/* ─── Pillnav (shared marketing nav) ─────────────────────────────────
 * Extracted from index.html iter59 — used by chrome.js to render the
 * same frosted-pill nav on every marketing page. Index.html still
 * works as-is because it imports this same file.
 * ──────────────────────────────────────────────────────────────────── */

header.pillnav {
  position: fixed; top: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex; align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 20px;
  /* More translucent — frosted glass so the page shows through */
  background: rgba(255,251,240,0.55);
  backdrop-filter: saturate(200%) blur(28px);
  -webkit-backdrop-filter: saturate(200%) blur(28px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 1px 2px rgba(20,21,26,0.04),
    0 10px 30px rgba(20,21,26,0.08);
  white-space: nowrap;
  overflow: hidden;
  transition:
    background 320ms cubic-bezier(.4,0,.2,1),
    border-color 320ms cubic-bezier(.4,0,.2,1),
    box-shadow 320ms cubic-bezier(.4,0,.2,1),
    padding 320ms cubic-bezier(.4,0,.2,1);
}
/* Sliding-glass shine that sweeps across the pill on scroll.
   The pseudo-element is a steeply-angled highlight gradient that translates
   left→right when `.is-scrolled` is added. Tied to scroll velocity for a
   reactive feel rather than a free-running loop. */
header.pillnav::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 38%,
    rgba(255,255,255,0.55) 48%,
    rgba(255,255,255,0.85) 50%,
    rgba(255,255,255,0.55) 52%,
    transparent 62%,
    transparent 100%
  );
  background-size: 280% 100%;
  background-position: -120% 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: overlay;
  transition: opacity 400ms ease, background-position 1200ms cubic-bezier(.22,.61,.36,1);
  z-index: 1;
}
header.pillnav.is-scrolled {
  background: rgba(255,251,240,0.78);
  border-color: rgba(255,255,255,0.7);
  padding: 7px 7px 7px 18px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 2px 6px rgba(20,21,26,0.06),
    0 14px 40px rgba(20,21,26,0.12);
}
header.pillnav.is-scrolled::before {
  opacity: 1;
  background-position: 120% 0;
}
/* Push nav contents above the shine */
header.pillnav > * { position: relative; z-index: 2; }
header.pillnav .brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display);
  font-weight: 800; font-size: 17px; letter-spacing: -0.02em;
  color: var(--ink);
  padding-right: 14px;
}
header.pillnav .brand img {
  width: 24px; height: 24px;
  border-radius: 7px;
  display: block;
}
header.pillnav nav {
  display: inline-flex; align-items: center; gap: 2px;
  border-left: 1px solid rgba(20,21,26,0.12);
  padding-left: 10px;
}
header.pillnav nav a,
header.pillnav nav button.nav-tools-toggle {
  font-family: var(--display);
  font-size: 15.5px; font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink-mute);
  padding: 9px 14px; border-radius: 999px;
  transition: color 160ms ease, background 160ms ease;
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
header.pillnav nav a:hover,
header.pillnav nav button.nav-tools-toggle:hover { color: var(--ink); background: rgba(20,21,26,0.06); }
header.pillnav nav .has-dropdown { position: relative; }
header.pillnav nav .nav-tools-toggle::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 200ms ease;
  margin-left: 2px;
}
header.pillnav nav .has-dropdown.is-open .nav-tools-toggle::after {
  transform: rotate(-135deg) translate(-1px, -1px);
}
.nav-tools-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%; transform: translateX(-50%) translateY(-4px);
  min-width: 200px;
  background: rgba(255,251,240,0.95);
  backdrop-filter: saturate(200%) blur(20px);
  -webkit-backdrop-filter: saturate(200%) blur(20px);
  border: 1px solid rgba(20,21,26,0.08);
  border-radius: 14px;
  padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 10px 32px rgba(20,21,26,0.10);
  opacity: 0; pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
