/* GRYD — one photograph, one giant word, then a short story as you scroll.
   The body never scrolls; each view scrolls inside the fixed frame. */

@font-face { font-family: "Inter Tight"; src: url(assets/fonts/inter-tight.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(assets/fonts/geist-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #0a0a0a;
  --fg: #f2f2ee;
  --mute: rgba(242, 242, 238, 0.62);
  --faint: rgba(242, 242, 238, 0.4);
  --line: rgba(242, 242, 238, 0.14);
  --paper: #f2f2ee;
  --ink: #0b0b0b;
  --ink-mute: rgba(11, 11, 11, 0.56);
  --r: 18px;
  --gut: 20px;
  --top: 60px;
  --pad: 28px;
  --sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.77, 0, 0.18, 1);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg); }
body {
  color: var(--fg);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ol { list-style: none; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; border-radius: 4px; }
.view :focus-visible { outline-width: 2px; outline-offset: -3px; }
.view:focus { outline: none; }
::selection { background: var(--paper); color: var(--ink); }
.skip {
  position: fixed; z-index: 50; top: 10px; left: 10px;
  padding: 9px 14px; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  transform: translateY(-160%); transition: transform .3s var(--out);
}
.skip:focus { transform: none; }

.micro {
  font: 500 10px/1.2 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-style: normal;
}

/* ── The whisper: liquid ASCII, only in the gaps ─────────────── */
#ascii { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ── Frame ───────────────────────────────────────────────────── */
.shell {
  position: fixed; inset: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: var(--top) minmax(0, 1fr);
  padding: 0 var(--gut) var(--gut);
}
.top { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; font-size: 15px; letter-spacing: -0.01em; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--fg); transition: transform .6s var(--out); }
.brand:hover .dot { transform: scale(.6); }
.nav { display: flex; gap: 28px; }
.nav a { position: relative; padding: 6px 0; font-size: 13px; color: var(--mute); transition: color .4s; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .6s var(--out);
}
.nav a:hover { color: var(--fg); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.stage { position: relative; min-height: 0; outline: none; }
.view {
  position: absolute; inset: 0;
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none;
  border-radius: var(--r);
}
.view::-webkit-scrollbar { display: none; }

.tag { position: absolute; z-index: 3; top: var(--pad); right: var(--pad); }
.media { position: absolute; inset: 0; overflow: hidden; }
.media img, .media canvas {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover; object-position: var(--pos, 50% 50%);
}

/* ── Hero: the photograph and the word ───────────────────────── */
.hero { position: relative; height: 100%; border-radius: var(--r); overflow: hidden; background: #111; }
.hero .media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.6), rgba(0,0,0,.18) 32%, transparent 55%);
}
.hero .media img { scale: 1.06; transition: scale 2.4s var(--out); }
.lede {
  position: absolute; z-index: 3; top: calc(var(--pad) - 6px); left: var(--pad);
  max-width: 16ch; text-wrap: balance;
  font-size: clamp(22px, 2.1vw, 32px); line-height: 1.1; letter-spacing: -0.025em;
}
.giant {
  position: absolute; z-index: 2;
  left: -0.055em; bottom: -0.13em;
  font-weight: 500; font-size: 200px; line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}
.giant .ch { display: inline-block; }

/* ── The story below ─────────────────────────────────────────── */
.intro {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px;
  padding: clamp(90px, 16vh, 170px) 0;
}
.intro .micro { grid-column: 1 / 4; color: var(--mute); padding-top: .9em; }
.intro p {
  grid-column: 4 / 12;
  font-size: clamp(26px, 3.1vw, 46px); line-height: 1.08; letter-spacing: -0.035em;
  text-wrap: balance;
}

.show {
  position: relative; display: block;
  height: 88%; min-height: 460px;
  border-radius: var(--r); overflow: hidden;
  background: var(--paper); color: var(--ink);
}
.show .tag { left: var(--pad); right: auto; color: var(--ink-mute); }
.phones { position: absolute; inset: 12% 0; display: flex; justify-content: center; align-items: center; gap: 4%; }
/* An even bezel of 3.5% of the phone's width on every side: the top and bottom inset is
   the same length as a share of the height (3.5% / 2.0921 = 1.673%). The body's ratio
   follows from the 786 × 1709 screen plus the bezel (0.93 × 1709/786 + 0.07 = 2.0921), and
   the corners are concentric: the screen's radius is 13.7% of its width, the body's that
   plus the bezel. */
