/* ==========================================================================
   Astel Games — design system
   Dark, technical, cinematic. Hairline grid + electric blue/violet accent.
   No frameworks. Sections are numbered; search by "── SECTION NAME ──".
   ========================================================================== */

/* ── TOKENS ─────────────────────────────────────────────────────────────── */
:root {
  /* surface */
  --bg: #06070b;
  --bg-2: #090b11;
  --panel: #0c0f16;
  --panel-2: #11151f;
  --panel-3: #161b27;

  /* line */
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.22);

  /* text */
  --ink: #eef1f7;
  --ink-2: #b9c0d0;
  --ink-3: #8b93a6;
  --ink-4: #5f6779;

  /* accent */
  --accent: #4d7cfe;
  --accent-2: #8b5cf6;
  --accent-3: #22d3ee;
  --accent-soft: rgba(77, 124, 254, 0.14);
  --grad: linear-gradient(120deg, #4d7cfe 0%, #7c5cff 48%, #22d3ee 100%);
  --grad-2: linear-gradient(120deg, #4d7cfe 0%, #8b5cf6 100%);

  /* type */
  --font-display: 'Space Grotesk', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
  --font-cjk: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;

  /* space */
  --gutter: clamp(20px, 4.5vw, 64px);
  --maxw: 1360px;
  --sec-y: clamp(64px, 7.5vw, 118px);
  --r-sm: 6px;
  --r: 12px;
  --r-lg: 20px;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --header-h: 68px;
}

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body[data-lang='zh'] {
  font-family: var(--font-cjk);
  line-height: 1.75;
}

body[data-lang='zh'] h1,
body[data-lang='zh'] h2,
body[data-lang='zh'] h3,
body[data-lang='zh'] .display { font-family: var(--font-cjk); }

img,
svg,
video,
canvas { display: block; max-width: 100%; }

button,
input,
select,
textarea { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }

::selection { background: rgba(77, 124, 254, 0.35); color: #fff; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #232937; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #313a4d; }

/* ── LAYOUT ─────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide { max-width: 1680px; }
.container--narrow { max-width: 900px; }

.section { padding-block: var(--sec-y); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 84px); }
.section--flush-top { padding-top: 0; }

.hr {
  height: 1px;
  background: var(--line);
  border: 0;
  width: 100%;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.stack-sm > * + * { margin-top: 12px; }
.stack > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: 36px; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────────────────── */
.display,
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.06;
  text-wrap: balance;
}

.display-xl {
  font-size: clamp(2.35rem, 5.9vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.display-l {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  letter-spacing: -0.03em;
}

.display-m {
  font-size: clamp(1.5rem, 2.7vw, 2.35rem);
  letter-spacing: -0.02em;
}

.h-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-family: var(--font-display);
}

.lead {
  font-size: clamp(1.02rem, 1.35vw, 1.22rem);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 62ch;
}

.body-copy { color: var(--ink-3); max-width: 68ch; }

.muted { color: var(--ink-3); }
.dim { color: var(--ink-4); }
.ink { color: var(--ink); }

.grad-text {
  background: linear-gradient(94deg, #ffffff 0%, #cdd8ff 28%, #6f8cff 66%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--accent);
  opacity: 0.9;
}

.eyebrow--plain::before { display: none; }

/* section head: label + title + optional link, on a hairline */
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(32px, 4vw, 56px);
}

.sec-head__title { display: flex; flex-direction: column; gap: 14px; }

.sec-num {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  color: var(--accent);
  opacity: 0.85;
}

/* ── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid var(--line-2);
  border-radius: 99px;
  background: var(--btn-bg);
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease);
  white-space: nowrap;
}

.btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn svg { width: 15px; height: 15px; transition: transform 0.4s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary {
  border-color: transparent;
  color: #fff;
  background: var(--grad-2);
  box-shadow: 0 8px 30px -12px rgba(77, 124, 254, 0.7);
}

.btn--primary:hover { box-shadow: 0 12px 40px -12px rgba(124, 92, 255, 0.8); border-color: transparent; }

.btn--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.28) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease-out);
}

.btn--primary:hover::after { transform: translateX(120%); }

.btn--ghost { background: rgba(255, 255, 255, 0.02); backdrop-filter: blur(6px); }

.btn--lg { padding: 17px 34px; font-size: var(--fs-base); }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.3s var(--ease), gap 0.3s var(--ease);
}

.link-arrow svg { width: 15px; height: 15px; }
.link-arrow:hover { color: var(--ink); gap: 12px; }

/* ── HEADER / NAV ───────────────────────────────────────────────────────── */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

.header.is-stuck {
  background: rgba(6, 7, 11, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
}

.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand__mark { width: 26px; height: 26px; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-md);
  letter-spacing: -0.01em;
}
.brand__name span { color: var(--ink-4); font-weight: 400; }

.nav { display: flex; align-items: center; gap: 4px; }

.nav__link {
  position: relative;
  padding: 9px 14px;
  font-size: var(--fs-base);
  color: var(--ink-2);
  border-radius: 8px;
  transition: color 0.3s var(--ease);
}

.nav__link:hover { color: var(--ink); }

.nav__link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}

.nav__link:hover::after,
.nav__link[aria-current='page']::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: 12px; }

