/* Nudge — ADHD-Friendly Habit Tracker Website
   Custom styles for Liquid Glass aesthetic + warm time-of-day theming */

/* Self-hosted Inter — removes Google Fonts CDN (privacy + perf win) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Inter-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/Inter-ExtraBold.woff2') format('woff2');
}

:root {
  /* Brand colors — inspired by Nudge's time-of-day theming */
  --color-morning: #f59e0b;      /* warm amber */
  --color-morning-soft: #fde68a;
  --color-afternoon: #0ea5e9;    /* bright sky */
  --color-evening: #6366f1;      /* deep indigo */
  --color-comeback: #f97316;     /* orange accent */

  /* Tier colors */
  --tier-seed: #84cc16;
  --tier-sprout: #22c55e;
  --tier-flower: #ec4899;
  --tier-bloom: #f59e0b;

  /* Neutrals */
  --bg: #fafaf9;
  --bg-elevated: #ffffff;
  --ink: #0c0a09;
  --ink-soft: #44403c;
  --ink-muted: #78716c;
  --border: rgba(12, 10, 9, 0.08);

  /* Surfaces */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.35);
  --glass-shadow: 0 20px 60px -15px rgba(12, 10, 9, 0.12);

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Radii */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Warm umber instead of pure near-black — matches Nudge's amber brand
       and keeps the ambient gradient from looking muddy. */
    --bg: #1c1710;
    --bg-elevated: #2b2419;
    --ink: #fef7eb;
    --ink-soft: #e7dfd1;
    --ink-muted: #a8a196;
    --border: rgba(254, 247, 235, 0.12);
    --glass-bg: rgba(43, 36, 25, 0.72);
    --glass-border: rgba(254, 247, 235, 0.10);
    --glass-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.5);
  }

  /* Boost ambient warmth in dark mode so the gradient feels intentional
     instead of a washed-out overlay. */
  body::before {
    background:
      radial-gradient(ellipse at top left, rgba(245, 158, 11, 0.28), transparent 55%),
      radial-gradient(ellipse at top right, rgba(99, 102, 241, 0.18), transparent 55%),
      radial-gradient(ellipse at bottom center, rgba(236, 72, 153, 0.14), transparent 55%);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

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

/* Ambient background — warm time-of-day gradient */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at top left, rgba(245, 158, 11, 0.12), transparent 50%),
    radial-gradient(ellipse at top right, rgba(99, 102, 241, 0.08), transparent 50%),
    radial-gradient(ellipse at bottom center, rgba(236, 72, 153, 0.06), transparent 50%);
  pointer-events: none;
}

/* Noise texture for depth */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

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

a { color: inherit; text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

/* ============================================
   Layout
   ============================================ */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }
@media (max-width: 768px) { section { padding: 64px 0; } }

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
}

h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 8px;
}

p { color: var(--ink-soft); }

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-morning);
  margin-bottom: 12px;
}

.lede {
  font-size: 1.25rem;
  color: var(--ink-muted);
  line-height: 1.5;
  max-width: 640px;
}

.section-header { text-align: center; margin-bottom: 64px; }
.section-header .lede { margin: 16px auto 0; }

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: var(--glass-bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.nav-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-morning), var(--color-comeback));
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  box-shadow: 0 4px 12px -2px rgba(245, 158, 11, 0.4);
}

