/*
 * iolette landing page layout.
 * Follows the Figma file "iolette - Landing Page" (node 3:512), drawn at 1200px.
 * Values with no design-system token come straight from Figma.
 */

/*
 * Display headings across the site: 58px on 48px leading (the design system's Display is 67 / 65.1).
 * Phones use the 44px size set in the phone section below.
 */
:root {
  --display-size: 58px;
  --display-leading: 48px;
}

/* Overrides tokens.css's clamp(44px, 6vw, 67px) for headings without their own size rule. */
.t-display,
.t-display-italic {
  font-size: clamp(44px, 6vw, var(--display-size));
  line-height: var(--display-leading);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--midnight);
  color: var(--white);
}

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

h1, h2, h3, h4, p, ul, ol { margin: 0; }

ul, ol { padding: 0; list-style: none; }

a { color: inherit; }

[hidden] { display: none !important; }

/* Highlighted text: Cobalt fill with Plaster text, as the design system pairs them on Cobalt buttons. */
::selection {
  background-color: var(--cobalt);
  color: var(--plaster);
}

strong { font-weight: 600; }

em { font-style: italic; }

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

/* Sections below the fold sit in one 1200px column; panels run edge to edge inside it. */
.page {
  display: flex;
  flex-direction: column;
  gap: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 96px;
}

@media (max-width: 1232px) {
  .page { padding-left: var(--space-md); padding-right: var(--space-md); }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100px;
  z-index: 10;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--midnight);
}
.skip-link:focus { top: var(--space-md); }

:focus-visible {
  outline: 2px solid var(--blue-300);
  outline-offset: 3px;
}

/* Shared Figma text styles that sit outside the design system's scale. */
.t-display em,
.t-display-italic { font-style: italic; }

/* Italic accent words inside a display heading match the heading's own size, not the token's clamp. */
.t-display .t-display-italic {
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

/* ---------- Navigation ---------- */

.site-header {
  --nav-height: 91px;
  position: relative;
  z-index: 50;
  height: var(--nav-height); /* holds the bar's space so content doesn't jump when the nav floats */
  background: var(--midnight);
}

/*
 * The bar is always fixed, so it can morph smoothly between its two states instead of jumping.
 * At the top of the page it sits flush in the Midnight header band; once the page scrolls
 * (main.js toggles .is-stuck) it becomes Figma's floating pill (node 5:84): 24px below the top of
 * the window, 24px in from each side (1152px at the 1200px design width), frosted Midnight.
 */
.nav {
  --nav-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-duration: 0.5s;
  position: fixed;
  top: 0;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, 100%);
  height: var(--nav-height);
  margin: 0;
  border-radius: 0;
  background-color: rgba(15, 23, 53, 0);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  transform: translateX(-50%);
  transition:
    top var(--nav-duration) var(--nav-ease),
    width var(--nav-duration) var(--nav-ease),
    height var(--nav-duration) var(--nav-ease),
    padding var(--nav-duration) var(--nav-ease),
    border-radius var(--nav-duration) var(--nav-ease),
    background-color var(--nav-duration) var(--nav-ease),
    -webkit-backdrop-filter var(--nav-duration) var(--nav-ease),
    backdrop-filter var(--nav-duration) var(--nav-ease);
}

