:root {
  --paper: #ebe7e1;
  --ink: #1c1b19;
  --dim: #7a746c;
  --rule: #d4cec6;
  --night: #0e0d0c;
  --serif: "New York", "Iowan Old Style", "Palatino", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }   /* width/height attributes only reserve the ratio */
picture { display: contents; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.1; }
.sub { color: var(--dim); margin: 12px 0 0; }

/* Navigation: light over the hero, paper once you scroll past it */
.bar { position: fixed; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(20px, 4vw, 48px); color: #fff; transition: background .4s, color .4s; }
.bar.solid { background: rgba(235, 231, 225, .86); color: var(--ink); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.mark svg { height: 21px; width: auto; }
.links a { margin-left: 26px; font-size: 14px; opacity: .85; }
.links a:hover { opacity: 1; }

/* Scroll-linked sections: a tall section, its view pinned while you scroll through it (app.js sets the motion) */
[data-progress] { position: relative; }
.pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }   /* svh: mobile toolbars never cover the bottom */

.hero { height: 190vh; background: #b9a991; color: #fff; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 40%; will-change: transform; }
.hero .pin::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(30, 22, 12, .55), rgba(30, 22, 12, 0) 45%), linear-gradient(to bottom, rgba(30, 22, 12, .3), rgba(30, 22, 12, 0) 20%); }
.hero-copy { position: absolute; z-index: 1; left: clamp(20px, 4vw, 48px); bottom: clamp(36px, 9vh, 90px); will-change: transform, opacity; }
.hero-copy h1 { font-size: clamp(48px, 8vw, 112px); line-height: 1; }
.hero-copy p { margin: 14px 0 0; font-size: clamp(17px, 1.7vw, 22px); opacity: .92; }
.cue { position: absolute; z-index: 1; right: clamp(20px, 4vw, 48px); bottom: clamp(36px, 9vh, 90px); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }

.statement { height: 260vh; }
.statement .pin { display: grid; place-items: center; padding: 0 clamp(24px, 8vw, 140px); }
.words { margin: 0; max-width: 980px; font: 400 clamp(28px, 4vw, 56px)/1.22 var(--serif); letter-spacing: -0.015em; }
.words span { opacity: .14; transition: opacity .2s linear; }

