/* ==========================================================================
   vaho 2.0 — tryvaho.com
   Static, dependency-free stylesheet.
   ========================================================================== */

@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage-var.woff2") format("woff2-variations"),
       url("fonts/bricolage-var.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  /* Ground */
  --bg:        #06070a;
  --bg-2:      #0a0c11;
  --bg-3:      #10131a;
  --panel:     rgba(255, 255, 255, 0.035);
  --panel-2:   rgba(255, 255, 255, 0.055);
  --line:      rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.05);

  /* Ink */
  --fg:   #f4f6fa;
  --fg-2: #a3abba;
  --fg-3: #6a7280;

  /* Accents — taken from vaho itself */
  --ember:   #ff6b3d;
  --ember-2: #ff9308;
  --violet:  #8e5cff;
  --blue:    #3b82f6;
  --green:   #4ec07a;
  --pink:    #dd7bbb;

  /* The one ember → blue ramp: outlined buttons, the family cards on hover
     and the Pro plan all read from it, so they stay the same gradient. */
  --grad-ob: linear-gradient(115deg, var(--ember) 0%, var(--ember-2) 26%, var(--blue) 100%);

  --radius:    18px;
  --radius-lg: 26px;
  --radius-sm: 11px;

  --shell: min(1180px, calc(100vw - 2.5rem));

  --font-display: "Bricolage", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Cascadia Mono", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------------------------------------------------------------- reset -- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* height:auto matters: several images carry width/height attributes, and
   without it the attribute height wins over the intrinsic ratio and stretches
   them (the lock-screen mock was doing exactly that). */
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: rgba(255, 107, 61, 0.32); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 550;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

/* Ambient grain, drawn once over everything. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------- layout -- */

.shell { width: var(--shell); margin-inline: auto; }

section { position: relative; }

.band {
  padding-block: clamp(5rem, 11vw, 9.5rem);
}
.band--tight { padding-block: clamp(3.5rem, 7vw, 6rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 1.4rem;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 12px var(--ember);
}
.eyebrow--violet::before { background: var(--violet); box-shadow: 0 0 12px var(--violet); }
.eyebrow--blue::before   { background: var(--blue);   box-shadow: 0 0 12px var(--blue); }

.h2 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
.h2--tight { font-size: clamp(2.4rem, 5.8vw, 4.1rem); line-height: 1.02; margin-block: 0.35em 0.55em; }
.h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); letter-spacing: -0.028em; }

.lede {
  color: var(--fg-2);
  font-size: clamp(1rem, 1.35vw, 1.135rem);
  line-height: 1.62;
  max-width: 60ch;
  margin-top: 1.15rem;
}

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .lede { margin-left: auto; margin-right: auto; }

.muted { color: var(--fg-2); }
.small { font-size: 0.87rem; }
.tiny  { font-size: 0.78rem; color: var(--fg-3); }

/* -------------------------------------------------------------- buttons -- */

.btn {
  --btn-bg: var(--panel-2);
  --btn-fg: var(--fg);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.86em 1.5em;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.95rem;
  font-weight: 550;
  letter-spacing: -0.015em;
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.2); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }

