@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #08090c;
  --bg-2: #0e1015;
  --bg-3: #151820;
  --line: rgba(236, 237, 241, 0.08);
  --line-2: rgba(236, 237, 241, 0.14);
  --text: #ecedf1;
  --muted: #9095a1;
  --faint: #5d626e;

  /* thin film colours, like light on a bare wafer */
  --film-v: #8b6cff;
  --film-t: #35e0c8;
  --film-g: #ffc76a;
  --film-p: #ff7ab6;
  --film: linear-gradient(110deg, var(--film-v), var(--film-t) 38%, var(--film-g) 70%, var(--film-p));

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --gutter: clamp(20px, 4vw, 56px);
  --max: 1360px;
  --nav-h: 68px;
  --radius-l: 28px;
  --radius-m: 18px;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { -webkit-tap-highlight-color: transparent; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: inherit; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(139, 108, 255, 0.45); color: #fff; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px;
  font-weight: 600; transition: top 200ms var(--ease-out);
}
.skip:focus { top: 16px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- type ---------- */

.h2 {
  font-size: clamp(2.35rem, 5.4vw, 5rem);
  line-height: 0.96;
  font-weight: 760;
  font-stretch: 112%;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.kicker, .hero-kicker {
  font-size: 15px;
  color: var(--muted);
  letter-spacing: -0.005em;
}
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: end;
  gap: 32px 48px;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section-sub {
  color: var(--muted);
  max-width: 34ch;
  justify-self: end;
  font-size: 17px;
}

/* split text: each word sits in a mask and rises into place */
.w { display: inline-block; overflow: clip; overflow-clip-margin: 0.08em; vertical-align: top; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.w > span {
  display: inline-block;
  transform: translate3d(0, 105%, 0);
  transition: transform 1100ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 45ms);
}
.is-in .w > span, .is-in.w > span { transform: none; }

.reveal-soft {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.is-ready .reveal-soft { opacity: 1; transform: none; }

.no-js .w > span, .no-js .reveal-soft { transform: none; opacity: 1; }

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

.btn {
  --pad-x: 22px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 var(--pad-x);
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, box-shadow 300ms ease;
  will-change: transform;
}
.btn > span { position: relative; z-index: 1; display: inline-block; transition: transform 300ms var(--ease-out); }
.btn::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background: var(--film);
  opacity: 0;
  transition: opacity 300ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-small { height: 40px; --pad-x: 16px; font-size: 14.5px; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn-ghost::before { background: rgba(236, 237, 241, 0.06); }

@media (hover: hover) and (pointer: fine) {
  .btn:hover::before { opacity: 1; }
  .btn:hover { color: #07080b; }
  .btn-ghost:hover { color: var(--text); box-shadow: inset 0 0 0 1px rgba(236, 237, 241, 0.3); }
}

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

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  transition: background-color 400ms ease, box-shadow 400ms ease, transform 500ms var(--ease-drawer);
}
.nav.is-solid {
  background: rgba(8, 9, 12, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 1px 0 var(--line);
}
.nav.is-hidden { transform: translate3d(0, -100%, 0); }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-stretch: 110%; font-size: 18px; letter-spacing: -0.02em;
  justify-self: start;
}
.brand-mark { width: 24px; height: 24px; }
.brand-lit { fill: var(--film-t); animation: lit 6s linear infinite; }
@keyframes lit {
  0%, 100% { fill: var(--film-t); }
  33% { fill: var(--film-v); }
  66% { fill: var(--film-g); }
}

.nav-links {
  display: flex; gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(236, 237, 241, 0.04);
  box-shadow: inset 0 0 0 1px var(--line);
}
.nav-links a {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--muted);
  transition: color 200ms ease, background-color 200ms ease;
}
.nav-links a.is-active { color: var(--text); background: rgba(236, 237, 241, 0.08); }
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--text); }
}