.site-header.is-stuck .nav {
  top: 24px;
  width: min(1152px, calc(100% - 48px));
  padding: 0 24px 0 36px;
  border-radius: 48px;
  background-color: rgba(15, 23, 53, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header .wordmark { transition: background-color var(--nav-duration) var(--nav-ease); }
.site-header.is-stuck .wordmark { background-color: var(--white); }

@media (prefers-reduced-motion: reduce) {
  .nav,
  .site-header .wordmark { transition: none; }
}

/* Anchor jumps land below the floating nav (24px + bar + 24px breathing room). */
[id] { scroll-margin-top: calc(48px + var(--nav-height, 91px)); }

/*
 * The wordmark file is drawn in Midnight; on dark grounds Figma shows it in Cobalt.
 * Use the SVG as a mask so CSS sets the colour without editing the asset.
 */
.wordmark {
  display: block;
  width: 103px;
  height: 36px; /* 365 × 127 source, scaled to Figma's 103 × 36 slot */
  background-color: var(--cobalt);
  -webkit-mask: url("../img/iolette-wordmark.svg") no-repeat center / contain;
  mask: url("../img/iolette-wordmark.svg") no-repeat center / contain;
}

.nav__brand { display: block; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 54px;
}

.nav__link {
  font: 400 18px/normal var(--font-sans);
  color: var(--white);
  text-decoration: none;
}
.nav__link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Figma nav button: 48px tall, 185px wide, 18px label, white text. */
.nav__cta {
  height: 48px;
  min-width: 185px;
  font-weight: 400;
  font-size: 18px;
  color: var(--white);
}

/* ---------- Hero: "Skin, measured." ---------- */

.hero {
  background: var(--midnight);
  color: var(--white);
  overflow: hidden;
}

.hero__inner {
  position: relative;
  height: 495px;
}

.hero__copy {
  position: absolute;
  left: 24px;
  top: 116px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 332px;
}

.hero__title {
  display: flex;
  flex-direction: column;
  font-size: var(--display-size);
  line-height: var(--display-leading);
}

.hero__lede {
  font: 400 21px/25px var(--font-sans);
  opacity: 0.8;
}

.hero__link {
  margin-top: -7px; /* 21px gap from the lede in Figma; the copy column gap is 28px */
  font: italic 300 20px/26px var(--font-serif);
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
  align-self: flex-start;
}
.hero__link:hover { color: var(--blue-200); }

.hero__media {
  position: absolute;
  inset: 0;
}

/*
 * Figma "Skin measured" (node 18:1116): the solid Cobalt arch with the full portrait oval over it
 * (791 × 899 at y -156), cropped to the 495px hero. One 2x image covers x 347–1139.
 */
.hero__portrait {
  position: absolute;
  left: 347px;
  top: 0;
  width: 792px;
  height: 495px;
}

/* ---------- Feature: "See beneath the surface." (Figma node 18:1097) ---------- */

/* Desktop: a white band, 612px tall at 1200px, with a rounded photo beside the copy column. */
.feature {
  background: var(--white);
  margin-bottom: 64px;
}

.feature__inner {
  display: flex;
  align-items: center;
  gap: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 94px 24px;
}

.feature__media {
  position: relative;
  flex: 0 1 518px;
  min-width: 0;
  aspect-ratio: 518 / 424;
  overflow: hidden;
  border-radius: 24px;
  background: var(--white);
}

/* Figma's crop: the photo at 127.82% width, 13.91% left of the frame. */
.feature__media img {
  position: absolute;
  left: -13.91%;
  top: -0.17%;
  width: 127.82%;
  max-width: none;
  height: 100%;
}

.feature__copy {
  flex: 0 1 527px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
}

.feature__title {
  font-size: var(--display-size);
  line-height: var(--display-leading);
  color: var(--midnight);
}

.feature__points {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.feature__points li {
  padding: 24px;
  border-radius: var(--radius-md);
  background: rgba(233, 226, 218, 0.5); /* Plaster at 50% */
  font: 400 21px/25px var(--font-sans);
  color: rgba(15, 23, 53, 0.8); /* Midnight at Figma's 80% text opacity */
}

/* Figma's Midnight pill button: 48px tall, 18px label. */
.feature__cta {
  height: 48px;
  background: var(--midnight);
  font-weight: 400;
  font-size: 18px;
  color: var(--white);
}
.feature__cta:hover { background: var(--blue-800); }

/* Mobile layout (Figma "See beneath the surface - mobile"): full-bleed photo, copy stacked below. */
@media (max-width: 760px) {
  .feature__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 24px 0 36px;
  }
  .feature__media {
    flex: none;
    width: 100%;
    aspect-ratio: 360 / 295;
    border-radius: 0;
  }
  .feature__copy { flex: none; padding: 0 24px; }
}

/* ---------- Subsurface / surface compare slider ---------- */

.compare-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 48px;
}

.compare-section__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 440px;
  min-width: 0;
}