.btn--primary {
  border-color: transparent;
  color: #14060a;
  background: linear-gradient(135deg, var(--ember-2), var(--ember) 55%, #ff5470);
  box-shadow: 0 10px 40px -12px rgba(255, 107, 61, 0.75);
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #ffd08a, var(--ember-2));
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.btn--primary:hover::before { opacity: 1; }
.btn--primary:hover { box-shadow: 0 16px 50px -12px rgba(255, 107, 61, 0.9); }

.btn--discord {
  background: #5865f2;
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 40px -14px rgba(88, 101, 242, 0.9);
}
.btn--discord:hover { background: #6b76f5; }

.btn--ghost { background: transparent; }

/* Outlined in the ember → blue ramp: a masked ring, so the fill stays glass. */
.btn--ob {
  background: transparent;
  border-color: transparent;
}
.btn--ob::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: var(--grad-ob);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.btn--ob:hover { border-color: transparent; background: rgba(255, 255, 255, 0.04); }
.btn--sm { padding: 0.6em 1.1em; font-size: 0.87rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--fg);
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding-bottom: 2px;
  transition: gap 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.link-arrow:hover { gap: 0.75em; border-color: var(--ember); color: #fff; }

/* ------------------------------------------------------------------ nav -- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 300;
  padding-block: 0.85rem;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(6, 7, 10, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--line-soft);
}
.nav__inner { display: flex; align-items: center; gap: 1.4rem; }

.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; letter-spacing: -0.03em; font-size: 1.06rem; }
.brand img { width: 27px; height: 27px; border-radius: 7px; }
.brand span sup {
  font-family: var(--font-mono);
  font-size: 0.56em;
  color: var(--ember);
  letter-spacing: 0.04em;
  margin-left: 0.25em;
  vertical-align: super;
}

.nav__links { display: flex; gap: 1.5rem; margin-left: auto; }
.nav__links a {
  font-size: 0.9rem;
  color: var(--fg-2);
  transition: color 0.25s var(--ease);
  position: relative;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -5px;
  height: 1px;
  background: var(--ember);
  transition: right 0.35s var(--ease);
}
.nav__links a:hover { color: var(--fg); }
.nav__links a:hover::after { right: 0; }

.nav__side { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.nav__links + .nav__side { margin-left: 1.6rem; }

.lang {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}
.lang button {
  padding: 0.32em 0.7em;
  border-radius: 999px;
  color: var(--fg-3);
  transition: color 0.25s, background 0.25s;
}
.lang button[aria-pressed="true"] { background: var(--panel-2); color: var(--fg); }

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__side { margin-left: auto; }
}

/* ----------------------------------------------------------------- hero -- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 8rem 4rem;
  overflow: hidden;
}

.hero__aura {
  position: absolute;
  inset: -20% -10% auto;
  height: 130vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(58% 42% at 50% 0%, rgba(255, 107, 61, 0.30), transparent 68%),
    radial-gradient(40% 35% at 78% 18%, rgba(142, 92, 255, 0.24), transparent 70%),
    radial-gradient(46% 40% at 18% 26%, rgba(59, 130, 246, 0.18), transparent 72%);
  filter: blur(10px);
  animation: aura 22s var(--ease-io) infinite alternate;
}
@keyframes aura {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2.5%, 2%, 0) scale(1.1); }
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: radial-gradient(70% 55% at 50% 30%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(70% 55% at 50% 30%, #000 20%, transparent 80%);
}

.hero__inner { position: relative; z-index: 2; text-align: center; }

.hero h1 {
  font-size: clamp(2.7rem, 7.6vw, 6.1rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin-top: 0.4rem;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--ember-2), var(--ember) 42%, var(--violet) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  margin: 1.7rem auto 0;
  max-width: 44ch;
  color: var(--fg-2);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.55;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 2.3rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 1.5rem;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  color: var(--fg-3);
  text-transform: uppercase;
}
.hero__meta span { display: inline-flex; align-items: center; gap: 0.5em; }
.hero__meta span::before {
  content: "";
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.tag-2 {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.42em 0.95em 0.42em 0.5em;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  font-size: 0.8rem;
  color: var(--fg-2);
}
.tag-2 b {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 0.25em 0.6em;
  border-radius: 999px;
  color: #180a04;
  background: linear-gradient(120deg, var(--ember-2), var(--ember));
  font-weight: 700;
}

/* Hero stage: the notch panel floating over a wallpaper. */
.stage {
  position: relative;
  z-index: 2;
  margin-top: clamp(3rem, 7vw, 5.5rem);
  width: var(--shell);
  margin-inline: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #000;
  overflow: hidden;
  box-shadow: 0 60px 140px -50px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  transform: perspective(1800px) rotateX(var(--stage-tilt, 7deg)) scale(var(--stage-scale, 0.965));
  transform-origin: 50% 0;
  transition: transform 0.1s linear;
}
.stage__film {
  display: block;
  width: 100%;
  aspect-ratio: 2400 / 620;
  object-fit: cover;
  background: #05060a;
}
/* <picture> is a format-negotiation wrapper only; it must not affect layout. */
picture { display: contents; }

.stage__film[hidden], .stage__still[hidden] { display: none; }
.stage__still { position: relative; }
.stage__wall { width: 100%; opacity: 0.95; }
.stage__panel {
  position: absolute;
  top: -2px;
  left: 50%;
  translate: -50% 0;
  width: min(62%, 700px);
  filter: drop-shadow(0 26px 50px rgba(0, 0, 0, 0.7));
}
.stage__chrome {
  position: absolute;
  inset: 0 0 auto;
  height: 26px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
  pointer-events: none;
}

/* ----------------------------------------------------------- news strip -- */

.ticker {
  border-block: 1px solid var(--line-soft);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.022), transparent);
  overflow: hidden;
  padding-block: 1.05rem;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track {
  display: flex;
  width: max-content;
  gap: 2.6rem;
  animation: slide 46s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg-3);
  white-space: nowrap;
}
.ticker__item b { color: var(--fg); font-weight: 500; }
.ticker__item::after {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--ember);
  opacity: 0.55;
  margin-left: 2rem;
}

/* --------------------------------------------------------------- reveal -- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .ticker__track, .hero__aura { animation: none; }
}

/* ---------------------------------------------------------------- cards -- */

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  padding: 1.6rem;
  overflow: hidden;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.11), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.card:hover { border-color: rgba(255, 255, 255, 0.18); transform: translateY(-3px); }
.card:hover::before { opacity: 1; }
/* ---------------------------------------------------------------- sheen -- */
/* An ember → blue ring around the card, with a brighter arc running the whole
   way round it, both only while the pointer is on the card. --spin is what
   moves; browsers without @property just get the static ring. */
