/* thyroidcoach.app: one stylesheet for the landing page, the guides and the
   policy pages. Light only, like the app. Colours are the app's (ThyroidCoach/Theme/Theme.swift); the
   hero's pinks are sampled from the product page header so the two meet
   without a seam. */

:root {
  color-scheme: light;
  --bg: #fbf5f4;
  --surface: #ffffff;
  --ink: #3a0d24;
  --ink-2: #6e4a5b;
  --ink-3: #83606f;
  --rose: #b82e6b;
  --on-rose: #ffffff;
  --amber: #a85f12;
  --brick: #bd4742;
  --hairline: rgba(58, 13, 36, 0.12);
  --shadow: 0 1px 2px rgba(58, 13, 36, 0.06), 0 14px 36px rgba(58, 13, 36, 0.10);

  /* The sunrise: fixed in both themes, like a photo. */
  --sun-ink: #3a0d24;
  --sun-top: #d16e8f;
  --sun-mid: #e99f9e;
  --sun-low: #fdd9b8;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --max: 1120px;
  --measure: 700px;
  --gutter: 20px;
}


* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rose); text-underline-offset: 0.16em; text-decoration-thickness: from-font; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 10px; }
.skip:focus { left: 12px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--hairline);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; height: 56px;
  padding: 0 max(var(--gutter), env(safe-area-inset-left));
  display: flex; align-items: center; gap: 22px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; margin-right: auto;
  color: var(--ink); text-decoration: none; font-weight: 650; font-size: 17px; letter-spacing: -0.01em;
}
.brand img { width: 28px; height: 28px; border-radius: 22.5%; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 12px 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-cta {
  position: relative;
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 999px;
  background: var(--rose); color: var(--on-rose); text-decoration: none; font-size: 15px; font-weight: 600;
}
.nav-cta::before { content: ""; position: absolute; inset: -4px; }
.nav-cta:hover { filter: brightness(1.06); }
@media (max-width: 520px) { .nav-links a.wide { display: none; } }

/* Shared section rhythm */
.section { padding: clamp(60px, 7.5vw, 96px) var(--gutter); }
.section-head { max-width: 720px; margin: 0 auto; text-align: center; }
.section h2 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.06; font-weight: 750; letter-spacing: -0.03em; }
.section-sub { margin-top: 14px; color: var(--ink-2); font-size: 19px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }

.badge { display: inline-block; border-radius: 12px; }
.badge img { height: 54px; width: auto; }

/* Hero: copy on a light morning sky; the header's three tiles glow out of
   it. The header's own deep pink edges are masked away so the page stays as
   light as the app. */
