:root {
  /* Layout: a device-stage hero that pins, docks its name into the header and pours the phone screen into a cobalt band;
     then alternating cobalt / ink / mist bands, each with one motion idea. Type carries the identity. */
  --ink: #0B0D17;
  --ink-2: #131628;
  --ink-3: #1B1F36;
  --mist: #E8EBF4;
  --mist-dim: #A2A8C3;
  --paper: #F8F9FD;
  --ink-soft: #4A5170;
  --cobalt: #3341FF;
  --cobalt-deep: #1F2BC4;
  --periwinkle: #9AA3FF;
  --amber: #FFB547;
  --line: rgba(232, 235, 244, .12);
  --line-ink: rgba(11, 13, 23, .12);

  --f-display: "Anybody", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --f-ar: "Reem Kufi", "Geeza Pro", "Noto Kufi Arabic", Tahoma, sans-serif;

  --gut-l: max(clamp(16px, 4vw, 56px), env(safe-area-inset-left, 0px));
  --gut-r: max(clamp(16px, 4vw, 56px), env(safe-area-inset-right, 0px));
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-gutter: stable; }
html.is-loading { overflow: hidden; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--mist);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--cobalt); color: var(--mist); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 8px; }

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) { html.no-motion { scroll-behavior: smooth; } }

.wrap {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-left: var(--gut-l);
  padding-right: var(--gut-r);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mist-dim);
}
.eyebrow::before { content: ""; width: 20px; height: 1px; background: currentColor; }
.display {
  font-family: var(--f-display);
  font-weight: 800;
  font-variation-settings: "wdth" 92, "wght" 800;
  line-height: .95;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.display em {
  font-style: normal;
  font-variation-settings: "wdth" 140, "wght" 300;
  color: var(--periwinkle);
}
.wm { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.wi { display: inline-block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font: 600 15px/1 var(--f-body);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--cobalt); color: var(--mist); }
.btn-primary:hover { background: var(--mist); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--mist); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--mist); }
.btn-ink { background: var(--ink); color: var(--mist); }
.btn-ink:hover { background: var(--mist); color: var(--ink); }

/* ---------- loader ---------- */
.loader { display: none; }
.js .loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--gut-r) calc(32px + env(safe-area-inset-bottom, 0px)) var(--gut-l);
  background: var(--ink);
  background-image: radial-gradient(rgba(232, 235, 244, .07) 1px, transparent 1.2px);
  background-size: 24px 24px;
}
.no-motion .loader { display: none; }
.loader-log { display: grid; gap: 6px; font-family: var(--f-mono); font-size: 12px; color: var(--mist-dim); min-width: 0; }
.loader-log p { opacity: 0; transform: translateY(8px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loader-log b { color: var(--amber); font-weight: 600; }
.loader-count {
  font-family: var(--f-display);
  font-variation-settings: "wdth" 60, "wght" 300;
  font-size: clamp(56px, 9vw, 120px);
  line-height: .8;
  font-variant-numeric: tabular-nums;
  color: var(--mist);
}
.loader-count small { font-size: .3em; color: var(--mist-dim); margin-left: 4px; }

/* ---------- custom cursor, progress, fps, toast ---------- */
.cursor, .cursor-dot { display: none; }
.has-cursor .cursor, .has-cursor .cursor-dot { display: grid; }
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  place-items: center;
  border: 1.5px solid var(--mist);
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), background .3s ease, border-color .3s ease, opacity .3s ease;
}
.cursor.is-on { opacity: 1; }
.cursor.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: var(--mist); }
.cursor.is-label { width: 88px; height: 88px; margin: -44px 0 0 -44px; background: var(--amber); border-color: transparent; mix-blend-mode: normal; }
.cursor-label { font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); opacity: 0; transition: opacity .2s ease; }
.cursor.is-label .cursor-label { opacity: 1; }
.cursor-dot {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 201;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--mist);
  pointer-events: none;
  mix-blend-mode: difference;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 3px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.no-motion .progress { display: none; }