.turn { height: 330vh; background: radial-gradient(ellipse at 50% 42%, #e2e1df, #d3d2ce 72%); }   /* the film's own backdrop */
.turn .pin { display: grid; place-items: center; }
.turn video { width: min(86vh, 92vw); aspect-ratio: 1; -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent); mask-image: radial-gradient(closest-side, #000 72%, transparent); }
.captions { list-style: none; margin: 0; padding: 0; position: absolute; left: 0; right: 0; bottom: 7vh; text-align: center; font: 400 clamp(20px, 2.2vw, 30px) var(--serif); }
.captions li { position: absolute; left: 0; right: 0; opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s; }
.captions li.on { opacity: 1; transform: none; }

.reel { height: 380vh; background: var(--night); }
.reel figure { position: absolute; inset: 0; margin: 0; opacity: 0; }
.reel figure:first-child { opacity: 1; }
.reel img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.reel figure::after, .full .pin::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(20, 16, 12, .5), rgba(20, 16, 12, 0) 38%); }
.reel figcaption { position: absolute; z-index: 1; left: clamp(20px, 4vw, 48px); bottom: 7vh; max-width: 520px; color: #fff; font: 400 clamp(20px, 2vw, 28px)/1.3 var(--serif); text-shadow: 0 1px 18px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(12px); transition: opacity .6s, transform .6s; }
.reel figure.on figcaption { opacity: 1; transform: none; }

.full { height: 180vh; background: var(--night); }
.full img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.over { position: absolute; z-index: 1; left: clamp(20px, 4vw, 48px); bottom: 9vh; margin: 0; color: #fff; font: 400 clamp(30px, 4.4vw, 64px)/1.1 var(--serif); text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }

/* Scrollytelling: the card stays in view; its screen follows the step you are reading */
.scrolly { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.stage { grid-column: 2; grid-row: 1; align-self: start; position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; }
.steps { grid-column: 1; grid-row: 1; padding: 0 clamp(24px, 6vw, 96px); }
.step { min-height: 100vh; display: flex; align-items: center; justify-content: flex-end; }
.step .text { max-width: 430px; opacity: .2; transition: opacity .5s; }
.step.on .text { opacity: 1; }
.step h2 { margin-bottom: 12px; }
.step p { margin: 0; color: var(--dim); font-size: 18px; }
.kicker { display: block; margin-bottom: 14px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }

.card { position: relative; width: min(400px, 38vw, 58vh); aspect-ratio: 2 / 3; user-select: none; -webkit-user-select: none; }
.card .front { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.flash, .press { position: absolute; pointer-events: none; opacity: 0; }
.flash { background: #151514; }
.flash.on { animation: refresh .34s steps(1, end) both; }
@keyframes refresh { 0% { opacity: 1; background: #151514; } 45% { opacity: 1; background: #e3e3db; } 100% { opacity: 0; } }
.press { box-shadow: inset 0 3px 9px rgba(28, 27, 25, .22); background: rgba(28, 27, 25, .05); transition: opacity .25s; }
.card.pressed .press { opacity: 1; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: inset 0 2px 5px rgba(28, 27, 25, .14); } }

/* Envoys */
.envoys { padding: 140px clamp(14px, 3vw, 40px) 120px; }
.head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.still { margin: 0 0 56px; overflow: hidden; background: #d8d2c9; cursor: zoom-in; }
.still img { width: 100%; height: auto; }
.row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px 18px; max-width: 1100px; margin: 0 auto; }
.row figure { margin: 0; text-align: center; }
.row img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: contain; }
.row figcaption { margin-top: 6px; font-size: 14px; color: var(--dim); }
.row figcaption b { display: block; color: var(--ink); font-weight: 500; }

/* Specs */
.specs { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 80px); align-items: start; max-width: 1200px; margin: 0 auto; padding: 60px clamp(20px, 4vw, 48px) 140px; }
.specs figure { margin: 0; cursor: zoom-in; }
.specs figure.back { width: 55%; margin-top: 36px; margin-left: auto; }
.specs h2 { font-size: clamp(40px, 5vw, 64px); }
.specs dl { margin: 22px 0 0; border-top: 1px solid var(--rule); }
.specs dl div { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.specs dt { color: var(--dim); }
.specs dd { margin: 0; }

/* Your turn: the live card */
.demo { display: grid; grid-template-columns: minmax(280px, 420px) auto; gap: clamp(32px, 6vw, 96px); justify-content: center; align-items: center; padding: 120px clamp(20px, 4vw, 48px); background: #e4dfd8; }
.how { color: var(--dim); margin: 14px 0 34px; }
.now { min-height: 110px; border-top: 1px solid var(--rule); padding-top: 18px; }
.now h3 { font-size: 26px; }
.now p { margin: 6px 0 0; color: var(--dim); }
.chips { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips-label { margin: 22px 0 0; font-size: 13px; color: var(--dim); }
.chips-label + .chips { margin-top: 10px; }
.chips button { font: 13px var(--sans); color: var(--ink); background: transparent; border: 1px solid #cbc4ba; border-radius: 99px; padding: 6px 13px; cursor: pointer; }
.chips button:hover { border-color: var(--dim); }
.chips button[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.device { display: grid; justify-items: center; gap: 18px; }
.card.live { width: min(400px, 78vw); touch-action: pan-y; }
.talk { position: absolute; z-index: 1; border: 0; background: transparent; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
.talk:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.swipe { position: absolute; z-index: 1; cursor: grab; }
.arrows { display: flex; align-items: center; gap: 18px; color: var(--dim); font-size: 14px; }
.arrows button { font: 26px/1 var(--sans); width: 40px; height: 40px; border-radius: 50%; border: 1px solid #cbc4ba; background: transparent; color: var(--ink); cursor: pointer; }
.arrows button:hover { border-color: var(--dim); }
#hint { min-width: 170px; text-align: center; }

/* Every core screen */
.screens { padding: 110px clamp(14px, 3vw, 40px) 140px; text-align: center; }
.screens .sub { margin-bottom: 44px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; text-align: left; }
.grid figure { margin: 0; background: #e4dfd8; cursor: zoom-in; }
.grid img { width: 100%; height: auto; aspect-ratio: 5 / 6; object-fit: cover; }
.grid figcaption { padding: 14px 16px 18px; font-size: 14px; color: var(--dim); }
.grid figcaption b { display: block; color: var(--ink); font-weight: 500; margin-bottom: 2px; }

.about { background: var(--night); color: #b9b2a8; padding: 60px 24px 80px; }
.about p { max-width: 760px; margin: 0 auto; font-size: 14px; line-height: 1.6; }
.about strong { color: #efe9e1; font-weight: 500; }

.lightbox { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(14, 13, 12, .94); cursor: zoom-out; padding: 3vmin; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Phones: portrait renders (<picture>), the card pinned at the top with the story passing under it */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .bar { padding: 14px 18px; }
  .links a { display: none; }
  .links a.try { display: inline-block; margin: 0; padding: 6px 13px; border: 1px solid currentColor; border-radius: 99px; font-size: 13px; opacity: 1; }
  .hero-copy { right: 20px; bottom: max(6svh, 28px); }
  .cue { display: none; }
  .turn video { width: min(80svh, 100vw); }
  .captions { bottom: 9svh; padding: 0 24px; }
  .reel figure:first-child img { object-position: 64% 50%; }   /* the edge shot: keep the keys */
  .reel figcaption, .over { left: 20px; right: 20px; bottom: max(7svh, 28px); }
  .scrolly { display: block; }
  .stage { place-items: start center; padding-top: max(9svh, 62px); }
  .card { width: min(330px, 78vw, 35svh); }
  .steps { position: relative; margin-top: -100vh; margin-top: -100svh; padding: 0 14px; }
  .step { min-height: 100vh; min-height: 100svh; align-items: flex-end; justify-content: center; padding-bottom: max(4svh, 18px); }
  .step .text { width: 100%; opacity: 0; background: rgba(235, 231, 225, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: 16px; padding: 14px 16px; box-shadow: 0 6px 30px rgba(28, 27, 25, .08); }
  .step h2 { font-size: 24px; margin-bottom: 6px; }
  .step p { font-size: 15px; line-height: 1.4; }
  .kicker { margin-bottom: 8px; font-size: 11px; }
  .envoys { padding: 90px 0 80px; }
  .envoys .head { padding: 0 20px; }
  .envoys .still { overflow-x: auto; scroll-snap-type: x proximity; margin-bottom: 36px; cursor: default; }
  .envoys .still img { width: auto; max-width: none; height: 46svh; }
  .row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding: 0 20px 6px; max-width: none; }
  .row figure { flex: 0 0 56vw; scroll-snap-align: center; }
  .specs, .demo { grid-template-columns: 1fr; }
  .specs { padding-bottom: 90px; }
  .specs figure.float { width: 82%; margin: 0 auto; }
  .specs figure.back { display: none; }
  .specs dl div { grid-template-columns: 1fr; gap: 2px; }
  .demo { padding: 80px 20px; }
  .demo-copy { display: contents; }   /* heading and how-to above the card, the rest below it */
  .demo-copy > * { order: 4; }
  .demo h2 { order: 1; }
  .demo .how { order: 2; margin-bottom: 8px; }
  .device { order: 3; }
  .card.live { width: min(330px, 80vw, 40svh); }
  .screens { padding: 80px 12px 100px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grid figcaption { padding: 10px 10px 12px; font-size: 12px; }
}
@media (hover: none) { .keys { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .flash.on, .card.pressed .press { animation: none; }
}