.phone {
  position: relative; height: 100%;
  aspect-ratio: 1 / 2.0921;
  border-radius: 16.24% / 7.76%;
  background: #050505;
  box-shadow: 0 30px 60px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.1), inset 0 0 0 1px rgba(255,255,255,.07);
}
.phone img {
  position: absolute; inset: 1.673% 3.5%;
  width: 93%; height: 96.654%;
  object-fit: cover; object-position: top;
  border-radius: 13.7% / 6.3%;
}

.points {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px;
  padding: clamp(90px, 16vh, 170px) 0 0;
}
.points li { grid-column: span 3; }
.points li:first-child { grid-column: 4 / span 3; }
.points li { border-top: 1px solid var(--line); padding-top: 18px; }
.points i { color: var(--mute); }
.points h2 { margin: 40px 0 10px; font-weight: 500; font-size: clamp(20px, 1.7vw, 26px); line-height: 1.1; letter-spacing: -0.03em; }
.points p { max-width: 32ch; color: var(--mute); }


/* Index: the products */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: #111; }
.card .media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.6), transparent 50%); }
.card .media img { transition: scale 1.6s var(--out); }
.card:hover .media img { scale: 1.05; }
.card-txt { position: absolute; z-index: 3; left: 20px; right: 20px; bottom: 20px; }
.card-txt h2 { font-weight: 500; font-size: clamp(30px, 3.2vw, 48px); line-height: 1; letter-spacing: -0.035em; margin-bottom: 10px; }
.card-txt p { color: var(--mute); }

.next {
  display: block; overflow: hidden;
  margin-top: clamp(90px, 16vh, 170px);
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}
.next .micro { color: var(--mute); }
.next b {
  display: block; width: max-content;
  margin: 14px 0 -0.14em -0.045em;
  font-weight: 500; font-size: clamp(44px, 9vw, 150px); line-height: 1; letter-spacing: -0.035em; white-space: nowrap;
  transition: transform 1s var(--out);
}
.next .arr { font-weight: 400; margin-left: .25em; }
.next b.desc { margin-bottom: .02em; }
.next:hover b { transform: translateX(2%); }
.foot { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 22px 0 4px; color: var(--faint); border-top: 1px solid var(--line); }
.foot :is(a, button) { text-transform: inherit; letter-spacing: inherit; transition: color .3s; }
.foot :is(a, button):hover { color: var(--fg); }
.legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.pro { margin-top: 64px; max-width: 46ch; color: var(--mute); }
.app-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 56px; color: var(--mute); }
.app-legal a { border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color .3s, border-color .3s; }
.app-legal a:hover { color: var(--fg); border-color: var(--fg); }

/* ── Legal pages: text in the same grid ──────────────────────── */
.doc-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; padding: clamp(40px, 8vh, 90px) 0 clamp(60px, 10vh, 110px); border-bottom: 1px solid var(--line); }
.doc-head .micro { grid-column: 1 / 4; color: var(--mute); align-self: end; padding-bottom: 1.6em; }
.doc-title { grid-column: 4 / 13; font-weight: 500; font-size: clamp(52px, 8.5vw, 150px); line-height: .9; letter-spacing: -0.035em; }
.doc { padding-bottom: clamp(80px, 14vh, 150px); }
.doc section { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; padding: 26px 0 30px; border-bottom: 1px solid var(--line); }
.doc h2 { grid-column: 1 / 4; color: var(--mute); padding-top: .35em; }
.doc section > :not(h2) { grid-column: 4 / 11; }
.doc p { font-size: 17px; line-height: 1.5; color: rgba(242,242,238,.82); max-width: 62ch; }
.doc p + p { margin-top: .8em; }
.doc a { color: var(--fg); border-bottom: 1px solid rgba(242,242,238,.35); transition: border-color .3s; }
.doc a:hover { border-color: var(--fg); }
.doc-table div { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 10px 0; border-top: 1px solid var(--line); }
.doc-table div:first-child { border-top: 0; padding-top: 0; }
.doc-table dt { font: 500 11px/1.9 var(--mono); letter-spacing: .04em; }
.doc-table dd { color: rgba(242,242,238,.82); }