.fps {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(11, 13, 23, .8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--mist-dim);
  pointer-events: none;
}
.fps.is-away { transform: translateY(170%); }
.fps { transition: transform .5s var(--ease-out); }
@media (max-width: 700px) { .fps { display: none; } }
.fps b { min-width: 3ch; text-align: right; color: var(--mist); font-weight: 600; font-variant-numeric: tabular-nums; }
.fps canvas { width: 56px; height: 18px; display: block; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 150;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform .5s var(--ease-out), opacity .3s ease;
  pointer-events: none;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- header ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gut-r) 14px var(--gut-l);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.pill {
  background: rgba(19, 22, 40, .74);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 999px;
}
.brand {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  text-decoration: none;
  color: var(--mist);
}
.brand-text {
  display: block;
  font-family: var(--f-display);
  font-size: 22px;
  line-height: .8;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand-text .ch, .hero-name .ch { display: inline-block; font-variation-settings: "wdth" 88, "wght" 800; }
.nav { display: flex; align-items: center; gap: 2px; padding: 5px; }
.nav a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--mist-dim);
  transition: color .2s ease, background .25s ease;
}
.nav a:hover { color: var(--mist); }
.nav a.is-active { background: var(--mist); color: var(--ink); }
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mist);
}
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 rgba(255, 181, 71, .6); animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 181, 71, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(255, 181, 71, 0); } }
@media (max-width: 1060px) { .status { display: none; } }
@media (max-width: 700px) { .nav a:not(.nav-contact) { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  overflow: clip;
  background: var(--ink);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(232, 235, 244, .085) 1px, transparent 1.3px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 58% 58%, #000 25%, transparent 80%);
  mask-image: radial-gradient(ellipse 75% 70% at 58% 58%, #000 25%, transparent 80%);
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  left: 60%;
  top: 58%;
  width: 64vw;
  height: 64vw;
  max-width: 980px;
  max-height: 980px;
  transform: translate(calc(-50% + var(--gx, 0px)), calc(-50% + var(--gy, 0px)));
  background: radial-gradient(closest-side, rgba(51, 65, 255, .42), rgba(51, 65, 255, .1) 55%, rgba(51, 65, 255, 0));
  pointer-events: none;
}
.hero-eyebrow { position: absolute; left: var(--gut-l); top: calc(86px + env(safe-area-inset-top, 0px)); z-index: 2; }
.hero-name {
  position: absolute;
  left: var(--gut-l);
  top: calc(112px + env(safe-area-inset-top, 0px));
  z-index: 2;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(64px, 13.6vw, 250px);
  font-variation-settings: "wdth" 88, "wght" 800;
  line-height: .8;
  letter-spacing: -.02em;
  white-space: nowrap;
  color: var(--mist);
}

.phone {
  --ph: min(60svh, 600px);
  --pw: calc(var(--ph) * .49);
  position: absolute;
  left: calc(50% - var(--pw) / 2);
  top: calc(50% - var(--ph) / 2 + 9svh);
  z-index: 3;
  width: var(--pw);
  height: var(--ph);
  transform-style: preserve-3d;
}
.phone-tilt { width: 100%; height: 100%; transform-style: preserve-3d; }
.phone-body {
  position: relative;
  width: 100%;
  height: 100%;
  padding: calc(var(--pw) * .036);
  border-radius: calc(var(--pw) * .17);
  background: linear-gradient(150deg, #2B3050 0%, #0E1020 42%, #1C2038 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(232, 235, 244, .2),
    inset 0 0 0 5px rgba(0, 0, 0, .55),
    0 50px 90px -30px rgba(0, 0, 0, .8),
    0 0 0 1px rgba(0, 0, 0, .6);
}
.phone-body::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 32%);
  pointer-events: none;
}
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--pw) * .135);
  background: var(--ink-2);
}
.island {
  position: absolute;
  top: 2.2%;
  left: 50%;
  z-index: 3;
  width: 32%;
  height: 4.2%;
  transform: translateX(-50%);
  border-radius: 99px;
  background: #000;
}
.app {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: .85em;
  padding: 17% 7% 6%;
  font-size: calc(var(--pw) * .047);
  line-height: 1.3;
  color: var(--mist);
  background: radial-gradient(130% 55% at 50% 0%, rgba(51, 65, 255, .55), rgba(51, 65, 255, 0) 70%), var(--ink-2);
}
.app-status {
  position: absolute;
  top: 3.6%;
  left: 10%;
  right: 10%;
  display: flex;
  justify-content: space-between;
  font: 600 .78em/1 var(--f-body);
}
.app-status span:last-child { letter-spacing: .1em; }
.app-hello { font-size: .85em; color: var(--mist-dim); }
.app-title { font-family: var(--f-display); font-variation-settings: "wdth" 90, "wght" 800; font-size: 2.1em; line-height: 1; margin-top: -.5em; }
.app-ring { position: relative; width: 48%; aspect-ratio: 1; align-self: center; }
.app-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(232, 235, 244, .12); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--amber); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: 81; animation: ring 7s var(--ease-out) infinite; }
@keyframes ring { 0% { stroke-dashoffset: 289; } 30%, 100% { stroke-dashoffset: 81; } }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.ring-label b { font-family: var(--f-display); font-variation-settings: "wdth" 80, "wght" 800; font-size: 1.7em; }
.ring-label span { font-size: .72em; color: var(--mist-dim); }
.app-list { display: flex; flex-direction: column; gap: .5em; }
.app-item {
  display: flex;
  align-items: center;
  gap: .7em;
  padding: .62em .75em;
  border-radius: .9em;
  background: rgba(232, 235, 244, .06);
  box-shadow: inset 0 0 0 1px rgba(232, 235, 244, .07);
}
.app-item i { flex: none; width: 1.9em; height: 1.9em; border-radius: .6em; background: var(--c); }
.app-item b { display: block; font-size: .86em; font-weight: 600; }
.app-item small { display: block; font-size: .72em; color: var(--mist-dim); }
.app-tabs { margin-top: auto; display: flex; justify-content: space-around; padding: .75em; border-radius: 1.2em; background: rgba(232, 235, 244, .06); }
.app-tabs span { width: 1.15em; height: 1.15em; border-radius: .35em; background: rgba(232, 235, 244, .22); }
.app-tabs .on { background: var(--mist); }
.app-toast {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 7.5%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: .55em;
  padding: .7em .85em;
  border-radius: 1em;
  background: var(--mist);
  color: var(--ink);
  font-size: .8em;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  opacity: 0;
  transform: translateY(-150%);
  animation: toast 8s var(--ease-out) 3.6s infinite;
}
.app-toast i { width: 1.4em; height: 1.4em; border-radius: .45em; background: var(--cobalt); flex: none; }
@keyframes toast {
  0%, 6% { opacity: 0; transform: translateY(-150%); }
  12%, 42% { opacity: 1; transform: translateY(0); }
  50%, 100% { opacity: 0; transform: translateY(-150%); }
}

