/* Migraine Tracker — landing site. Dusk sky, beige pill, white cards (matches the app). */
:root {
  --sky-0: #231b4f;
  --sky-1: #2e2460;
  --sky-2: #4f3a80;
  --sky-3: #8a5a8e;
  --sky-4: #c9788a;
  --coral: #e88a70;
  --pill: #f3d9a6;
  --pill-ink: #3e3376;
  --ink: #241d45;
  --ink-2: #5b547a;
  --line: #e6e1ef;
  --bg: #f4f1f8;
  --card: #ffffff;
  --accent: #6b5bb5;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(36, 29, 69, .06), 0 10px 30px rgba(36, 29, 69, .08);
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--pill-ink); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; color: var(--ink); }
h2 { font-size: clamp(28px, 4.2vw, 42px); margin: 0 0 14px; }
h3 { font-size: 20px; margin: 0 0 6px; letter-spacing: -.01em; }
p { margin: 0 0 14px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.small { font-size: 14px; }
.muted { color: var(--ink-2); }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(35, 27, 79, .82);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand img { border-radius: 9px; }
.site-header nav { display: flex; gap: 4px; margin-left: auto; }
.site-header nav a { color: rgba(255, 255, 255, .82); text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: #fff; background: rgba(255, 255, 255, .1); }
.header-cta {
  background: var(--pill); color: var(--pill-ink); text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 9px 16px; border-radius: 999px; white-space: nowrap;
}
.header-cta:hover { color: var(--pill-ink); filter: brightness(1.04); }
@media (max-width: 640px) {
  .site-header nav { display: none; }
  .header-cta { margin-left: auto; }
}

/* ---------- buttons ---------- */
.store-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 24px;
  background: var(--pill); color: var(--pill-ink); font-weight: 700; font-size: 17px;
  border-radius: 999px; text-decoration: none; box-shadow: 0 8px 24px rgba(20, 10, 50, .25);
  transition: transform .15s ease, filter .15s ease;
}
.store-btn:hover { color: var(--pill-ink); filter: brightness(1.04); transform: translateY(-1px); }
.store-btn svg { flex: none; margin-top: -2px; }
.store-btn--light { box-shadow: none; }
.soon-badge {
  display: inline-flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 20px;
  border: 1.5px dashed rgba(255, 255, 255, .45); color: rgba(255, 255, 255, .85);
  border-radius: 999px; font-size: 15px; font-weight: 600;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% 115%, rgba(232, 138, 112, .55), transparent 60%),
    linear-gradient(180deg, var(--sky-0) 0%, var(--sky-1) 22%, var(--sky-2) 50%, var(--sky-3) 74%, var(--sky-4) 100%);
  padding: 64px 0 0;
}
.hero::before { /* faint stars */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 30% 8%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 52% 22%, #fff, transparent),
    radial-gradient(1px 1px at 70% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 88% 28%, #fff, transparent),
    radial-gradient(1px 1px at 8% 44%, #fff, transparent);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: end; }
.hero-copy { padding-bottom: 88px; position: relative; z-index: 3; }
.eyebrow {
  display: inline-block; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18);
  color: #fff; font-size: 14px; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { color: #fff; font-size: clamp(40px, 5.6vw, 62px); margin: 0 0 18px; letter-spacing: -.035em; }
.hero h1 .hl { background: var(--pill); color: var(--pill-ink); padding: 0 .18em; border-radius: .22em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero-lede { font-size: clamp(18px, 2vw, 21px); color: rgba(255, 255, 255, .88); max-width: 34em; margin-bottom: 28px; }
.hero-note { margin-top: 16px; font-size: 14px; color: rgba(255, 255, 255, .75); }
.hero-phones { position: relative; height: 600px; }
.phone {
  position: absolute; bottom: -40px; width: 260px; border-radius: 40px; overflow: hidden;
  box-shadow: 0 30px 60px rgba(20, 10, 50, .45), 0 0 0 8px rgba(18, 14, 38, .92), 0 0 0 9px rgba(255, 255, 255, .15);
  aspect-ratio: 1320 / 2868; background: #1a1530;
}
.phone img { width: 100%; height: 100%; object-fit: contain; }
.phone--front { right: 0; z-index: 2; }
.phone--back { right: 175px; bottom: -110px; transform: rotate(-6deg); }
.hero-wave { position: relative; display: block; width: 100%; height: 70px; margin-top: -1px; }

@media (max-width: 900px) {
  .hero { padding-top: 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .hero-copy { padding-bottom: 8px; text-align: left; }
  .hero-phones { height: 470px; }
  .phone { width: 230px; border-radius: 36px; }
  .phone--front { right: 50%; transform: translateX(78%); bottom: -60px; }
  .phone--back { right: 50%; transform: translateX(-8%) rotate(-6deg); bottom: -120px; }
}

/* ---------- availability ---------- */
.availability { margin-top: -36px; position: relative; z-index: 3; }
.avail-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 22px 26px;
}
.avail-card img { border-radius: 18px; }
.avail-card h2 { font-size: 22px; margin: 0 0 4px; }
.avail-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.avail-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.avail-actions .store-btn { box-shadow: none; }
.play-soon { font-size: 14px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.play-soon b { background: var(--bg); border: 1px solid var(--line); padding: 2px 10px; border-radius: 999px; font-weight: 600; }
@media (max-width: 760px) {
  .avail-card { grid-template-columns: auto 1fr; }
  .avail-actions { grid-column: 1 / -1; align-items: stretch; }
  .avail-actions .store-btn { justify-content: center; }
  .play-soon { justify-content: center; }
}

/* ---------- sections ---------- */
section { padding: 88px 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head p { color: var(--ink-2); font-size: 19px; }
.kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }

/* feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 28px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature:nth-child(even) .feature-media { order: -1; }
.feature-copy h3 { font-size: clamp(26px, 3.2vw, 34px); margin-bottom: 12px; letter-spacing: -.025em; }
.feature-copy p { color: var(--ink-2); font-size: 18px; }
.feature-copy ul { padding: 0; margin: 16px 0 0; list-style: none; }
.feature-copy li { position: relative; padding-left: 28px; margin: 8px 0; color: var(--ink); }
.feature-copy li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }
.feature-media { display: flex; justify-content: center; }
.shot {
  width: min(320px, 78vw); aspect-ratio: 1320 / 2868; border-radius: 40px; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-1), var(--sky-4)); box-shadow: var(--shadow), 0 0 0 1px var(--line);
}
.shot img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 820px) {
  section { padding: 64px 0; }
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature:nth-child(even) .feature-media { order: 0; }
}

/* gallery */
.gallery-section { background: linear-gradient(180deg, var(--bg), #ebe5f3); }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 250px); gap: 18px; overflow-x: auto; padding: 4px 4px 22px; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery .shot { width: 100%; border-radius: 30px; }
.gallery figcaption { font-size: 15px; font-weight: 600; margin-top: 10px; color: var(--ink); text-align: center; }
.ipad-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: center; margin-top: 56px; }
.ipad { border-radius: 26px; overflow: hidden; box-shadow: var(--shadow), 0 0 0 10px #1c1733; aspect-ratio: 2064 / 2752; max-width: 460px; justify-self: center; width: 100%; }
.ipad img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 820px) { .ipad-row { grid-template-columns: 1fr; } .ipad { max-width: 340px; } }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; padding: 0; list-style: none; margin: 0; }
.steps li { background: var(--card); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--pill); color: var(--pill-ink); font-weight: 800; margin-bottom: 14px;
}
.steps p { color: var(--ink-2); margin: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* benefit cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card p { color: var(--ink-2); margin: 0; font-size: 16px; }
.card .ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: #efeaf8; color: var(--accent); margin-bottom: 14px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* dusk band (privacy) */
.dusk-band { background: linear-gradient(135deg, var(--sky-1), var(--sky-3) 70%, var(--sky-4)); color: #fff; border-radius: 32px; padding: 48px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.dusk-band h2 { color: #fff; }
.dusk-band p { color: rgba(255, 255, 255, .86); }
.dusk-band ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.dusk-band li { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; padding: 14px 16px; font-size: 16px; }
@media (max-width: 820px) { .dusk-band { grid-template-columns: 1fr; padding: 30px 22px; border-radius: 26px; } }

/* guides */
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.guide-card { display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .15s ease; }
.guide-card:hover { transform: translateY(-2px); color: var(--ink); }
.guide-card h3 { font-size: 19px; }
.guide-card p { color: var(--ink-2); font-size: 15px; margin: 0 0 14px; }
.guide-card .more { margin-top: auto; color: var(--accent); font-weight: 600; font-size: 15px; }
@media (max-width: 900px) { .guide-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .guide-grid { grid-template-columns: 1fr; } }

/* faq */
.faq { max-width: 820px; }
.faq-item { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 12px; }
.faq-item summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 22px; font-weight: 650; font-size: 18px; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: 400; color: var(--accent); }
.faq-item[open] summary::after { content: "–"; }
.faq-a { padding: 0 22px 18px; color: var(--ink-2); }
.faq-a p:last-child { margin: 0; }

/* final cta */
.final { text-align: center; color: #fff; background: linear-gradient(180deg, var(--sky-1), var(--sky-3) 65%, var(--coral)); }
.final h2 { color: #fff; }
.final p { color: rgba(255, 255, 255, .86); font-size: 19px; max-width: 34em; margin: 0 auto 26px; }
.final img { margin: 0 auto 22px; border-radius: 22px; box-shadow: 0 16px 40px rgba(0, 0, 0, .3); }
.final .btn-row { justify-content: center; }

/* footer */
.site-footer { background: var(--sky-0); color: rgba(255, 255, 255, .78); padding: 56px 0 28px; font-size: 15px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-h { color: #fff; font-weight: 700; margin-bottom: 12px; }
.site-footer .muted { color: rgba(255, 255, 255, .55); }
.site-footer .brand { margin-bottom: 12px; }
.footer-legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .5); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- article / guide pages ---------- */
.crumbs { padding-top: 18px; font-size: 14px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; color: var(--ink-2); }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: #a39bbd; }
.crumbs a { color: var(--ink-2); }
.article-hero { padding-top: 28px; padding-bottom: 8px; }
.article-hero h1 { font-size: clamp(34px, 5vw, 50px); margin: 6px 0 14px; letter-spacing: -.03em; }
.article-hero .lede { font-size: 20px; color: var(--ink-2); max-width: 40em; }
.meta-line { font-size: 14px; color: var(--ink-2); }
.article { padding-top: 20px; padding-bottom: 72px; }
.article-grid { display: grid; grid-template-columns: minmax(0, 720px) 1fr; gap: 56px; }
.prose h2 { font-size: 28px; margin: 40px 0 12px; }
.prose h3 { margin: 26px 0 8px; }
.prose p, .prose li { font-size: 18px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 16px; background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: #efeaf8; font-weight: 700; }
.table-scroll { overflow-x: auto; }
.answer { background: var(--card); border-left: 5px solid var(--pill); border-radius: 16px; padding: 18px 22px; box-shadow: var(--shadow); font-size: 19px !important; }
.note { background: #fbf3e4; border-radius: 16px; padding: 16px 20px; font-size: 16px !important; color: #5a4a2a; }
.figure { margin: 28px 0; display: flex; flex-direction: column; align-items: center; }
.figure .shot { width: min(280px, 70vw); }
.figure figcaption { font-size: 15px; color: var(--ink-2); margin-top: 10px; text-align: center; }
.cta-card { display: grid; grid-template-columns: auto 1fr; gap: 18px; background: linear-gradient(135deg, var(--sky-1), var(--sky-3)); color: #fff; border-radius: 24px; padding: 24px; margin: 36px 0; }
.cta-card img { border-radius: 16px; }
.cta-card p { color: rgba(255, 255, 255, .86); font-size: 16px !important; }
.cta-card .cta-title { color: #fff; font-weight: 750; font-size: 20px !important; margin-bottom: 6px; }
.cta-card .store-btn { min-height: 48px; font-size: 16px; }
@media (max-width: 520px) { .cta-card { grid-template-columns: 1fr; } }
.aside-sticky { position: sticky; top: 86px; display: grid; gap: 14px; }
.aside-box { background: var(--card); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); font-size: 15px; }
.aside-box p.h { font-weight: 700; margin-bottom: 8px; }
.aside-box ul { margin: 0; padding-left: 1.1em; }
.aside-box li { margin: 5px 0; }
.related { padding-top: 8px; }
.related h2 { font-size: 26px; }
@media (max-width: 960px) { .article-grid { grid-template-columns: minmax(0, 1fr); } .aside-sticky { position: static; } }

.legal h2 { font-size: 24px; }
.not-found { text-align: center; padding-top: 100px; padding-bottom: 100px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
