/* Bezel launch site — minimalist black & white. No dependencies. */

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #8c8c8c;
  --dim: #5a5a5a;
  --line: #1e1e1e;
  --line-strong: #333;
  --panel: #0a0a0a;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  /* Spring-like overshoot, tuned to feel like response 0.35 / damping 0.78. */
  --spring: cubic-bezier(0.34, 1.42, 0.64, 1);
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
b, strong { font-weight: 600; }

:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 8px;
  transition: top .2s var(--out);
}
.skip-link:focus { top: 12px; }

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 48px);
  background: rgba(0, 0, 0, .72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); font-size: 14px; }
.nav nav a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav nav a:not(.btn):hover { color: var(--fg); }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; }
.brand img { border-radius: 7px; }

@media (max-width: 640px) {
  .nav nav a:not(.btn) { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px;
  border-radius: 999px;
  background: var(--fg); color: var(--bg);
  font-weight: 600; font-size: 16px; letter-spacing: -.01em;
  border: 1px solid var(--fg);
  transition: transform .35s var(--spring), background .2s, color .2s, border-color .2s, box-shadow .3s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 40px -10px rgba(255, 255, 255, .35); }
.btn:active { transform: scale(.97); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--fg); box-shadow: none; }
.btn-small { height: 34px; padding: 0 16px; font-size: 14px; }

/* ---------- Reveal-on-load / scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity .8s var(--out) calc(var(--d, 0) * 90ms),
    transform .9s var(--out) calc(var(--d, 0) * 90ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* Masked line reveal for the headline: each line slides up out of its own clip. */
