/* getmailey.app home page. The film's look: cream paper, near-black ink, pine, one orange stamp, Cabinet Grotesk
   for display and the Mac's own type for reading. Bands change the mood as you scroll: night for the film and the
   end card, pine for privacy. */

@font-face { font-family: "Cabinet Grotesk"; src: url("/fonts/cabinet-grotesk-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Cabinet Grotesk"; src: url("/fonts/cabinet-grotesk-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cabinet Grotesk"; src: url("/fonts/cabinet-grotesk-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #F1ECE2;
  --paper-deep: #E7E0D2;
  --paper-hi: #FAF7F1;
  --line: #DCD4C4;
  --ink: #17140F;
  --ink-2: #5A5349;
  --ink-3: #7A7266;
  --pine: #083328;
  --pine-hi: #0E4536;
  --on-pine: #EAF3EE;
  --on-pine-2: #A9C7B9;
  --mint: #9EE6B0;
  --stamp: #F0562E;
  --night: #17140F;
  --night-hi: #24201A;
  --on-night: #F1ECE2;
  --on-night-2: #A39B8E;

  --display: "Cabinet Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;

  --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px;
  --space-xl: 32px; --space-2xl: 48px; --space-3xl: 64px; --space-4xl: 96px;
  --section: clamp(88px, 12vw, 168px);
  --gutter: clamp(20px, 5vw, 56px);
  --max: 1180px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --window-shadow: 0 1px 2px rgba(23, 20, 15, 0.06), 0 12px 32px rgba(23, 20, 15, 0.10), 0 48px 96px -24px rgba(23, 20, 15, 0.22);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
/* Pictures of the app can't be dragged out, selected or long-pressed to save. */
img, video, .window, .finale-mark, .wordmark { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
img { height: auto; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--pine); color: var(--on-pine); }
:focus-visible { outline: 2.5px solid var(--stamp); outline-offset: 3px; border-radius: 6px; }

.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 16px; }

/* ---------- Type ---------- */
.display {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.display span { display: block; }
.display-2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 36ch; text-wrap: pretty; }

/* ---------- The wordmark (one pen stroke, the stamp on the i) ---------- */
.wordmark { color: var(--pine); overflow: visible; }
.wordmark .stamp, .finale-mark .stamp { fill: var(--stamp); transform-box: view-box; transform-origin: 612px 82px; }

/* ---------- Buttons ---------- */
.button {
  --bg: var(--pine);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px;
  background: var(--bg); color: var(--on-pine);
  font: 600 16px/1 var(--text); letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 2px rgba(8, 51, 40, 0.2);
}
.button:hover { --bg: var(--pine-hi); }
.button:active { transform: scale(0.97); }
.button-small { min-height: 40px; padding: 0 18px; font-size: 15px; }

/* ---------- Nav: a floating pill ---------- */
.nav { position: fixed; inset: 14px 0 auto; z-index: 40; display: flex; justify-content: center; padding: 0 var(--space-sm); pointer-events: none; }
.nav-pill {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--space-lg);
  width: min(100%, 760px);
  padding: 7px 7px 7px 20px;
  border-radius: 999px;
  background: rgba(250, 247, 241, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 0 0 1px rgba(23, 20, 15, 0.07), 0 8px 24px -8px rgba(23, 20, 15, 0.16);
  transition: background-color 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
.nav.on-dark .nav-pill { background: rgba(36, 32, 26, 0.82); box-shadow: 0 0 0 1px rgba(241, 236, 226, 0.1), 0 8px 24px -8px rgba(0, 0, 0, 0.4); }
.nav.on-dark .nav-links a { color: var(--on-night-2); }
.nav.on-dark .nav-links a:hover { color: var(--on-night); }
.nav.on-dark .wordmark { color: var(--on-night); }
.nav.on-dark .button { --bg: var(--on-night); color: var(--night); box-shadow: none; }
.nav.on-dark .button:hover { --bg: #FFFFFF; }
.nav-mark { display: block; flex: none; border-radius: 8px; }
.nav-mark .wordmark { width: 78px; height: auto; transition: color 300ms; }
.nav-links { display: flex; gap: var(--space-lg); margin-left: auto; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 8px 2px; transition: color 150ms; }
.nav-links a:hover { color: var(--ink); }
.nav .button { margin-left: auto; }
.nav-links + .button { margin-left: 0; }
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-pill { padding-left: 16px; }
  .nav .button { margin-left: auto; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(112px, 15vh, 156px) var(--gutter) 0;
  display: grid; justify-items: center; text-align: center;
}
.hero-copy { display: grid; justify-items: center; gap: var(--space-lg); max-width: 1120px; }
.hero .lede { margin-top: var(--space-2xs); max-width: 40ch; }
.hero .display span:last-child { color: var(--pine); }

.hero-shot {
  margin: clamp(44px, 5vw, 72px) 0 0;
  width: min(var(--max), 100%);
  perspective: 1800px;
}
.window {
  position: relative;
  border-radius: clamp(10px, 1.4vw, 18px);
  box-shadow: var(--window-shadow);
  background: var(--paper-hi);
}
.window > img, .window > picture > img, .screen > img:first-child { border-radius: inherit; width: 100%; }
.window > picture { display: contents; }
.hero-shot .window { transform-origin: 50% 0; }

/* As the hero scrolls away, the window settles from a slight tilt to flat (where scroll timelines exist). */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 701px) {
    .hero-shot .window { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
    @keyframes settle { from { transform: rotateX(14deg) scale(0.94); } to { transform: none; } }
  }
}

.review-note {
  display: flex; align-items: flex-start; gap: var(--space-sm);
  max-width: 560px; margin: var(--space-2xl) auto 0; padding: 14px 18px;
  text-align: left; font-size: 15px; line-height: 1.5; color: var(--ink-2);
  background: var(--paper-hi); border: 1px solid var(--line); border-radius: 16px;
}
.review-note strong { color: var(--ink); font-weight: 600; }
.review-note a { color: var(--pine); font-weight: 600; white-space: nowrap; }
.review-dot { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 3px; background: var(--stamp); transform: rotate(8deg); }

/* Phones: instead of shrinking the whole window, two real windows at about 60% of their size (the text reads),
   Mail over Calendar, pinned to a corner and running off the edge. A ring on Lena's chip in Mail and on her
   meeting in Calendar, joined by a line. Positions are in window pixels × the scale (Mail 0.6, Calendar 4/7). */
.hero-pair { display: none; }
@media (max-width: 700px) {
  .hero { text-align: left; justify-items: stretch; padding-top: 80px; }
  .hero .get { margin-top: 0; }
  .hero-copy { justify-items: start; gap: var(--space-md); grid-template-columns: minmax(0, 1fr); }
  .hero .display { font-size: clamp(38px, 10.4vw, 56px); }
  .hero .display span { display: inline; }
  .hero-copy .lede { order: 3; margin-top: var(--space-xs); }
  .hero-shot { display: none; }

  .hero-pair {
    display: block; position: relative; width: auto; height: 393px;
    margin: 0 calc(var(--gutter) * -1); overflow: hidden;
    --mx: min(var(--gutter), calc(100vw - 370px)); /* narrow phones slide Mail left so Lena's chip stays in view */
    justify-self: stretch;
  }
  .pair-window { position: absolute; overflow: hidden; background: var(--paper-hi); }
  .pair-window img { display: block; width: 100%; height: auto; border-radius: 0; }
  .pair-mail { left: var(--mx); top: 0; width: 660px; border-radius: 12px 0 0 0; box-shadow: 0 0 0 1px rgba(23, 20, 15, 0.08), 0 18px 40px -16px rgba(23, 20, 15, 0.35); }
  .pair-calendar { left: -8px; top: 168px; width: 680px; border-radius: 0; box-shadow: 0 0 0 1px rgba(23, 20, 15, 0.08), 0 -10px 34px -14px rgba(23, 20, 15, 0.32); }
  .pair-ring { position: absolute; border: 2px solid var(--stamp); border-radius: 7px; box-shadow: 0 0 0 4px rgba(240, 86, 46, 0.16); }
  .pair-ring-chip { left: calc(var(--mx) + 262px); top: 155px; width: 54px; height: 18px; }
  .pair-ring-event { left: 30px; top: 347px; width: min(calc(100% - 44px), 386px); height: 41px; }
  .pair-link { position: absolute; left: var(--mx); top: 168px; overflow: visible; }
  .pair-link path { fill: none; stroke: var(--stamp); stroke-width: 1.6; stroke-dasharray: 3 3; }
}
@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  .js .pair-ring, .js .pair-link { opacity: 0; animation: enter 600ms var(--ease-out) forwards; }
  .js .pair-ring-chip { animation-delay: 900ms; }
  .js .pair-link { animation-delay: 1150ms; }
  .js .pair-ring-event { animation-delay: 1400ms; }
}

/* ---------- The email form ---------- */
.get { width: min(100%, 520px); display: grid; gap: var(--space-sm); margin-top: var(--space-xs); }
.get-row {
  display: flex; gap: 6px; padding: 6px;
  background: var(--paper-hi);
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--line), 0 10px 30px -14px rgba(23, 20, 15, 0.25);
  transition: box-shadow 200ms var(--ease-out);
}
.get-row:focus-within { box-shadow: 0 0 0 2px var(--pine), 0 10px 30px -14px rgba(23, 20, 15, 0.25); }
.get-input {
  flex: 1; min-width: 0; width: 100%; /* a percentage width keeps the field's built-in size from widening the form */ height: 52px; padding: 0 8px 0 20px;
  border: 0; background: transparent; color: var(--ink);
  font: 17px var(--text); outline: none;
}
.get-input::placeholder { color: var(--ink-3); }
.get-button { position: relative; flex: none; }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.get-note { font-size: 14px; color: var(--ink-3); }
.get-note a { color: inherit; }
.hero .get-note, .finale .get-note { text-align: center; }
@media (max-width: 700px) { .hero .get-note { text-align: left; } }

.get-status:empty { display: none; }
.get-status { font-size: 15px; line-height: 1.5; text-align: left; border-radius: 18px; }
.get[data-state="invalid"] .get-row { box-shadow: 0 0 0 2px var(--stamp), 0 10px 30px -14px rgba(23, 20, 15, 0.25); }
.get[data-state="invalid"] .get-status, .get[data-state="error"] .get-status { color: #B23A1A; padding: 0 20px; }
.get[data-state="sending"] .get-label { opacity: 0.0; }
.get[data-state="sending"] .spinner { display: block; position: absolute; }
.get[data-state="sending"] .get-button { pointer-events: none; }

/* Sent and fallback replace the field with a card of the same height, so nothing below moves. */
.get[data-state="sent"] .get-row, .get[data-state="fallback"] .get-row { display: none; }
.get[data-state="sent"] .get-status, .get[data-state="fallback"] .get-status {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; min-height: 64px;
  background: var(--paper-hi); color: var(--ink-2);
  box-shadow: 0 0 0 1px var(--line), 0 10px 30px -14px rgba(23, 20, 15, 0.25);
  animation: rise 500ms var(--ease-out) both;
}
.get-status strong { color: var(--ink); font-weight: 600; }
.get-status .sent-stamp { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--stamp); color: #fff; display: grid; place-items: center; transform: rotate(-6deg); animation: press 520ms var(--ease-out) both 120ms; }
.get-status .sent-stamp svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.get-status .link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--pine); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.get-status .button { margin-top: 10px; min-height: 44px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes press { 0% { opacity: 0; transform: scale(1.8) rotate(-20deg); } 60% { opacity: 1; } 100% { transform: scale(1) rotate(-6deg); } }

/* On the night band. */
.get-on-night .get-row { background: var(--night-hi); box-shadow: 0 0 0 1px rgba(241, 236, 226, 0.14); }
.get-on-night .get-row:focus-within { box-shadow: 0 0 0 2px var(--on-night); }
.get-on-night .get-input { color: var(--on-night); }
.get-on-night .get-input::placeholder { color: var(--on-night-2); }
.get-on-night .button { --bg: var(--on-night); color: var(--night); box-shadow: none; }
.get-on-night .button:hover { --bg: #FFFFFF; }
.get-on-night .get-note { color: var(--on-night-2); }
.get-on-night[data-state="sent"] .get-status, .get-on-night[data-state="fallback"] .get-status { background: var(--night-hi); color: var(--on-night-2); box-shadow: 0 0 0 1px rgba(241, 236, 226, 0.14); }
.get-on-night .get-status strong { color: var(--on-night); }
.get-on-night .get-status .link-button { color: var(--on-night); }
.get-on-night[data-state="invalid"] .get-status, .get-on-night[data-state="error"] .get-status { color: #FF9B7E; }

/* Phones keep the field and the button on one line, so the hero's form stays in the first screen. */
@media (max-width: 480px) {
  .get-input { height: 48px; padding-left: 14px; font-size: 16px; }
  .get-button { min-height: 48px; padding: 0 18px; font-size: 15px; }
}
@media (max-width: 359px) {
  .get-row { flex-direction: column; border-radius: 22px; }
  .get-input { flex: none; padding-left: 14px; }
  .get-button { width: 100%; }
}

/* ---------- Bands ---------- */
.band { position: relative; }
.band-night { background: var(--night); color: var(--on-night); }
.band-pine { background: var(--pine); color: var(--on-pine); }

/* ---------- Film ---------- */
.film { margin-top: var(--section); padding: var(--section) var(--gutter); }
.film-head { max-width: var(--max); margin: 0 auto var(--space-2xl); display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-md) var(--space-2xl); }
.film-head p { max-width: 38ch; color: var(--on-night-2); font-size: 18px; }
.film-frame { position: relative; max-width: var(--max); margin: 0 auto; border-radius: clamp(12px, 1.6vw, 22px); overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(241, 236, 226, 0.08), 0 40px 120px -30px rgba(0, 0, 0, 0.8); aspect-ratio: 16 / 9; }
.film-frame video { width: 100%; height: 100%; object-fit: cover; }
.film-play {
  position: absolute; inset: 0; width: 100%; border: 0; padding: 0; margin: 0; cursor: pointer;
  display: flex; align-items: flex-end; justify-content: flex-start; gap: 14px;
  padding: clamp(16px, 3vw, 32px);
  background: linear-gradient(to top, rgba(23, 20, 15, 0.45), rgba(23, 20, 15, 0) 45%);
  color: var(--on-night); font: 600 17px var(--text);
  transition: opacity 300ms var(--ease-out);
}
.film-play-icon { width: clamp(56px, 6vw, 76px); aspect-ratio: 1; border-radius: 50%; background: var(--stamp); display: grid; place-items: center; box-shadow: 0 12px 30px -8px rgba(240, 86, 46, 0.6); transition: transform 250ms var(--ease-out); }
.film-play-icon svg { width: 40%; fill: #fff; margin-left: 6%; }
.film-play:hover .film-play-icon { transform: scale(1.08); }
.film-play-label { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-bottom: 6px; text-shadow: 0 1px 12px rgba(0,0,0,0.35); }
.film-len { font-weight: 500; font-size: 14px; opacity: 0.8; }
.film.is-playing .film-play { opacity: 0; pointer-events: none; }

/* ---------- Tour: the same window follows you and changes screen ---------- */
.tour { padding: var(--section) var(--gutter) 0; }
.tour-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); }
.tour-steps { display: grid; }
.tour-step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; gap: var(--space-md); padding: var(--space-2xl) 0; }
.tour-step:first-child { min-height: 64vh; justify-content: flex-start; padding-top: 12vh; }
.tour-step p { color: var(--ink-2); font-size: 18px; max-width: 34ch; text-wrap: pretty; }
.tour-step h3 { transition: color 400ms var(--ease-out); color: color-mix(in oklab, var(--ink) 35%, var(--paper)); }
.tour-step.is-active h3 { color: var(--ink); }
.tour-detail { display: none; }

.tour-stage { position: relative; }
.tour-sticky { position: sticky; top: calc(50vh - min(260px, 19vw)); display: grid; gap: var(--space-lg); justify-items: center; }
.tour-window { width: 100%; aspect-ratio: 1440 / 900; }
.screen { position: absolute; inset: 0; border-radius: inherit; opacity: 0; transition: opacity 500ms var(--ease-out); }
.screen.is-active { opacity: 1; }
.screen:first-child { position: relative; }
.screen > img:first-child { position: absolute; inset: 0; height: 100%; }
.screen:first-child > img:first-child { position: relative; }
.lift {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); max-width: none;
  transform-origin: 50% 60%;
  transition: transform 600ms var(--ease-out) 150ms, filter 600ms var(--ease-out) 150ms;
}
.screen.is-active .lift { transform: translateY(-1.2%) scale(1.06); filter: drop-shadow(0 18px 28px rgba(23, 20, 15, 0.22)); }
.tour-dots { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--paper-deep); }
.tour-dots li { font-size: 13px; font-weight: 600; color: var(--ink-3); padding: 6px 12px; border-radius: 999px; transition: background-color 300ms, color 300ms; }
.tour-dots li.is-active { background: var(--paper-hi); color: var(--ink); box-shadow: 0 1px 2px rgba(23,20,15,0.12); }