.nav-end { justify-self: end; display: flex; align-items: center; gap: 18px; }
.nav-clock { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--film-t);
  box-shadow: 0 0 0 0 rgba(53, 224, 200, 0.5);
  animation: ping 2.4s var(--ease-out) infinite;
  flex: none;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(53, 224, 200, 0.55); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(53, 224, 200, 0); }
}

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

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: clamp(56px, 8vh, 96px);
  overflow: hidden;
  isolation: isolate;
  touch-action: pan-y;
}
.die {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0;
  transition: opacity 1400ms ease;
}
.is-ready .die, .no-js .die { opacity: 1; }
.hero-scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 9, 12, 0.92) 0%, rgba(8, 9, 12, 0.55) 38%, rgba(8, 9, 12, 0) 64%),
    linear-gradient(0deg, rgba(8, 9, 12, 0.95) 0%, rgba(8, 9, 12, 0) 42%);
}
.hero-inner { position: relative; pointer-events: none; }
.hero-inner a, .hero-inner button { pointer-events: auto; }
.hero-kicker { margin-bottom: 22px; --d: 150ms; }
.hero-title {
  font-size: clamp(3.1rem, min(8.2vw, 13.2svh), 8.8rem);
  line-height: 0.9;
  font-weight: 800;
  font-stretch: 116%;
  letter-spacing: -0.045em;
  max-width: 12ch;
  margin-left: -0.04em;
}
.hero-foot {
  margin-top: clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.hero-lede { max-width: 46ch; color: #c3c6cf; font-size: clamp(16px, 1.3vw, 18.5px); --d: 520ms; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; --d: 640ms; }
.hero-note {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(56px, 8vh, 96px);
  max-width: 30ch;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--faint);
  text-align: right;
  --d: 1400ms;
}
.hint-touch { display: none; }
@media (hover: none), (pointer: coarse) {
  .hint-fine { display: none; }
  .hint-touch { display: inline; }
}

@media (min-width: 821px) and (max-height: 880px) {
  .hero { padding-top: calc(var(--nav-h) + 24px); padding-bottom: 40px; }
  .hero-kicker { margin-bottom: 14px; }
  .hero-foot { margin-top: 22px; gap: 20px; }
  .hero-note { bottom: 40px; }
}

/* ---------- about ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px clamp(40px, 7vw, 120px);
  padding-block: clamp(96px, 14vw, 200px) clamp(80px, 10vw, 150px);
}
.about-copy { margin-top: 28px; color: var(--muted); max-width: 44ch; font-size: 18px; }
.spec { border-top: 1px solid var(--line); align-self: end; }
.spec-row {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  transition: background-color 250ms ease;
}
.spec-row dt { color: var(--faint); font-size: 15px; padding-top: 2px; }
.spec-row dd { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }

/* ---------- services ---------- */

.services { padding-block: clamp(60px, 8vw, 110px); }
.svc-list { border-top: 1px solid var(--line); }
.svc { border-bottom: 1px solid var(--line); }
.svc-h { font-size: inherit; }
.svc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 3vw, 38px) 0;
  text-align: left;
}
.svc-name {
  font-size: clamp(2rem, 5.6vw, 5.4rem);
  line-height: 1;
  font-weight: 700;
  font-stretch: 100%;
  letter-spacing: -0.04em;
  transition: font-stretch 700ms var(--ease-out), font-weight 700ms var(--ease-out), color 300ms ease;
  color: var(--muted);
}
.svc-btn[aria-expanded="true"] .svc-name { color: var(--text); font-stretch: 122%; font-weight: 800; }
.svc-icon {
  position: relative;
  width: clamp(44px, 4.4vw, 60px);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-2);
  flex: none;
  transition: transform 500ms var(--ease-out), background-color 300ms ease, box-shadow 300ms ease;
}
.svc-icon::before, .svc-icon::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 34%; height: 1.6px; border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 500ms var(--ease-out);
}
.svc-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.svc-btn[aria-expanded="true"] .svc-icon { transform: rotate(180deg); background: var(--text); color: var(--bg); box-shadow: none; }
.svc-btn[aria-expanded="true"] .svc-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.svc-btn:active .svc-icon { scale: 0.94; }

@media (hover: hover) and (pointer: fine) {
  .svc-btn:hover .svc-name { color: var(--text); font-stretch: 122%; }
  .svc-btn:hover .svc-icon { box-shadow: inset 0 0 0 1px rgba(236, 237, 241, 0.35); }
}