/* language toggle */
.lang {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.02);
}

.lang__btn {
  border: 0;
  background: transparent;
  padding: 5px 11px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  cursor: pointer;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

.lang__btn[aria-pressed='true'] { background: var(--line-2); color: var(--ink); }

/* burger */
.burger {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  position: relative;
}

.burger span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}

.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 20.5px; }
.burger span:nth-child(3) { top: 26px; }

.burger[aria-expanded='true'] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* mobile drawer */
.drawer {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 99;
  background: rgba(6, 7, 11, 0.97);
  backdrop-filter: blur(20px);
  padding: 32px var(--gutter) 48px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
  overflow-y: auto;
}

.drawer.is-open { opacity: 1; visibility: visible; transform: none; }

.drawer__link {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 500;
}

.drawer__sub { padding: 10px 0 10px 14px; color: var(--ink-3); font-size: var(--fs-base); }

body.is-locked { overflow: hidden; }

/* ── HERO ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: min(100svh, 940px);
  display: flex;
  align-items: flex-end;
  padding-top: calc(var(--header-h) + 60px);
  padding-bottom: clamp(32px, 6vw, 72px);
  overflow: hidden;
  isolation: isolate;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0.85;
}

.hero__grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 0%, transparent 78%);
  opacity: 0.5;
}

.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 70% 60% at 50% 12%, rgba(77, 124, 254, 0.14), transparent 62%),
    radial-gradient(ellipse 60% 50% at 88% 82%, rgba(139, 92, 246, 0.12), transparent 62%),
    linear-gradient(180deg, rgba(6, 7, 11, 0.2) 0%, rgba(6, 7, 11, 0) 42%, rgba(6, 7, 11, 0.86) 100%);
}

.hero__inner {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  grid-template-areas:
    'eyebrow eyebrow'
    'title   aside'
    'cue     cue';
  align-items: end;
  row-gap: clamp(18px, 2.2vw, 30px);
  column-gap: clamp(28px, 4vw, 72px);
}

.hero__eyebrow { grid-area: eyebrow; }
.hero__title { grid-area: title; max-width: 24ch; }

.hero__title--wide { max-width: 26ch; }

/* scroll cue + timezone strip along the bottom of the hero */
.hero__cue {
  grid-area: cue;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: clamp(16px, 2vw, 24px);
  border-top: 1px solid var(--line);
}