@media (max-width: 900px) {
  .tour-grid { grid-template-columns: 1fr; }
  .tour-stage { display: none; }
  .tour-step, .tour-step:first-child { min-height: 0; padding: var(--space-2xl) 0; justify-content: flex-start; }
  .tour-step h3 { color: var(--ink); }
  .tour-detail { display: block; width: 100%; max-width: 520px; margin-top: var(--space-sm); border-radius: 14px; }
  .tour-step[data-step="mail"] .tour-detail { max-width: 340px; }
  .tour-step[data-step="search"] .tour-detail { max-width: 440px; }
}

/* ---------- Everything else ---------- */
.more { max-width: var(--max); margin: 0 auto; padding: var(--section) var(--gutter); }
.more > h2 { max-width: 16ch; margin-bottom: var(--space-3xl); }
.more-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); border-top: 1px solid var(--line); }
.more-list li { display: grid; grid-template-columns: 36px 1fr; column-gap: var(--space-md); row-gap: 4px; align-content: start; padding: var(--space-xl) var(--space-lg) var(--space-xl) 0; border-bottom: 1px solid var(--line); }
.more-list .glyph { grid-row: span 2; width: 32px; height: 32px; fill: none; stroke: var(--pine); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.more-list h3 { font: 700 19px/1.25 var(--display); letter-spacing: -0.01em; }
.more-list p { color: var(--ink-2); font-size: 16px; }

/* ---------- Themes ---------- */
.themes { padding: var(--section) var(--gutter); transition: background-color 0s; }
.themes-head { max-width: var(--max); margin: 0 auto var(--space-2xl); display: grid; grid-template-columns: 1fr auto; align-items: end; gap: var(--space-md) var(--space-2xl); }
.themes-head h2 { grid-column: 1; }
.themes-head p { grid-column: 1; color: var(--ink-2); font-size: 18px; }
.mode-switch { grid-column: 2; grid-row: 1 / span 2; position: relative; display: flex; padding: 5px; border-radius: 999px; background: var(--paper-deep); isolation: isolate; }
.mode-switch button { position: relative; z-index: 1; min-width: 92px; min-height: 44px; border: 0; background: none; border-radius: 999px; font: 600 15px var(--text); color: var(--ink-2); cursor: pointer; transition: color 300ms; }
.mode-switch button[aria-checked="true"] { color: var(--ink); }
.mode-knob { position: absolute; z-index: 0; top: 5px; left: 5px; width: calc(50% - 5px); height: calc(100% - 10px); border-radius: 999px; background: var(--paper-hi); box-shadow: 0 1px 3px rgba(23,20,15,0.18); transition: transform 450ms var(--ease-out), background-color 300ms; }
.themes.is-dark .mode-knob { transform: translateX(100%); }
.theme-wall { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px, 1.6vw, 22px); }
.theme-wall li { display: grid; gap: 10px; }
.theme-wall img { width: 100%; border-radius: 8px; box-shadow: 0 1px 2px rgba(23,20,15,0.08), 0 12px 28px -12px rgba(23,20,15,0.3); transition: transform 400ms var(--ease-out); }
.theme-wall li:hover img { transform: translateY(-4px); }
.theme-wall span { font-size: 14px; font-weight: 600; color: var(--ink-3); }