.svc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 600ms var(--ease-drawer);
}
.svc-panel > .svc-body { overflow: hidden; min-height: 0; }
.svc.is-open .svc-panel { grid-template-rows: 1fr; }
.svc-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px 56px;
  opacity: 0;
  transform: translate3d(0, -8px, 0);
  filter: blur(4px);
  transition: opacity 350ms ease, transform 500ms var(--ease-out), filter 350ms ease;
}
.svc.is-open .svc-body { opacity: 1; transform: none; filter: none; transition-delay: 120ms; }
.svc-body > p { color: #c3c6cf; max-width: 52ch; font-size: 18px; padding-bottom: clamp(26px, 3vw, 40px); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; padding-bottom: 32px; }
.tags li {
  font-size: 14px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

/* ---------- now ---------- */

.now {
  padding-block: clamp(90px, 12vw, 180px);
  position: relative;
}
.now::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 80% 50%, rgba(139, 108, 255, 0.10), transparent 70%),
    radial-gradient(40% 40% at 70% 70%, rgba(53, 224, 200, 0.07), transparent 70%);
}
.now-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px clamp(40px, 7vw, 110px);
  align-items: center;
}
.now-copy .h2 { margin: 18px 0 28px; }
.now-copy p:not(.kicker) { color: var(--muted); max-width: 46ch; font-size: 18px; }
.now-copy p + p { margin-top: 18px; }

.lab {
  border-radius: var(--radius-l);
  background: linear-gradient(180deg, rgba(236, 237, 241, 0.045), rgba(236, 237, 241, 0.015));
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -40px rgba(0, 0, 0, 0.7);
  padding: clamp(20px, 3vw, 36px);
  display: grid;
  gap: 32px;
}
.seg {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px var(--line);
}
.seg button {
  position: relative; z-index: 1;
  height: 44px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  transition: color 250ms ease, transform 160ms var(--ease-out);
}
.seg button[aria-checked="true"] { color: var(--bg); }
.seg button:active { transform: scale(0.96); }
.seg-thumb {
  position: absolute; z-index: 0;
  top: 5px; bottom: 5px; left: 5px;
  width: calc((100% - 10px) / 4);
  border-radius: 999px;
  background: var(--text);
  transform: translate3d(calc(var(--idx, 0) * 100%), 0, 0);
  transition: transform 550ms var(--ease-drawer), background 300ms ease;
}
.lab-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; margin-bottom: 14px;
  color: var(--muted); font-size: 15px;
}
.num {
  color: var(--text);
  font-weight: 700;
  font-stretch: 112%;
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.bits {
  display: grid;
  grid-template-columns: repeat(32, 1fr);
  gap: 3px;
  height: 34px;
}
.bits i {
  border-radius: 3px;
  background: var(--c, var(--film-v));
  transform-origin: 50% 100%;
  transition: transform 500ms var(--ease-out), opacity 400ms ease;
  transition-delay: var(--dl, 0ms);
}
.bits i.off { transform: scaleY(0.12); opacity: 0.18; background: var(--faint); }
.bits i[data-f="s"] { --c: var(--film-p); }
.bits i[data-f="e"] { --c: var(--film-g); }
.bits i[data-f="m"] { --c: var(--film-v); }
.bits i[data-f="i"] { --c: var(--film-t); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 13.5px; color: var(--muted); min-height: 1.4em; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend span::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.legend [data-k="s"] { --c: var(--film-p); }
.legend [data-k="e"] { --c: var(--film-g); }
.legend [data-k="m"] { --c: var(--film-v); }
.legend [data-k="i"] { --c: var(--film-t); }

.bar {
  height: 14px;
  border-radius: 999px;
  background: rgba(236, 237, 241, 0.06);
  overflow: hidden;
}
.bar-fill {
  display: block; height: 100%; width: 100%;
  border-radius: inherit;
  background: var(--film);
  background-size: 100vw 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--s, 1));
  transition: transform 800ms var(--ease-drawer);
}
.lab-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: var(--faint); }
.lab-note {
  min-height: 3.1em;
  color: #c3c6cf;
  font-size: 16.5px;
  transition: opacity 220ms ease, filter 220ms ease;
}
.lab-note.is-swapping { opacity: 0; filter: blur(4px); }

/* ---------- projects ---------- */

.projects { padding-block: clamp(80px, 10vw, 150px) clamp(40px, 6vw, 80px); }
.stack { display: grid; gap: clamp(24px, 4vw, 40px); }
.card {
  --top: calc(var(--nav-h) + 20px);
  position: sticky;
  top: var(--top);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px clamp(32px, 5vw, 80px);
  min-height: min(620px, calc(100svh - var(--nav-h) - 60px));
  padding: clamp(24px, 4vw, 56px);
  border-radius: var(--radius-l);
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line), 0 -30px 60px -30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  transform-origin: 50% 0%;
  will-change: transform;
}
.card:nth-child(2) { --top: calc(var(--nav-h) + 36px); }
.card:nth-child(3) { --top: calc(var(--nav-h) + 52px); }
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: #000; opacity: var(--dim, 0); border-radius: inherit;
}
.card-copy { display: flex; flex-direction: column; gap: 18px; align-self: center; position: relative; z-index: 1; }
.card-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.card-name {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: -0.045em;
  line-height: 1;
}
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--muted);
  padding: 6px 12px 6px 10px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.card-tagline { font-size: clamp(19px, 1.7vw, 23px); font-weight: 600; letter-spacing: -0.015em; }