@property --spin {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.card--sheen::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background:
    conic-gradient(from var(--spin),
      transparent 0 52%,
      rgba(255, 107, 61, 0.95) 66%,
      rgba(255, 147, 8, 0.95) 74%,
      rgba(59, 130, 246, 0.95) 88%,
      transparent 100%),
    var(--grad-ob);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
  z-index: 2;
}
.card--sheen:hover::after,
.card--sheen:focus-within::after {
  opacity: 1;
  animation: sheenSpin 3.4s linear infinite;
}
@keyframes sheenSpin { to { --spin: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  .card--sheen:hover::after, .card--sheen:focus-within::after { animation: none; }
}

.card h3 { font-size: 1.12rem; letter-spacing: -0.025em; margin-bottom: 0.5rem; }
.card p { color: var(--fg-2); font-size: 0.92rem; line-height: 1.58; }

.grid { display: grid; gap: 1rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 940px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- store -- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split--rev { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
/* Text left, code right, with the code taking the room it needs to breathe. */
.split--wide { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
@media (max-width: 940px) {
  .split, .split--rev, .split--wide { grid-template-columns: 1fr; }
  .split--rev > *:first-child { order: 2; }
}

.shot {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 45px 90px -45px rgba(0, 0, 0, 0.95);
}
.shot img { width: 100%; }
.shot--glow::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% -30%;
  height: 60%;
  background: radial-gradient(50% 100% at 50% 100%, rgba(255, 107, 61, 0.3), transparent 70%);
  pointer-events: none;
}

.checks { display: grid; gap: 0.85rem; margin-top: 1.8rem; }
.checks li { display: flex; gap: 0.75rem; align-items: flex-start; list-style: none; color: var(--fg-2); font-size: 0.94rem; line-height: 1.55; }
.checks { padding: 0; }
.checks li::before {
  content: "";
  flex: none;
  width: 18px; height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  background: rgba(255, 107, 61, 0.16);
  border: 1px solid rgba(255, 107, 61, 0.42);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff8a5c' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 11px;
  background-repeat: no-repeat;
  background-position: center;
}
.checks li b { color: var(--fg); font-weight: 560; }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4em 0.9em;
  margin-top: 1.6rem;
}
.live-badge i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.28; } }

/* ----------------------------------------------------------------- code -- */

.code {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #07090d;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.75;
}
.code__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.022);
}
.code__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.code__bar span { margin-left: 0.6rem; color: var(--fg-3); font-size: 0.72rem; }
.code pre { margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto; }
.code .k { color: #7fb2ff; }   /* keys        */
.code .s { color: #9fd88f; }   /* strings     */
.code .n { color: #d7a3ff; }   /* numbers     */
.code .p { color: #6a7280; }   /* punctuation */
.code .c { color: #5c6472; }   /* comments    */
.code .kw { color: #ff9d76; }  /* keywords    */

/* The ember → blue rule, painted as the border itself: the inner fill is one
   background layer clipped to the padding box, the ramp another clipped to the
   border box. */
.code--ob {
  border: 1px solid transparent;
  background:
    linear-gradient(#07090d, #07090d) padding-box,
    var(--grad-ob) border-box;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2rem; }

.code--lg pre { padding: 1.6rem 1.5rem; font-size: 0.95rem; line-height: 1.75; }
.code--lg .code__bar { padding-block: 0.9rem; }
@media (max-width: 620px) { .code--lg pre { padding: 1.1rem 1.2rem; font-size: 0.82rem; } }

.perms { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.4rem; }
.perm {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.34em 0.75em;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--fg-2);
  background: rgba(255, 255, 255, 0.028);
  transition: border-color 0.3s, color 0.3s;
}
.perm:hover { border-color: rgba(142, 92, 255, 0.5); color: #c0a7ff; }

/* ----------------------------------------------------------- lock strip -- */

.lock {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}
.lock__wall { width: 100%; filter: brightness(0.55) saturate(0.85); }
/* The strip is short on purpose — it is a notch, not a banner — and it reads
   under the clock, the way you meet it when the screen wakes. */
.lock__strip {
  position: absolute;
  top: 66%;
  left: 50%;
  translate: -50% 0;
  width: min(44%, 470px);
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.75));
}
.lock__clock {
  position: absolute;
  top: 22%;
  left: 50%;
  translate: -50% 0;
  text-align: center;
  font-family: var(--font-display);
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 4px 34px rgba(0, 0, 0, 0.65);
}
.lock__clock b { display: block; font-size: clamp(3rem, 9vw, 7rem); font-weight: 500; letter-spacing: -0.045em; line-height: 0.95; }
.lock__clock span { font-size: clamp(0.8rem, 1.9vw, 1.25rem); opacity: 0.8; }

/* Narrow screens: the mock keeps the wallpaper's aspect ratio, so the clock
   has to give the strip below it room rather than growing into it. */
@media (max-width: 700px) {
  .lock__clock { top: 12%; }
  .lock__clock b { font-size: clamp(1.9rem, 8vw, 4rem); }
  .lock__strip { top: 62%; width: min(62%, 470px); }
}

/* --------------------------------------------------------------- family -- */

.family { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.family--2 { grid-template-columns: repeat(2, 1fr); max-width: 46rem; margin-left: auto; margin-right: auto; }
.family--4 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .family { grid-template-columns: 1fr; } }
.family .card { text-align: left; }
/* Stands where the download link goes, for an app with no release yet. */
.family__soon {
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.family img { width: 58px; height: 58px; border-radius: 14px; margin-bottom: 1rem; }

/* The corner tag on every card: these apps cost nothing. */
.family__free {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.3em 0.75em;
  border-radius: 999px;
  background: linear-gradient(115deg, var(--ember), var(--ember-2));
  color: #0a0c11;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  z-index: 1;
}

/* On hover the card's own contents take the gradient too, so the ring and
   the reading underneath it are plainly the same thing. */
.family .card--sheen { transition: border-color 0.4s var(--ease), transform 0.4s var(--ease); }
.family .card--sheen:hover { border-color: transparent; transform: translateY(-4px); }
.family .card--sheen h3,
.family .card--sheen p,
.family .card--sheen .link-arrow { transition: color 0.4s var(--ease), border-color 0.4s var(--ease); }
.family .card--sheen:hover h3,
.family .card--sheen:hover .link-arrow {
  background: var(--grad-ob);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.family .card--sheen:hover .link-arrow { border-bottom-color: var(--blue); }
.family .card--sheen:hover p { color: var(--fg); }

/* -------------------------------------------------------------- privacy -- */

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.stat {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  background: rgba(255, 255, 255, 0.022);
}
.stat-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .stat-row--3 { grid-template-columns: 1fr; } }

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
  background: var(--grad-ob);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* The counting figure. The selector carries .stat span's specificity on
   purpose — that rule styles the caption underneath, not this. Tabular figures
   keep the digits from jittering as they fall. */
.stat b .stat__n {
  display: inline-block;
  margin: 0;
  font: inherit;
  color: inherit;
  font-variant-numeric: tabular-nums;
}
.stat span { display: block; margin-top: 0.55rem; font-size: 0.85rem; color: var(--fg-3); line-height: 1.5; }

/* -------------------------------------------------------------- pricing -- */

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: stretch; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }

.plan {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.9rem;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.042), rgba(255, 255, 255, 0.01));
  overflow: hidden;
}
.plan--pro {
  border-color: rgba(255, 147, 8, 0.26);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255, 107, 61, 0.26) 0%, transparent 58%),
    radial-gradient(110% 85% at 100% 100%, rgba(59, 130, 246, 0.26) 0%, transparent 60%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
/* The ember glow that ties the card to the button under it. */
.plan--pro::before {
  content: "";
  position: absolute;
  left: -20%; bottom: -55%;
  width: 90%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 147, 8, 0.2) 0%, transparent 68%);
  pointer-events: none;
}
.plan--pro:hover { border-color: transparent; transform: translateY(-4px); }
.plan--pro > * { position: relative; }
.plan__name { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); }
.plan__price { display: flex; align-items: baseline; gap: 0.45rem; margin: 0.7rem 0 0.2rem; }
.plan__price b { font-family: var(--font-display); font-size: clamp(2.5rem, 5vw, 3.4rem); font-weight: 500; letter-spacing: -0.05em; line-height: 1; }
.plan__price span { color: var(--fg-3); font-size: 0.85rem; }
.plan__note { color: var(--fg-3); font-size: 0.84rem; }