.hero__aside {
  grid-area: aside;
  align-self: end;
  max-width: 46ch;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero__aside .lead { color: var(--ink-2); font-size: clamp(0.98rem, 1.15vw, 1.1rem); }

.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero__link { margin-top: 2px; }

/* HUD details: coordinates, status */
.hud {
  position: absolute;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.hud--tl { top: calc(var(--header-h) + 26px); left: var(--gutter); }
.hud--tr { top: calc(var(--header-h) + 26px); right: var(--gutter); }

.hud__dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #35e08a;
  box-shadow: 0 0 0 3px rgba(53, 224, 138, 0.15);
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

/* scroll cue */
.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.scroll-cue__line {
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-cue__line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: cue 2.4s var(--ease) infinite;
}

@keyframes cue {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

/* page hero (inner pages) */
.phero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(64px, 9vw, 120px));
  padding-bottom: clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.phero__glow {
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 120%;
  background: radial-gradient(ellipse 50% 55% at 22% 30%, rgba(77, 124, 254, 0.15), transparent 62%),
    radial-gradient(ellipse 45% 50% at 78% 12%, rgba(139, 92, 246, 0.12), transparent 60%);
  z-index: -1;
}

.phero__title { max-width: 24ch; }
.phero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

/* breadcrumbs */
.crumbs { display: flex; gap: 10px; align-items: center; margin-bottom: 22px; }
.crumbs a { color: var(--ink-3); font-size: var(--fs-sm); transition: color 0.3s var(--ease); }
.crumbs a:hover { color: var(--ink); }
.crumbs span { color: var(--ink-4); font-size: var(--fs-sm); }

/* ── MARQUEE (clients) ──────────────────────────────────────────────────── */
.marquee {
  position: relative;
  display: flex;
  overflow: hidden;
  padding: 26px 0;
  border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  animation: marquee 42s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes marquee {
  to { transform: translateX(-100%); }
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-inline: 28px;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  font-weight: 500;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color 0.3s var(--ease);
}

.marquee__item::after {
  content: '✳';
  font-size: 0.6em;
  color: var(--ink-4);
  opacity: 0.6;
}

.marquee__item:hover { color: var(--ink); }

/* ── STAT ───────────────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat {
  padding: 30px 26px 30px 0;
  border-top: 1px solid var(--line);
  position: relative;
}

.stat + .stat { padding-left: 26px; border-left: 1px solid var(--line); }

.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.stat__num sup { font-size: 0.45em; color: var(--accent); top: -0.9em; }

.stat__label {
  margin-top: 12px;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  max-width: 22ch;
}

/* ── CARD / PANEL ───────────────────────────────────────────────────────── */
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.006));
  overflow: hidden;
  transition: border-color 0.45s var(--ease), transform 0.45s var(--ease), background 0.45s var(--ease);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(77, 124, 254, 0.13), transparent 62%);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}

.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card:hover::before { opacity: 1; }

/* service card */
.svc {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 26px 26px;
  min-height: 270px;
}

.svc__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }

.svc__num {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  color: var(--ink-4);
}

.svc__icon { width: 34px; height: 34px; color: var(--accent); opacity: 0.9; }

.svc__title { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.02em; margin-top: auto; }

.svc__tag { color: var(--ink-3); font-size: var(--fs-base); }

.svc__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.chip {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 4px 9px;
}

.svc__more {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  margin-top: 6px;
}

.svc__more svg { width: 14px; height: 14px; }

.svc:hover .svc__more { color: var(--ink); }