.compare-section__title { font-size: var(--display-size); line-height: var(--display-leading); white-space: nowrap; } /* two lines, set by the <br> */

.compare-section__lede {
  font: 400 21px/25px var(--font-sans);
  opacity: 0.8;
}

/* --pos is the divider position, 0–100%; main.js keeps it in sync with the range input. */
.compare {
  --pos: 50%;
  position: relative;
  flex: 0 1 560px;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--neutral-600);
  cursor: ew-resize;
  touch-action: pan-y; /* horizontal drags move the slider; vertical swipes still scroll the page */
  user-select: none;
}

.compare__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Subsurface sits on top and shows only left of the divider. */
.compare__img--subsurface { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }


.compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 2;
  width: 3px;
  margin-left: -1.5px;
  background: var(--white);
  pointer-events: none;
}

/* The handle follows the divider but stays fully inside the frame at either edge. */
.compare__handle {
  --handle-size: 56px;
  position: absolute;
  top: 50%;
  left: clamp(calc(var(--handle-size) / 2), var(--pos), calc(100% - var(--handle-size) / 2));
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--handle-size);
  height: var(--handle-size);
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-raised);
  pointer-events: none;
  color: var(--midnight);
  font: 400 24px/1 var(--font-sans);
  transform: translate(-50%, -50%);
}

/* Visually hidden range input: keyboard and screen-reader control. Pointer drags are handled in main.js. */
.compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.compare__range:focus-visible ~ .compare__handle {
  outline: 2px solid var(--blue-300);
  outline-offset: 3px;
}

/* ---------- Shared panel ---------- */

.panel {
  border-radius: 22px;
  overflow: hidden;
}
.panel--plaster { background: var(--plaster); color: var(--midnight); }

.photo-slot {
  background: var(--neutral-200);
  border-radius: 22px;
}

/* ---------- How it works ---------- */

.how {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

/* Figma node 5:108: a centred 809px column, then the app's "Ask iolette anything" pill 80px below. */
.how__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
  padding: 0 24px 100px; /* extra room below the pill, on top of the section gap */
}

.how__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 809px;
  align-items: center;
  padding-top: 13px;
  color: var(--plaster);
  text-align: center; /* Figma 15:731 */
}

.how__title { font-size: var(--display-size); line-height: var(--display-leading); }

/* Two lines as in Figma where they fit; narrower screens wrap naturally. */
@media (max-width: 820px) {
  .how__break { display: none; }
}

.how__lede {
  max-width: 651px;
  font: 500 21px/25px var(--font-sans);
  opacity: 0.5;
}

/* The app's frosted coach prompt (Figma "chat with coach"), shown as a preview. */

/*
 * Reserves room for the tallest example question (main.js sets --ask-reserve), so the cards below
 * don't move while the pill grows from one line to two.
 */
.ask-pill-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 518px;
  min-height: var(--ask-reserve, 77px);
}

.ask-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 77px;
  padding: 8px 28px 8px 18px;
  /* 1.5px stroke as an inset shadow: browsers snap fractional border widths to whole pixels. */
  border-radius: 44px;
  /* Figma 15:734: a fainter gradient plus a soft Cobalt glow. */
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.12) 14.286%, rgba(255, 255, 255, 0) 127.27%);
  box-shadow:
    inset 0 0 0 1.5px rgba(233, 226, 218, 0.1),
    0 0 44px 0 rgba(74, 102, 255, 0.2);
}

.ask-pill__lead {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 19px;
  min-width: 0;
}

.ask-pill__mark { flex: none; width: 45px; height: 47px; }

.ask-pill__text {
  min-width: 0;
  font: italic 400 18.96px/24px var(--font-sans); /* 80% of Figma's 23.7px */
  color: var(--white);
  opacity: 0.6;
}

.ask-pill__caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: currentColor;
  animation: ask-caret-blink 1s steps(1) infinite;
}
.ask-pill.is-typing .ask-pill__caret { animation: none; } /* solid while typing, blinks while resting */

@keyframes ask-caret-blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ask-pill__caret { display: none; }
}

.ask-pill__sparkle { flex: none; width: 24px; height: 24px; }