.card-copy > p:not(.card-tagline) { color: var(--muted); max-width: 46ch; }
.link {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  margin-top: 6px;
  font-weight: 600;
  padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 400ms var(--ease-out);
}
.link svg { width: 16px; height: 16px; transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .link:hover svg { transform: translate(2px, -2px); }
  .link:hover { background-size: 0% 1px; background-position: 100% 100%; }
}

.card-art {
  position: relative;
  border-radius: var(--radius-m);
  background: var(--bg-3);
  box-shadow: inset 0 0 0 1px var(--line);
  min-height: 300px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.card-art::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(236, 237, 241, 0.09) 1px, transparent 1.2px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(80% 80% at 50% 50%, #000, transparent);
  mask-image: radial-gradient(80% 80% at 50% 50%, #000, transparent);
}

/* animations in project art only run while visible */
.card-art * { animation-play-state: paused; }
.card.is-visible .card-art * { animation-play-state: running; }

/* 27labs graph */
.graph { width: 88%; height: auto; position: relative; }
.graph .edges path {
  fill: none;
  stroke: rgba(236, 237, 241, 0.2);
  stroke-width: 1.2;
  stroke-dasharray: 4 6;
  animation: flow 1.8s linear infinite;
}
@keyframes flow { to { stroke-dashoffset: -20; } }
.graph .n { fill: var(--bg-3); stroke: var(--film-t); stroke-width: 1.6; transform-box: fill-box; transform-origin: center; animation: bob 5s ease-in-out infinite; }
.graph .n2, .graph .n5 { stroke: var(--film-v); animation-delay: -1.2s; }
.graph .n3 { stroke: var(--film-g); fill: #2a2619; animation-delay: -2.4s; }
.graph .n4, .graph .n6 { animation-delay: -3.3s; }
.graph .hub { fill: var(--text); transform-box: fill-box; transform-origin: center; animation: hub 3s var(--ease-out) infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes hub { 0% { transform: scale(1); } 15% { transform: scale(1.08); } 40%, 100% { transform: scale(1); } }
.chip-card {
  position: absolute; right: 7%; bottom: 8%;
  display: grid; gap: 4px;
  width: min(210px, 56%);
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(8, 9, 12, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 40px -20px #000;
}
.chip-title { font-weight: 700; font-size: 14.5px; }
.chip-meta { font-size: 12.5px; color: var(--muted); }
.chip-bars { display: grid; gap: 5px; margin-top: 8px; }
.chip-bars i { height: 5px; border-radius: 4px; background: rgba(236, 237, 241, 0.08); position: relative; overflow: hidden; }
.chip-bars i::after {
  content: ""; position: absolute; inset: 0; width: var(--w); border-radius: inherit;
  background: var(--film); transform-origin: 0 50%;
  animation: grow 3.6s var(--ease-out) infinite;
}
.chip-bars i:nth-child(2)::after { animation-delay: 0.15s; }
.chip-bars i:nth-child(3)::after { animation-delay: 0.3s; }
@keyframes grow { 0% { transform: scaleX(0); } 35%, 85% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }

/* bidmybiz board */
.board {
  position: relative;
  width: min(380px, 86%);
  display: grid;
  gap: 8px;
}
.board li {
  display: grid;
  grid-template-columns: 26px 30px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(236, 237, 241, 0.035);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 15px;
  will-change: transform;
}
.board li.is-top { background: rgba(255, 199, 106, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 199, 106, 0.35); }
.board li.is-bump { animation: bump 900ms var(--ease-out); }
@keyframes bump { 0% { box-shadow: inset 0 0 0 1px rgba(53, 224, 200, 0.9), 0 0 0 0 rgba(53, 224, 200, 0.35); } 100% { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 10px rgba(53, 224, 200, 0); } }
.board .rk { color: var(--faint); font-variant-numeric: tabular-nums; font-weight: 600; }
.board .av { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, hsl(var(--h) 80% 68%), hsl(calc(var(--h) + 50) 80% 55%)); }
.board .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .amt { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.board li.is-top .amt { color: var(--film-g); }

/* ocuvero */
.art-cam { grid-auto-flow: column; gap: clamp(10px, 2vw, 22px); padding: 24px; }
.phone {
  position: relative;
  width: clamp(70px, 8vw, 96px);
  aspect-ratio: 9 / 19;
  border-radius: 18px;
  background: #050608;
  box-shadow: inset 0 0 0 1.5px rgba(236, 237, 241, 0.22), 0 20px 40px -20px #000;
}
.lens {
  position: absolute; left: 14%; top: 5%;
  width: 36%; aspect-ratio: 1; border-radius: 30%;
  background: #15171d; box-shadow: inset 0 0 0 1px rgba(236, 237, 241, 0.15);
}
.lens::after { content: ""; position: absolute; inset: 28%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #4a4f6b, #0b0c10 70%); }
.rec {
  position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%);
  font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 999px;
  background: rgba(255, 122, 182, 0.18); color: var(--film-p);
  animation: blink 2s steps(2, jump-none) infinite;
}
@keyframes blink { 50% { opacity: 0.5; } }
.wire { --wire: clamp(50px, 8vw, 110px); position: relative; width: var(--wire); height: 2px; background: repeating-linear-gradient(90deg, rgba(236, 237, 241, 0.25) 0 4px, transparent 4px 9px); }
.wire i {
  position: absolute; top: 50%; left: 0; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: var(--film-t); box-shadow: 0 0 12px var(--film-t);
  animation: packet 1.8s linear infinite;
}
.wire i:nth-child(2) { animation-delay: -0.6s; background: var(--film-v); box-shadow: 0 0 12px var(--film-v); }
.wire i:nth-child(3) { animation-delay: -1.2s; background: var(--film-g); box-shadow: 0 0 12px var(--film-g); }
@keyframes packet { from { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { transform: translateX(calc(var(--wire) - 8px)); opacity: 0; } }
.screen {
  position: relative;
  width: clamp(150px, 20vw, 260px);
  aspect-ratio: 16 / 10.5;
  border-radius: 12px;
  background: #050608;
  box-shadow: inset 0 0 0 1.5px rgba(236, 237, 241, 0.22), 0 24px 50px -24px #000;
  padding: 7px;
}
.feed {
  display: block; width: 100%; height: 100%; border-radius: 7px;
  background:
    radial-gradient(28% 38% at 50% 58%, rgba(236, 237, 241, 0.22), transparent 70%),
    radial-gradient(16% 22% at 50% 36%, rgba(236, 237, 241, 0.3), transparent 70%),
    linear-gradient(135deg, #2a1f4f, #0d3b3a 55%, #3b2a12);
  background-size: 100% 100%, 100% 100%, 200% 200%;
  animation: feed 8s ease-in-out infinite alternate;
}
@keyframes feed { to { background-position: 0 0, 0 0, 100% 100%; } }
.bezel { position: absolute; left: 50%; bottom: -12px; width: 34%; height: 6px; transform: translateX(-50%); border-radius: 0 0 6px 6px; background: rgba(236, 237, 241, 0.14); }

/* ---------- contact ---------- */

.contact {
  position: relative;
  padding-top: clamp(100px, 14vw, 200px);
  overflow: hidden;
}
.h-contact {
  font-size: clamp(2.9rem, 8vw, 8.4rem);
  line-height: 0.92;
  font-weight: 800;
  font-stretch: 116%;
  letter-spacing: -0.045em;
  max-width: 15ch;
  text-wrap: balance;
}
.contact-sub { margin-top: 26px; color: var(--muted); font-size: 19px; max-width: 42ch; }
.mail {
  margin-top: clamp(40px, 6vw, 72px);
  display: flex; align-items: center; gap: 18px 28px; flex-wrap: wrap;
}
.mail-addr {
  position: relative;
  font-size: clamp(1.6rem, 4.4vw, 3.9rem);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.035em;
  line-height: 1.1;
  background: linear-gradient(var(--text), var(--text)) 0 100% / 100% 2px no-repeat;
  padding-bottom: 6px;
  overflow-wrap: anywhere;
}
.mail-addr::before {
  content: attr(data-text);
  position: absolute; inset: 0;
  background: var(--film);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 700ms var(--ease-in-out);
}
@media (hover: hover) and (pointer: fine) {
  .mail-addr:hover::before { clip-path: inset(0 0 0 0); }
}
.btn-copy { min-width: 150px; background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-copy::before { background: var(--film); }
.copy-label { transition: filter 200ms ease, opacity 200ms ease, transform 300ms var(--ease-out); }
.btn-copy.is-swapping .copy-label { filter: blur(3px); opacity: 0; transform: translateY(4px); }
.btn-copy.is-done { color: #07080b; }
.btn-copy.is-done::before { opacity: 1; }
.contact-time { margin-top: 28px; color: var(--faint); font-size: 15px; min-height: 1.5em; font-variant-numeric: tabular-nums; }

.socials { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 40px; }
.socials a {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 18px 0 15px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-2);
  font-weight: 600; font-size: 15.5px;
  transition: background-color 250ms ease, transform 160ms var(--ease-out);
}
.socials svg { width: 18px; height: 18px; }
.socials a:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .socials a:hover { background: rgba(236, 237, 241, 0.07); }
}

.foot { margin-top: clamp(90px, 12vw, 170px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.foot-row {
  display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  padding-block: 22px;
  border-top: 1px solid var(--line);
  font-size: 14.5px; color: var(--faint);
}
.to-top { color: var(--muted); transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .to-top:hover { color: var(--text); } }
.foot-word {
  font-size: 11.2vw;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.06em;
  line-height: 0.78;
  width: max-content;
  margin: 0 auto;
  padding-top: 0.05em;
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(180deg, rgba(236, 237, 241, 0.14), rgba(236, 237, 241, 0.02) 85%);
  -webkit-background-clip: text; background-clip: text;
  user-select: none;
  transform: translateY(0.12em);
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav { grid-template-columns: 1fr auto; }
  .now-grid { grid-template-columns: 1fr; }
  .card { grid-template-columns: 1fr; min-height: 0; }
  .card-art { min-height: 280px; }
}

/* stacking only works when a whole card fits on screen */
@media (max-width: 820px), (max-height: 700px) {
  .card { position: relative; top: auto; }
}

@media (max-width: 820px) {
  .section-head { grid-template-columns: 1fr; }
  .section-sub { justify-self: start; }
  .about { grid-template-columns: 1fr; }
  .svc-body { grid-template-columns: 1fr; gap: 0; }
  .svc-body > p { padding-bottom: 20px; }
  .hero-note { display: none; }
  .hero-scrim {
    background:
      linear-gradient(0deg, rgba(8, 9, 12, 1) 0%, rgba(8, 9, 12, 0.85) 42%, rgba(8, 9, 12, 0.2) 72%, rgba(8, 9, 12, 0.35) 100%);
  }
}

@media (max-width: 560px) {
  :root { --nav-h: 62px; }
  body { font-size: 16.5px; }
  .nav-clock { display: none; }
  .hero-title { font-size: clamp(2.7rem, 13.4vw, 4.4rem); font-stretch: 108%; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; }
  .spec-row { grid-template-columns: 1fr; gap: 4px; padding: 16px 2px; }
  .spec-row dd { font-size: 17px; }
  .card { padding: 22px; border-radius: 24px; }
  .card:nth-child(2) { --top: calc(var(--nav-h) + 28px); }
  .card:nth-child(3) { --top: calc(var(--nav-h) + 36px); }
  .card-art { min-height: 250px; }
  .art-graph { min-height: 330px; place-items: start center; }
  .graph { width: 94%; margin-top: 6px; }
  .chip-card { right: 14px; bottom: 14px; width: 60%; padding: 11px 13px; }
  .chip-title { font-size: 13.5px; }
  .art-cam { gap: 10px; padding: 18px 14px; }
  .phone { width: 58px; border-radius: 14px; }
  .wire { --wire: 34px; }
  .screen { width: 140px; }
  .board li { grid-template-columns: 20px 26px 1fr auto; gap: 10px; padding: 9px 12px; font-size: 14px; }
  .board .av { width: 26px; height: 26px; }
  .seg button { font-size: 14px; height: 42px; }
  .bits { gap: 2px; height: 28px; }
  .mail { gap: 16px; }
  .btn-copy { width: 100%; }
  .socials { display: grid; grid-template-columns: 1fr 1fr; }
  .socials a { justify-content: center; }
  .foot-row { display: grid; grid-template-columns: 1fr auto; }
  .foot-row > :nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .w > span, .reveal-soft { transform: none !important; opacity: 1 !important; transition: none !important; }
  .card { transform: none !important; }
  .svc-body { transform: none; filter: none; }
}