/* ── Consent ─────────────────────────────────────────────────── */
.consent {
  position: fixed; z-index: 40; left: 50%; bottom: calc(var(--gut) + 12px);
  translate: -50% 0;
  width: min(760px, calc(100% - 2 * var(--gut)));
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 32px;
  padding: 22px 24px; border-radius: 14px;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  transition: opacity .5s, translate .7s var(--out);
}
.consent[hidden] { display: grid; opacity: 0; translate: -50% 24px; pointer-events: none; visibility: hidden; transition: opacity .3s, translate .4s, visibility 0s .4s; }
.consent .micro { grid-column: 1; color: var(--ink-mute); }
.consent p { grid-column: 1; margin: 8px 0 0; font-size: 14px; line-height: 1.45; max-width: 52ch; }
.consent p a { border-bottom: 1px solid rgba(11,11,11,.3); }
.consent-actions { grid-column: 2; grid-row: 1 / 3; display: flex; gap: 8px; }
.btn { flex: 1; padding: 10px 28px; white-space: nowrap; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 13px; transition: background-color .3s, color .3s; }
.btn:hover { background: #2a2a2a; }
.consent :focus-visible { outline-color: var(--ink); }

/* ── Motion ──────────────────────────────────────────────────── */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.w > span { display: inline-block; transform: translateY(108%); transition: transform 1s var(--out); transition-delay: calc(var(--d, 0) * 1ms); }
.giant .ch { transform: translateY(110%); transition: transform 1.15s var(--out); transition-delay: calc(var(--d, 0) * 1ms); }
.hero > .media { clip-path: inset(100% 0 0 0); transition: clip-path 1.2s var(--ease); }
.hero .tag { opacity: 0; transition: opacity .8s .7s; }

.view.is-in .w > span, .view.is-in .giant .ch { transform: none; }
.view.is-in .hero > .media { clip-path: inset(0); }
.view.is-in .hero .media img { scale: 1; }
.view.is-in .hero .tag { opacity: 1; }

/* below the hero, blocks rise in as they scroll into view */
.rv { opacity: 0; translate: 0 32px; transition: opacity .9s, translate 1.2s var(--out); }
.rv.seen { opacity: 1; translate: 0 0; }
.rv .phone { translate: 0 40px; transition: translate 1.4s var(--out); transition-delay: calc(var(--i, 0) * 90ms + 120ms); }
.rv.seen .phone { translate: 0 0; }

.view.is-out { z-index: 6; pointer-events: none; opacity: 0; transition: opacity .5s ease .1s; }
.view.is-out .hero { clip-path: inset(0 0 100% 0); transition: clip-path .6s var(--ease); }

/* ── Skeleton: shimmering bars measured from the real layout ─── */
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skel { position: absolute; inset: 0; z-index: 5; pointer-events: none; transition: opacity .45s; }
.skel.gone { opacity: 0; }
.skel i {
  position: absolute; display: block; border-radius: 6px;
  background: linear-gradient(100deg, #1d1d1d 30%, #2c2c2c 50%, #1d1d1d 70%) fixed;
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
.skel i.b { background: #121212; animation: none; }
.measuring, .measuring * { transition: none !important; }
.measuring :is(.w > span, .giant .ch) { transform: none !important; }

/* ── Phones ──────────────────────────────────────────────────── */
@media (max-width: 760px) {
  :root { --gut: 16px; --top: 56px; --pad: 20px; --r: 16px; }
  .nav { gap: 16px; }
  .lede { max-width: 13ch; }
  .tag { top: calc(var(--pad) + 2px); }
  .hero { height: auto; aspect-ratio: 4 / 5; }
  .hero .media::after { background: linear-gradient(to bottom, rgba(0,0,0,.78), rgba(0,0,0,.42) 28%, transparent 52%, rgba(0,0,0,.28)); }
  .lede { text-shadow: 0 1px 18px rgba(0,0,0,.55); }
  .hero .tag { display: none; }
  .intro { display: block; padding: 72px 0; }
  .intro .micro { display: block; margin-bottom: 20px; padding: 0; }
  .intro p { font-size: 27px; }
  .show { height: auto; min-height: 0; padding: 72px 0 38px; }   /* the air under the phones matches the air above them */
  .phones { position: relative; inset: auto; gap: 4%; }
  .phone { height: auto; width: 40%; }
  .phone:nth-child(3) { display: none; }
  .points { grid-template-columns: 1fr; gap: 36px; padding: 72px 0 0; }
  .points li, .points li:first-child { grid-column: auto; }
  .points h2 { margin-top: 20px; }
  .cards { grid-template-columns: 1fr; gap: 10px; }
  .card { aspect-ratio: 4 / 3.4; }
  .next { margin-top: 72px; }
  .foot { flex-direction: column; gap: 10px; padding-top: 18px; }
  .doc-head, .doc section { display: block; }
  .doc-head { padding: 28px 0 44px; }
  .doc-head .micro { display: block; padding: 0 0 18px; }
  .doc h2 { margin-bottom: 12px; padding: 0; }
  .doc p { font-size: 16px; }
  .doc-table div { grid-template-columns: 1fr; gap: 4px; }
  .consent { grid-template-columns: 1fr; padding: 18px; }
  .consent-actions { grid-column: 1; grid-row: auto; margin-top: 16px; }
}
@media (max-width: 380px) { .nav { gap: 12px; } .nav a { font-size: 12.5px; } }

/* ── Reduced motion: no travel, no wipes ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  /* none, not a .01ms duration: that would give every element an `all` transition, and the
     giant word's fit would read its font size mid-transition (it came out ~99px) */
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .w > span, .giant .ch { transform: none !important; }
  .hero > .media, .view.is-out .hero { clip-path: none !important; }
  .rv, .rv .phone { opacity: 1; translate: none; }
}

/* ── Studio film: one minute drawn live in code (film.js) ────────
   A 16:9 frame in the hero's radius, never taller than the stage, with a quiet player below. */
.film { padding-top: 4px; }
.film-frame {
  position: relative; width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100dvh - var(--top) - var(--gut) - 58px);
  border-radius: var(--r); overflow: hidden;
  background: #111; cursor: pointer;
}
.film-cv { display: block; width: 100%; height: 100%; }
.film-big {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: grid; place-items: center;
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(10, 10, 10, .72); color: var(--fg);
  box-shadow: inset 0 0 0 1px rgba(242, 242, 238, .28);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: opacity .5s, scale .7s var(--out);
}
.film-big svg { width: 18px; height: 18px; margin-left: 3px; }
.film-big:hover { scale: 1.06; }
.film-big[hidden] { display: grid; opacity: 0; scale: .9; pointer-events: none; }
.film-cv { transition: opacity .5s; }
.film.is-paused .film-cv { opacity: .85; }
/* the bar sits on the page's 12 columns: button and chapter in the first three, the track from the
   fourth to the eleventh, the time flush right in the twelfth */
.film-bar {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center; column-gap: 20px;
  padding-top: 12px;
}
.film-play { grid-column: 1; }
.film-chap { grid-column: 2 / 4; }
.film-track { grid-column: 4 / 12; }
.film-time { grid-column: 12; justify-self: end; }
.film-play {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line);
  transition: border-color .3s, background-color .3s, color .3s;
}
.film-play:hover { border-color: var(--fg); }
.film-play svg { width: 12px; height: 12px; grid-area: 1 / 1; }
.film-play .i-pause, .film-play[aria-pressed="true"] .i-play { display: none; }
.film-play[aria-pressed="true"] .i-pause { display: block; }
.film-chap { display: flex; align-items: baseline; gap: 12px; min-width: 0; white-space: nowrap; overflow: hidden; }
.film-chap .micro { color: var(--mute); }
.film-chap b { font-weight: 500; font-size: 13px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; }
.film-track { position: relative; height: 28px; cursor: pointer; touch-action: none; }
.film-track::before, .film-fill { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; }
.film-track::before { background: var(--line); }
.film-fill { display: block; background: var(--fg); transform-origin: left; transform: scaleX(0); }
.film-tick { position: absolute; top: calc(50% - 4px); width: 1px; height: 9px; background: rgba(242, 242, 238, .3); }
.film-time { color: var(--mute); white-space: nowrap; }
.film-track:focus-visible { outline-offset: 2px; }
.film-script { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 760px) {
  .film-frame { aspect-ratio: 4 / 5; max-height: none; }
  .film-bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
  .film-play, .film-track, .film-time { grid-column: auto; }
  .film-chap { display: none; }
  .film-big { width: 64px; height: 64px; }
}