/* "How it works." band (Figma 21:1192 web, 21:1132 mobile) */
.steps-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  padding: 48px 24px 60px;
  background: var(--neutral-600); /* Figma 15:739 */
  color: var(--green-50);
}

.steps-panel__title {
  font-size: var(--display-size);
  line-height: var(--display-leading);
  text-align: center;
}

.steps {
  display: flex;
  justify-content: space-between;
  gap: var(--space-lg);
  width: 100%;
  list-style: none;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 293px;
  min-width: 0;
}

.step__photo {
  width: 100%;
  height: 283px;
  object-fit: cover;
}


.step__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 0 0 12px;
}

.step__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 21px/25px var(--font-sans);
}

.step__icon { flex: none; width: 24px; height: 24px; }

.step__text {
  max-width: 260px;
  font: 400 18px/24px var(--font-sans);
  opacity: 0.8;
}

/* ---------- Here are the facts ---------- */

.facts {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 36px 24px;
  border-radius: 24px;
  background: var(--peridot);
}

.facts__title {
  color: var(--olivine);
  font-size: min(var(--display-size), calc((100vw - 80px) / 9)); /* 80px = page + panel gutters; keeps one line */
  line-height: var(--display-leading);
  text-align: center;
  white-space: nowrap; /* one line at every width; phones scale it down below */
}

.facts__list {
  display: flex;
  justify-content: space-between;
  gap: var(--space-lg);
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 293px;
  min-width: 0;
  min-height: 437px;
  padding: 18px;
  border-radius: 21px;
  background: var(--olivine);
  color: var(--peridot);
}

.fact__figure {
  font: italic 300 137px/145.1px var(--font-serif);
}

.fact__unit {
  font-style: normal;
  font-weight: 200;
  font-size: 57px;
  line-height: 1; /* keep the figure line the same height whatever the unit */
}

.fact__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fact__title { font: 600 21px/25px var(--font-sans); }

.fact__text { font: 400 18px/24px var(--font-sans); opacity: 0.8; }

/* ---------- Stop guessing. Start tracking. ---------- */

.tracking {
  display: flex;
  align-items: flex-start;
  gap: 61px;
  padding: 36px 40px 36px 51px;
}

.tracking__media {
  flex: 0 1 546px;
  min-width: 0;
  height: 359px;
  border-radius: 21px;
  object-fit: cover;
  object-position: center 30%; /* keep the whole mirror and the bottles in the landscape crop */
}

.tracking__copy {
  flex: 1 0 498px; /* Figma's heading width: holds "Stop guessing." on one line; the photo gives way */
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.tracking__copy h2 { font-size: var(--display-size); line-height: var(--display-leading); }

.tracking__text {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 442px;
  font: 400 21px/25px var(--font-sans);
}

.tracking__kicker { font-weight: 600; }

/* ---------- Enter iolette ---------- */

/* Figma 22:447 (web) and 22:493 (mobile). */
.enter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  padding: 32px 8px 32px 24px; /* Figma: 96px top and bottom, less the 64px section gap */
}

.enter__copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 480px;
  min-width: 0;
  font: 400 21px/25px var(--font-sans);
}

.enter__title { font-size: var(--display-size); line-height: var(--display-leading); }

.enter__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 19px 0 35px;
  list-style: none;
}

.enter__list li {
  width: 440px;
  max-width: 100%;
  padding: 24px;
  border-radius: 12px;
  background: rgba(233, 226, 218, 0.1);
  color: rgba(233, 226, 218, 0.8); /* Figma dims the text, not the card */
}

/* Two lines per card: what we detect, then "before …". */
.enter__item,
.enter__when { display: block; }

.enter__media {
  position: relative;
  flex: 0 0 591px;
  height: 505px;
  overflow: hidden;
  border-radius: 48px;
}

/* The 627 × 940 photo sits at -23px, -166.5px inside the 591 × 505 frame. */
.enter__media img {
  position: absolute;
  left: -23px;
  top: -166.5px;
  width: 627px;
  max-width: none;
  height: 940px;
  object-fit: cover;
}