.reveal.reveal-lines { opacity: 1; transform: none; }
.reveal-lines .line { display: block; overflow: hidden; padding: 0 .05em .12em; margin-bottom: -.12em; }
.reveal-lines .line > span {
  display: inline-block;
  transform: translateY(108%);
  transition: transform 1.1s var(--out) calc(var(--d, 0) * 90ms);
  background: linear-gradient(180deg, #fff 45%, #9d9d9d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.reveal-lines .line + .line > span { transition-delay: calc(var(--d, 0) * 90ms + 120ms); }
.reveal-lines.is-in .line > span { transform: none; }

/* ---------- Hero ---------- */

.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(36px, 6vh, 80px) clamp(20px, 4vw, 48px) 40px;
}
.eyebrow {
  text-wrap: balance;
  margin: 0 0 18px;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
h1 {
  margin: 0;
  font-size: clamp(44px, 6.6vw, 96px);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 700;
}
.lede {
  max-width: 560px;
  margin: 20px auto 0;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--muted);
}
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.fineprint { margin: 18px 0 0; font-size: 13px; color: var(--dim); }

.caption { margin: 6px 0 0; font-size: 15px; color: #b8b8b8; min-height: 1.6em; }
.caption span { display: inline-block; transition: opacity .2s, transform .35s var(--out); }
.caption span.swap { opacity: 0; transform: translateY(5px); }

/* ---------- Stage: close-up of the top of a MacBook display ---------- */

@property --iw { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --ih { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --ir { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --ie { syntax: "<length>"; inherits: true; initial-value: 0px; }

.stage {
  container: stage / inline-size;
  position: relative;
  width: min(1120px, 100%);
  margin-top: clamp(28px, 5vh, 52px);
  padding: 8px 8px 0;
  perspective: 1800px;
  /* The device dissolves into the page instead of ending in a hard edge. */
  -webkit-mask-image: linear-gradient(to bottom, #000 56%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 56%, transparent 96%);
}
.stage-ambient { /* depth 1: soft light falling on the lid */
  position: absolute; left: 50%; top: 0; width: 86%; height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 255, 255, .09), transparent);
  pointer-events: none;
}

.device { /* depth 3 */
  --u: 1cqw;                     /* one stage unit; zoomed in on small screens */
  --h0: calc(3.3 * var(--u));    /* menu bar = hardware notch height */
  position: relative;
  padding: calc(1.2 * var(--u)) calc(1.2 * var(--u)) 0;
  border-radius: calc(3.4 * var(--u)) calc(3.4 * var(--u)) 0 0;
  background: #020202;
  box-shadow:
    0 0 0 1px #262626,
    0 0 0 calc(.45 * var(--u)) #0d0d0d,
    0 0 0 calc(.45 * var(--u) + 1px) #3b3b3b;
  transform-origin: 50% 100%;
}
.device::before { /* light catching the top edge of the aluminium lid */
  content: ""; position: absolute; left: 14%; right: 14%;
  top: calc(-.45 * var(--u) - 1px); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
}
@container stage (max-width: 700px) {
  .device { --u: 1.5cqw; }
  .device .display { --file-x: 17; --file-y: 25; --rest-x: -15; --rest-y: 30; }
  .mb-opt { display: none; }
}
@media (max-width: 740px) {
  .stage {
    -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  }
}

.display {
  /* Where the desktop file and the idle pointer sit, in stage units (x from centre). */
  --file-x: 31; --file-y: 8; --rest-x: 27; --rest-y: 19;
  position: relative;
  height: calc(42 * var(--u));
  border-radius: calc(2.1 * var(--u)) calc(2.1 * var(--u)) 0 0;
  overflow: hidden;
  isolation: isolate;
  background: #050505;
}
.wallpaper { /* depth 0 */
  position: absolute; inset: 0;
  background: url("assets/wallpaper.svg") 50% 0 / cover no-repeat;
}
.glass { /* depth 5: glass sheen over everything */
  position: absolute; inset: 0; z-index: 9; pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, 0) 30%),
    radial-gradient(120% 60% at 50% -20%, rgba(255, 255, 255, .04), transparent 60%);
}

/* Light and shadow that follow the island's size */
.island-glow {
  position: absolute; z-index: 1; left: 50%; top: 0;
  width: calc(80 * var(--u)); height: calc(46 * var(--u));
  background: radial-gradient(closest-side, rgba(255, 255, 255, .2), rgba(255, 255, 255, .05) 60%, transparent);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.55);
  transition: opacity .7s var(--out), transform .9s var(--out);
}
.display[data-state^="peek"] .island-glow { opacity: .5; transform: translate(-50%, -50%) scale(.75); }
.display[data-state^="expanded"] .island-glow { opacity: 1; transform: translate(-50%, -38%) scale(1); }
.island-shadow {
  position: absolute; z-index: 3; left: 50%; top: 0;
  width: calc(62 * var(--u)); height: calc(30 * var(--u));
  background: radial-gradient(closest-side, rgba(0, 0, 0, .72), transparent);
  opacity: 0;
  transform: translate(-50%, 0) scale(.5);
  transition: opacity .5s, transform .8s var(--out);
}
.display[data-state^="expanded"] .island-shadow { opacity: 1; transform: translate(-50%, calc(2.5 * var(--u))) scale(1); }

/* Menu bar */
.menubar {
  position: absolute; z-index: 2; inset: 0 0 auto 0; height: var(--h0);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 calc(1.9 * var(--u));
  font-size: calc(1.28 * var(--u)); color: rgba(255, 255, 255, .92);
  background: rgba(0, 0, 0, .24);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}
.mb-left, .mb-right { display: flex; align-items: center; gap: calc(1.7 * var(--u)); }
.mb-left b { font-weight: 700; }
.mb-apple { width: calc(1.45 * var(--u)); height: calc(1.45 * var(--u)); fill: currentColor; }
.mb-icon { width: calc(1.55 * var(--u)); height: calc(1.55 * var(--u)); fill: currentColor; }
.mb-battery {
  position: relative; width: calc(2.5 * var(--u)); height: calc(1.2 * var(--u));
  border: calc(.12 * var(--u)) solid rgba(255, 255, 255, .78); border-radius: calc(.38 * var(--u));
}
.mb-battery::after {
  content: ""; position: absolute; right: calc(-.42 * var(--u)); top: 30%; height: 40%; width: calc(.2 * var(--u));
  background: rgba(255, 255, 255, .78); border-radius: 0 2px 2px 0;
}
.mb-battery i {
  position: absolute; top: calc(.14 * var(--u)); bottom: calc(.14 * var(--u)); left: calc(.14 * var(--u)); right: 24%;
  background: #fff; border-radius: calc(.18 * var(--u));
}
.mb-clock { font-variant-numeric: tabular-nums; }

/* Document icon (desktop, drag ghost and shelf) */
.doc {
  position: relative; display: block; flex: none;
  width: calc(4.6 * var(--u)); height: calc(5.8 * var(--u));
  border-radius: calc(.45 * var(--u));
  background: linear-gradient(165deg, #fff, #d4d4d4);
  box-shadow: 0 calc(.5 * var(--u)) calc(1.4 * var(--u)) rgba(0, 0, 0, .55);
}
.doc::before { /* folded corner */
  content: ""; position: absolute; top: 0; right: 0;
  width: calc(1.4 * var(--u)); height: calc(1.4 * var(--u));
  background: linear-gradient(225deg, #0a0a0a 50%, #b9b9b9 50%);
  border-bottom-left-radius: calc(.3 * var(--u));
}
.doc::after { /* text lines */
  content: ""; position: absolute; left: calc(.75 * var(--u)); right: calc(.75 * var(--u));
  top: calc(1.9 * var(--u)); height: calc(1.5 * var(--u));
  background: repeating-linear-gradient(180deg, #a3a3a3 0 calc(.18 * var(--u)), transparent calc(.18 * var(--u)) calc(.5 * var(--u)));
}
.doc-tag {
  position: absolute; left: calc(.6 * var(--u)); bottom: calc(.6 * var(--u));
  padding: calc(.12 * var(--u)) calc(.4 * var(--u));
  border-radius: calc(.25 * var(--u));
  background: #111; color: #fff;
  font: 700 calc(.78 * var(--u))/1.2 var(--font); letter-spacing: .02em;
}

.desk-file {
  position: absolute; z-index: 2; left: 50%; top: calc(var(--file-y) * var(--u));
  display: flex; flex-direction: column; align-items: center; gap: calc(.7 * var(--u));
  transform: translateX(calc(var(--file-x) * var(--u) - 50%));
  transition: opacity .35s;
}
.desk-file em {
  font-style: normal; font-size: calc(1.1 * var(--u)); color: #fff;
  padding: calc(.15 * var(--u)) calc(.6 * var(--u)); border-radius: calc(.4 * var(--u));
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
  transition: background .25s;
}
.display.dragging .desk-file { opacity: .45; }
.display.dragging .desk-file em { background: rgba(255, 255, 255, .18); }

/* ---------- The island ---------- */
/*
  The island is a fixed black box revealed by a clip-path driven by four registered
  custom properties (width, height, corner radius, ear radius). Animating those
  properties with a real spring keeps the content laid out once: nothing reflows or
  scales mid-flight, so text stays pixel-crisp.
*/
.island {
  --iw: calc(17 * var(--u));
  --ih: var(--h0);
  --ir: calc(.95 * var(--u));
  --ie: calc(.65 * var(--u));
  --maxw: calc(54 * var(--u));
  --maxh: calc(26 * var(--u));
  --sx: calc((var(--maxw) - var(--iw)) / 2);
  --sy: calc(var(--maxh) - var(--ih));
  position: absolute; z-index: 5; top: 0; left: 50%;
  width: var(--maxw); height: var(--maxh);
  margin-left: calc(var(--maxw) / -2);
  pointer-events: none;
  transition: --iw .7s var(--spring), --ih .7s var(--spring), --ir .7s var(--spring), --ie .7s var(--spring);
  transition: --iw .7s linear(0, 0.0367, 0.127, 0.2463, 0.3765, 0.505, 0.6235, 0.7272, 0.8142, 0.8842, 0.9382, 0.9779, 1.0056, 1.0234, 1.0335, 1.0379, 1.0381, 1.0357, 1.0316, 1.0268, 1.0218, 1.017, 1.0126, 1.0089, 1.0059, 1.0035, 1.0016, 1.0003, 0.9994, 0.9989, 0.9986, 0.9985, 0.9986, 0.9987, 0.9989, 0.9991, 1), --ih .7s linear(0, 0.0367, 0.127, 0.2463, 0.3765, 0.505, 0.6235, 0.7272, 0.8142, 0.8842, 0.9382, 0.9779, 1.0056, 1.0234, 1.0335, 1.0379, 1.0381, 1.0357, 1.0316, 1.0268, 1.0218, 1.017, 1.0126, 1.0089, 1.0059, 1.0035, 1.0016, 1.0003, 0.9994, 0.9989, 0.9986, 0.9985, 0.9986, 0.9987, 0.9989, 0.9991, 1), --ir .7s linear(0, 0.0367, 0.127, 0.2463, 0.3765, 0.505, 0.6235, 0.7272, 0.8142, 0.8842, 0.9382, 0.9779, 1.0056, 1.0234, 1.0335, 1.0379, 1.0381, 1.0357, 1.0316, 1.0268, 1.0218, 1.017, 1.0126, 1.0089, 1.0059, 1.0035, 1.0016, 1.0003, 0.9994, 0.9989, 0.9986, 0.9985, 0.9986, 0.9987, 0.9989, 0.9991, 1), --ie .7s linear(0, 0.0367, 0.127, 0.2463, 0.3765, 0.505, 0.6235, 0.7272, 0.8142, 0.8842, 0.9382, 0.9779, 1.0056, 1.0234, 1.0335, 1.0379, 1.0381, 1.0357, 1.0316, 1.0268, 1.0218, 1.017, 1.0126, 1.0089, 1.0059, 1.0035, 1.0016, 1.0003, 0.9994, 0.9989, 0.9986, 0.9985, 0.9986, 0.9987, 0.9989, 0.9991, 1);
}
.display[data-state^="peek"] .island { --iw: calc(31 * var(--u)); --ir: calc(1.3 * var(--u)); --ie: calc(.8 * var(--u)); }
.display[data-state="peek-charge"] .island,
.display[data-state="peek-timer"] .island { --iw: calc(29 * var(--u)); }
.display[data-state^="expanded"] .island {
  --iw: calc(46 * var(--u)); --ih: calc(21 * var(--u)); --ir: calc(3 * var(--u)); --ie: calc(1.2 * var(--u));
}

.island-body {
  position: absolute; inset: 0;
  background: #000;
  clip-path: inset(0 var(--sx) var(--sy) var(--sx) round 0 0 var(--ir) var(--ir));
}
.island-edge { /* 1px rim of light that defines the silhouette on bright wallpaper */
  position: absolute; inset: 0;
  clip-path: inset(0 calc(var(--sx) - 1px) calc(var(--sy) - 1px) calc(var(--sx) - 1px) round 0 0 calc(var(--ir) + 1px) calc(var(--ir) + 1px));
  background: linear-gradient(180deg, transparent 0, transparent calc(var(--h0) * .6), rgba(255, 255, 255, .24) calc(var(--h0) * 1.6));
  opacity: 0;
  transition: opacity .45s;
}
.display[data-state^="peek"] .island-edge { opacity: .55; }
.display[data-state^="expanded"] .island-edge { opacity: 1; }

/* Concave fillets where the island meets the bezel, like the hardware notch */
.ear { position: absolute; top: 0; left: 50%; width: var(--ie); height: var(--ie); }
.ear-l {
  transform: translateX(calc(var(--iw) / -2 - 100%));
  background: radial-gradient(circle at 0 100%, transparent calc(var(--ie) - .5px), #000 var(--ie));
}
.ear-r {
  transform: translateX(calc(var(--iw) / 2));
  background: radial-gradient(circle at 100% 100%, transparent calc(var(--ie) - .5px), #000 var(--ie));
}

.camera {
  position: absolute; left: 50%; top: calc(var(--h0) / 2);
  width: calc(.66 * var(--u)); height: calc(.66 * var(--u));
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #7383b0 0 8%, #1b2133 24%, #07090e 64%);
  box-shadow: 0 0 0 calc(.14 * var(--u)) #101114;
}
.glint { /* one sweep of light across the island as it expands */
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: calc(12 * var(--u)); margin-left: calc(-6 * var(--u));
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1), transparent);
  opacity: 0;
  pointer-events: none;
}
.display.glinting .glint { animation: glint 1.2s var(--out) .12s; }
@keyframes glint {
  0% { opacity: 1; transform: translateX(calc(-30 * var(--u))) skewX(-18deg); }
  100% { opacity: 1; transform: translateX(calc(30 * var(--u))) skewX(-18deg); }
}

/* Panes: laid out at their final size and revealed by the clip, never scaled */
.pane {
  position: absolute; top: 0;
  opacity: 0;
  transform: translateY(calc(-.6 * var(--u)));
  transition: opacity .18s, transform .5s var(--out);
}
.pane-peek {
  left: calc(50% - 15.5 * var(--u)); width: calc(31 * var(--u)); height: var(--h0);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 calc(1.45 * var(--u));
}
.pane-peek-narrow { left: calc(50% - 14.5 * var(--u)); width: calc(29 * var(--u)); }
.pane-expanded {
  left: calc(50% - 23 * var(--u)); width: calc(46 * var(--u)); height: calc(21 * var(--u));
  display: flex; flex-direction: column;
  padding: 0 calc(2.4 * var(--u)) calc(2.2 * var(--u));
  color: #fff; text-align: left;
}
.display[data-state="peek-music"] [data-pane="peek-music"],
.display[data-state="peek-charge"] [data-pane="peek-charge"],
.display[data-state="peek-timer"] [data-pane="peek-timer"],
.display[data-state="expanded-music"] [data-pane="expanded-music"],
.display[data-state="expanded-shelf"] [data-pane="expanded-shelf"] {
  opacity: 1;
  transform: none;
  transition: opacity .3s .14s, transform .6s var(--out) .1s;
}

/* Album art: a monochrome sunset */
.art-tile {
  position: relative; display: block; flex: none; overflow: hidden;
  background: linear-gradient(180deg, #f6f6f6 0%, #a9a9a9 48%, #3a3a3a 100%);
}
.art-tile::before {
  content: ""; position: absolute; left: 50%; top: 60%; width: 54%; height: 54%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #0b0b0b;
  box-shadow: 0 0 0 calc(.16 * var(--u)) rgba(255, 255, 255, .9);
}
.art-tile::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36%;
  background: repeating-linear-gradient(180deg, #0b0b0b 0 calc(.32 * var(--u)), transparent calc(.32 * var(--u)) calc(.62 * var(--u)));
}
.art-tile-sm { width: calc(2.1 * var(--u)); height: calc(2.1 * var(--u)); border-radius: calc(.55 * var(--u)); }
.art-tile-lg {
  width: calc(12 * var(--u)); height: calc(12 * var(--u)); border-radius: calc(1.7 * var(--u));
  box-shadow: 0 calc(1 * var(--u)) calc(3.5 * var(--u)) rgba(255, 255, 255, .09);
}

.wave { display: inline-flex; align-items: center; gap: calc(.24 * var(--u)); height: calc(1.6 * var(--u)); }
.wave i {
  width: calc(.3 * var(--u)); height: 100%; border-radius: 99px; background: #fff;
  animation: wave 1s ease-in-out infinite;
}
.wave i:nth-child(1) { animation-duration: .92s; }
.wave i:nth-child(2) { animation-duration: .64s; animation-delay: -.3s; }
.wave i:nth-child(3) { animation-duration: 1.1s; animation-delay: -.52s; }
.wave i:nth-child(4) { animation-duration: .78s; animation-delay: -.12s; }
.wave i:nth-child(5) { animation-duration: .96s; animation-delay: -.66s; }
@keyframes wave { 0%, 100% { transform: scaleY(.22); } 50% { transform: scaleY(1); } }

.readout { font: 600 calc(1.35 * var(--u))/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

.cell {
  position: relative; display: block;
  width: calc(2.9 * var(--u)); height: calc(1.45 * var(--u));
  border: calc(.14 * var(--u)) solid rgba(255, 255, 255, .85); border-radius: calc(.42 * var(--u));
}
.cell::after {
  content: ""; position: absolute; right: calc(-.45 * var(--u)); top: 30%; height: 40%; width: calc(.22 * var(--u));
  background: rgba(255, 255, 255, .85); border-radius: 0 2px 2px 0;
}
.cell i {
  position: absolute; inset: calc(.14 * var(--u));
  background: #fff; border-radius: calc(.22 * var(--u));
  transform-origin: left; transform: scaleX(.78);
  transition: transform .45s var(--out);
}
.cell svg {
  position: absolute; left: 50%; top: 50%;
  width: calc(1.3 * var(--u)); height: calc(1.3 * var(--u));
  transform: translate(-50%, -50%);
  fill: #000; stroke: #fff; stroke-width: 2; stroke-linejoin: round;
}

.ring { width: calc(1.75 * var(--u)); height: calc(1.75 * var(--u)); transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, .2); stroke-width: 2.6; }
.ring-fill {
  fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round;
  stroke-dasharray: 50.27; stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.pane-head { flex: none; height: var(--h0); display: flex; align-items: center; justify-content: space-between; }
.tabs { display: flex; gap: calc(.55 * var(--u)); }
.tabs i { width: calc(1.5 * var(--u)); height: calc(.7 * var(--u)); border-radius: 99px; background: rgba(255, 255, 255, .22); }
.tabs i.on { width: calc(2.4 * var(--u)); background: #fff; }
.pane-meta { font: 600 calc(1.05 * var(--u))/1 var(--font); color: rgba(255, 255, 255, .55); letter-spacing: .02em; }
.pane-chip { padding: calc(.45 * var(--u)) calc(1 * var(--u)); border-radius: 99px; background: rgba(255, 255, 255, .14); color: #fff; }

.np { flex: 1; display: flex; align-items: center; gap: calc(2 * var(--u)); }
.np-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(.85 * var(--u)); }
.np-title { display: flex; justify-content: space-between; align-items: flex-start; gap: calc(1 * var(--u)); }
.np-title strong { display: block; font-size: calc(1.8 * var(--u)); font-weight: 650; letter-spacing: -.015em; line-height: 1.15; }
.np-title small { display: block; margin-top: calc(.15 * var(--u)); font-size: calc(1.35 * var(--u)); color: #8c8c8c; }
.np-track { display: block; height: calc(.5 * var(--u)); border-radius: 99px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.np-track i {
  display: block; height: 100%; background: #fff; border-radius: inherit;
  transform-origin: left; transform: scaleX(.32);
  transition: transform 1s linear;
}
.np-times {
  display: flex; justify-content: space-between; margin-top: calc(-.35 * var(--u));
  font: 500 calc(1 * var(--u))/1 var(--font); color: #727272; font-variant-numeric: tabular-nums;
}
.np-controls { display: flex; justify-content: center; align-items: center; gap: calc(3.6 * var(--u)); }
.np-controls svg { width: calc(1.9 * var(--u)); height: calc(1.9 * var(--u)); fill: #fff; }
.np-controls svg.big { width: calc(2.7 * var(--u)); height: calc(2.7 * var(--u)); }

.shelf { flex: 1; display: flex; gap: calc(1.6 * var(--u)); padding-top: calc(.8 * var(--u)); }
.shelf-file {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(.7 * var(--u));
  width: calc(10 * var(--u));
  opacity: 0;
  transform: translateY(calc(-3 * var(--u))) scale(.6);
  transition: opacity .25s, transform .7s var(--spring);
  transition: opacity .25s, transform .7s linear(0, 0.0367, 0.127, 0.2463, 0.3765, 0.505, 0.6235, 0.7272, 0.8142, 0.8842, 0.9382, 0.9779, 1.0056, 1.0234, 1.0335, 1.0379, 1.0381, 1.0357, 1.0316, 1.0268, 1.0218, 1.017, 1.0126, 1.0089, 1.0059, 1.0035, 1.0016, 1.0003, 0.9994, 0.9989, 0.9986, 0.9985, 0.9986, 0.9987, 0.9989, 0.9991, 1);
}
.shelf-file em { font-style: normal; font-size: calc(1 * var(--u)); color: rgba(255, 255, 255, .85); }
.display.dropped .shelf-file { opacity: 1; transform: none; }
.shelf-drop {
  flex: 1; display: grid; place-items: center;
  border: calc(.12 * var(--u)) dashed rgba(255, 255, 255, .26);
  border-radius: calc(1.4 * var(--u));
  color: #6e6e6e; font: 500 calc(1.1 * var(--u))/1 var(--font);
  transition: border-color .3s, background .3s, color .3s;
}
.shelf-drop span { grid-area: 1 / 1; transition: opacity .25s; }
.shelf-drop span + span { opacity: 0; }
.display.drop-hot .shelf-drop { border-style: solid; border-color: #fff; background: rgba(255, 255, 255, .07); color: #fff; }
.display.drop-hot .shelf-drop span:first-child { opacity: 0; }
.display.drop-hot .shelf-drop span + span { opacity: 1; }

/* ---------- Storytelling pointer ---------- */
/* X and Y move on different curves, so the pointer travels in a natural arc. */
.pointer {
  --px: var(--rest-x); --py: var(--rest-y);
  position: absolute; z-index: 8; left: 50%; top: 0; width: 0; height: 0;
  transform: translateX(calc(var(--px) * var(--u)));
  transition: transform 1s cubic-bezier(.55, .05, .25, 1);
}
.pointer-y {
  transform: translateY(calc(var(--py) * var(--u)));
  transition: transform 1s cubic-bezier(.3, .1, .2, 1);
}
.arrow {
  position: absolute; left: calc(-.47 * var(--u)); top: calc(-.26 * var(--u));
  width: calc(2.5 * var(--u)); height: calc(2.5 * var(--u));
  fill: #000; stroke: #fff; stroke-width: 1.5; stroke-linejoin: round;
  filter: drop-shadow(0 calc(.25 * var(--u)) calc(.5 * var(--u)) rgba(0, 0, 0, .55));
  transform-origin: 20% 10%;
  transition: transform .14s;
}
.pointer.press .arrow { transform: scale(.86); }
.ripple {
  position: absolute; left: 0; top: 0;
  width: calc(4.4 * var(--u)); height: calc(4.4 * var(--u));
  margin: calc(-2.2 * var(--u)) 0 0 calc(-2.2 * var(--u));
  border-radius: 50%;
  border: calc(.16 * var(--u)) solid rgba(255, 255, 255, .85);
  opacity: 0; transform: scale(.2);
  pointer-events: none;
}
.ripple.go { animation: ripple .6s var(--out); }
@keyframes ripple { 0% { opacity: 1; transform: scale(.2); } 100% { opacity: 0; transform: scale(1.3); } }
.drag-ghost {
  position: absolute; left: calc(-2.6 * var(--u)); top: calc(-2 * var(--u));
  opacity: 0; transform: scale(.6) rotate(-6deg);
  transition: opacity .2s, transform .45s var(--spring);
}
.pointer.dragging .drag-ghost { opacity: .92; transform: scale(.85) rotate(-6deg); }
.pointer.dropping .drag-ghost {
  opacity: 0; transform: translateY(calc(-2 * var(--u))) scale(.3);
  transition: opacity .3s, transform .35s var(--out);
}

/* ---------- Scene chips ---------- */

.scenes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.scene-chip {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px 2px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(255, 255, 255, .02); color: var(--muted);
  font: 500 14px/1 var(--font); letter-spacing: -.005em;
  cursor: pointer;
  transition: color .25s, border-color .25s, background .25s, transform .35s var(--spring);
}
.scene-chip svg { width: 15px; height: 15px; fill: currentColor; }
.scene-chip:hover { color: var(--fg); border-color: #555; }
.scene-chip:active { transform: scale(.96); }
.scene-chip.is-active { color: var(--fg); border-color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .06); }
.scene-progress {
  position: absolute; left: 16px; right: 16px; bottom: 6px; height: 2px;
  border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden;
  opacity: 0; transition: opacity .25s;
}
.scene-progress i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.scene-chip.is-active .scene-progress { opacity: 1; }
.scene-chip.is-active .scene-progress i { animation: chip-fill var(--dur, 8s) linear forwards; }
@keyframes chip-fill { to { transform: scaleX(1); } }

/* Pause every loop while the stage is off screen or the tab is hidden */
.hero.is-paused .wave i,
.hero.is-paused .scene-progress i { animation-play-state: paused; }

/* Scroll-driven "lid opening": the device tilts back and settles flat as it enters view */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .device {
      animation: lid-open linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }
  }
}
@keyframes lid-open {
  from { transform: rotateX(16deg) scale(.95); }
  to { transform: none; }
}

/* ---------- Shared glyphs (feature card mini-islands) ---------- */

.art {
  display: block; flex: none;
  background:
    radial-gradient(circle at 30% 30%, #fff 0 12%, transparent 13%),
    conic-gradient(from 210deg, #fafafa, #5d5d5d, #111, #9a9a9a, #fafafa);
}
.eq { display: inline-flex; align-items: center; }
.eq i { height: 100%; border-radius: 4px; background: #fff; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(1) { animation-duration: .9s; }
.eq i:nth-child(2) { animation-duration: .65s; animation-delay: -.3s; }
.eq i:nth-child(3) { animation-duration: 1.1s; animation-delay: -.5s; }
.eq i:nth-child(4) { animation-duration: .8s; animation-delay: -.15s; }
@keyframes eq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
.bolt { fill: #fff; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.pct { font-weight: 600; font-variant-numeric: tabular-nums; }
.file-icon {
  display: block; position: relative;
  background: linear-gradient(160deg, #fff 0%, #d9d9d9 100%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .5);
}
.file-icon::before { /* folded corner */
  content: ""; position: absolute; top: 0; right: 0;
  background: linear-gradient(225deg, #000 50%, #bdbdbd 50%); border-bottom-left-radius: 2px;
}

/* ---------- Features ---------- */

section h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  letter-spacing: -.04em; line-height: 1.02; font-weight: 700;
  text-align: center;
}
.features, .performance, .download {
  max-width: 1120px; margin: 0 auto;
  padding: clamp(96px, 14vh, 160px) clamp(20px, 4vw, 48px) 0;
}
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 56px;
}
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }

.card {
  container-type: inline-size;
  border: 1px solid var(--line); border-radius: 24px;
  padding: 28px;
  background: var(--panel);
  transition: border-color .3s, transform .5s var(--spring), opacity .9s var(--out) calc(var(--d, 0) * 90ms), filter .9s var(--out) calc(var(--d, 0) * 90ms);
}
.card.is-in:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.card h3 { margin: 22px 0 6px; font-size: 21px; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

.card-visual {
  height: 150px; border-radius: 16px;
  background: radial-gradient(80% 120% at 50% 0%, #1a1a1a, #050505 70%);
  border: 1px solid var(--line);
  position: relative; overflow: hidden;
  display: flex; justify-content: center;
}
.mini-island {
  margin-top: -1px;
  height: 42px; padding: 0 18px; min-width: 52%;
  background: #000; border: 1px solid #1a1a1a; border-top: 0;
  border-radius: 0 0 20px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: min-width .6s var(--spring), height .6s var(--spring);
}
.card:hover .mini-island { min-width: 70%; height: 52px; }
.mini-island .art-sm { width: 26px; height: 26px; border-radius: 7px; }
.mini-island .eq { height: 20px; gap: 3px; }
.mini-island .eq i { width: 4px; }
.mini-island .bolt { width: 18px; height: 18px; }
.mini-island .pct, .mini-island .timer { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-island .timer { color: var(--muted); }
.mini-shelf { justify-content: center; }
.mini-shelf .file-icon { width: 20px; height: 26px; border-radius: 3px; animation: bob 2.4s ease-in-out infinite; }
.mini-shelf .file-icon::before { width: 7px; height: 7px; }
.mini-shelf .file-icon::after { display: none; }
.mini-shelf .file-icon:nth-child(2) { animation-delay: -.8s; }
.mini-shelf .file-icon.ghost { background: none; border: 1px dashed #444; box-shadow: none; animation: none; }
.mini-shelf .file-icon.ghost::before { display: none; }
@keyframes bob { 50% { transform: translateY(-3px); } }

.points {
  list-style: none; padding: 0; margin: 64px 0 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.points li { padding: 26px 4px; border-bottom: 1px solid var(--line); color: var(--muted); }
.points li:nth-child(odd) { padding-right: 32px; }
.points li strong { color: var(--fg); }
@media (max-width: 720px) { .points { grid-template-columns: 1fr; } .points li:nth-child(odd) { padding-right: 4px; } }

/* ---------- Performance ---------- */

.performance { text-align: center; }
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 56px;
  border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
}
.stat { padding: 44px 20px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .num { font-size: clamp(52px, 7vw, 88px); font-weight: 700; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .unit { font-size: clamp(18px, 2vw, 24px); font-weight: 600; color: var(--muted); margin-left: 6px; }
.stat p { margin: 12px 0 0; color: var(--muted); font-size: 15px; }
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
}

/* ---------- Download ---------- */

.download { text-align: center; display: flex; flex-direction: column; align-items: center; padding-bottom: clamp(96px, 14vh, 160px); }
.download-logo { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 28px; box-shadow: 0 20px 60px -20px rgba(255, 255, 255, .25); }
.download-logo.is-in { animation: float 5s ease-in-out 1s infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.steps {
  list-style: none; padding: 0; margin: 48px 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; max-width: 860px;
  text-align: left;
}
.steps li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 18px; border: 1px solid var(--line); border-radius: 16px;
  color: var(--muted); font-size: 15px;
}
.steps li p { margin: 0; }
.steps li b { color: var(--fg); }
.steps span {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--fg); color: var(--bg); font-size: 13px; font-weight: 700;
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

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

.footer {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  padding: 28px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--dim);
}
.footer p { margin: 0; }
.footer a:hover { color: var(--fg); }

/* ---------- Reduced motion ---------- */

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