/* ── WORK GRID ──────────────────────────────────────────────────────────── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
}

.filter {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 99px;
  padding: 8px 16px;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.filter:hover { color: var(--ink); border-color: var(--line-2); }
.filter[aria-pressed='true'] { background: var(--ink); color: #06070b; border-color: var(--ink); font-weight: 500; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 26px);
}

.work-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tile {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--panel);
  transition: border-color 0.45s var(--ease), transform 0.5s var(--ease);
}

.tile:hover { border-color: var(--line-2); transform: translateY(-4px); }

.tile--wide { grid-column: span 2; }

.tile__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #10141d 0%, #171d2b 50%, #0d1017 100%);
}

.tile--wide .tile__media { aspect-ratio: 21 / 9; }

.tile__media img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out), filter 0.6s var(--ease);
  filter: saturate(0.82) contrast(1.03);
}

.tile:hover .tile__media img { transform: scale(1.045); filter: saturate(1) contrast(1.05); }

/* placeholder art when no image is supplied yet */
.tile__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 60% 70% at 30% 20%, rgba(77, 124, 254, 0.22), transparent 60%),
    radial-gradient(ellipse 55% 65% at 78% 82%, rgba(139, 92, 246, 0.2), transparent 62%),
    linear-gradient(135deg, #0e1219, #141a26);
}

.tile__ph::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000, transparent 75%);
}

/* unifies mixed-brightness artwork (e.g. white-background concept sheets)
   with the dark UI, and adds depth to flat renders */
.tile__media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 7, 11, 0.05) 0%, rgba(6, 7, 11, 0.12) 55%, rgba(6, 7, 11, 0.32) 100%);
}

.tile__ph span {
  position: relative;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

/* subtle variation so a page of placeholders does not read as one flat block */
.tile:nth-child(3n + 2) .tile__ph { filter: hue-rotate(28deg) saturate(1.1); }
.tile:nth-child(3n + 3) .tile__ph { filter: hue-rotate(-22deg) saturate(0.92); }
.media-frame:nth-child(2n) .tile__ph { filter: hue-rotate(18deg); }

.tile__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 22px;
}

.tile__title { font-size: var(--fs-md); font-weight: 500; letter-spacing: -0.01em; }
.tile__meta { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.tile__meta span { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); }

.tile__arrow {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 99px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  transition: all 0.4s var(--ease);
}

.tile:hover .tile__arrow { background: var(--ink); color: #06070b; border-color: var(--ink); }
.tile__arrow svg { width: 14px; height: 14px; }

.tile__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(6, 7, 11, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-2);
  border-radius: 99px;
  padding: 5px 11px;
}

/* ── PROCESS / PIPELINE ─────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }

.step {
  position: relative;
  padding: 26px 22px 26px 0;
  border-top: 1px solid var(--line);
}

.step + .step { padding-left: 22px; }

.step::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(77, 124, 254, 0.9);
}

.step__num { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.12em; color: var(--ink-4); }
.step__title { margin-top: 12px; font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; }
.step__text { margin-top: 9px; font-size: var(--fs-sm); color: var(--ink-3); }

/* ── FEATURE LIST ───────────────────────────────────────────────────────── */
.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }

.feat { background: var(--bg); padding: 30px 26px; display: flex; flex-direction: column; gap: 12px; transition: background 0.4s var(--ease); }
.feat:hover { background: var(--panel); }
.feat__icon { width: 22px; height: 22px; color: var(--accent); }
.feat__title { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; }
.feat__text { font-size: var(--fs-sm); color: var(--ink-3); }

/* ── QUOTE ──────────────────────────────────────────────────────────────── */
.quote { border-left: 2px solid var(--accent); padding: 6px 0 6px 26px; }
.quote p { font-family: var(--font-display); font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.4; text-wrap: balance; }
.quote footer { margin-top: 18px; font-size: var(--fs-sm); color: var(--ink-3); }

/* ── CTA BAND ───────────────────────────────────────────────────────────── */
.cta {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(38px, 6vw, 76px);
  overflow: hidden;
  background: var(--panel);
}

.cta::before {
  content: '';
  position: absolute;
  inset: -60% -20% auto -20%;
  height: 200%;
  background: radial-gradient(ellipse 45% 50% at 20% 20%, rgba(77, 124, 254, 0.22), transparent 60%),
    radial-gradient(ellipse 40% 45% at 85% 70%, rgba(139, 92, 246, 0.2), transparent 62%);
}