.chip { position: absolute; left: var(--x); top: var(--y); z-index: 4; }
.chip-in {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(19, 22, 40, .78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -18px rgba(0, 0, 0, .7);
  font-family: var(--f-mono);
  font-size: 12px;
  white-space: nowrap;
  color: var(--mist);
}
.chip-in i { width: 9px; height: 9px; border-radius: 3px; background: var(--c, var(--cobalt)); flex: none; }

.hero-pitch {
  position: absolute;
  left: var(--gut-l);
  bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  width: min(34vw, 470px);
  display: grid;
  gap: 22px;
}
.hero-pitch h2 { font-size: clamp(24px, 2.35vw, 38px); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }

.seal {
  position: absolute;
  right: var(--gut-r);
  bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
}
.seal-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 22s linear infinite; }
.seal-ring text { fill: var(--mist-dim); font-family: var(--f-mono); font-size: 8.6px; letter-spacing: .12em; }
.seal-ar {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--cobalt);
  color: var(--mist);
  font-family: var(--f-ar);
  font-weight: 700;
  font-size: 25px;
  line-height: 1;
  padding-bottom: 4px;
  align-content: center;
  gap: 4px;
}
.seal-ar small { font-size: 12.5px; font-weight: 500; opacity: .86; }
@keyframes spin { to { transform: rotate(360deg); } }

