/* Damp Diary concept site, draft 3: a product-page treatment.
   Light grey, white and black grounds, the system font, big tight headlines, rounded tiles, and the
   device's own green, amber and red light as the only accents. Every scroll timeline and transition is
   the same as draft 2. */

:root {
  --white: #FBFBFD;
  --grey: #F5F5F7;
  --black: #000000;
  --text: #1D1D1F;
  --text-2: #6E6E73;
  --text-dark: #F5F5F7;
  --text-dark-2: #A1A1A6;
  --tile-dark: #1C1C1E;
  --line: #D2D2D7;
  --line-dark: #333336;

  --teal: #0A7C70;
  --teal-light: #4FD1C5;
  --green: #3E8E5A;
  --green-light: #5FBF83;
  --amber: #D9902A;
  --amber-light: #F0A93A;
  --red: #C2483D;
  --red-light: #F06A5A;

  --gutter: clamp(16px, 4.5vw, 80px);
  --maxw: 1180px;
  --radius: 28px;
  --ease: cubic-bezier(.35, 0, 0, 1);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --page-bg: var(--black);
  --ring: var(--green);
  --fog: 0;
  --drops: 0;
  --dawn: 0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(17px, 1.2vw, 19px);
  line-height: 1.47;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color .7s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; margin: 0; letter-spacing: -0.028em; }
p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- canvas and layers ---------- */
#scene {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity .8s var(--ease);
}
.webgl #scene { opacity: 1; }
main, .site-footer { position: relative; z-index: 1; }

/* ---------- type ---------- */
h1 { font-size: clamp(56px, 9vw, 112px); line-height: 1; letter-spacing: -0.035em; }
h2 { font-size: clamp(36px, 5.2vw, 80px); line-height: 1.04; }
h3 { font-size: clamp(22px, 1.9vw, 28px); line-height: 1.15; letter-spacing: -0.02em; }
.eyebrow { font-size: clamp(15px, 1.2vw, 19px); font-weight: 600; letter-spacing: -0.01em; color: var(--text-2); }
[data-tone="dark"] .eyebrow { color: var(--text-dark-2); }
.tagline { font-size: clamp(28px, 3.6vw, 52px); font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; }
.sec-sub { font-size: clamp(19px, 1.7vw, 26px); line-height: 1.35; font-weight: 500; color: var(--text-2); max-width: 36em; margin-left: auto; margin-right: auto; }
[data-tone="dark"] .sec-sub { color: var(--text-dark-2); }
.fine, .caption { font-size: 13px; line-height: 1.5; color: var(--text-2); }
[data-tone="dark"] .fine, [data-tone="dark"] .caption { color: var(--text-dark-2); }
.center { text-align: center; }
.tag {
  display: inline-block; font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(217, 144, 42, .14); color: #8A560B;
  justify-self: start; width: fit-content;
}
[data-tone="dark"] .tag { background: rgba(240, 169, 58, .16); color: var(--amber-light); }