.cta > * { position: relative; }
.cta__title { max-width: 22ch; }
.cta__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* ── FORM ───────────────────────────────────────────────────────────────── */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.field { display: flex; flex-direction: column; gap: 9px; }
.field--full { grid-column: span 2; }

.field label { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); }
.field .req { color: var(--accent); }

.input,
.select,
.textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  color: var(--ink);
  font-size: var(--fs-base);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.input::placeholder,
.textarea::placeholder { color: var(--ink-4); }

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(77, 124, 254, 0.6);
  background: rgba(77, 124, 254, 0.05);
}

.textarea { min-height: 132px; resize: vertical; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%238b93a6' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 11px;
  padding-right: 38px;
}

.select option { background: var(--panel-2); color: var(--ink); }

.check { display: flex; gap: 11px; align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-3); }
.check input { margin-top: 3px; accent-color: var(--accent); width: 15px; height: 15px; }

.form__note { grid-column: span 2; font-size: var(--fs-sm); color: var(--ink-4); }

/* honeypot fields: invisible to humans, filled by bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-status { grid-column: span 2; font-size: var(--fs-base); padding: 13px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); display: none; }
.form-status.is-ok { display: block; border-color: rgba(53, 224, 138, 0.4); background: rgba(53, 224, 138, 0.07); color: #9ff0c4; }
.form-status.is-err { display: block; border-color: rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.07); color: #ffb3b3; }

/* contact info list */
.info { display: flex; flex-direction: column; }
.info__row { display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.info__row:first-child { border-top: 1px solid var(--line); }
.info__k { flex: 0 0 108px; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); padding-top: 4px; }
.info__v { color: var(--ink-2); font-size: var(--fs-base); }
.info__v a:hover { color: var(--accent); }

/* ── FOOTER ─────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding-top: clamp(48px, 6vw, 80px); margin-top: var(--sec-y); position: relative; overflow: hidden; }

.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }

.footer__col h2 { font-family: var(--font-mono); font-weight: 400; font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 16px; }
.footer__col a { display: block; padding: 6px 0; color: var(--ink-3); font-size: var(--fs-base); transition: color 0.3s var(--ease), transform 0.3s var(--ease); }
.footer__col a:hover { color: var(--ink); transform: translateX(3px); }

.socials { display: flex; gap: 10px; margin-top: 22px; }

.social {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 99px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  transition: all 0.35s var(--ease);
}

.social:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-2px); }
.social svg { width: 16px; height: 16px; }

.footer__legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 64px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--ink-4);
}

.footer__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 19vw, 17rem);
  line-height: 0.78;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.07);
  text-align: center;
  user-select: none;
  margin-top: 40px;
  margin-bottom: -0.14em;
  pointer-events: none;
}

/* ── CASE STUDY PAGE ───────────────────────────────────────────────────── */
.spec-table { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.spec { padding: 22px 20px 22px 0; border-bottom: 1px solid var(--line); }
.spec + .spec { padding-left: 20px; border-left: 1px solid var(--line); }
.spec dt { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); }
.spec dd { margin: 10px 0 0; font-size: var(--fs-base); color: var(--ink); }

.prose { max-width: 72ch; }
.prose p + p { margin-top: 18px; }
.prose h2 { margin-top: 46px; margin-bottom: 16px; font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.prose h3 { margin-top: 32px; margin-bottom: 12px; font-size: var(--fs-md); }
.prose ul { margin-top: 14px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.prose ul li { position: relative; padding-left: 22px; color: var(--ink-2); }
.prose ul li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 8px; height: 1px; background: var(--accent); }

.media-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--panel);
  aspect-ratio: 16 / 9;
}

.media-frame img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; }
.media-frame--tall { aspect-ratio: 4 / 5; }

.next-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: padding 0.4s var(--ease);
}