.themes.is-dark { background: var(--night); color: var(--on-night); }
.themes.is-dark .themes-head p, .themes.is-dark .theme-wall span { color: var(--on-night-2); }
.themes.is-dark .mode-switch { background: var(--night-hi); }
.themes.is-dark .mode-switch button { color: var(--on-night-2); }
.themes.is-dark .mode-switch button[aria-checked="true"] { color: var(--night); }
.themes.is-dark .mode-knob { background: var(--on-night); }
.themes.is-dark .theme-wall img { box-shadow: 0 0 0 1px rgba(241,236,226,0.08), 0 12px 28px -12px rgba(0,0,0,0.6); }

/* The switch spreads dark mode from its knob (View Transitions where supported). */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: reveal 700ms var(--ease-in-out); }
@keyframes reveal { from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 50%)); } to { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 50%) var(--vt-y, 50%)); } }

@media (max-width: 900px) {
  .theme-wall { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; margin-right: calc(var(--gutter) * -1); padding: 4px var(--gutter) 24px 0; scrollbar-width: none; }
  .theme-wall::-webkit-scrollbar { display: none; }
  .theme-wall li { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .themes-head { grid-template-columns: 1fr; }
  .mode-switch { grid-column: 1; grid-row: auto; justify-self: start; }
}

/* ---------- Privacy ---------- */
.privacy { padding: var(--section) var(--gutter); overflow: hidden; }
.privacy-inner { max-width: var(--max); margin: 0 auto; display: grid; gap: var(--space-xl); }
.privacy .display { color: var(--on-pine); max-width: 11ch; }
.privacy-lede { font-size: clamp(19px, 1.8vw, 23px); line-height: 1.5; color: var(--on-pine-2); max-width: 44ch; }
.privacy-lede::first-line { color: var(--on-pine); }
.privacy-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--space-xl); margin-top: var(--space-xl); padding-top: var(--space-xl); border-top: 1px solid rgba(234, 243, 238, 0.18); }
.privacy-points li { color: var(--on-pine-2); font-size: 16px; line-height: 1.55; }
.privacy-points strong { display: block; color: var(--on-pine); font: 700 20px/1.25 var(--display); letter-spacing: -0.01em; margin-bottom: 6px; }
.arrow-link { justify-self: start; color: var(--mint); font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.arrow-link::after { content: "→"; transition: transform 200ms var(--ease-out); }
.arrow-link:hover::after { transform: translateX(4px); }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 0 auto; padding: var(--section) var(--gutter); }
.faq > h2 { margin-bottom: var(--space-2xl); }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-lg);
  padding: var(--space-lg) 0;
  font: 700 clamp(19px, 2vw, 23px)/1.3 var(--display); letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background: linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat;
  transition: transform 300ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--pine); }