.nav-links a {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.nav-links a:hover { color: var(--ink); opacity: 1; }

/* Nav disclosure (mobile hamburger → drawer; desktop flat row) */
.nav-disclosure { position: relative; }

.nav-toggle {
  list-style: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-disclosure[open] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-disclosure[open] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-disclosure[open] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-links ul {
  list-style: none;
}

@media (max-width: 768px) {
  .nav-disclosure .nav-links {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 240px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
  }
  .nav-disclosure .nav-links ul { display: grid; gap: 8px; }
  .nav-disclosure .nav-links a { display: block; padding: 10px 0; font-size: 1rem; }
  .nav-cta-item { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--border); }
  .nav-cta-item .btn { width: 100%; justify-content: center; }
}

@media (min-width: 769px) {
  .nav-toggle { display: none; }
  .nav-disclosure .nav-links {
    display: block !important;
    position: static;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
  }
  .nav-disclosure .nav-links ul {
    display: flex;
    gap: 32px;
    align-items: center;
  }
  .nav-cta-item { margin-left: auto; }
}

/* Skip link — keyboard-only nav helper (WCAG 2.4.1 Level A) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  border-radius: 8px;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus {
  left: 12px;
  outline: 3px solid var(--color-morning);
  outline-offset: 2px;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 8px 24px -8px rgba(12, 10, 9, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(12, 10, 9, 0.45);
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  opacity: 1;
}

.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-sm { padding: 10px 18px; font-size: 0.875rem; }

/* App Store button */
.btn-appstore {
  background: var(--ink);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  box-shadow: 0 8px 24px -8px rgba(12, 10, 9, 0.35);
  transition: transform 0.15s;
}

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

.btn-appstore-sub {
  font-size: 0.6875rem;
  line-height: 1;
  opacity: 0.75;
  font-weight: 500;
}
.btn-appstore-main { font-size: 1.125rem; line-height: 1.1; }

/* ============================================
   Hero
   ============================================ */

.hero {
  padding: 80px 0 96px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-morning);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  max-width: 14ch;
  margin: 0 auto 24px;
}

.hero-gradient-text {
  background: linear-gradient(135deg, var(--color-morning), var(--color-comeback) 40%, var(--color-flower, #ec4899) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  max-width: 600px;
  margin: 0 auto 40px;
  font-size: 1.25rem;
  color: var(--ink-muted);
}

.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero-note {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-top: 8px;
}

.hero-visual {
  margin-top: 80px;
  display: grid;
  place-items: center;
  position: relative;
}

.phone-frame {
  width: min(320px, 80%);
  aspect-ratio: 9 / 19.5;
  background: linear-gradient(165deg, #1c1917 0%, #292524 100%);
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 50px 100px -20px rgba(12, 10, 9, 0.3),
    0 0 0 2px rgba(255, 255, 255, 0.05) inset,
    0 30px 60px -30px var(--color-morning);
  position: relative;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 34px;
  background: linear-gradient(180deg, #fff8ec 0%, #ffeed4 50%, #ffe0b8 100%);
  overflow: hidden;
  padding: 44px 18px 18px;
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 26px;
  background: #0c0a09;
  border-radius: 999px;
  z-index: 2;
}

.phone-header { margin-bottom: 18px; }
.phone-greeting { font-size: 0.75rem; color: #92400e; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.phone-title { font-size: 1.25rem; font-weight: 700; color: #0c0a09; margin-top: 2px; }

.habit-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px -4px rgba(120, 53, 15, 0.15);
}

.habit-emoji { font-size: 1.5rem; }
.habit-info { flex: 1; }
.habit-name { font-size: 0.875rem; font-weight: 600; color: #0c0a09; }
.habit-tier { font-size: 0.6875rem; color: #92400e; margin-top: 2px; }

.habit-tier-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  color: #92400e;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.habit-card.complete .habit-tier-badge {
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
}

/* ============================================
   Features Grid
   ============================================ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.feature-icon-morning { background: linear-gradient(135deg, #fde68a, #f59e0b); }
.feature-icon-sky { background: linear-gradient(135deg, #bae6fd, #0ea5e9); }
.feature-icon-indigo { background: linear-gradient(135deg, #c7d2fe, #6366f1); }
.feature-icon-rose { background: linear-gradient(135deg, #fbcfe8, #ec4899); }
.feature-icon-green { background: linear-gradient(135deg, #bbf7d0, #22c55e); }
.feature-icon-orange { background: linear-gradient(135deg, #fed7aa, #f97316); }

.feature-card h3 { margin-bottom: 10px; font-size: 1.25rem; }
.feature-card p { font-size: 0.9375rem; color: var(--ink-muted); line-height: 1.55; }

/* ============================================
   How It Works
   ============================================ */

.steps {
  display: grid;
  gap: 48px;
  max-width: 880px;
  margin: 0 auto;
}

.step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: flex-start;
}

.step-num {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-morning), var(--color-comeback));
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  box-shadow: 0 8px 24px -8px rgba(245, 158, 11, 0.4);
}

.step-body h3 { font-size: 1.5rem; margin-bottom: 8px; }
.step-body p { font-size: 1.0625rem; color: var(--ink-muted); line-height: 1.6; }

@media (max-width: 600px) {
  .step { grid-template-columns: 1fr; gap: 12px; }
  .step-num { width: 48px; height: 48px; font-size: 1.125rem; }
}

/* ============================================
   Tiers Section
   ============================================ */

.tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
}

.tier-card {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  backdrop-filter: blur(20px);
}

.tier-emoji { font-size: 3rem; margin-bottom: 12px; line-height: 1; }
.tier-name { font-weight: 700; font-size: 1.125rem; margin-bottom: 4px; }
.tier-range { font-size: 0.8125rem; color: var(--ink-muted); font-weight: 500; margin-bottom: 12px; }
.tier-quote { font-size: 0.9375rem; font-style: italic; color: var(--ink-soft); line-height: 1.5; }

/* ============================================
   Pricing
   ============================================ */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}