.portal {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-content: center;
  gap: 14px;
  text-align: center;
  background: var(--cobalt);
  background-image: radial-gradient(rgba(232, 235, 244, .14) 1px, transparent 1.3px);
  background-size: 24px 24px;
  visibility: hidden;
}
.portal-text { display: grid; gap: 10px; }
.portal-text span { font-family: var(--f-mono); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--mist); opacity: .8; }
.portal-text b { font-family: var(--f-display); font-variation-settings: "wdth" 130, "wght" 250; font-size: clamp(64px, 12vw, 200px); line-height: .85; font-weight: 300; }

@media (min-width: 900px) and (min-height: 560px) {
  .motion .brand { opacity: 0; visibility: hidden; }
}

@media (max-width: 899px), (max-height: 559px) {
  .hero {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: calc(92px + env(safe-area-inset-top, 0px)) var(--gut-r) 56px var(--gut-l);
  }
  .hero-eyebrow, .hero-name, .phone, .hero-pitch, .seal {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
  }
  .hero-name { font-size: 14.4vw; }
  .phone { --pw: min(60vw, 270px); --ph: calc(var(--pw) * 2.04); align-self: center; margin-block: 10px 6px; }
  .hero-pitch { width: 100%; max-width: 560px; }
  .hero-pitch h2 { font-size: clamp(26px, 6.6vw, 36px); }
  .chip, .seal, .portal { display: none; }
  .hero-glow { left: 50%; top: 62%; width: 130vw; height: 130vw; }
}

/* ---------- manifesto ---------- */
.manifesto { background: var(--cobalt); color: var(--mist); padding-block: clamp(96px, 16vh, 180px) clamp(80px, 12vh, 140px); }
.manifesto .eyebrow { color: var(--mist); opacity: .78; }
.manifesto-text {
  margin-top: 36px;
  max-width: 1220px;
  font-family: var(--f-display);
  font-weight: 650;
  font-variation-settings: "wdth" 96, "wght" 650;
  font-size: clamp(30px, 4.5vw, 72px);
  line-height: 1.06;
  letter-spacing: -.015em;
}
.manifesto-text mark { background: var(--mist); color: var(--cobalt-deep); padding: 0 .12em; border-radius: .16em; }
.word { display: inline-block; transform-origin: 50% 100%; }
.word.hl { position: relative; isolation: isolate; transition: color .45s ease; }
.word.hl::before {
  content: "";
  position: absolute;
  inset: .04em -.15em -.04em;
  z-index: -1;
  border-radius: .16em;
  background: var(--mist);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .7s var(--ease-out);
}
.word.hl.lit { color: var(--cobalt-deep); }
.word.hl.lit::before { transform: scaleX(1); }
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(64px, 10vh, 120px);
  padding-top: 28px;
  border-top: 1px solid rgba(232, 235, 244, .3);
}
.fact { display: grid; gap: 8px; align-content: start; min-width: 0; }
.fact-num {
  font-family: var(--f-display);
  font-variation-settings: "wdth" 70, "wght" 700;
  font-size: clamp(44px, 5vw, 76px);
  line-height: .9;
  font-variant-numeric: tabular-nums;
}
.fact-num small { font-size: .38em; font-variation-settings: "wdth" 100, "wght" 500; margin-left: 4px; }
.fact p { font-size: 15px; color: rgba(232, 235, 244, .82); max-width: 24ch; }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; } }