.plan { display: flex; flex-direction: column; }
.plan ul { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 0.75rem; align-content: start; }
/* The list absorbs the slack, so both cards end at the same line. */
.plan ul { flex: 1 1 auto; }
.plan li {
  position: relative;
  padding-left: 1.75rem;
  font-size: 0.9rem;
  color: var(--fg-2);
  line-height: 1.55;
}
.plan li::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3abba' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 10px;
  background-repeat: no-repeat;
  background-position: center;
}
.plan--pro li::before {
  background-color: rgba(255, 147, 8, 0.14);
  border-color: rgba(255, 147, 8, 0.42);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffa860' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.plan li b { color: var(--fg); font-weight: 560; }
.plan .btn { width: 100%; margin-top: 1.8rem; flex: none; }
.plan__ribbon {
  position: absolute;
  top: 1.35rem; right: -3.2rem;
  width: 12rem;
  text-align: center;
  transform: rotate(38deg);
  background: var(--grad-ob);
  color: #0b0d14;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  padding: 0.35em 0;
  font-weight: 700;
}

/* --------------------------------------------------------------- footer -- */

.footer {
  border-top: 1px solid var(--line-soft);
  padding-block: 3.5rem 0;
  margin-top: 3rem;
  overflow: hidden;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 780px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
.footer h4 { font-family: var(--font-body); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); font-weight: 500; margin-bottom: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.footer a { color: var(--fg-2); font-size: 0.9rem; transition: color 0.25s; }
.footer a:hover { color: var(--fg); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.8rem;
  color: var(--fg-3);
}

/* ------------------------------------------------------------- progress -- */

.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--ember-2), var(--ember), var(--violet));
  z-index: 400;
  pointer-events: none;
}

/* ============================================================ doc pages == */