.hero {
  color: var(--sun-ink); text-align: center;
  background:
    /* the icon's orchid, high on the left */
    radial-gradient(48% 46% at 6% 4%, rgba(234, 122, 255, 0.20) 0%, rgba(234, 122, 255, 0) 72%),
    /* rose, high on the right */
    radial-gradient(44% 46% at 96% 10%, rgba(255, 141, 186, 0.26) 0%, rgba(255, 141, 186, 0) 72%),
    linear-gradient(180deg, #fdf3f7 0%, #fcedf2 100%);
}
.hero .eyebrow { color: var(--rose); }
.hero-copy { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; padding: clamp(48px, 6.5vw, 84px) var(--gutter) 0; }
.hero h1 { font-size: clamp(40px, 6.6vw, 72px); line-height: 1.02; font-weight: 800; letter-spacing: -0.035em; }
.hero .lede { margin: 22px auto 0; max-width: 620px; font-size: clamp(18px, 2.1vw, 21px); line-height: 1.5; color: var(--ink-2); }
.hero .cta-row { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero .cta-note { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.hero-art-wrap {
  margin-top: clamp(-48px, -3vw, -8px); padding-bottom: clamp(32px, 5vw, 72px);
  background: linear-gradient(180deg,
    rgba(240, 167, 158, 0) 0%,
    rgba(240, 167, 158, 0.55) 22%,
    #f2aea1 40%,
    #f6b8a5 56%,
    #fac6aa 70%,
    #fcdcc4 84%,
    var(--bg) 100%);
}
.hero-art {
  width: 100%;
  aspect-ratio: 2.6; object-fit: cover; object-position: 50% 62%;
  /* A soft band, faded on all four sides: the tiles sit in the warm middle
     and the header's deeper pinks melt into the sky. */
  -webkit-mask-image:
    linear-gradient(180deg, transparent 6%, #000 38%, #000 78%, transparent 100%),
    linear-gradient(90deg, transparent 4%, #000 26%, #000 74%, transparent 96%);
  mask-image:
    linear-gradient(180deg, transparent 6%, #000 38%, #000 78%, transparent 100%),
    linear-gradient(90deg, transparent 4%, #000 26%, #000 74%, transparent 96%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
@media (max-width: 760px) {
  .hero-art {
    aspect-ratio: 1.3; object-position: 50% 58%;
    -webkit-mask-image:
      linear-gradient(180deg, transparent 6%, #000 38%, #000 76%, transparent 100%),
      linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
    mask-image:
      linear-gradient(180deg, transparent 6%, #000 38%, #000 76%, transparent 100%),
      linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  }
}

/* The five store frames */
.screens { padding-left: 0; padding-right: 0; padding-top: clamp(28px, 4vw, 56px); }
.screens .section-head { padding: 0 var(--gutter); }
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 16px;
  max-width: 1240px; margin: 48px auto 0; padding: 4px var(--gutter) 20px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.shots figure { margin: 0; scroll-snap-align: start; }
.shots img { width: 100%; aspect-ratio: 1320 / 2868; border-radius: 26px; box-shadow: var(--shadow); }

/* Safety pillars */
.pillars {
  max-width: var(--max); margin: 52px auto 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 40px;
}
.pillar svg { width: 30px; height: 30px; color: var(--rose); }
.pillar h3 { margin-top: 14px; font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.pillar p { margin-top: 8px; color: var(--ink-2); font-size: 16.5px; }
@media (max-width: 820px) { .pillars { grid-template-columns: 1fr; max-width: 520px; gap: 36px; } }

/* Guides (teaser and hub) */
.guide-cards {
  list-style: none; padding: 0; max-width: var(--max); margin: 44px auto 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.guide-cards a {
  display: flex; flex-direction: column; height: 100%;
  background: var(--surface); border-radius: 22px; padding: 26px 24px; box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none;
  transition: transform 0.2s ease;
}
.guide-cards a:hover { transform: translateY(-2px); }
.guide-cards h3 { font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; }
.guide-cards p { margin-top: 10px; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.guide-cards .more { margin-top: auto; padding-top: 16px; color: var(--rose); font-size: 15px; font-weight: 600; }
.all-guides { text-align: center; margin-top: 28px; font-weight: 600; }
@media (max-width: 900px) { .guide-cards { grid-template-columns: 1fr; max-width: 560px; } }

/* Closing call to action */
.final { text-align: center; }
.final-icon { width: 92px; height: 92px; border-radius: 22.5%; margin: 0 auto 26px; box-shadow: var(--shadow); }
.final .section-sub { max-width: 520px; margin-left: auto; margin-right: auto; }
.final .badge { margin-top: 30px; }

/* Footer */
.footer { border-top: 0.5px solid var(--hairline); padding: 32px var(--gutter) 48px; }
.footer-inner { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.footer .brand { margin-right: 0; font-size: 15px; }
.footer .brand img { width: 22px; height: 22px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-left: auto; }
.footer nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 6px 0; }
.footer nav a:hover { color: var(--ink); }
.fineprint { flex-basis: 100%; color: var(--ink-3); font-size: 14px; line-height: 1.5; }

/* Reading pages: guides, policies, support */
.reading { max-width: var(--measure); margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter) 8px; }
.reading .eyebrow a { color: var(--rose); text-decoration: none; }
.reading h1 { font-size: clamp(34px, 5.2vw, 48px); line-height: 1.07; font-weight: 800; letter-spacing: -0.03em; }
.reading .meta { margin-top: 14px; color: var(--ink-3); font-size: 15px; }
.reading .intro { margin-top: 16px; color: var(--ink-2); font-size: 19px; }
.prose { margin-top: 34px; font-size: 18px; line-height: 1.65; }
.prose h2 { font-size: 26px; line-height: 1.2; font-weight: 750; letter-spacing: -0.02em; margin: 46px 0 12px; }
.prose h3 { font-size: 21px; line-height: 1.3; font-weight: 700; margin: 32px 0 8px; }
.prose p, .prose ul, .prose ol, .prose table { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--ink-3); }
.prose hr { border: 0; border-top: 0.5px solid var(--hairline); margin: 38px 0; }
.prose blockquote { margin: 24px 0; padding: 2px 0 2px 20px; border-left: 3px solid var(--rose); color: var(--ink-2); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 0.5px solid var(--hairline); }
.prose th { font-weight: 700; }
.prose img { border-radius: 14px; }

.disclaimer { margin-top: 34px; color: var(--ink-3); font-size: 14.5px; }

.hub { list-style: none; padding: 0; margin: 36px 0 0; border-top: 0.5px solid var(--hairline); }
.hub li { border-bottom: 0.5px solid var(--hairline); }
.hub a { display: block; padding: 22px 0; color: var(--ink); text-decoration: none; }
.hub h2 { font-size: 21px; line-height: 1.3; font-weight: 700; letter-spacing: -0.015em; }
.hub a:hover h2 { color: var(--rose); }
.hub p { margin-top: 6px; color: var(--ink-2); font-size: 16px; }

/* The app, pinned to the bottom of the guides: a solid card (the article
   never shows through its words) with a little sunrise behind the icon. */
body.has-app-bar { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
.app-bar {
  position: fixed; z-index: 30; left: 0; right: 0;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: flex; justify-content: center; padding: 0 12px;
  pointer-events: none;
  animation: app-bar-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s both;
}
.app-bar-inner {
  pointer-events: auto;
  width: min(100%, 560px);
  display: flex; align-items: center; gap: 14px;
  padding: 12px 12px 12px 12px; border-radius: 28px;
  color: var(--ink); text-decoration: none;
  background:
    radial-gradient(160px 100px at 0% 50%, rgba(255, 196, 168, 0.60), rgba(255, 196, 168, 0) 72%),
    radial-gradient(180px 100px at 100% 50%, rgba(255, 168, 204, 0.30), rgba(255, 168, 204, 0) 72%),
    linear-gradient(120deg, #ffffff, #fff5f8);
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.95),
    0 0 0 0.5px rgba(58, 13, 36, 0.10),
    0 2px 6px rgba(58, 13, 36, 0.06),
    0 18px 44px rgba(58, 13, 36, 0.16);
  transition: transform 0.2s ease;
}
.app-bar-inner:hover { transform: translateY(-1px); }
.app-bar-icon { flex: none; width: 52px; height: 52px; border-radius: 22.5%; box-shadow: 0 1px 2px rgba(58, 13, 36, 0.12), 0 4px 10px rgba(184, 46, 107, 0.18); }
.app-bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.app-bar-text strong { font-size: 16px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
.app-bar-text span { font-size: 14px; line-height: 1.3; color: var(--ink-2); }
.app-bar-cta {
  flex: none; display: inline-flex; align-items: center; min-height: 42px; padding: 0 18px; border-radius: 999px;
  background: var(--rose); color: var(--on-rose); font-size: 15px; font-weight: 650;
  box-shadow: 0 6px 16px rgba(184, 46, 107, 0.30);
}
.app-bar-inner:hover .app-bar-cta { filter: brightness(1.06); }
@keyframes app-bar-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .app-bar { animation: none; }
}