/* ---------- Your Privacy ---------- */

.privacy {
  display: flex;
  align-items: center;
  gap: 61px;
  min-height: 449px;
  padding: 36px 190px 36px 51px;
  background: var(--olivine);
  color: var(--peridot);
}

.privacy__media {
  position: relative;
  flex: 0 0 310px;
  width: 310px;
  height: 310px;
}

.privacy__photo {
  width: 100%;
  height: 100%;
  border-radius: 21px;
  object-fit: cover;
}

/* Lock icon tucked into the photo's bottom-right corner (Figma 23:379). */
.privacy__lock {
  position: absolute;
  right: 17px;
  bottom: 17px;
  width: 24px;
  height: 23px;
}

.privacy__copy {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
  font: 400 21px/25px var(--font-sans);
}

.privacy__title { font-size: var(--display-size); line-height: var(--display-leading); }

/* ---------- Waitlist ---------- */

.waitlist {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: 32px 24px 0;
  text-align: center;
}

.waitlist__lede {
  max-width: 420px;
  font: 400 21px/25px var(--font-sans);
  opacity: 0.8;
}

.waitlist__form {
  display: flex;
  gap: var(--space-sm);
  width: 100%;
  max-width: 480px;
  margin-top: var(--space-md);
}

.waitlist__input {
  flex: 1 1 auto;
  min-width: 0;
  height: var(--control-height);
  padding: 0 20px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-pill);
  background: var(--white);
  font: 400 16px/24px var(--font-sans);
  color: var(--neutral-600);
}
.waitlist__input::placeholder { color: var(--neutral-400); }
.waitlist__input[aria-invalid="true"] { border-color: var(--red-400); }

.waitlist__status { min-height: 20px; }
.waitlist__status[data-state="error"] { color: var(--red-200); }
.waitlist__status[data-state="success"] { color: var(--peridot); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: var(--space-xxl) 0;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.site-footer__legal {
  flex: 1 1 360px;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.7);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
}
.site-footer__links a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer__links a:hover { color: var(--blue-200); }

.site-footer__social {
  display: flex;
  gap: var(--space-md);
  padding: 0;
  list-style: none;
}
.site-footer__social a {
  display: block;
  color: var(--white);
  transition: color 0.2s ease;
}
.site-footer__social a:hover { color: var(--blue-200); }
.site-footer__social svg { display: block; width: 24px; height: 24px; }

/* ---------- Legal pages (privacy policy, terms) ---------- */

/* Long-form reading on the design system's light ground: Neutral-50 page, Midnight text. */
.legal {
  background: var(--neutral-50);
  color: var(--midnight);
}

.legal__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px 96px;
  font: 400 16px/26px var(--font-sans);
}

.legal__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.legal__eyebrow { color: var(--midnight-70); }

.legal__meta { color: var(--midnight-70); font-size: 14px; }

.legal h2 {
  margin: 48px 0 var(--space-md);
  font: 500 24px/30px var(--font-sans);
  letter-spacing: -0.6px;
}

.legal h3 {
  margin: var(--space-lg) 0 var(--space-sm);
  font: 600 16px/24px var(--font-sans);
}

.legal p + p { margin-top: var(--space-md); }

.legal ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
  padding-left: var(--space-lg);
  list-style: disc;
}

.legal a {
  color: var(--blue-700);
  overflow-wrap: anywhere;
}
.legal a:hover { color: var(--blue-600); }

.legal__inner > .legal__meta:last-child { margin-top: 48px; }

/* ---------- Support page (contact form) ---------- */

/* Same reading column as the legal pages; the form reuses the waitlist input recipe, stacked. */
.support__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.support__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.field__label { font: 600 14px/20px var(--font-sans); color: var(--midnight); }
.field__required { color: var(--red-600); }
.field__optional { font-weight: 400; color: var(--midnight-70); }

.field__input {
  width: 100%;
  min-width: 0;
  height: var(--control-height);
  padding: 0 20px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-pill);
  background: var(--white);
  font: 400 16px/24px var(--font-sans);
  color: var(--neutral-600);
}
.field__input::placeholder { color: var(--neutral-400); }
.field__input[aria-invalid="true"] { border-color: var(--red-400); }