.doc { padding-block: 8rem 5rem; }
.doc__head { margin-bottom: 3rem; }
.doc__head h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 500; }
.doc__body { max-width: 46rem; }
.doc__body h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 3.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
}
.doc__body h3 { font-size: 1.15rem; margin-top: 2.2rem; }
.doc__body p, .doc__body li { color: var(--fg-2); font-size: 0.97rem; line-height: 1.72; }
.doc__body p { margin-top: 1rem; }
.doc__body ul, .doc__body ol { padding-left: 1.2rem; margin-top: 1rem; display: grid; gap: 0.5rem; }
.doc__body a { color: var(--ember); border-bottom: 1px solid rgba(255, 107, 61, 0.35); }
.doc__body a:hover { color: #ffb08c; }
.doc__body code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 0.12em 0.42em;
  color: #ffc7a8;
}
.doc__body pre {
  margin-top: 1.2rem;
  background: #07090d;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: #cdd5e2;
}
.doc__body pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.doc__body table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.4rem;
  font-size: 0.88rem;
  display: block;
  overflow-x: auto;
}
.doc__body th, .doc__body td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  color: var(--fg-2);
}
.doc__body th { color: var(--fg); font-weight: 550; white-space: nowrap; }
.doc__body td code { white-space: nowrap; }
.doc__body blockquote {
  margin: 1.4rem 0 0;
  padding: 0.9rem 1.2rem;
  border-left: 2px solid var(--ember);
  background: rgba(255, 107, 61, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.doc__body blockquote p { margin: 0; }
.doc-back {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: 0.88rem; color: var(--fg-3); margin-bottom: 1.6rem;
}
.doc-back:hover { color: var(--fg); }
.toc {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  background: rgba(255, 255, 255, 0.022);
  margin-bottom: 2.5rem;
}
.toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.toc a { border: 0; color: var(--fg-2); font-size: 0.9rem; }
.toc a:hover { color: var(--ember); }

/* --------------------------------------------------------------- clips -- */

.clips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 980px) { .clips { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .clips { grid-template-columns: 1fr; } }

.clip { margin: 0; }
.clip video {
  width: 100%;
  aspect-ratio: 1360 / 496;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #05060a;
  box-shadow: 0 26px 60px -34px rgba(0, 0, 0, 0.95);
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
}
.clip:hover video { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.18); }
.clip figcaption {
  margin-top: 0.9rem;
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--fg-3);
}
.clip figcaption b { color: var(--fg-2); font-weight: 560; }

/* ============================================================== the scene ==
   One continuous scroll: "Infinite modes, zero windows" lands, then the clips
   rise through it and hold the screen alone. app.js drives the per-tile
   transforms and the veil; everything here is just the look.
   ========================================================================== */

.scene { position: relative; height: 440vh; }

.scene__track {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}
.scene__track::before,
.scene__track::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 16vh;
  z-index: 4;
  pointer-events: none;
}
.scene__track::before { top: 0;    background: linear-gradient(to bottom, var(--bg), transparent); }
.scene__track::after  { bottom: 0; background: linear-gradient(to top,    var(--bg), transparent); }

.scene__stage { position: absolute; inset: 0; }
.scene__field { position: absolute; inset: 0; }
.scene__field--icons { z-index: 1; }
.scene__field--clips { z-index: 2; }

/* Every tile is placed by percentage and moved by transform only. */
.scene__tile {
  position: absolute;
  translate: -50% -50%;
  will-change: transform, opacity;
  opacity: 0;
}

.scene__icon { width: clamp(42px, 5vw, 68px); }
.scene__icon img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 22%;
  display: block;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.9);
}

.scene__clip { width: clamp(150px, 19vw, 276px); }
.scene__clip video,
.scene__clip--empty {
  width: 100%;
  aspect-ratio: 1360 / 496;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #05060a;
  box-shadow: 0 22px 50px -26px rgba(0, 0, 0, 0.95);
}
/* A slot with no recording yet: the frame that marks where one will go. */
.scene__clip--empty {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.02);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}
.scene__clip--empty span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-3);
  letter-spacing: 0.08em;
}

/* Reads the middle of the stage back to black so the sentence stays legible.
   app.js fades it out with the sentence, so the clips are never clouded. */
.scene__veil {
  position: absolute;
  inset: -12%;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(52% 42% at 50% 50%,
    var(--bg) 0%,
    rgba(6, 7, 10, 0.97) 30%,
    rgba(6, 7, 10, 0.82) 50%,
    rgba(6, 7, 10, 0.35) 70%,
    rgba(6, 7, 10, 0) 84%);
}

