/* ══════════════════════════════════════════════════════════
   Bipolar Mood Tracker — Marketing Website Styles
   ══════════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  --color-primary: #179999;
  --color-primary-dark: #147878;
  --color-primary-light: #29A3A3;
  --color-primary-bg: rgba(23, 153, 153, 0.08);
  --color-text: #424242;
  --color-text-secondary: #666666;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F2F2F2;
  --color-footer-bg: #2D2D2D;
  --color-star: #FFB300;
  --color-border: #E0E0E0;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1140px;
  --header-height: 72px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.07);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-header: 0 2px 12px rgba(0, 0, 0, 0.08);
  --transition: 0.25s ease;
}

/* ── Reset & Base ───────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
}

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  color: var(--color-text);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: 48px;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 36px;
  letter-spacing: -0.3px;
}

h3 {
  font-size: 22px;
}

p {
  color: var(--color-text-secondary);
}

/* ── Utility ────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 100px;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  border: none;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
  box-shadow: 0 4px 16px rgba(23, 153, 153, 0.3);
}

.btn-white {
  background: #fff;
  color: var(--color-primary);
}

.btn-white:hover {
  background: #f0f0f0;
  color: var(--color-primary-dark);
}

/* ── Store Badges ───────────────────────────────────────── */
.store-badges {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.store-badges a {
  display: inline-flex;
  transition: transform var(--transition), opacity var(--transition);
}

.store-badges a:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.store-badges img {
  height: 44px;
  width: auto;
}

/* ══════════════════════════════════════════════════════════
   1. HEADER
   ══════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-header);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: 18px;
}

.header-logo img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--color-text);
  font-size: 15px;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--color-primary);
}

.header-cta {
  margin-left: 8px;
  background: #fff;
  color: var(--color-primary);
}

.nav-links .header-cta:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

.site-header.scrolled .header-cta {
  background: var(--color-primary);
  color: #fff;
}

.site-header.scrolled .nav-links .header-cta:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ══════════════════════════════════════════════════════════
   2. HERO
   ══════════════════════════════════════════════════════════ */
.hero {
  padding-top: calc(var(--header-height) + 64px);
  padding-bottom: 80px;
  background: linear-gradient(170deg, #f8fffe 0%, #ffffff 50%, #f2f2f2 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.hero-content h1 {
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 18px;
  margin-bottom: 28px;
  max-width: 480px;
}

.hero-stars {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.hero-stars .stars {
  color: var(--color-star);
  font-size: 20px;
  letter-spacing: 2px;
}

.hero-stars span:last-child {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-mockup {
  width: 320px;
  max-width: 100%;
  border-radius: 24px;
  animation: heroFloat 4s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Placeholder image styling */
.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f5f5, #d0eded);
  border: 2px dashed var(--color-primary);
  border-radius: var(--radius);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  padding: 24px;
}

.hero-mockup-placeholder {
  width: 320px;
  height: 560px;
  border-radius: 24px;
  animation: heroFloat 4s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════════════
   3. SOCIAL PROOF STRIP
   ══════════════════════════════════════════════════════════ */
.social-proof {
  background: var(--color-primary-bg);
  border-top: 1px solid rgba(23, 153, 153, 0.1);
  border-bottom: 1px solid rgba(23, 153, 153, 0.1);
  padding: 28px 0;
}

.proof-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.proof-icon {
  font-size: 22px;
}

/* ══════════════════════════════════════════════════════════
   4. CORE FEATURES — ALTERNATING BLOCKS
   ══════════════════════════════════════════════════════════ */
.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 80px;
}

.feature-block:last-child {
  margin-bottom: 0;
}

.feature-block.reverse .feature-image {
  order: 2;
}

.feature-block.reverse .feature-text {
  order: 1;
}

.feature-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.feature-screenshot {
  width: 100%;
  max-width: 240px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.feature-image-placeholder {
  width: 100%;
  height: 400px;
  border-radius: var(--radius);
}

.feature-text h2 {
  margin-bottom: 16px;
}

.feature-text p {
  margin-bottom: 20px;
  font-size: 17px;
}

.feature-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
}

.feature-bullets li::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--color-primary-bg);
  color: var(--color-primary);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   5. FEATURE GRID
   ══════════════════════════════════════════════════════════ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.feature-card-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.feature-card h3 {
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 15px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════
   6. PRIVACY
   ══════════════════════════════════════════════════════════ */
.privacy-section {
  background: var(--color-bg-alt);
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.privacy-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--color-border);
}

.privacy-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.privacy-card h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.privacy-card p {
  font-size: 15px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════
   7. REVIEWS
   ══════════════════════════════════════════════════════════ */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.review-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.review-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.review-stars {
  color: var(--color-star);
  font-size: 16px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.review-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.review-card p {
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 14px;
}

.review-source {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

/* ══════════════════════════════════════════════════════════
   8. HOW IT WORKS
   ══════════════════════════════════════════════════════════ */
.how-it-works {
  background: var(--color-bg-alt);
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

/* Connecting line */
.steps-row::before {
  content: '';
  position: absolute;
  top: 36px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 28px;
  font-weight: 700;
}

.step h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.step p {
  font-size: 14px;
}

/* ══════════════════════════════════════════════════════════
   9. DOWNLOAD CTA
   ══════════════════════════════════════════════════════════ */
.download-cta {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 80px 0;
}

.download-cta h2 {
  color: #fff;
  margin-bottom: 16px;
}

.download-cta p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.download-cta .store-badges {
  justify-content: center;
  margin-bottom: 16px;
}

.download-cta .download-note {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* ══════════════════════════════════════════════════════════
   10. FOOTER
   ══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--color-footer-bg);
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 0 24px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.footer-brand span {
  font-weight: 600;
  color: #fff;
  font-size: 16px;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 1.6;
}

.footer-col h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  margin-bottom: 24px;
}

.footer-disclaimer p {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  line-height: 1.6;
  max-width: 720px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}

/* ══════════════════════════════════════════════════════════
   SUPPORT MODAL
   ══════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 40px 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--color-text-secondary);
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--color-text);
}

.modal-card h3 {
  margin-bottom: 12px;
}

.modal-card p {
  margin-bottom: 24px;
  font-size: 16px;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */

/* ── Tablet (max 1024px) ───────────────────────────────── */
@media (max-width: 1024px) {
  h1 { font-size: 38px; }
  h2 { font-size: 30px; }
  .section { padding: 72px 0; }

  .hero-grid {
    gap: 32px;
  }

  .feature-block {
    gap: 40px;
    margin-bottom: 64px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Mobile (max 768px) ────────────────────────────────── */
@media (max-width: 768px) {
  body { font-size: 16px; }
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  h3 { font-size: 18px; }
  .section { padding: 56px 0; }
  .section-header { margin-bottom: 36px; }

  /* Header mobile */
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--color-bg);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 40px;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 16px 24px;
    font-size: 18px;
  }

  .header-cta {
    margin-left: 0;
    margin-top: 8px;
  }

  /* Hero mobile */
  .hero {
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 48px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content p {
    max-width: 100%;
  }

  .hero-stars {
    justify-content: center;
  }

  .hero .store-badges {
    justify-content: center;
  }

  .hero-visual {
    order: unset;
  }

  .hero-mockup,
  .hero-mockup-placeholder {
    width: 240px;
    height: auto;
  }

  .hero-mockup-placeholder {
    height: 420px;
  }

  /* Social proof mobile */
  .proof-grid {
    gap: 20px;
  }

  .proof-item {
    font-size: 13px;
  }

  /* Feature blocks mobile */
  .feature-block {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 48px;
  }

  .feature-block.reverse .feature-image,
  .feature-block.reverse .feature-text {
    order: unset;
  }

  .feature-image-placeholder {
    height: 280px;
  }

  /* Feature grid mobile */
  .feature-grid {
    grid-template-columns: 1fr;
  }

  /* Privacy mobile */
  .privacy-grid {
    grid-template-columns: 1fr;
  }

  /* Reviews mobile */
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  /* Steps mobile */
  .steps-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
  }

  .steps-row::before {
    display: none;
  }

  .step-number {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }

  /* Download CTA mobile */
  .download-cta {
    padding: 56px 0;
  }

  /* Footer mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ── Small mobile (max 480px) ──────────────────────────── */
@media (max-width: 480px) {
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  .container { padding: 0 16px; }

  .store-badges {
    flex-direction: column;
    align-items: center;
  }

  .proof-grid {
    flex-direction: column;
    gap: 14px;
  }

  .steps-row {
    grid-template-columns: 1fr;
  }
}