/* ---------- marquee ---------- */
.marquee { background: var(--ink); padding-block: clamp(56px, 10vh, 110px); overflow: hidden; display: grid; gap: 6px; }
.marquee-row { overflow: hidden; white-space: nowrap; }
.marquee-inner { display: inline-flex; align-items: center; will-change: transform; }
.mq {
  display: inline-flex;
  align-items: center;
  padding-inline: .32em;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 112, "wght" 800;
  font-size: clamp(44px, 8vw, 128px);
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--mist);
}
.mq.out { color: transparent; -webkit-text-stroke: 1.5px var(--mist); font-variation-settings: "wdth" 112, "wght" 500; }
.mq-dot { display: inline-block; width: .22em; height: .22em; margin-inline: .2em; background: var(--cobalt); transform: rotate(45deg); flex: none; font-size: clamp(44px, 8vw, 128px); }

/* ---------- journey ---------- */
.journey { position: relative; background: var(--mist); color: var(--ink); overflow: clip; }
.journey .eyebrow { color: var(--ink-soft); }
.journey-inner { padding-block: clamp(96px, 14vh, 150px) clamp(72px, 10vh, 120px); }
.journey-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.journey-head h2 { margin-top: 14px; font-size: clamp(36px, 4.3vw, 66px); }
.journey-head h2 em { color: var(--cobalt); }
.journey-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 60, "wght" 300;
  font-size: clamp(44px, 5.4vw, 88px);
  line-height: .9;
  font-variant-numeric: tabular-nums;
  color: var(--cobalt);
}
.journey-count small { font-size: .4em; color: var(--ink-soft); }
.journey-count b { display: inline-block; font-weight: 300; }
.journey-stage { position: relative; margin-top: 48px; }
.steps { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 22px 24px 24px;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line-ink);
}
.step-tag { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; color: var(--cobalt); }
.step h3 { font-family: var(--f-display); font-variation-settings: "wdth" 96, "wght" 750; font-size: 28px; line-height: 1; }
.step p { font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.journey-svg, .journey-playhead, .journey-line { display: none; }

@media (min-width: 900px) and (min-height: 560px) {
  .motion .journey-inner {
    height: 100svh;
    min-height: 660px;
    display: flex;
    flex-direction: column;
    padding-block: calc(100px + env(safe-area-inset-top, 0px)) 28px;
  }
  .motion .journey-head h2 { font-size: clamp(34px, min(4.2vw, 7.4svh), 64px); }
  .motion .journey-stage { flex: 1; min-height: 430px; margin-top: 8px; }
  .motion .steps { position: absolute; left: 0; top: 0; display: block; width: 10px; height: 100%; will-change: transform; }
  .motion .step {
    position: absolute;
    width: clamp(250px, 22vw, 320px);
    opacity: .36;
    transform: scale(.93);
    transition: opacity .45s ease, transform .6s var(--ease-out), box-shadow .45s ease;
  }
  .motion .step.is-near { opacity: .72; transform: scale(.97); }
  .motion .step.is-active { opacity: 1; transform: scale(1); box-shadow: inset 0 0 0 1px rgba(51, 65, 255, .35), 0 30px 60px -26px rgba(11, 13, 23, .35); }
  .motion .journey-svg { display: block; position: absolute; left: 0; top: 0; max-width: none; overflow: visible; pointer-events: none; }
  .motion .journey-playhead {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: repeating-linear-gradient(to bottom, rgba(51, 65, 255, .45) 0 4px, transparent 4px 10px);
    pointer-events: none;
  }
}
.j-base { fill: none; stroke: rgba(11, 13, 23, .18); stroke-width: 2; stroke-dasharray: 3 7; stroke-linecap: round; }
.j-prog { fill: none; stroke: var(--cobalt); stroke-width: 3; stroke-linecap: round; }
.j-node { fill: var(--paper); stroke: rgba(11, 13, 23, .3); stroke-width: 1.5; transition: fill .3s ease, stroke .3s ease; }
.j-node.on { fill: var(--cobalt); stroke: var(--cobalt); }
.j-dot { fill: var(--cobalt); stroke: var(--paper); stroke-width: 3; }
.j-halo { fill: var(--cobalt); opacity: .16; transform-box: fill-box; transform-origin: center; animation: halo 1.8s ease-in-out infinite; }
@keyframes halo { 50% { transform: scale(1.45); opacity: .08; } }

@media (max-width: 899px), (max-height: 559px) {
  .motion .steps { grid-template-columns: 1fr; padding-left: 30px; gap: 14px; }
  .motion .journey-line { display: block; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: rgba(11, 13, 23, .12); border-radius: 2px; }
  .motion .journey-line i { position: absolute; inset: 0; background: var(--cobalt); border-radius: 2px; transform: scaleY(0); transform-origin: 50% 0; }
  .motion .step::before { content: ""; position: absolute; left: -26px; top: 28px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px rgba(11, 13, 23, .3); transition: background .3s ease, box-shadow .3s ease; }
  .motion .step.is-active::before { background: var(--cobalt); box-shadow: inset 0 0 0 2px var(--cobalt); }
}

/* ---------- work ---------- */
.work { background: var(--ink); padding-block: clamp(96px, 14vh, 160px) clamp(72px, 10vh, 120px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; margin-bottom: clamp(40px, 7vh, 80px); }
.section-head h2 { margin-top: 14px; font-size: clamp(40px, 6vw, 96px); }
.section-head > p { max-width: 38ch; color: var(--mist-dim); }
.work-list { display: flex; flex-direction: column; gap: 5svh; }
.project {
  --hue: var(--cobalt);
  position: relative;
  z-index: calc(1 + var(--i, 0));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 500px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(90% 80% at 88% 20%, color-mix(in srgb, var(--hue) 42%, transparent), transparent 62%),
    var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line), 0 -30px 60px -40px rgba(0, 0, 0, .8);
  transform-origin: 50% 0;
  isolation: isolate;
}
.project::after { content: ""; position: absolute; inset: 0; z-index: 5; background: var(--ink); opacity: var(--dim, 0); pointer-events: none; border-radius: inherit; }
.project-info { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: clamp(26px, 4vw, 56px); min-width: 0; }
.project-cat { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--mist-dim); }
.project-name {
  margin-top: 16px;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 78, "wght" 800;
  font-size: clamp(46px, 6.2vw, 108px);
  line-height: .86;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.project-desc { max-width: 44ch; color: var(--mist-dim); font-size: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 7px 11px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-family: var(--f-mono); font-size: 11px; color: var(--mist); }
.tag-link { text-decoration: none; color: var(--amber); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 45%, transparent); }
.tag-link:hover { background: var(--amber); color: var(--ink); }
.project-visual { position: relative; min-width: 0; overflow: hidden; }
.mini {
  position: absolute;
  width: min(44%, 230px);
  aspect-ratio: 9 / 19;
  max-width: 100%;
  border-radius: 26px;
  padding: 7px;
  background: #0D0F1C;
  box-shadow: inset 0 0 0 1px rgba(232, 235, 244, .16), 0 40px 70px -30px rgba(0, 0, 0, .8);
}
.mini:nth-child(1) { left: 12%; top: 12%; transform: rotate(-7deg); }
.mini:nth-child(2) { left: 46%; top: 22%; transform: rotate(6deg); }
.mini-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  padding: 18% 10% 10%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--hue) 70%, #fff 0%), color-mix(in srgb, var(--hue) 55%, #000));
}
.mini-screen.alt { background: var(--paper); }
.sk { display: block; border-radius: 8px; background: rgba(255, 255, 255, .22); min-height: 10px; }
.alt .sk { background: rgba(11, 13, 23, .1); }
.sk.h { height: 22px; width: 70%; background: rgba(255, 255, 255, .9); }
.alt .sk.h { background: var(--hue); }
.sk.card { height: 58px; }
.sk.row { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 8px; font: 600 10px/1 var(--f-mono); color: rgba(11, 13, 23, .7); }
.sk.btn { height: 30px; width: 60%; border-radius: 99px; background: var(--ink); }
.sk.pill { height: 18px; width: 40%; border-radius: 99px; }
.sk-ar { font-family: var(--f-ar); font-weight: 700; color: var(--ink); font-size: 19px; line-height: 1.2; text-align: right; }
.sk-lines { display: grid; gap: 7px; direction: rtl; }
.sk-lines span { height: 6px; border-radius: 4px; background: rgba(11, 13, 23, .16); }
@media (min-width: 900px) and (min-height: 560px) {
  .project { height: min(72svh, 620px); }
}
@media (max-width: 899px), (max-height: 559px) {
  .project { grid-template-columns: 1fr; min-height: 0; }
  .project-visual { height: 340px; }
}