.field__textarea {
  height: auto;
  min-height: 160px;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  resize: vertical;
}

/* Honeypot field: off-screen for people, present for bots. */
.support__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.support__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

.support__status { min-height: 20px; }
.support__status[data-state="error"] { color: var(--red-600); }
.support__status[data-state="success"] { color: var(--blue-700); }

/* ---------- Tablet ---------- */

@media (max-width: 1100px) {
  .hero__inner { height: auto; display: flex; flex-direction: column; align-items: stretch; padding-block: 0; }

  .hero__copy {
    position: static;
    width: auto;
    max-width: 420px;
    padding: 56px 0 40px;
  }

  .hero__media {
    position: relative;
    inset: auto;
    flex: none;
    width: 100%;
    max-width: 792px;
    margin: 0 0 0 auto;
    aspect-ratio: 792 / 495;
  }

  .hero__portrait { left: 0; top: 0; width: 100%; height: 100%; }


  .tracking,
  .privacy { flex-direction: column; align-items: stretch; gap: 32px; padding: 32px 24px; }
  .tracking__copy { flex: none; }
  .tracking__media { flex: none; height: 300px; }
  .privacy__media { flex: none; }

  .compare-section { flex-direction: column; align-items: stretch; gap: 32px; }
  .compare { flex: none; width: 100%; max-width: 560px; align-self: center; }

  .enter { flex-direction: column; align-items: stretch; gap: 48px; padding: 0 24px; }
  .enter__copy { width: auto; max-width: 600px; }
  .enter__media { flex: none; width: 100%; max-width: 591px; height: auto; aspect-ratio: 591 / 505; align-self: flex-end; }
  .enter__media img { left: -3.89%; top: -32.97%; width: 106.09%; height: auto; aspect-ratio: 627 / 940; }
}

@media (max-width: 900px) {
  .steps,
  .facts__list { flex-direction: column; }
  .step,
  .fact { width: auto; }

  /* How it works, tablet (Figma 33:477): each step is a row, square photo left, copy right. */
  .steps-panel { padding: 48px 12px 60px; }
  .steps { gap: 47px; }
  .step { flex-direction: row; align-items: flex-start; gap: 10px; }
  .step > :first-child { flex: 1 1 0; min-width: 0; }
  .step__photo { height: auto; aspect-ratio: 1; }
  .step__body { flex: 1 1 0; min-width: 0; padding: 12px 0 0 12px; }
  .step__text { max-width: none; }
  .fact { min-height: 0; }
}

/* ---------- Phone ---------- */