.price-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  position: relative;
}

.price-card.featured {
  background: linear-gradient(180deg, var(--ink) 0%, #292524 100%);
  color: var(--bg);
  border: none;
  box-shadow: 0 40px 80px -20px rgba(12, 10, 9, 0.4);
  padding: 44px 32px;
}

.price-card.featured h3,
.price-card.featured .price-amount { color: var(--bg); }

.price-card.featured p,
.price-card.featured .price-period { color: rgba(250, 250, 249, 0.7); }

.price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--color-morning), var(--color-comeback));
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.price-card h3 { font-size: 1.375rem; margin-bottom: 6px; }
.price-card-sub { font-size: 0.9375rem; margin-bottom: 28px; color: var(--ink-muted); }

.price-value { display: flex; align-items: baseline; gap: 8px; margin-bottom: 28px; }
.price-amount { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; }
.price-period { font-size: 1rem; color: var(--ink-muted); }

.price-list { list-style: none; margin-bottom: 32px; }
.price-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.9375rem;
}

.price-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 2px;
}

.price-card.featured .price-check { background: rgba(245, 158, 11, 0.2); color: var(--color-morning); }

.price-card .btn { width: 100%; justify-content: center; }

.price-card.featured .btn-primary {
  background: var(--bg);
  color: var(--ink);
}

/* ============================================
   FAQ
   ============================================ */

.faq-list { max-width: 720px; margin: 0 auto; display: grid; gap: 12px; }