header.pillnav nav .has-dropdown.is-open .nav-tools-menu {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-tools-menu a {
  font-family: var(--display);
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px; font-weight: 500;
  color: var(--ink-2);
  text-align: left;
}
.nav-tools-menu a:hover {
  background: rgba(15,148,139,0.08);
  color: var(--teal-deep);
}
.nav-tools-menu a small {
  display: block;
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 400;
  margin-top: 2px;
  line-height: 1.3;
}
/* iter64 — "All tools" anchor sits at the top of the dropdown; mark
   it visually so anon visitors notice the full-page demo index. */
.nav-tools-menu a.nav-tools-menu-all {
  color: var(--teal-deep);
  border-bottom: 1px solid rgba(15,148,139,0.16);
  margin-bottom: 4px;
  padding-bottom: 12px;
  border-radius: 8px 8px 0 0;
}
.nav-tools-menu a.nav-tools-menu-all small {
  color: color-mix(in srgb, var(--teal-deep) 70%, transparent);
}
header.pillnav .cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 999px;
  transition: background 160ms ease, transform 160ms ease;
}
header.pillnav .cta:hover { background: #000; transform: translateY(-1px); }
header.pillnav .cta svg { width: 14px; height: 14px; }

/* Hamburger button — hidden by default, shown on narrow viewports */
header.pillnav .burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  margin-left: 6px;
}
header.pillnav .burger:hover { background: rgba(20,21,26,0.05); }
header.pillnav .burger span {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px; background: var(--ink);
  border-radius: 1px;
  transition: transform 200ms ease, opacity 200ms ease, top 200ms ease;
}
header.pillnav .burger span:nth-child(1) { top: 13px; }
header.pillnav .burger span:nth-child(2) { top: 19px; }
header.pillnav .burger span:nth-child(3) { top: 25px; }
header.pillnav.is-open .burger span:nth-child(1) { top: 19px; transform: rotate(45deg); }
header.pillnav.is-open .burger span:nth-child(2) { opacity: 0; }
header.pillnav.is-open .burger span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* Drawer revealed on hamburger click — same pill aesthetic, full nav */
.pillnav-drawer {
  position: fixed;
  top: 76px; left: 50%; transform: translateX(-50%) translateY(-8px);
  z-index: 99;
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: 16px;
  box-shadow: 0 10px 32px rgba(20,21,26,0.14);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  min-width: 180px;
}
.pillnav-drawer a {
  display: block;
  padding: 10px 14px;
  font-size: 14px; font-weight: 500;
  color: var(--ink);
  border-radius: 10px;
}
.pillnav-drawer a:hover { background: rgba(20,21,26,0.05); }
.pillnav-drawer a:last-child {
  background: var(--ink); color: #fff;
  font-weight: 600;
  margin-top: 4px;
  text-align: center;
}
.pillnav-drawer.is-open {
  display: flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

@media (max-width: 720px) {
  header.pillnav { top: 12px; padding: 6px 6px 6px 16px; gap: 6px; }
  header.pillnav .brand { font-size: 15px; padding-right: 10px; }
  header.pillnav .brand img { width: 20px; height: 20px; }
  header.pillnav .pillnav-links a { padding: 8px 11px; font-size: 14px; }
  header.pillnav .cta { padding: 8px 14px; font-size: 13px; }
  header.pillnav .pillnav-links { padding-left: 6px; }
}
@media (max-width: 580px) {
  /* Compact mode: hide inline nav links + CTA text, show hamburger */
  header.pillnav .pillnav-links { display: none; }
  header.pillnav .cta { padding: 8px 12px; }
  header.pillnav .burger { display: inline-block; }
}
@media (max-width: 400px) {
  /* Tightest: even hide the CTA, hamburger drawer has the download link */
  header.pillnav .cta { display: none; }
}

/* ─── iter60: Shared "page-hero" pattern ──────────────────────────────
 * Reusable mini-hero for non-index marketing pages. Mirrors the
 * homepage aesthetic — cloud-grass bg, brand-teal accents, frosted
 * card — but shorter (no 100svh) so it sits above the page content
 * naturally. Lets every page open with the same brand impression.
 * Usage: <section class="page-hero"> ... </section>
 * ──────────────────────────────────────────────────────────────────── */

/* iter63 — cream paper sub-page hero. The cloud-grass atmosphere
   is reserved for the homepage hero only; sub-pages get a quieter
   editorial intro: warm cream with a fine top hairline and a soft
   bottom fade into the page body. Same typography family (display +
   italic-teal accent) as the homepage hero so the brand reads
   consistent without repeating the marquee visual. */
.brand-hero {
  position: relative;
  padding: clamp(120px, 14vh, 160px) 0 clamp(48px, 6vh, 80px);
  background: linear-gradient(180deg, #FAFAF6 0%, #F5F2EA 60%, #FAFAF6 100%);
  border-bottom: 1px solid rgba(14, 30, 30, 0.06);
  overflow: hidden;
  isolation: isolate;
}
.brand-hero::before {
  /* Subtle paper grain — adds tooth without imagery */
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.04 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.7;
  z-index: -1;
}
.brand-hero::after {
  /* Hairline teal accent rule above the headline — apothecary detail */
  content: "";
  position: absolute;
  top: clamp(96px, 12vh, 130px);
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 2px;
  background: var(--teal-deep, #086E66);
  opacity: 0.7;
}
.brand-hero .container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 48px);
  text-align: center;
}
.brand-hero .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-deep, #086E66);
  margin-bottom: 16px;
}
.brand-hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 5vw + 0.5rem, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: #1F2025;
  margin: 0 0 18px;
  text-wrap: balance;
}
.brand-hero h1 em {
  font-style: italic;
  color: var(--teal-deep, #086E66);
  font-weight: 500;
  letter-spacing: -0.025em;
}
.brand-hero p.lead {
  margin: 0 auto clamp(28px, 3vw, 40px);
  max-width: 56ch;
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.5;
  color: #4A5071;
  font-weight: 400;
}
.brand-hero .brand-hero-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: #15161A;
  color: #fff;
  font-family: var(--display);
  font-size: 15px; font-weight: 600;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(13, 18, 38, 0.22);
  transition: transform 160ms ease, background 160ms ease;
}
.brand-hero .brand-hero-cta:hover {
  background: #000;
  transform: translateY(-1px);
}
.brand-hero .brand-hero-cta svg {
  width: 16px; height: 16px;
}

/* Slim mobile: tighten padding */
@media (max-width: 720px) {
  .brand-hero { padding: clamp(110px, 18vh, 160px) 0 clamp(48px, 8vh, 90px); }
}

/* ─── iter60: pillnav top-clearance on shell pages ────────────────────
 * The pillnav is position:fixed and doesn't take layout space, so
 * pages without a tall hero (legal text, blog, status, etc.) have
 * their top content hidden behind the nav. Add a top-padding to
 * common shells so content sits below the floating pill.
 * Pages with a .brand-hero (which has its own top padding tuned
 * for the nav) get a 0 override. */
.legal-shell,
.auth-shell,
.blog-shell,
.changelog-shell,
.roadmap-shell,
.doctor-main,
.status-page,
.ba-shell,
.ba-page,
.science-shell,
main#main-content {
  padding-top: 96px;
}
/* When .brand-hero comes first, it already accounts for the nav */
.brand-hero + main,
.brand-hero ~ main {
  padding-top: 0 !important;
}
/* Science + bio-age + what-if all need top space too */
body[data-active-nav="science"] > main:first-of-type,
body[data-active-nav="bio-age"] > main:first-of-type,
body[data-active-nav="what-if"] > main:first-of-type {
  padding-top: 96px;
}