.next-link:hover { padding-inline: 12px; }
.next-link svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--ink-3); transition: transform 0.4s var(--ease-out), color 0.3s var(--ease); }
.next-link:hover svg { transform: translateX(6px); color: var(--ink); }
.next-link__label { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-4); }
.next-link__title { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -0.02em; margin-top: 8px; }

/* ── 404 ────────────────────────────────────────────────────────────────── */
.err { min-height: 100svh; display: grid; place-items: center; text-align: center; }
.err__code { font-family: var(--font-display); font-size: clamp(6rem, 24vw, 18rem); font-weight: 700; line-height: 0.8; letter-spacing: -0.05em; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.16); color: transparent; }

/* ── REVEAL ANIMATION ─────────────────────────────────────────────────────
   Scoped to html.js so that content is fully visible when JavaScript is
   unavailable (crawlers, old browsers, blocked scripts). site.js adds the
   class before first paint. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

html.js [data-reveal].is-in { opacity: 1; transform: none; }

html.js [data-reveal='fade'] { transform: none; }

html.js [data-reveal='line'] {
  opacity: 1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease-out);
}

html.js [data-reveal='line'].is-in { transform: scaleX(1); }

/* ── PROGRESS BAR ───────────────────────────────────────────────────────── */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--grad);
  z-index: 200;
  pointer-events: none;
}

/* ── LIGHTBOX ───────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(4, 5, 8, 0.94);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 5vw;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 84vh; border-radius: var(--r); border: 1px solid var(--line); }
.lightbox__close { position: absolute; top: 26px; right: 26px; width: 44px; height: 44px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); color: var(--ink); cursor: pointer; font-size: 18px; }
.lightbox__cap { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: var(--ink-3); font-size: var(--fs-sm); }

/* ── UTILITIES ──────────────────────────────────────────────────────────── */
.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: absolute;
  top: -60px;
  left: var(--gutter);
  z-index: 400;
  background: var(--ink);
  color: #06070b;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  font-weight: 500;
  transition: top 0.25s var(--ease);
}

.skip:focus { top: 0; }

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

.mt-0 { margin-top: 0; }
.mt-s { margin-top: 14px; }
.mt-m { margin-top: 26px; }
.mt-l { margin-top: 48px; }
.mb-m { margin-bottom: 26px; }
.tac { text-align: center; }
.mx-auto { margin-inline: auto; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

.note {
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  font-size: var(--fs-sm);
  color: var(--ink-4);
  background: rgba(255, 255, 255, 0.012);
}

.glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(77, 124, 254, 0.55), transparent);
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .nav { display: none; }
  .burger { display: block; }
  .header__actions .btn { display: none; }
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'eyebrow' 'title' 'aside' 'cue';
  }
  .hero__aside { max-width: 62ch; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(odd) { padding-left: 0; }
  .step:nth-child(even) { padding-left: 22px; }
  .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
}