.scene__titles {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  pointer-events: none;
  padding-inline: 1.25rem;
}
.scene__title {
  grid-area: 1 / 1;
  text-align: center;
  opacity: var(--o, 0);
  transform: translateY(var(--ty, 0)) scale(var(--sc, 1));
  will-change: opacity, transform;
}
.scene__title .eyebrow { justify-content: center; margin-bottom: 1rem; }
.scene__h2 {
  font-size: clamp(2.3rem, 7.4vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}
.scene__h2 span, .scene__h2 em { display: block; font-style: normal; }
.scene__h2 em {
  background: linear-gradient(100deg, var(--ember-2), var(--ember) 45%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.scene__hint {
  position: absolute;
  left: 50%;
  bottom: 4.5vh;
  translate: -50% 0;
  z-index: 6;
  opacity: var(--hint, 1);
  transition: opacity 0.4s var(--ease);
}
.scene__hint i {
  display: block;
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, transparent, var(--fg-3));
}

@media (max-width: 700px) {
  .scene { height: 400vh; }
  .scene__veil { background: radial-gradient(72% 40% at 50% 50%, var(--bg) 0%, rgba(6,7,10,0.97) 34%, rgba(6,7,10,0.7) 58%, rgba(6,7,10,0) 86%); }
}
@media (prefers-reduced-motion: reduce) {
  .scene { height: auto; }
  .scene__track { position: static; height: auto; padding-block: 5rem; }
  .scene__stage { position: static; }
  .scene__field { position: static; display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin-bottom: 2.5rem; }
  .scene__tile { position: static; translate: none; transform: none !important; opacity: 1 !important; }
  .scene__veil, .scene__hint { display: none; }
  .scene__titles { position: static; display: grid; gap: 2.5rem; }
  .scene__title { grid-area: auto; opacity: 1 !important; transform: none !important; }
}

/* ===================================================== desktop switcher ==
   A Mac that uses the switcher on itself. app.js moves the model; the rules
   below draw it. Everything is sized in cqw of the stage (or of a card, for
   the previews), so the whole picture scales as one.
   ========================================================================== */

.spaces-fig { margin: 0; }

.spaces {
  --sp-accent: #8fbaff;
  /* The strip's geometry. The notch's open width and the highlight's
     position are both worked out from these. */
  --sp-card: 10.4cqw;
  --sp-gap: 1.1cqw;
  --sp-side: 2.4cqw;

  position: relative;
  container-type: inline-size;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  background: #05060a;
  box-shadow: 0 40px 90px -46px rgba(0, 0, 0, 0.95);
  font-family: var(--font-body);
  color: #eef3fb;
}
.spaces__screens { position: absolute; inset: 0; transition: opacity 0.45s var(--ease); }
.spaces.is-resetting .spaces__screens,
.spaces.is-resetting .spaces__notch { opacity: 0; }

/* One screen per desktop, stacked; the one on screen is .is-on. A switch is
   instant in vaho, so this is a short crossfade with a nudge toward the side
   the desktop came from, not macOS' full slide. */
.spaces__screen {
  position: absolute;
  inset: 0;
  container-type: inline-size;
  background: var(--wall);
  opacity: 0;
  transform: translateX(calc(var(--dir, 1) * 3%)) scale(1.02);
  transition: opacity 0.38s var(--ease), transform 0.5s var(--ease);
}
.spaces__screen.is-on { opacity: 1; transform: none; }

/* A window: a title bar and a few lines of something. Sized in cqw of the
   screen or card it sits on, so a preview is the same window, smaller. */
.spwin {
  position: absolute;
  display: flex;
  flex-direction: column;
  border-radius: 1.1cqw;
  overflow: hidden;
  background: rgba(16, 19, 27, 0.78);
  border: 0.12cqw solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 2cqw 4cqw -1.5cqw rgba(0, 0, 0, 0.7);
  transform-origin: 50% 0;
  transform: scale(var(--s, 1));
}
.spwin__bar {
  display: flex;
  gap: 0.55cqw;
  align-items: center;
  height: 3.6cqw;
  flex: none;
  padding-inline: 1.2cqw;
  background: rgba(255, 255, 255, 0.06);
}
.spwin__bar i { width: 0.9cqw; height: 0.9cqw; border-radius: 50%; background: rgba(255, 255, 255, 0.3); }
.spwin__bar i:first-child { background: #ff5f57; }
.spwin__bar i:nth-child(2) { background: #febc2e; }
.spwin__bar i:last-child { background: #28c840; }
.spwin__body { display: grid; align-content: start; gap: 1cqw; padding: 1.8cqw 2cqw; }
.spwin__body b { height: 4cqw; width: 46%; border-radius: 0.7cqw; background: var(--tint); opacity: 0.85; }
.spwin__body i { height: 0.9cqw; border-radius: 99px; background: rgba(255, 255, 255, 0.2); }
.spwin__body i:nth-child(2) { width: 88%; }
.spwin__body i:nth-child(3) { width: 72%; }
.spwin__body i:nth-child(4) { width: 54%; }

/* The window being dragged leaves its screen for this layer, above the notch. */
.spaces__fly { position: absolute; inset: 0; z-index: 25; pointer-events: none; container-type: inline-size; }
.spaces__fly .spwin.is-flying {
  transition: left 0.9s var(--ease-io), top 0.9s var(--ease-io), transform 0.9s var(--ease-io), opacity 0.35s var(--ease);
  opacity: 0.92;
}
.spaces__fly .spwin.is-dropped { opacity: 0; transition-duration: 0.38s; }

.spaces__menubar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  height: 4.2cqw;
  display: flex;
  align-items: center;
  gap: 1.3cqw;
  padding-inline: 2cqw;
  font-size: 1.25cqw;
  background: rgba(10, 12, 18, 0.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.spaces__apple { width: 1cqw; height: 1cqw; border-radius: 50%; background: currentColor; opacity: 0.85; }
.spaces__menubar b { font-weight: 650; letter-spacing: -0.01em; }
.spaces__menus, .spaces__status { display: flex; align-items: center; gap: 1cqw; opacity: 0.65; }
.spaces__status { margin-left: auto; font-variant-numeric: tabular-nums; }
.spaces__menus i, .spaces__status i { display: block; width: 2.6cqw; height: 0.7cqw; border-radius: 99px; background: currentColor; }
.spaces__status i { width: 1.5cqw; }

/* The notch. Collapsed it is the camera housing; open it is the strip. */
.spaces__notch {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 20;
  translate: -50% 0;
  width: 15cqw;
  height: 4.2cqw;
  border-radius: 0 0 1.6cqw 1.6cqw;
  background: #000;
  box-shadow: 0 3cqw 6cqw -2cqw rgba(0, 0, 0, 0);
  transition:
    width 0.55s cubic-bezier(0.3, 1.25, 0.5, 1),
    height 0.55s cubic-bezier(0.3, 1.25, 0.5, 1),
    border-radius 0.55s var(--ease),
    box-shadow 0.4s var(--ease),
    opacity 0.45s var(--ease);
}
.spaces__notch.is-open {
  width: calc(var(--n, 3) * var(--sp-card) + (var(--n, 3) - 1) * var(--sp-gap) + 2 * var(--sp-side));
  height: 17.6cqw;
  border-radius: 0 0 3.4cqw 3.4cqw;
  box-shadow: 0 3cqw 6cqw -2cqw rgba(0, 0, 0, 0.9);
}
/* The curve where the notch meets the top of the screen: a concave fillet
   on either side, flaring out into the menu bar. Each is a black square with
   a quarter circle cut out of its lower outer corner; the circle's radius is
   the square's side, so the fillet grows with it as the notch opens. */
.spaces__notch::before,
.spaces__notch::after {
  content: "";
  position: absolute;
  top: 0;
  width: 1.1cqw;
  height: 1.1cqw;
  transition: width 0.55s var(--ease), height 0.55s var(--ease);
}
.spaces__notch::before { right: 100%; background: radial-gradient(farthest-side at 0 100%, transparent 96%, #000 100%); }
.spaces__notch::after  { left: 100%;  background: radial-gradient(farthest-side at 100% 100%, transparent 96%, #000 100%); }
.spaces__notch.is-open::before,
.spaces__notch.is-open::after { width: 2cqw; height: 2cqw; }
/* The contents are clipped here rather than on the notch, so the fillets,
   which sit outside it, still show. */
.spaces__notch-in { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }

.spaces__strip {
  position: absolute;
  top: 5.4cqw;
  left: 50%;
  translate: -50% 0;
  display: flex;
  gap: var(--sp-gap);
  opacity: 0;
  transform: translateY(-1cqw) scale(0.96);
  transition: opacity 0.18s var(--ease), transform 0.3s var(--ease);
}
.spaces__notch.is-open .spaces__strip {
  opacity: 1;
  transform: none;
  transition-delay: 0.16s;
}

.spaces__card {
  --pull: 0;
  position: relative;
  flex: none;
  width: var(--sp-card);
  aspect-ratio: 16 / 10;
  border-radius: 1cqw;
  background: var(--wall, transparent);
  box-shadow: inset 0 0 0 0.12cqw rgba(255, 255, 255, 0.14);
  transform: translateY(calc(var(--pull) * 7cqw)) scale(calc(1 - var(--pull) * 0.18));
  opacity: calc(1 - var(--pull) * 0.85);
  transition:
    width 0.45s var(--ease), margin 0.45s var(--ease),
    transform 0.6s var(--ease), opacity 0.45s var(--ease), box-shadow 0.25s var(--ease);
}
/* The highlight: a ring in the notch's border colour that slides along the
   strip to the card the fingers are on. It rides the same curve as the
   fingers, and follows a card pulled down to close it. */
.spaces__hl {
  --hl: 0;
  --pull: 0;
  position: absolute;
  top: 0;
  left: calc(var(--hl) * (var(--sp-card) + var(--sp-gap)));
  z-index: 2;
  width: var(--sp-card);
  aspect-ratio: 16 / 10;
  border-radius: 1cqw;
  box-shadow: 0 0 0 0.26cqw var(--sp-accent), 0 0 2.4cqw -0.4cqw var(--sp-accent);
  pointer-events: none;
  transform: translateY(calc(var(--pull) * 7cqw)) scale(calc(1 - var(--pull) * 0.18));
  opacity: calc(1 - var(--pull) * 0.85);
  transition: left 0.55s var(--ease-io), transform 0.6s var(--ease), opacity 0.3s var(--ease), box-shadow 0.25s var(--ease);
}
.spaces__hl.is-hidden { opacity: 0; transition-duration: 0.55s, 0.6s, 0.15s, 0.25s; }
.spaces__hl.is-commit { animation: spCommit 0.3s var(--ease) 1; }
/* The dot under the desktop that is on screen. */
.spaces__card.is-current::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1.5cqw;
  width: 0.65cqw;
  height: 0.65cqw;
  translate: -50% 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}
.spaces__card.is-in, .spaces__card.is-gone {
  width: 0;
  margin-inline: calc(var(--sp-gap) / -2);
  opacity: 0;
  transform: scale(0.6);
}
.spaces__card.is-gone { transform: translateY(7cqw) scale(0.6); }
.spaces__card.is-land { animation: spLand 0.7s cubic-bezier(0.3, 1.6, 0.45, 1) 1; }
@keyframes spCommit { 50% { box-shadow: 0 0 0 0.5cqw #fff, 0 0 3cqw 0 var(--sp-accent); } }
@keyframes spLand { 0% { transform: translateY(-1.6cqw) scale(1.08); } 100% { transform: none; } }

.spaces__card--new {
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
  border: 0.14cqw dashed rgba(143, 186, 255, 0.55);
  color: var(--sp-accent);
}
.spaces__card--new b { font-size: 3cqw; font-weight: 400; line-height: 1; }

/* A card's preview is its desktop's own markup, drawn at card size. */
.spaces__preview {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  container-type: inline-size;
}
.spaces__preview .spwin { box-shadow: none; }
.spaces__num {
  position: absolute;
  top: 0.45cqw;
  left: 0.45cqw;
  min-width: 1.9cqw;
  padding: 0.15cqw 0.5cqw;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 1cqw;
  font-weight: 700;
  text-align: center;
  color: #fff;
}

.spaces__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.5cqw;
  text-align: center;
  font-size: 1.35cqw;
  font-weight: 560;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.spaces__notch.is-open .spaces__title { opacity: 1; transition-delay: 0.22s; }

.spaces__dock {
  position: absolute;
  bottom: 2cqw;
  left: 50%;
  z-index: 10;
  translate: -50% 0;
  display: flex;
  gap: 0.9cqw;
  padding: 0.9cqw 1.2cqw;
  border-radius: 2cqw;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.spaces__dock i {
  width: 3.6cqw;
  aspect-ratio: 1;
  border-radius: 26%;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.14));
}
.spaces__dock i:nth-child(2) { background: linear-gradient(160deg, var(--ember), var(--ember-2)); }
.spaces__dock i:nth-child(4) { background: linear-gradient(160deg, var(--sp-accent), rgba(255, 255, 255, 0.14)); }

.spaces__pointer {
  position: absolute;
  z-index: 30;
  left: 70%;
  top: 86%;
  width: 2.2cqw;
  height: 2.2cqw;
  background: #fff;
  clip-path: polygon(0 0, 0 78%, 26% 60%, 44% 100%, 62% 90%, 45% 52%, 78% 50%);
  filter: drop-shadow(0 0.3cqw 0.6cqw rgba(0, 0, 0, 0.8));
  opacity: 0;
  transition: opacity 0.3s var(--ease), scale 0.2s var(--ease);
}
.spaces__pointer.is-on { opacity: 1; }
.spaces__pointer.is-slow { transition: opacity 0.3s var(--ease), scale 0.2s var(--ease), left 0.9s var(--ease-io), top 0.9s var(--ease-io); }
.spaces__pointer.is-grab { scale: 0.85; }

/* The trackpad, and the three fingers on it. */
.spaces__pad {
  position: absolute;
  right: 2.4cqw;
  bottom: 2cqw;
  z-index: 10;
  width: 15cqw;
  aspect-ratio: 1.5;
  border-radius: 1.4cqw;
  background: rgba(8, 10, 15, 0.55);
  border: 0.12cqw solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
}
.spaces__fingers {
  --fx: 0;
  --fy: 0;
  display: flex;
  gap: 1cqw;
  transform: translate(calc(var(--fx) * 3.6cqw), calc(var(--fy) * 2.2cqw));
  opacity: 0;
  scale: 1.5;
  transition: transform 0.55s var(--ease-io), opacity 0.3s var(--ease), scale 0.3s var(--ease);
}
.spaces__fingers.is-down { opacity: 1; scale: 1; }
.spaces__fingers.is-fast { transition-duration: 0.22s, 0.14s, 0.14s; }
.spaces__fingers i {
  width: 1.7cqw;
  height: 1.7cqw;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 1.6cqw rgba(143, 186, 255, 0.85);
}
.spaces__fingers i:nth-child(2) { translate: 0 -0.5cqw; }

/* What the loop is showing right now, under the picture. */
.spaces__caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 1.5em;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--fg-2);
  text-align: center;
}
.spaces__caption i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 10px var(--blue); }
.spaces__caption span { transition: opacity 0.18s var(--ease); }
.spaces__caption.is-swap span { opacity: 0; }

.desktops-band {
  background:
    radial-gradient(70% 60% at 50% 0%, rgba(59, 130, 246, 0.12), transparent 70%),
    linear-gradient(to bottom, transparent, rgba(59, 130, 246, 0.04), transparent);
}

/* ======================================================= closing wordmark ==
   The name, oversized and cut in half by the bottom of the page.
   ========================================================================== */

.wordmark {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  height: clamp(1.9rem, 6.9vw, 6.1rem);
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.wordmark span {
  display: block;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(5.5rem, 19vw, 17rem);
  font-weight: 600;
  line-height: 0.78;
  letter-spacing: -0.055em;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.015));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