.faq-item {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(20px);
  transition: background 0.2s;
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-toggle {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  display: grid;
  place-items: center;
  font-size: 0.875rem;
  transition: transform 0.3s, background 0.2s;
}

.faq-item[open] .faq-toggle { transform: rotate(45deg); background: var(--color-morning); color: white; }

.faq-answer {
  padding: 0 24px 20px;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

.faq-answer p + p { margin-top: 12px; }

/* ============================================
   CTA Banner
   ============================================ */

.cta-banner {
  /* Dark warm-amber gradient is part of the CTA's identity — independent of theme.
     Hard-code inner colors so the banner looks the same in light + dark mode. */
  background: linear-gradient(135deg, #2b2419 0%, #1a1308 100%);
  color: #fef7eb;
  border-radius: var(--radius-xl);
  padding: 64px 48px;
  text-align: center;
  margin: 64px 0;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 30px 80px -20px rgba(245, 158, 11, 0.35),
    0 0 0 1px rgba(245, 158, 11, 0.12) inset;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 0%, rgba(245, 158, 11, 0.45), transparent 55%),
    radial-gradient(circle at 80% 100%, rgba(249, 115, 22, 0.25), transparent 50%);
}

.cta-banner > * { position: relative; z-index: 1; }

.cta-banner h2 {
  color: #fef7eb;
  max-width: 18ch;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #fef7eb 0%, #fde68a 50%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cta-banner p {
  color: rgba(254, 247, 235, 0.85);
  max-width: 520px;
  margin: 0 auto 32px;
}

.cta-banner .btn-primary {
  /* Solid warm-amber button pops against the dark banner in both themes */
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  color: #1a1308;
  box-shadow: 0 8px 24px -6px rgba(251, 191, 36, 0.5);
}
.cta-banner .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -6px rgba(251, 191, 36, 0.6);
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a { font-size: 0.9375rem; color: var(--ink-soft); }

.footer-tagline { color: var(--ink-muted); font-size: 0.9375rem; max-width: 32ch; margin-top: 12px; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--ink-muted);
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Content Pages (Privacy / Terms / Support)
   ============================================ */

.page-header {
  padding: 80px 0 48px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 64px;
}

.page-header h1 {
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  margin-bottom: 12px;
}

.page-header-meta {
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.prose {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 96px;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 48px;
  margin-bottom: 16px;
}

.prose h2:first-child { margin-top: 0; }

.prose h3 {
  font-size: 1.125rem;
  margin-top: 28px;
  margin-bottom: 10px;
  font-weight: 600;
}

.prose p {
  margin-bottom: 16px;
  color: var(--ink-soft);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.prose ul, .prose ol {
  margin-bottom: 16px;
  padding-left: 24px;
  color: var(--ink-soft);
}

.prose li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.prose strong { color: var(--ink); font-weight: 600; }

.prose a {
  color: var(--color-morning);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* Support-specific */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 32px 0 64px;
}

.contact-card {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  backdrop-filter: blur(20px);
}

.contact-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.contact-card h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.contact-card p { font-size: 0.9375rem; color: var(--ink-muted); margin-bottom: 16px; }

/* ============================================
   Utilities
   ============================================ */

.text-center { text-align: center; }
.hidden-mobile { display: initial; }
.visible-mobile { display: none; }

@media (max-width: 768px) {
  .hidden-mobile { display: none; }
  .visible-mobile { display: initial; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .phone-frame { animation: none; opacity: 1; transform: none; }
}

/* Keyboard focus rings — only visible to keyboard users */
:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--color-morning);
  outline-offset: 3px;
  border-radius: inherit;
}

.btn-primary:focus-visible {
  outline-color: var(--color-morning-soft);
  outline-offset: 4px;
}

.faq-question:focus-visible,
.nav-logo:focus-visible,
.nav-toggle:focus-visible {
  outline-offset: 4px;
  border-radius: 8px;
}

/* Windows / macOS high-contrast mode — keep text readable */
@media (forced-colors: active) {
  .hero-gradient-text,
  .price-amount,
  .btn {
    color: CanvasText !important;
    -webkit-text-fill-color: CanvasText !important;
    background: transparent !important;
  }
  .btn { border: 1px solid CanvasText !important; }
  .feature-card,
  .price-card,
  .faq-item { border: 1px solid CanvasText; }
}

/* Hero phone subtle entrance (respects reduced motion above) */
@keyframes phoneRise {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.phone-frame {
  animation: phoneRise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
}

/* Back-to-top floating FAB (legal/support pages) */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 24px -8px rgba(12, 10, 9, 0.4);
  z-index: 40;
  transition: transform 0.2s, opacity 0.2s;
}
.back-to-top:hover {
  transform: translateY(-2px);
  opacity: 1;
}
@media (max-width: 480px) {
  .back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }
}

/* ============================================
   Today-screen phone mockup — replicates real app
   ============================================ */

.phone-screen {
  /* Override earlier padding for denser Today layout */
  padding: 48px 14px 14px;
}

.phone-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.phone-fullday-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #78716c;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(120, 113, 108, 0.15);
  padding: 4px 10px;
  border-radius: 999px;
}

.phone-today {
  font-size: 1.625rem;
  font-weight: 800;
  color: #0c0a09;
  margin: 6px 0 12px;
  letter-spacing: -0.02em;
}

.phone-greeting-card {
  background: rgba(255, 236, 204, 0.85);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.phone-greeting-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0c0a09;
  line-height: 1.25;
  margin: 0;
}

.phone-comeback-line {
  font-size: 0.75rem;
  font-weight: 600;
  color: #c2410c;
  margin: 6px 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.phone-comeback-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  background: #6366f1;
  color: white;
  border-radius: 4px;
  font-size: 0.625rem;
}

.phone-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0c0a09;
}

.phone-progress-text { color: #0c0a09; }

.phone-comeback-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: #c2410c;
  font-size: 0.6875rem;
  font-weight: 700;
}

.phone-progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(120, 113, 108, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.phone-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  border-radius: 999px;
}

.phone-timeline {
  position: relative;
  height: 36px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.25) 0%, rgba(251, 191, 36, 0.25) 45%, rgba(186, 230, 253, 0.4) 50%, rgba(186, 230, 253, 0.4) 100%);
  border-radius: 10px;
}