/* ---------- skills (flip cards) ---------- */
.skills { background: var(--ink); padding-block: clamp(80px, 12vh, 140px); border-top: 1px solid var(--line); }
.flip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .flip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .flip-grid { grid-template-columns: 1fr; } }
.flip { position: relative; height: 380px; perspective: 1200px; border-radius: 22px; cursor: pointer; outline-offset: 4px; }
.flip-inner { position: relative; height: 100%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.flip.is-flipped .flip-inner { transform: rotateY(180deg); }
@media (hover: hover) and (pointer: fine) { .flip:hover .flip-inner { transform: rotateY(180deg); } }
.face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 26px;
  border-radius: 22px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.face.front { background: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
.face.back { background: var(--cobalt); transform: rotateY(180deg); }
.face svg { width: 64px; height: 64px; stroke: var(--periwinkle); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.face h3 { font-family: var(--f-display); font-variation-settings: "wdth" 92, "wght" 780; font-size: 30px; line-height: 1; }
.face p { margin-top: 10px; color: var(--mist-dim); font-size: 15px; }
.face .hint { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mist-dim); }
.face ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.face li { display: flex; gap: 10px; font-size: 15px; line-height: 1.4; }
.face li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .5em; background: var(--amber); transform: rotate(45deg); }
.face.back h3 { font-size: 24px; }

/* ---------- contact & footer ---------- */
.contact { background: var(--cobalt); color: var(--mist); padding-block: clamp(96px, 16vh, 180px) clamp(72px, 10vh, 120px); overflow: clip; }
.contact .eyebrow { color: var(--mist); opacity: .8; }
.contact-title {
  margin-top: 22px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(52px, 10.4vw, 188px);
  line-height: .86;
  letter-spacing: -.025em;
}
.contact-title .wd { display: inline-block; white-space: nowrap; }
.contact-title .ch { display: inline-block; font-variation-settings: "wdth" 80, "wght" 800; }
.contact-copy { margin-top: 36px; max-width: 52ch; font-size: 18px; color: rgba(232, 235, 244, .86); }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.contact-links .btn-ghost { box-shadow: inset 0 0 0 1px rgba(232, 235, 244, .42); }
.contact-links .btn-ghost:hover { background: var(--mist); color: var(--ink); }
.email {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  background: rgba(11, 13, 23, .22);
  font-family: var(--f-mono);
  font-size: clamp(13px, 1.5vw, 17px);
  -webkit-user-select: all;
  user-select: all;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.footer { background: var(--ink); padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; font-size: 14px; color: var(--mist-dim); }
.footer a { text-decoration: none; color: var(--mist); }
.footer a:hover { color: var(--amber); }

/* ---------- no-motion fallback ---------- */
.no-motion .topbar, .no-motion .brand, .no-motion .hero > *:not(.portal), .no-motion .hero-name .ch, .no-motion .hero-pitch .wi {
  opacity: 1 !important;
  visibility: visible !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .app-toast { display: none; }
}