/* gradient text: the device's own light */
.grad-lights, .grad-green, .grad-amber { -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.grad-lights { background-image: linear-gradient(90deg, var(--green-light) 0%, var(--amber-light) 55%, var(--red-light) 100%); }
.grad-green { background-image: linear-gradient(90deg, #0A7C70 0%, #3E8E5A 100%); }
[data-tone="dark"] .grad-green { background-image: linear-gradient(90deg, var(--teal-light) 0%, var(--green-light) 100%); }
.grad-amber { background-image: linear-gradient(90deg, var(--amber-light) 0%, #F7C66B 100%); }

.led { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(62, 142, 90, .18); }
.led-green { background: var(--green); box-shadow: 0 0 0 4px rgba(62, 142, 90, .18); }
.led-amber { background: var(--amber); box-shadow: 0 0 0 4px rgba(217, 144, 42, .2); }
.led-red { background: var(--red); box-shadow: 0 0 0 4px rgba(194, 72, 61, .2); }
.led-ink { background: var(--text); box-shadow: 0 0 0 4px rgba(29, 29, 31, .12); }

sup.fn { font-size: .55em; line-height: 0; margin-left: 2px; vertical-align: super; }
sup.fn a { text-decoration: none; color: var(--text-2); }
[data-tone="dark"] sup.fn a { color: var(--text-dark-2); }
sup.fn a:hover { text-decoration: underline; }

/* ---------- product sub-nav, pills, links ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  height: 52px; padding: 0 var(--gutter);
  color: var(--text);
  background: rgba(251, 251, 253, .72);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  transition: color .4s var(--ease), background-color .4s var(--ease);
}
.site-header[data-tone="dark"] { color: var(--text-dark); background: rgba(22, 22, 23, .72); border-bottom-color: rgba(255, 255, 255, .08); }
.wordmark { font-weight: 600; font-size: 21px; letter-spacing: -0.02em; text-decoration: none; }
.site-nav { display: flex; gap: 24px; margin-left: auto; }
.site-nav a { font-size: 12px; text-decoration: none; opacity: .8; letter-spacing: 0; }
.site-nav a:hover { opacity: 1; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 980px; border: 0;
  background: var(--teal); color: #fff;
  font: 400 17px/1.17 var(--sans); letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .3s var(--ease), transform .3s var(--ease);
}
.pill:hover { background: #086A60; }
.pill-small { padding: 5px 12px; font-size: 12px; }
.pill-quiet { background: rgba(0, 0, 0, .06); color: var(--text); }
.pill-quiet:hover { background: rgba(0, 0, 0, .1); }
.chev { color: var(--teal); text-decoration: none; font-size: 17px; }
.chev::after { content: ' ›'; font-size: 1.1em; }
.chev:hover { text-decoration: underline; }
[data-tone="dark"] .chev { color: var(--teal-light); }

.progress { position: fixed; right: 10px; top: 35vh; height: 30vh; width: 2px; z-index: 10; background: rgba(127, 127, 127, .25); border-radius: 2px; }
.progress span { position: absolute; inset: 0; transform-origin: top; transform: scaleY(0); background: var(--teal-light); border-radius: 2px; }

/* ---------- sections ---------- */
.sec { padding: clamp(96px, 14vh, 168px) var(--gutter); }
.sec > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.sec > * + * { margin-top: clamp(28px, 3.4vw, 56px); }
.sec-white { background: var(--white); color: var(--text); }
.sec-grey { background: var(--grey); color: var(--text); }
.sec-black { background: var(--black); color: var(--text-dark); }
.is-clear { background: transparent; }
[data-tone="dark"] { color: var(--text-dark); }
.sec-head { text-align: center; display: grid; gap: 18px; justify-items: center; }
.sec-head h2 { max-width: 20ch; }
#evidence .sec-head h2 { max-width: 24ch; font-size: clamp(34px, 4.6vw, 68px); }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr auto;
  justify-items: center; text-align: center;
  padding: 92px var(--gutter) 28px;
  position: relative;
}
.hero-text { display: grid; gap: 14px; justify-items: center; max-width: 900px; }
.hero h1 { color: var(--text-dark); }
.hero-sub { font-size: clamp(19px, 1.7vw, 24px); color: var(--text-dark-2); font-weight: 500; }
.cta-row { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; justify-content: center; margin-top: 10px; }
.hero-anchor { width: min(100%, 980px); height: clamp(240px, 42vh, 520px); }
.hero-foot { font-size: 13px; color: var(--text-dark-2); }
.scroll-cue {
  position: absolute; right: var(--gutter); bottom: 30px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-dark-2);
}
.scroll-cue span { width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 50%; position: relative; }
.scroll-cue span::after { content: ''; position: absolute; left: 50%; top: 4px; width: 2px; height: 5px; margin-left: -1px; background: currentColor; border-radius: 2px; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(5px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- anchors and fallbacks ---------- */
.anchor { position: relative; width: 100%; }
.fallback-device {
  position: absolute; left: 50%; top: 50%;
  width: min(44%, 260px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: #F2F2F2; border-radius: 26%;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
  display: grid; place-items: center;
  transition: opacity .6s var(--ease);
}
.fallback-device span {
  width: 64%; aspect-ratio: 1; border-radius: 50%;
  border: 6px solid var(--ring);
  box-shadow: 0 0 24px var(--ring), inset 0 0 18px var(--ring);
  transition: border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.fallback-gen1 { border-radius: 10%; }
.webgl .fallback-device { opacity: 0; }
.poster { display: none; position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; border-radius: 18px; }
html:not(.webgl) .poster.is-loaded { display: block; }
html:not(.webgl) .anchor:has(.poster.is-loaded) .fallback-device { opacity: 0; }

/* ---------- tiles (bento) ---------- */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tile {
  background: var(--white); border-radius: var(--radius);
  padding: clamp(26px, 2.6vw, 40px);
  display: grid; gap: 12px; align-content: start;
  overflow: hidden; position: relative;
}
.sec-white .tile { background: var(--grey); }
.tile-wide { grid-column: span 2; }
.tile-tall { grid-row: span 2; align-content: end; }
.tile-dark { background: var(--tile-dark); color: var(--text-dark); }
.tile-black { background: var(--black); color: var(--text-dark); }
.tile-label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.tile-dark .tile-label, .tile-black .tile-label { color: var(--text-dark-2); }
.tile-num { font-size: clamp(56px, 6.4vw, 104px); font-weight: 700; line-height: 1; letter-spacing: -0.045em; }
.tile-num .unit { font-size: .34em; font-weight: 600; letter-spacing: -0.01em; margin-left: 6px; color: var(--text-2); }
.tile-text { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.42; font-weight: 500; }
.tile-dark .tile-text, .tile-black .tile-text { color: var(--text-dark); }
.tile-sub { font-size: 15px; color: var(--text-2); }
.tile-dark .tile-sub { color: var(--text-dark-2); }

/* problem */
.bento-problem { grid-template-rows: auto auto; }
.bento-problem .tile-tall { background: var(--black); color: var(--text-dark); }
.bento-problem .tile-tall .tile-label, .bento-problem .tile-tall .tile-sub { color: var(--text-dark-2); }
.bento-problem .tile-tall .tile-num { font-size: clamp(88px, 11vw, 168px); background-image: linear-gradient(90deg, var(--green-light) 0%, var(--amber-light) 70%, var(--red-light) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.bento-problem .tile-tall sup.fn a { color: var(--text-dark-2); }
.tile-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; padding: 0; }
.tile-copy { padding: clamp(26px, 2.6vw, 40px); display: grid; gap: 14px; align-content: center; }
.tile-quote { font-size: 16px; line-height: 1.45; color: var(--text-2); border-left: 3px solid var(--amber); padding-left: 14px; }
.tile-media { margin: 0; position: relative; min-height: 280px; }
.crop-img { position: absolute; inset: 0; background-repeat: no-repeat; }
.crop-window { background-image: url("assets/Gen%202%20assembled.jpg"); background-size: cover; background-position: 58% 50%; }

/* ---------- pinned sections ---------- */
.pin-track { position: relative; }
.js .pin-track[data-pin="night"] { height: 460vh; }
.js .pin-track[data-pin="gen1"], .js .pin-track[data-pin="gen2"] { height: 520vh; }
.pin-stage { position: relative; }
.js .pin-stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  padding: 92px var(--gutter) 40px;
}

/* night */
.js .night .pin-stage {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 4fr);
  grid-template-rows: auto 1fr auto;
  column-gap: clamp(16px, 3vw, 56px);
}
.stage-label { grid-column: 1 / -1; }
.window {
  position: relative; align-self: center;
  width: 100%; max-width: 340px; aspect-ratio: 3 / 4;
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 0 0 10px #E9E4DA, 0 30px 60px rgba(0, 0, 0, .5);
}
.window-sky { position: absolute; inset: 0; background: linear-gradient(180deg, #0B1420 0%, #1C2B3D 70%, #2E3B4C 100%); }
.window-sky::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #8FA9C4 0%, #E8C9A3 100%); opacity: var(--dawn); transition: opacity .8s var(--ease); }
.window-fog { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 110%, rgba(235, 240, 243, .95), rgba(220, 228, 233, .75) 60%, rgba(210, 220, 228, .55)); opacity: var(--fog); backdrop-filter: blur(4px); transition: opacity .8s var(--ease); }
.window-drops {
  position: absolute; inset: 0; opacity: var(--drops); transition: opacity .8s var(--ease);
  background-image:
    radial-gradient(circle at 30% 35%, rgba(255, 255, 255, .9) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .85) 0 3px, transparent 4px),
    radial-gradient(circle at 50% 80%, rgba(255, 255, 255, .8) 0 2px, transparent 3px),
    linear-gradient(180deg, transparent 70%, rgba(255, 255, 255, .5) 100%);
  background-size: 34px 46px, 52px 64px, 41px 58px, 100% 100%;
}
.window-frame { position: absolute; inset: 0; border: 10px solid #E9E4DA; }
.window-frame::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 8px; margin-left: -4px; background: #E9E4DA; }
.window-frame::after { content: ''; position: absolute; top: 46%; left: 0; right: 0; height: 8px; background: #E9E4DA; }
.night-anchor { align-self: stretch; min-height: 280px; }
.steps { position: relative; align-self: center; min-height: 380px; }
.step { display: grid; gap: 12px; align-content: start; }
.step h3 { font-size: clamp(28px, 2.8vw, 44px); letter-spacing: -0.03em; }
.js .step {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(18px); pointer-events: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js .step.is-active { opacity: 1; transform: none; pointer-events: auto; }
.no-js .step + .step { margin-top: 40px; }
.step-time { font-family: var(--mono); font-size: 15px; color: var(--teal-light); }
.step p:not(.step-time):not(.chat-tag):not(.bubble) { color: var(--text-dark-2); max-width: 40ch; }
.chat { margin-top: 8px; display: grid; gap: 8px; max-width: 360px; }
.chat-tag { font-size: 12px; font-weight: 600; color: var(--amber-light); }
.bubble {
  background: #E9E9EB; color: var(--text);
  padding: 12px 16px; border-radius: 20px 20px 20px 6px;
  font-size: 15px; line-height: 1.4;
}
.step-dots { grid-column: 1 / -1; display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.step-dots li { width: 28px; height: 3px; border-radius: 3px; background: rgba(245, 245, 247, .2); transition: background-color .4s var(--ease); }
.step-dots li.is-on { background: var(--teal-light); }

/* chapters (Gen 1, Gen 2), both on black */
.js .chapter .pin-stage {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  grid-template-rows: auto 1fr auto;
  column-gap: clamp(16px, 3vw, 56px);
}
.chapter-head { display: grid; gap: 10px; grid-column: 1; grid-row: 1; }
.chapter-head h2 { font-size: clamp(30px, 3.4vw, 54px); }
.chapter-sub { color: var(--text-dark-2); max-width: 40ch; font-weight: 500; }
.chapter-anchor { grid-column: 2; grid-row: 1 / 3; min-height: 320px; }
.parts { grid-column: 1; grid-row: 2; align-self: center; list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 0; }
.parts li {
  display: grid; grid-template-columns: 30px 1fr; column-gap: 12px;
  padding: 10px 12px; border-top: 1px solid var(--line-dark);
  opacity: .5; transition: opacity .4s var(--ease), background-color .4s var(--ease);
}
.parts li::before {
  content: attr(data-n); grid-row: 1 / 3;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font: 600 12px/1 var(--sans); background: var(--text-dark); color: var(--black);
}
.parts li b { font-weight: 600; font-size: 16px; }
.parts li span { font-size: 14px; line-height: 1.45; color: var(--text-dark-2); }
.no-js .parts li, .parts.is-open li { opacity: 1; }
.parts li.is-active { opacity: 1; background: rgba(255, 255, 255, .07); border-radius: 12px; }
.chapter-foot { grid-column: 1 / -1; grid-row: 3; max-width: 90ch; font-size: 13px; color: var(--text-dark-2); }
.chat-gen2 { position: absolute; right: var(--gutter); bottom: 88px; z-index: 2; }
.js .chat-gen2 { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .chat-gen2.is-on { opacity: 1; transform: none; }

.markers { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.marker {
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  display: grid; place-items: center;
  font: 600 12px/1 var(--sans);
  background: var(--text-dark); color: var(--black);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .6);
  opacity: 0; transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.marker.is-on { opacity: 1; }
.marker.is-active { background: var(--teal-light); color: var(--black); }

/* labelled exploded renders under each chapter (the whole image is shown, nothing cropped) */
.render { position: relative; margin: 0 auto; padding: 0 var(--gutter) clamp(96px, 12vh, 160px); max-width: calc(var(--maxw) + 2 * var(--gutter)); display: grid; gap: 14px; }
.render-frame { position: relative; }
.render-frame img { width: 100%; height: auto; border-radius: var(--radius); }
.render figcaption, .shot figcaption, .tile-photo figcaption { font-size: 13px; color: var(--text-dark-2); text-align: center; }
.callout { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); display: grid; justify-items: center; }
.callout i {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font: 600 12px/1 var(--sans); font-style: normal;
  background: var(--text); color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .9);
}
.callout em {
  position: absolute; bottom: calc(100% + 8px); white-space: nowrap;
  font: 600 13px/1 var(--sans); font-style: normal;
  padding: 7px 11px; border-radius: 999px;
  background: rgba(29, 29, 31, .86); color: #fff;
  backdrop-filter: blur(8px);
}
.callout.below em { bottom: auto; top: calc(100% + 8px); }
.legend { display: none; }
.shot.is-empty::before, .render.is-empty .render-frame::before {
  content: 'Image slot: ' attr(data-file);
  display: grid; place-items: center; aspect-ratio: 1376 / 768; padding: 16px; text-align: center;
  border: 2px dashed var(--line); border-radius: var(--radius);
  font-size: 13px; color: var(--text-2); background: var(--grey);
}
.render.is-empty img, .render.is-empty .callout { display: none; }
.shot.is-empty img { display: none; }

/* ---------- compare ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.shot { margin: 0; display: grid; gap: 12px; }
.shot img { width: 100%; height: auto; border-radius: var(--radius); }
.shot figcaption { color: var(--text-2); }
.shot figcaption b { color: var(--text); font-weight: 600; margin-right: 4px; }
table { border-collapse: collapse; width: 100%; }
caption { text-align: left; font-size: 14px; font-weight: 600; color: var(--text-2); padding-bottom: 10px; }
th, td { text-align: left; vertical-align: top; padding: 16px 16px 16px 0; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.42; }
thead th { font-size: 14px; font-weight: 600; color: var(--text-2); border-top: none; }
.compare thead th { font-size: 21px; color: var(--text); letter-spacing: -0.02em; }
.compare th[scope="row"] { font-size: 14px; font-weight: 600; color: var(--text-2); width: 16%; }

/* ---------- the app ---------- */
.app-points { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.app-points li { background: var(--white); border-radius: 20px; padding: 22px 24px; font-size: 17px; line-height: 1.42; color: var(--text-2); }
.app-points li b { color: var(--text); font-weight: 600; }
.app-points .led { display: block; margin-bottom: 14px; }
.app-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.seg { display: none; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, .06); }
.seg button { font: 500 14px/1 var(--sans); padding: 9px 16px; border-radius: 999px; border: 0; background: transparent; color: var(--text); cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.demo-toggle[aria-pressed="false"] .led { background: var(--amber); box-shadow: 0 0 0 4px rgba(217, 144, 42, .2); }
.app-status { max-width: 60ch; }

.phones { --s: .7; display: flex; justify-content: center; align-items: flex-start; gap: clamp(20px, 3vw, 56px); }
.phone { margin: 0; display: grid; gap: 14px; justify-items: center; }
.phone figcaption { font-size: 13px; color: var(--text-2); }
.phone-body { position: relative; padding: 12px; background: #0B0B0C; box-shadow: 0 0 0 2px #2C2C2E, 0 40px 80px rgba(0, 0, 0, .25); }
.phone-ios .phone-body { border-radius: 52px; }
.phone-ios .phone-body::before, .phone-ios .phone-body::after { content: ''; position: absolute; width: 4px; border-radius: 2px; background: #2C2C2E; }
.phone-ios .phone-body::before { left: -4px; top: 120px; height: 56px; }
.phone-ios .phone-body::after { right: -4px; top: 150px; height: 84px; }
.phone-android .phone-body { border-radius: 34px; padding: 10px; }
.phone-android .phone-body::after { content: ''; position: absolute; right: -4px; top: 130px; width: 4px; height: 70px; border-radius: 2px; background: #2C2C2E; }
.phone-android { margin-top: 48px; }
.phone-screen { position: relative; overflow: hidden; width: calc(390px * var(--s)); height: calc(844px * var(--s)); background: var(--white); }
.phone-ios .phone-screen { border-radius: 42px; }
.phone-android .phone-screen { border-radius: 26px; }
.phone-screen iframe { position: absolute; left: 0; top: 0; width: 390px; height: 844px; border: 0; transform: scale(var(--s)); transform-origin: 0 0; background: var(--white); opacity: 0; transition: opacity .5s var(--ease); }
.phone.is-live iframe { opacity: 1; }
.phone-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.phone-poster.is-loaded { display: block; }
.phone.is-live .phone-poster, .phone.is-live .phone-placeholder { visibility: hidden; }
.phone-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--text-2); font-size: 13px; }
.phone-poster.is-loaded + .phone-placeholder { display: none; }
.ph-ring { width: 64px; height: 64px; border-radius: 22px; border: 5px solid var(--green); box-shadow: 0 0 18px rgba(62, 142, 90, .5); animation: ph 1.6s var(--ease) infinite alternate; }
@keyframes ph { from { opacity: .45; } to { opacity: 1; } }
.island { position: absolute; left: 50%; top: 22px; width: 92px; height: 26px; margin-left: -46px; border-radius: 14px; background: #0B0B0C; z-index: 2; }
.punch { position: absolute; left: 50%; top: 20px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #0B0B0C; box-shadow: 0 0 0 2px #1C1C1E; z-index: 2; }
@media (min-width: 901px) and (max-width: 1240px) { .phones { --s: .56; } }
@media (min-width: 901px) and (max-height: 940px) {
  .parts li { padding: 7px 10px; }
  .parts li span { display: none; }
  .parts li.is-active span { display: block; }
  .chapter-head h2 { font-size: clamp(28px, 2.8vw, 44px); }
  .chapter-sub { font-size: 15px; }
  .chapter-foot { font-size: 12px; }
}

/* ---------- verdict ---------- */
.verdict .sec-head h2 { max-width: 18ch; }
.bento-verdict .tile-num { font-size: clamp(52px, 5.6vw, 88px); }
.bento-verdict .tile-black { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; column-gap: 32px; align-items: center; }
.bento-verdict .tile-black .tile-label { grid-column: 1 / -1; }
.tile-verdict { display: flex; align-items: center; gap: 16px; font-size: clamp(32px, 3.4vw, 52px); font-weight: 700; letter-spacing: -0.03em; color: var(--red-light); }
.tile-verdict .led { width: 16px; height: 16px; box-shadow: 0 0 0 6px rgba(194, 72, 61, .25), 0 0 24px rgba(240, 106, 90, .6); }
.rules { max-width: 760px; }

/* ---------- evidence ---------- */
.bento-evidence .tile-wide { grid-column: 1 / -1; }
.log { margin: 0; padding: 18px 20px; border-radius: 16px; overflow-x: auto; background: #000; color: #CFE3DF; font: 14px/1.85 var(--mono); white-space: pre; }
.log-head { color: #6E7B80; }
.letter { margin: 6px 0 0; padding: 22px; border-radius: 16px; background: #F5F5F7; color: var(--text); display: grid; gap: 10px; }
.letter p { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }
.letter footer { font-size: 13px; color: var(--text-2); }
.tile-dark b { color: var(--text-dark); }

/* ---------- built ---------- */
.state { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.tile-note { grid-column: 1 / -1; background: transparent; border: 1px solid var(--line); }
.tile-note ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); }

/* ---------- others ---------- */
.others td:first-child { font-weight: 600; width: 28%; }
.others td:nth-child(2) { width: 24%; color: var(--text-2); }
.others tr.is-us td { background: rgba(62, 142, 90, .1); border-top: 2px solid var(--green); }
.others tr.is-us td:first-child { padding-left: 14px; border-radius: 14px 0 0 14px; }
.others tr.is-us td:last-child { border-radius: 0 14px 14px 0; }

/* ---------- founder ---------- */
.founder { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.tile-photo { margin: 0; padding: 0; aspect-ratio: 4 / 5; display: block; }
.tile-photo figcaption { position: absolute; left: 0; right: 0; bottom: 14px; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.crop-founder { background-image: url("assets/Gen%201%20assembled.jpg"); background-size: auto 150%; background-position: 31% 52%; }
.founder-text { display: grid; gap: 24px; }
.founder-quote { margin: 0; display: grid; gap: 16px; }
.founder-quote p { font-size: clamp(24px, 2.4vw, 38px); line-height: 1.22; font-weight: 600; letter-spacing: -0.025em; }
.founder-quote footer { font-size: 15px; color: var(--text-2); }
.creds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.creds li { display: grid; gap: 2px; padding: 16px 18px; border-radius: 18px; background: var(--white); }
.creds b { font-weight: 600; }
.creds span { color: var(--text-2); font-size: 15px; }
.links { display: flex; gap: 24px; }

/* ---------- interest ---------- */
.interest-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 14px; align-items: end; max-width: 860px; }
.field { display: grid; gap: 8px; }
.field span { font-size: 14px; font-weight: 600; color: var(--text-2); }
.field input { font: 17px/1.3 var(--sans); padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--text); }
.field input:focus { outline: 3px solid rgba(10, 124, 112, .35); border-color: var(--teal); }
.interest .fine, .form-status { grid-column: 1 / -1; text-align: center; }
.form-status { font-weight: 600; min-height: 1.5em; color: var(--text); }
.hp { position: absolute; left: -9999px; }

/* ---------- footer: small grey type and numbered sources ---------- */
.site-footer { background: var(--grey); color: var(--text-2); padding: 40px var(--gutter) 32px; border-top: 1px solid var(--line); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 12px; font-size: 12px; line-height: 1.5; }
.footnotes { margin: 8px 0; padding: 14px 0 14px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.footnotes a { color: var(--text); text-decoration: none; }
.footnotes a:hover { text-decoration: underline; }
.footnotes li:target { background: rgba(10, 124, 112, .1); }
.footer-links { color: var(--text); }

/* ---------- for the selection committee ---------- */
.bento-committee { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bento-committee .tile { gap: 10px; }
.bento-committee h3 { font-size: clamp(20px, 1.7vw, 24px); }
.tile-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.tile-cta .pill { padding: 10px 18px; font-size: 15px; }
.render-link { text-align: center; font-size: 15px; }
@media (max-width: 1240px) { .bento-committee { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- phones and tablets ---------- */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-header { gap: 12px; }
  .site-header .pill { margin-left: auto; }
  .hero { padding-top: 84px; }
  .hero-anchor { height: 40vh; }
  .scroll-cue { display: none; }
  .bento, .bento-problem, .bento-committee, .gallery, .founder, .app-points { grid-template-columns: 1fr; }
  .tile-wide, .tile-tall { grid-column: auto; grid-row: auto; }
  .tile-split { grid-template-columns: 1fr; }
  .tile-media { min-height: 240px; }
  .bento-verdict .tile-black { grid-template-columns: 1fr; row-gap: 10px; }
  .creds { grid-template-columns: 1fr; }
  .tile-photo { aspect-ratio: 4 / 3; }
  .interest-form { grid-template-columns: 1fr; }
  .interest-form .pill { justify-self: center; }
  .log { font-size: 11.5px; }

  .js .night .pin-stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    padding-top: 76px; padding-bottom: 20px; row-gap: 12px;
  }
  .window { grid-column: 1; grid-row: 2; max-width: 150px; justify-self: center; }
  .night-anchor { grid-column: 2; grid-row: 2; min-height: 0; }
  .steps { grid-column: 1 / -1; grid-row: 3; min-height: 250px; align-self: start; }
  .step-dots { grid-row: 4; }
  .step h3 { font-size: 26px; }
  .step p:not(.step-time):not(.chat-tag):not(.bubble) { font-size: 15px; }
  .bubble { font-size: 14px; padding: 10px 12px; }

  .js .chapter .pin-stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    padding-top: 76px; padding-bottom: 16px; row-gap: 10px;
  }
  .chapter-head { gap: 6px; }
  .chapter-head h2 { font-size: 30px; }
  .chapter-sub { font-size: 15px; }
  .chapter-anchor { grid-column: 1; grid-row: 2; min-height: 0; }
  .parts { grid-column: 1; grid-row: 3; margin: 0; min-height: 84px; align-self: end; }
  .js .parts li { display: none; }
  .js .parts li.is-active { display: grid; }
  .chapter-foot { grid-row: 4; font-size: 12px; }
  .chat-gen2 { left: 16px; right: 16px; bottom: 150px; max-width: none; }
  .callout em { display: none; }
  .callout i { width: 22px; height: 22px; font-size: 11px; }
  .legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; margin: 4px 0 0; padding-left: 20px; font-size: 14px; color: var(--text-dark); }

  .others thead { display: none; }
  .others tr { display: grid; padding: 12px 0; border-top: 1px solid var(--line); }
  .others td { border: none; padding: 2px 0; width: auto !important; }
  .others tr.is-us { padding: 14px; background: rgba(62, 142, 90, .1); border-top: 2px solid var(--green); border-radius: 14px; }
  .others tr.is-us td { background: none; border: none; padding-left: 0 !important; }
  .compare thead { display: none; }
  .compare tr { display: grid; grid-template-columns: 1fr; padding: 10px 0; border-top: 1px solid var(--line); }
  .compare th, .compare td { border: none; padding: 2px 0; width: auto !important; }
  .compare td:nth-of-type(1)::before { content: 'Gen 1: '; font-weight: 600; }
  .compare td:nth-of-type(2)::before { content: 'Gen 2: '; font-weight: 600; }
  .progress { display: none; }
  .seg { display: inline-flex; }
  .phones { --s: .78; }
  .phone-android { margin-top: 0; }
  .phones[data-show="ios"] .phone-android, .phones[data-show="android"] .phone-ios { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