@media (max-width: 640px) {
  .container { padding: 0 var(--space-md); }

  /*
   * Phones (Figma "Top Nav", node 12:680). Default: a full-width Midnight bar, 91px tall, 12px side
   * padding, Cobalt 80px wordmark. On scroll it morphs into the mobile pill: 12px in from each side
   * (369px on a 393px phone), 24px from the top, 70px tall, Midnight at 40% with a 12px blur and a
   * white wordmark. Both states use the compact 143 × 48 button with 14px text.
   */
  .site-header { --nav-height: 91px; }
  .nav { padding: 0 12px; }
  .site-header.is-stuck .nav {
    width: calc(100% - 24px);
    height: 70px;
    padding: 0 13px 0 32px;
    background-color: rgba(15, 23, 53, 0.4);
  }
  .site-header .wordmark { width: 80px; height: 28px; }
  .nav__links { gap: var(--space-lg); }
  .nav__link { display: none; }
  .nav__cta { min-width: 143px; height: 48px; padding: 0 16px; font-size: 14px; }

  /*
   * Hero on phones (Figma node 18:1099, 393 × 410): the portrait runs full-bleed behind the copy,
   * a Midnight gradient (0 → 50%) covers the lower 63%, and a 24px Cobalt bar sits along the bottom.
   * The copy sits 24px in, 61px above the bottom edge. The "Reserve Your Camera" link isn't in the
   * mobile design; the nav's Join the Waitlist button covers it.
   */
  .hero__inner {
    display: block;
    height: auto;
    aspect-ratio: 393 / 410;
    padding: 0;
  }
  .hero__media {
    position: absolute;
    inset: 0;
    width: auto;
    max-width: none;
    margin: 0;
    aspect-ratio: auto;
  }
  .hero__portrait {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .hero__media::after {
    content: "";
    position: absolute;
    inset: 37% 0 0; /* 152 / 410 */
    background: linear-gradient(to bottom, rgba(15, 23, 53, 0), rgba(15, 23, 53, 0.5));
  }
  .hero__inner::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 24px;
    background: var(--cobalt);
  }
  .hero__copy {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 61px;
    top: auto;
    z-index: 1;
    width: auto;
    max-width: 332px;
    padding: 0;
    gap: 28px;
  }
  .hero .hero__lede { max-width: 273px; line-height: 22px; }
  .hero__link { display: none; }

  /* Display headings on phones: 42px on 32px leading. */
  :root {
    --display-size: 42px;
    --display-leading: 32px;
  }

  .t-display,
  .t-display-italic,
  .hero__title,
  .legal .t-display,
  .feature__title,
  .how__title,
  .tracking__copy h2,
  .compare-section__title,
  .enter__title,
  .privacy__title {
    font-size: var(--display-size);
    line-height: var(--display-leading);
    letter-spacing: -0.2px;
  }

  .hero__lede,
  .feature__points li,
  .how__lede,
  .tracking__text,
  .compare-section__lede,
  .privacy__copy,
  .waitlist__lede { font-size: 18px; line-height: 24px; }

  /* Scales with the screen so "Here are the facts." stays on one line on small phones. */
  .facts__title { font-size: min(var(--display-size), calc((100vw - 64px) / 9.3)); line-height: var(--display-leading); } /* 64px = page + panel gutters */
  .fact__figure { font-size: 96px; line-height: 100px; }
  .fact__unit { font-size: 40px; }

  .feature__points li { padding: 12px; line-height: 22px; }

  .page { gap: 48px; }
  .how { gap: 40px; }
  .how__intro { gap: 40px; }
  .ask-pill-wrap { min-height: var(--ask-reserve, 64px); }
  .ask-pill { min-height: 64px; padding: 8px 20px 8px 14px; }
  .ask-pill__lead { gap: 12px; }
  .ask-pill__mark { width: 36px; height: 38px; }
  .ask-pill__text { font-size: 14.4px; line-height: 19.2px; } /* 80% of 18px */
  .how__intro { padding-left: 0; padding-right: 0; }
  /* 16px page gutter + 8px = Figma's 24px; the photo runs off the right edge of the screen. */
  .enter { align-items: stretch; gap: 24px; padding: 48px 8px; }
  .enter__media {
    width: calc(100% + 24px);
    max-width: none;
    height: 505px;
    margin-right: -24px;
    aspect-ratio: auto;
    border-radius: 100px 0 0 50px; /* Figma's right-hand corners fall off-screen */
  }
  .enter__media img { left: -23px; top: -26px; width: calc(100% + 37px); height: auto; aspect-ratio: 627 / 940; }
  .enter__list li { padding: 12px; }
  .compare-section { padding: 36px var(--space-md) var(--space-md); } /* extra top room: 42px type on 32px leading rises above its line */
  .compare__handle { --handle-size: 44px; font-size: 20px; }
  .facts,
  .tracking,
  .privacy { padding: 24px var(--space-md); }
  /* Full-bleed on phones, as in Figma 21:1132. */
  .steps-panel { margin: 0 calc(-1 * var(--space-md)); padding: 48px 12px 60px; border-radius: 0; }
  /* How it works, mobile (Figma 21:1132): stacked again, square photos, full-width copy. */
  .step { flex-direction: column; align-items: stretch; gap: 0; }
  .step > :first-child { flex: none; margin-bottom: -8px; }
  .step__body { flex: none; padding: 24px 0 0 12px; }

  .privacy__media { width: 100%; height: auto; aspect-ratio: 1; }

  .waitlist { padding-left: 0; padding-right: 0; }
  .waitlist__form { flex-direction: column; }
}