.phone-timeline-marker {
  position: absolute;
  bottom: 3px;
  font-size: 0.625rem;
  color: #78716c;
  font-weight: 600;
  transform: translateX(-50%);
}

.phone-timeline-icon {
  position: absolute;
  top: 4px;
  font-size: 0.875rem;
  transform: translateX(-50%);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}

.phone-timeline-now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ef4444;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.phone-timeline-now::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
}

.phone-block-collapsed,
.phone-block-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  margin-bottom: 10px;
  font-size: 0.8125rem;
}

.phone-block-header {
  background: transparent;
  padding: 6px 4px;
  margin-bottom: 6px;
}

.phone-block-icon { font-size: 1rem; }
.phone-block-icon-bright { font-size: 1rem; }
.phone-block-name { color: #0c0a09; font-weight: 600; flex: 1; }
.phone-block-name-bold { color: #0c0a09; font-weight: 700; font-size: 0.9375rem; }
.phone-block-count { color: #78716c; font-size: 0.75rem; }
.phone-block-chev { color: #a8a29e; font-size: 1rem; line-height: 1; }

.habit-card-today {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px -6px rgba(120, 53, 15, 0.12);
}

.habit-card-today .habit-emoji { font-size: 1.5rem; line-height: 1; }
.habit-card-today .habit-name { font-size: 0.9375rem; font-weight: 700; color: #0c0a09; }
.habit-card-today .habit-meta {
  font-size: 0.6875rem;
  color: #78716c;
  margin-top: 2px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.habit-card-today .habit-tier-inline { font-size: 0.75rem; }
.habit-card-today .habit-micro { color: #78716c; }

.habit-check-circle {
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(120, 113, 108, 0.35);
  border-radius: 50%;
  flex-shrink: 0;
}

.phone-upnext {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 237, 213, 0.6);
  margin-bottom: 12px;
  font-size: 0.75rem;
}

.phone-upnext-icon { font-size: 0.9375rem; }
.phone-upnext-text { color: #0c0a09; font-weight: 600; flex: 1; }
.phone-upnext-count { color: #a8a29e; }

.phone-tabbar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border-radius: 999px;
  padding: 8px 4px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  box-shadow: 0 8px 24px -8px rgba(120, 53, 15, 0.15);
}

.phone-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 2px;
  border-radius: 999px;
}

.phone-tab-icon { font-size: 0.9375rem; line-height: 1; opacity: 0.45; }
.phone-tab-label { font-size: 0.5625rem; font-weight: 600; color: #78716c; }

.phone-tab.active .phone-tab-icon { opacity: 1; }
.phone-tab.active .phone-tab-label { color: #2563eb; font-weight: 700; }

/* ============================================
   Pricing — 3 tiers + free banner
   ============================================ */

.free-banner {
  max-width: 880px;
  margin: 0 auto 32px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(132, 204, 22, 0.06));
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}

.free-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.free-banner-left { flex: 1; min-width: 220px; }

.free-banner-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #16a34a;
  background: rgba(34, 197, 94, 0.14);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.free-banner-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.free-banner-meta {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* 3-column pricing grid */
.pricing-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
  align-items: stretch;
}

@media (max-width: 1080px) {
  .pricing-grid-3 { grid-template-columns: 1fr; max-width: 480px; }
  .price-card.featured { transform: none; padding: 40px 32px; }
}

.pricing-grid-3 .price-card {
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
}

.pricing-grid-3 .price-list { flex: 1; }

.price-subnote {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin-top: -16px;
  margin-bottom: 24px;
}

.price-card.featured .price-subnote { color: rgba(250, 250, 249, 0.65); }

/* Lifetime card — gold accent */
.price-card-lifetime {
  background: linear-gradient(165deg, rgba(251, 191, 36, 0.08), rgba(245, 158, 11, 0.04));
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.price-badge-gold {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #7c2d12;
}

/* Subscription disclosure */
.pricing-disclosure {
  max-width: 720px;
  margin: 40px auto 0;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.6;
  text-align: center;
}

.pricing-disclosure p { margin-bottom: 8px; font-size: 0.8125rem; }
.pricing-disclosure a { color: var(--color-morning); text-decoration: underline; text-underline-offset: 2px; }
.pricing-disclosure strong { color: var(--ink); }