@media (max-width: 900px) {
  :root { --header-h: 62px; }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8 { grid-column: span 12; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .work-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .tile--wide { grid-column: span 1; }
  .tile--wide .tile__media { aspect-ratio: 16 / 10; }
  .spec-table { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec:nth-child(odd) { padding-left: 0; border-left: 0; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .field--full, .form__note, .form-status { grid-column: span 1; }
  .hero { align-items: flex-start; }
  .hud { display: none; }
}

@media (max-width: 620px) {
  .sec-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { padding-left: 0 !important; }
  .feats { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: 1fr; gap: 34px; }
  .footer__legal { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; }
  .hero__cta { width: 100%; }
  .tile__body { flex-direction: column; gap: 14px; }
}

/* ── MOTION PREFERENCES ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .hero__canvas { display: none; }
}

@media print {
  .header, .drawer, .progress, .cta, .footer__wordmark { display: none; }
  body { background: #fff; color: #000; }
}

/* ── playable-demo band ───────────────────────────────────────────────── */
.demo-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(ellipse 60% 90% at 8% 0%, rgba(77, 124, 254, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(18, 22, 32, 0.9), rgba(10, 12, 18, 0.9));
  padding: clamp(24px, 3.6vw, 48px);
}
.demo-band__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 14px 0 0;
}
.demo-band__text { color: var(--ink-2); margin: 16px 0 26px; max-width: 46ch; }
.demo-band__shot {
  position: relative;
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9);
}
.demo-band__shot img { display: block; width: 100%; height: auto; transition: transform .6s var(--ease); }
.demo-band__shot:hover img { transform: scale(1.03); }
.demo-band__shot::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(6, 8, 13, 0.55));
  pointer-events: none;
}
@media (max-width: 900px) {
  .demo-band { grid-template-columns: 1fr; }
  .demo-band__shot { order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-band__shot img { transition: none; }
}

/* ── looping showreel block (service pages) ───────────────────────────── */
.showcase {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #07090e;
}
.showcase__video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 42%;
  background: #07090e;
}
.showcase__cap {
  display: block;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
}
@media (prefers-reduced-motion: reduce) {
  .showcase__video { display: none; }
  .showcase { background: #07090e url('/assets/img/services/animation-cover.jpg') center/cover; aspect-ratio: 16 / 9; }
}

/* ── service cards: identical size in every row ───────────────────────── */
.svc {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.svc__title { min-height: 2.5em; }
.svc__tag,
.svc .dim,
.svc > p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.svc__tags { margin-top: auto; }
.svc__more { margin-top: 14px; }

/* ── work tiles: never crop a character out of frame ──────────────────── */
.tile__media img { object-fit: contain; background: #0b0e15; }
.tile__media::after { background: linear-gradient(180deg, transparent 62%, rgba(6, 8, 13, 0.72)); }

/* ── case-study gallery ───────────────────────────────────────────────── */
.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 18px);
  align-items: start;
}
.case-gallery__item {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #0b0e15;
  display: flex;
  justify-content: center;
}
.case-gallery__item--lead { grid-column: 1 / -1; }
.case-gallery__item img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(70vh, 620px);
  height: auto;
  margin-inline: auto;
}
.case-gallery__item--lead img { max-height: min(80vh, 780px); }