.faq-body { padding: 0 0 var(--space-xl); display: grid; gap: var(--space-md); color: var(--ink-2); max-width: 62ch; }
.faq-body a { color: var(--pine); font-weight: 600; }
.faq details:target summary, .faq details.is-flash summary { color: var(--pine); }
.consent-steps { counter-reset: step; display: grid; gap: 10px; padding: var(--space-md) var(--space-lg); background: var(--paper-hi); border: 1px solid var(--line); border-radius: 16px; }
.consent-steps li { counter-increment: step; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--ink); }
.consent-steps li::before { content: counter(step); width: 24px; height: 24px; border-radius: 50%; background: var(--paper-deep); display: grid; place-items: center; font: 700 13px var(--text); color: var(--ink-2); }
.consent-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 6px; border: 1px solid #C9D2E3; color: #1A56C8; background: #F7F9FD; font: 500 14px/1.4 var(--text); }
.consent-chip-solid { background: #1A56C8; color: #fff; border-color: #1A56C8; }

/* ---------- Finale: the film's end card ---------- */
.finale { padding: var(--section) var(--gutter) clamp(72px, 9vw, 120px); display: grid; justify-items: center; text-align: center; gap: var(--space-xl); }
.finale-mark { width: min(440px, 72vw); height: auto; color: var(--on-night); overflow: visible; }
.finale-line { font-size: clamp(42px, 6.4vw, 92px); color: var(--on-night); margin-top: calc(var(--space-md) * -1); }
.finale .get { margin-top: var(--space-md); }

/* The pen writes the name (the m, a lift, then "ailey"), then the stamp is pressed onto the i. */
.js .finale-mark .pen path { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.js .finale-mark .stamp { opacity: 0; }
.finale-mark.is-written .pen path:nth-child(1) { animation: write 420ms cubic-bezier(0.45, 0, 0.55, 1) forwards; }
.finale-mark.is-written .pen path:nth-child(2) { animation: write 1150ms cubic-bezier(0.45, 0, 0.4, 1) forwards 470ms; }
.finale-mark.is-written .stamp { animation: stamp 520ms var(--ease-out) forwards 1700ms; }
@keyframes write { to { stroke-dashoffset: 0; } }
@keyframes stamp { 0% { opacity: 0; transform: scale(1.9) rotate(-14deg); } 40% { opacity: 1; } 100% { opacity: 1; transform: none; } }

/* The nav's stamp is pressed on once, at load. */
.js .nav .wordmark .stamp { opacity: 0; animation: stamp 520ms var(--ease-out) forwards 900ms; }

/* ---------- Footer ---------- */
.footer { background: var(--night); color: var(--on-night-2); padding: var(--space-2xl) var(--gutter) var(--space-3xl); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md) var(--space-xl); border-top: 1px solid rgba(241, 236, 226, 0.08); font-size: 15px; }
.footer .wordmark { width: 84px; height: auto; color: var(--on-night); }
.footer nav { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); }
.footer a { color: var(--on-night); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer p { margin-left: auto; font-size: 14px; }
@media (max-width: 700px) { .footer p { margin-left: 0; width: 100%; } }

/* ---------- Entrances ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal-load { opacity: 0; transform: translateY(18px); animation: enter 900ms var(--ease-out) forwards; }
  .js .reveal-load:nth-child(1) { animation-delay: 60ms; }
  .js .hero-copy .reveal-load:nth-child(3) { animation-delay: 160ms; }
  .js .hero-copy .reveal-load:nth-child(4) { animation-delay: 260ms; }
  /* The pictures are the LCP: they slide in but are never transparent. */
  .js .hero-pair.reveal-load { opacity: 1; transform: translateY(56px); animation: rise-in 1100ms var(--ease-out) 120ms both; }
  .js .hero-shot.reveal-load { opacity: 1; transform: translateY(56px); animation: rise-in 1100ms var(--ease-out) 120ms both; }
  @keyframes rise-in { from { transform: translateY(56px); } to { transform: none; } }
  .js .review-note.reveal-load { animation-delay: 700ms; }
  @keyframes enter { to { opacity: 1; transform: none; } }

  .js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .more-list .reveal:nth-child(3n+2) { transition-delay: 80ms; }
  .js .more-list .reveal:nth-child(3n) { transition-delay: 160ms; }
}
@media (prefers-reduced-motion: reduce) {
  .js .finale-mark .pen path { stroke-dashoffset: 0; }
  .js .finale-mark .stamp, .js .nav .wordmark .stamp { opacity: 1; animation: none; }
  .screen, .lift, .button, .theme-wall img { transition: none; }
}