/* portrait-only galleries (phone UI screens) read better as an even row */
.case-gallery--portrait { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case-gallery--portrait .case-gallery__item--lead { grid-column: auto; }
.case-gallery--portrait .case-gallery__item img { max-height: min(62vh, 560px); }
@media (max-width: 900px) {
  .case-gallery--portrait { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .case-gallery { grid-template-columns: 1fr; }
  .case-gallery--portrait { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════════════
   DESIGN SYSTEM LAYER
   Audit found 55 padding declarations with 45 distinct values and nine
   different small-text sizes — no spacing or type scale, which is why the
   rhythm read as slightly off everywhere. This layer defines the scales and
   applies them to the highest-traffic elements. Additive only: it overrides
   values, it does not restructure markup.
   ══════════════════════════════════════════════════════════════════════════ */
:root {
  /* spacing — 8px base, 1.5 step at the top end */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  /* type scale — five steps, no in-between one-offs */
  --fs-xs: 0.72rem;    /* eyebrow, meta, mono labels */
  --fs-sm: 0.84rem;    /* chips, captions, small print */
  --fs-base: 0.95rem;  /* body copy */
  --fs-md: 1.08rem;    /* lead paragraphs */
  --fs-lg: 1.3rem;     /* card titles */
  --fs-xl: 1.75rem;    /* section headings */
  --fs-2xl: 2.4rem;    /* page headings */
  --fs-3xl: 3.4rem;    /* hero */

  /* vertical rhythm */
  --section-y: clamp(56px, 6vw, 96px);
  --section-y-tight: clamp(36px, 4vw, 56px);
  --gutter: clamp(20px, 3vw, 40px);
}

/* — section rhythm: one value for the whole site — */
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section--tight { padding-top: var(--section-y-tight); padding-bottom: var(--section-y-tight); }
.section--flush-top { padding-top: 0; }

/* — eyebrow labels: identical tracking and size everywhere —
   These are real <h2>/<h3> elements for screen-reader structure, so the
   label styling has to override the heading defaults set above. */
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  text-wrap: initial;
}

/* — body copy: one measure, one line-height — */
.lead { font-size: var(--fs-md); line-height: 1.62; }
p, .body-copy, .note { font-size: var(--fs-base); line-height: 1.68; }
.note, .dim { font-size: var(--fs-sm); line-height: 1.6; }

/* — headings: a real hierarchy instead of per-page guesses — */
.display-l { font-size: var(--fs-3xl); line-height: 1.04; letter-spacing: -0.03em; }
.display-m { font-size: var(--fs-xl); line-height: 1.14; letter-spacing: -0.022em; }
h2.display-m, .phero__title { letter-spacing: -0.028em; }
.svc__title, .tile__title, .step__title { font-size: var(--fs-lg); line-height: 1.24; }

/* — cards: one internal padding, one title rhythm — */
.svc, .tile, .card, .stat, .step { padding: var(--sp-5); }
.svc__tags, .tile__meta { margin-top: var(--sp-4); }
.svc__more, .tile__body { margin-top: var(--sp-3); }

/* — chips and small labels: one size, one padding — */
.chip, .tag, .tile__badge {
  font-size: var(--fs-sm);
  padding: var(--sp-1) var(--sp-3);
}

/* — buttons: consistent optical size across variants — */
.btn { font-size: var(--fs-base); padding: var(--sp-3) var(--sp-5); }
.btn--lg { font-size: var(--fs-md); padding: var(--sp-4) var(--sp-6); }
.btn--ghost { padding: var(--sp-3) var(--sp-5); }

/* — grid gutters follow the same scale — */
.grid, .work-grid { gap: var(--sp-5); }

@media (max-width: 700px) {
  :root {
    --section-y: clamp(48px, 10vw, 72px);
    --section-y-tight: clamp(32px, 7vw, 48px);
  }
  .svc, .tile, .card { padding: var(--sp-4); }
  .grid, .work-grid { gap: var(--sp-4); }
}

/* ── rhythm fix: hero to first content block was ~145px of dead space ──── */
.phero { padding-bottom: var(--section-y-tight); }

/* ── interaction polish that professional sites all have ──────────────── */
::selection { background: rgba(77, 124, 254, 0.32); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
/* keyboard users get a visible ring; mouse users do not */
.btn:focus:not(:focus-visible),
.nav__link:focus:not(:focus-visible),
.chip:focus:not(:focus-visible) { outline: none; }

/* long-form links inside body copy stay distinguishable without shouting */
.body-copy a, .lead a, .note a { text-decoration-color: rgba(77, 124, 254, 0.5); text-underline-offset: 3px; }
.body-copy a:hover, .lead a:hover, .note a:hover { text-decoration-color: currentColor; }

/* ── FAQ accordion (uses <details>, so it works with JavaScript disabled) ─ */
.faq { border-top: 1px solid rgba(255, 255, 255, 0.10); }
.faq__item { border-bottom: 1px solid rgba(255, 255, 255, 0.10); }
.faq__q {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-5); padding: var(--sp-5) 0; cursor: pointer;
  list-style: none; font-size: var(--fs-lg); line-height: 1.3; font-weight: 600;
  transition: color 0.25s ease;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: '+'; flex: 0 0 auto; color: var(--accent, #6f8dff);
  font-size: var(--fs-xl); font-weight: 400; line-height: 1;
}
.faq__item[open] .faq__q::after { content: '\2212'; }
.faq__q:hover { color: var(--accent, #6f8dff); }
.faq__a { padding: 0 0 var(--sp-5); max-width: 68ch; }
.faq__a p { margin: 0; color: rgba(255, 255, 255, 0.72); line-height: 1.68; }