/* samshahin.ca: Dark Tech × Editorial. Tokens and rules live in DESIGN.md. */

:root {
  --bg: #0A0C12;
  --bg-deep: #07080C;
  --surface: #11141C;
  --surface-alt: #0E1118;
  --surface-hover: #161A24;

  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.16);

  --text: #EDEFF5;
  --text-secondary: #A3A9B8;
  --text-tertiary: #7C8494;

  --accent: #7C7CFF;
  --accent-hover: #9D9DFF;
  --accent-ink: #0A0C12;
  --signal: #22D3EE;

  --bg-rgb: 10,12,18;
  --accent-rgb: 124,124,255;
  --signal-rgb: 34,211,238;
  --text-rgb: 237,239,245;

  --success: #34D399;
  --success-rgb: 52,211,153;
  --error: #F87171;
  --warning: #FBBF24;

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-cinema: cubic-bezier(0.65, 0, 0.35, 1);

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-pad: clamp(88px, 12vw, 160px);
  --radius: 18px;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font: 400 16px/1.65 var(--font-body);
  color: var(--text-secondary);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* atmosphere: indigo haze + 3% grain (static, no animation cost) */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(var(--accent-rgb), 0.12), transparent 60%),
    radial-gradient(700px 500px at -10% 40%, rgba(var(--signal-rgb), 0.05), transparent 60%),
    var(--bg);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: rgba(var(--accent-rgb), 0.35); color: var(--text); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }
section { position: relative; }
.section { padding: var(--section-pad) 0; }

/* ── Type ── */
h1, h2, h3 { font-family: var(--font-display); color: var(--text); font-weight: 600; }
.h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.05; letter-spacing: -0.03em; }
.h2 .dim { color: var(--text-tertiary); }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; color: var(--text-secondary); max-width: 60ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px;
  font: 500 12px/1.4 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-tertiary);
}
.eyebrow::before { content: ''; width: 18px; height: 1px; background: var(--signal); }
.section-head { margin-bottom: clamp(48px, 6vw, 72px); display: grid; gap: 20px; }
.section-head.split { grid-template-columns: 1.2fr 1fr; align-items: end; gap: 40px; }

/* split-text helpers (ScrollFloat / SplitText) */
.split-word { display: inline-block; white-space: nowrap; }
.split-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .2em; margin-bottom: -.2em; }
.split-char, .split-inner { display: inline-block; will-change: transform; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: 12px; font: 600 15px/1 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, box-shadow .3s, transform .2s var(--ease-out);
}
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0), 0 10px 30px -10px rgba(var(--accent-rgb), .6);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 0 6px rgba(var(--accent-rgb), .15), 0 14px 40px -10px rgba(var(--accent-rgb), .7);
}
.btn-primary:active { transform: scale(.97); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-hover); }
.btn-ghost:hover { border-color: rgba(var(--accent-rgb), .6); background: rgba(var(--accent-rgb), .08); }
.btn-ghost:active { transform: scale(.97); }
.btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn svg { width: 16px; height: 16px; flex: none; transition: transform .25s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.magnet { will-change: transform; }

/* ── Tags ── */
.tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px;
  font: 500 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-secondary); background: rgba(255,255,255,.03); border: 1px solid var(--border);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 12px rgba(var(--signal-rgb), .8); flex: none; }
.dot.live { animation: live 2.2s ease-in-out infinite; }
@keyframes live { 50% { opacity: .35; box-shadow: 0 0 4px rgba(var(--signal-rgb), .4); } }
.metric { font: 500 13px/1.3 var(--font-mono); color: var(--signal); display: inline-flex; align-items: center; gap: 8px; }

/* ── Links ── */
.link {
  color: var(--text); text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat;
  transition: background-size .3s var(--ease-out), color .2s;
}
.link:hover { background-size: 100% 1px; color: var(--accent-hover); }

/* ── Nav ── */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, padding .3s;
}
.nav.scrolled {
  background: rgba(var(--bg-rgb), .72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border); padding-block: 12px;
}
.nav-logo {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font: 600 17px/1 var(--font-display); color: var(--text); text-decoration: none; letter-spacing: -.01em;
}
.nav-logo .mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(var(--accent-rgb), .12); border: 1px solid rgba(var(--accent-rgb), .35);
  color: var(--accent); font: 600 13px/1 var(--font-mono);
  transition: background .2s, border-color .2s;
}
.nav-logo:hover .mark { background: rgba(var(--accent-rgb), .22); border-color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px;
  font-size: 14px; color: var(--text-secondary); text-decoration: none; transition: color .2s, background .2s;
}
.nav-links a:not(.btn):hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-links a[aria-current="true"] { color: var(--text); }
.nav-links .btn { margin-left: 10px; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center;
  border: 1px solid var(--border); transition: border-color .2s, background .2s;
}
.nav-toggle:hover { border-color: var(--border-hover); background: rgba(255,255,255,.04); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 1.5px; background: var(--text); border-radius: 2px; position: relative;
  transition: transform .3s var(--ease-out), background .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ── Hero ── */
.hero { min-height: 100svh; display: flex; align-items: center; padding: 120px 0 80px; overflow: hidden; isolation: isolate; }
.hero-visual { position: absolute; inset: 0 0 0 38%; z-index: -1; pointer-events: none; }
.hero-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s var(--ease-out); }
.hero-visual.gl-ready canvas { opacity: 1; }
.hero-visual.gl-ready .net-static { opacity: 0; }
.net-static { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 1s; }
.net-static line { stroke: rgba(var(--accent-rgb), .22); stroke-width: 1; }
.net-static .pulse { stroke: var(--signal); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 6 120; animation: flow 3.6s linear infinite; }
.net-static circle { fill: rgba(var(--accent-rgb), .75); }
.net-static circle.hub { fill: var(--signal); filter: drop-shadow(0 0 6px rgba(var(--signal-rgb), .9)); }
@keyframes flow { to { stroke-dashoffset: -126; } }
.hero-visual::after { /* fade network into copy side */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(var(--bg-rgb), 0) 35%), linear-gradient(0deg, var(--bg) 0%, rgba(var(--bg-rgb), 0) 30%);
}
.hero > .container { width: 100%; }
.hero-copy { max-width: 700px; }
.hero h1 {
  font-size: clamp(44px, 7vw, 96px); font-weight: 700; line-height: 1.0; letter-spacing: -0.035em;
  margin: 28px 0 28px; text-shadow: 0 0 40px rgba(var(--accent-rgb), .25);
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent) 10%, var(--signal) 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  text-shadow: none; padding-right: .06em;
}
.hero .lead { margin-bottom: 40px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-foot {
  position: absolute; left: 0; right: 0; bottom: 28px;
  display: flex; justify-content: space-between; align-items: center;
  font: 500 12px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-tertiary);
}
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; transition: color .2s; }
.scroll-cue:hover { color: var(--text); }
.scroll-cue i { width: 1px; height: 28px; background: linear-gradient(var(--signal), transparent); animation: cue 2s var(--ease-cinema) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ── Manifesto marquee + stats ── */
.manifesto { padding: clamp(56px, 8vw, 96px) 0; background: var(--bg-deep); border-block: 1px solid var(--border); overflow: hidden; }
.marquee { display: flex; overflow: hidden; user-select: none; }
.marquee + .marquee { margin-top: 8px; }
.marquee-track { display: flex; flex: none; gap: 0; will-change: transform; }
.marquee-item {
  display: inline-flex; align-items: center; gap: clamp(20px, 3vw, 40px); padding-right: clamp(20px, 3vw, 40px);
  font: 700 clamp(44px, 8vw, 112px)/1.05 var(--font-display); letter-spacing: -0.04em; white-space: nowrap; color: var(--text);
}
.marquee-item.outline { color: transparent; -webkit-text-stroke: 1px rgba(var(--text-rgb), .28); }
.marquee-item .sep { width: .28em; height: .28em; border-radius: 50%; background: var(--signal); box-shadow: 0 0 24px rgba(var(--signal-rgb), .7); flex: none; }
.marquee-item.outline .sep { background: var(--accent); box-shadow: 0 0 24px rgba(var(--accent-rgb), .7); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(48px, 7vw, 88px); }
.stat { border-top: 1px solid var(--border); padding-top: 22px; }
.stat-val { font: 700 clamp(48px, 6vw, 80px)/1 var(--font-display); letter-spacing: -0.04em; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-val sup { font-size: .45em; vertical-align: top; position: relative; top: .25em; color: var(--signal); margin-left: 2px; }
.stat-lbl { margin-top: 12px; font: 500 12px/1.4 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-tertiary); }

/* ── Cards / Bento (SpotlightCard) ── */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; overflow: hidden; box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
  transition: border-color .25s, background .25s, box-shadow .35s var(--ease-out);
}
.card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), .14), transparent 60%);
}
.card:hover { border-color: var(--border-hover); background: var(--surface-hover); box-shadow: 0 30px 80px -30px rgba(0,0,0,.8); }
.card:hover::before { opacity: 1; }
.card:focus-within { border-color: rgba(var(--accent-rgb), .5); }
.card > * { position: relative; }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; perspective: 1200px; }
.bento > :nth-child(1) { grid-column: span 4; }
.bento > :nth-child(2) { grid-column: span 2; }
.bento > :nth-child(3), .bento > :nth-child(4), .bento > :nth-child(5) { grid-column: span 2; }
.bento > :nth-child(6) { grid-column: span 6; }
.svc { display: flex; flex-direction: column; gap: 14px; min-height: 240px; }
.svc-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: auto;
  color: var(--accent); background: rgba(var(--accent-rgb), .1); border: 1px solid rgba(var(--accent-rgb), .25);
  transition: color .25s, background .25s, border-color .25s;
}
.svc-icon svg { width: 22px; height: 22px; }
.card:hover .svc-icon { color: var(--signal); border-color: rgba(var(--signal-rgb), .4); background: rgba(var(--signal-rgb), .08); }
.svc h3 { font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; margin-top: 28px; }
.svc p { max-width: 52ch; }
.svc-feature { min-height: 300px; }
.svc-feature .flow { position: absolute; right: 24px; top: 24px; width: min(46%, 360px); opacity: .9; }
.svc-feature .flow .n { fill: var(--surface-hover); stroke: var(--border-hover); }
.svc-feature .flow .n.on { stroke: rgba(var(--accent-rgb), .7); }
.svc-feature .flow text { fill: var(--text-secondary); font: 500 10px var(--font-mono); letter-spacing: .04em; }
.svc-feature .flow .wire { stroke: rgba(var(--accent-rgb), .3); fill: none; }
.svc-feature .flow .spark { stroke: var(--signal); stroke-width: 2; fill: none; stroke-linecap: round; stroke-dasharray: 8 200; animation: flow2 2.8s linear infinite; }
.svc-feature .flow .spark.d2 { animation-delay: -1.4s; }
@keyframes flow2 { to { stroke-dashoffset: -208; } }
.svc-wide { flex-direction: row; align-items: center; gap: 28px; min-height: 0; }
.svc-wide .svc-icon { margin-bottom: 0; }
.svc-wide h3 { margin-top: 0; }
.svc-wide .btn { margin-left: auto; }

/* ── Work: pin / swap ── */
.work-track { position: relative; }
.work-sticky { position: relative; }
.work-steps { display: none; }
.projects { display: grid; gap: 24px; }
.project { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.project-num { font: 500 13px/1 var(--font-mono); color: var(--text-tertiary); letter-spacing: .1em; }
.project h3 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.08; letter-spacing: -0.025em; margin: 18px 0 18px; }
.project p { max-width: 48ch; margin-bottom: 24px; }
.project .metric { padding: 10px 14px; border-radius: 10px; background: rgba(var(--signal-rgb), .07); border: 1px solid rgba(var(--signal-rgb), .2); }
.project .metric svg { width: 16px; height: 16px; }
.scene {
  position: relative; aspect-ratio: 5 / 4; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, var(--surface), var(--surface-alt)); border: 1px solid var(--border);
  box-shadow: 0 40px 100px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.02) inset;
}
.scene-bar { display: flex; align-items: center; gap: 6px; padding: 14px 16px; border-bottom: 1px solid var(--border); font: 500 11px/1 var(--font-mono); color: var(--text-tertiary); }
.scene-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.1); }
.scene-bar span { margin-left: 10px; }
.scene-body { position: absolute; inset: 44px 0 0; padding: clamp(16px, 3vw, 28px); }
.scene svg { width: 100%; height: 100%; }

/* scene 1: workflow graph */
.wf .node rect { fill: var(--bg); stroke: var(--border-hover); }
.wf .node.src rect { stroke: rgba(var(--accent-rgb), .7); }
.wf .node.core rect { fill: rgba(var(--accent-rgb), .14); stroke: var(--accent); }
.wf .node text { fill: var(--text); font: 500 13px var(--font-body); }
.wf .node .sub { fill: var(--text-tertiary); font: 500 10px var(--font-mono); letter-spacing: .06em; }
.wf .edge { stroke: rgba(var(--accent-rgb), .35); fill: none; stroke-width: 1.5; }
.wf .pkt { stroke: var(--signal); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 10 400; animation: pkt 2.4s linear infinite; }
.wf .pkt.b { animation-delay: -.8s; } .wf .pkt.c { animation-delay: -1.6s; }
@keyframes pkt { from { stroke-dashoffset: 10; } to { stroke-dashoffset: -400; } }
.wf .chip rect { fill: rgba(var(--signal-rgb), .08); stroke: rgba(var(--signal-rgb), .35); }
.wf .chip text { fill: var(--signal); font: 500 11px var(--font-mono); }

/* scene 2: booking */
.bk { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; height: 100%; }
.bk-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-content: start; }
.bk-cal .dow { font: 500 10px/1 var(--font-mono); color: var(--text-tertiary); text-align: center; padding-bottom: 4px; }
.bk-cal .d { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; font: 500 12px var(--font-mono); color: var(--text-tertiary); background: rgba(255,255,255,.02); }
.bk-cal .d.av { color: var(--text); background: rgba(var(--accent-rgb), .1); border: 1px solid rgba(var(--accent-rgb), .25); }
.bk-cal .d.sel { color: var(--accent-ink); background: var(--accent); box-shadow: 0 0 20px rgba(var(--accent-rgb), .6); }
.bk-month { grid-column: 1 / -1; font: 600 15px var(--font-display); color: var(--text); margin-bottom: 6px; }
.bk-side { display: flex; flex-direction: column; gap: 8px; }
.bk-slot { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); font: 500 12px var(--font-mono); color: var(--text-secondary); display: flex; justify-content: space-between; }
.bk-slot.sel { border-color: var(--accent); color: var(--text); background: rgba(var(--accent-rgb), .1); }
.bk-toast { margin-top: auto; padding: 12px; border-radius: 12px; background: rgba(var(--success-rgb), .1); border: 1px solid rgba(var(--success-rgb),.3); font: 500 12px/1.5 var(--font-mono); color: var(--success); display: grid; gap: 4px; }
.bk-toast span { color: var(--text-secondary); }

/* scene 3: terminal */
.term { font: 400 13px/1.75 var(--font-mono); color: var(--text-secondary); }
.term .p { color: var(--signal); }
.term .u { color: var(--text); }
.term .a { color: var(--text); padding-left: 14px; border-left: 2px solid rgba(var(--accent-rgb), .5); margin: 6px 0; }
.term .src { color: var(--text-tertiary); font-size: 11px; }
.term .ok { color: var(--success); }
.term .cursor { display: inline-block; width: 8px; height: 15px; background: var(--signal); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* pinned mode (desktop, motion allowed): set by JS on <html class="pin-ok"> */
.pin-ok .work-track { height: 300vh; }
.pin-ok .work-sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-top: 72px; }
.pin-ok .work-head { margin-bottom: clamp(24px, 3vw, 40px); }
.pin-ok .work-steps { display: flex; gap: 8px; margin-bottom: 28px; }
.pin-ok .projects { position: relative; display: block; height: min(50vh, 500px); }
.pin-ok .project { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease-out), visibility 0s .6s; }
.pin-ok .project.active { opacity: 1; visibility: visible; transition: opacity .6s var(--ease-out), visibility 0s; }
.pin-ok .project .project-copy > * { transform: translateY(18px); opacity: 0; transition: transform .7s var(--ease-out), opacity .7s var(--ease-out); }
.pin-ok .project.active .project-copy > * { transform: none; opacity: 1; }
.pin-ok .project.active .project-copy > :nth-child(2) { transition-delay: .06s; }
.pin-ok .project.active .project-copy > :nth-child(3) { transition-delay: .12s; }
.pin-ok .project.active .project-copy > :nth-child(4) { transition-delay: .18s; }
.pin-ok .project .scene { transform: translateY(30px) scale(.96); transition: transform .8s var(--ease-out); }
.pin-ok .project.active .scene { transform: none; }
.pin-ok .project .scene { aspect-ratio: auto; height: min(50vh, 500px); }
.step {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 10px;
  font: 500 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary);
  border: 1px solid var(--border); transition: color .25s, border-color .25s, background .25s;
}
.step:hover { color: var(--text); border-color: var(--border-hover); }
.step[aria-current="true"] { color: var(--text); border-color: rgba(var(--accent-rgb), .6); background: rgba(var(--accent-rgb), .08); }
.step .bar { width: 36px; height: 2px; background: var(--border-hover); border-radius: 2px; overflow: hidden; }
.step .bar b { display: block; height: 100%; width: 100%; background: var(--signal); transform: scaleX(var(--p, 0)); transform-origin: left; }

/* ── Stack ── */
.stack-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font: 500 15px/1 var(--font-body);
  transition: border-color .2s, transform .3s var(--ease-out), background .2s;
}
.chip .dot { background: var(--text-tertiary); box-shadow: none; transition: background .2s, box-shadow .2s; }
.chip:hover { border-color: rgba(var(--signal-rgb), .45); background: var(--surface-hover); transform: translateY(-2px); }
.chip:hover .dot { background: var(--signal); box-shadow: 0 0 12px rgba(var(--signal-rgb), .8); }

/* ── Testimonials ── */
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.quote { display: flex; flex-direction: column; gap: 28px; padding: clamp(28px, 3.5vw, 40px); }
.quote svg.qm { width: 32px; height: 32px; color: var(--accent); opacity: .8; }
.quote blockquote { font: 400 clamp(17px, 1.5vw, 19px)/1.65 var(--font-body); color: var(--text); }
.quote figcaption { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font: 600 16px var(--font-display); color: var(--text);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .35), rgba(var(--signal-rgb), .2)); border: 1px solid var(--border-hover);
}
.quote .name { color: var(--text); font-weight: 600; }
.quote .role { font: 500 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); }

/* ── FAQ ── */
.faq-list { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; min-height: 64px; padding: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  text-align: left; font: 500 clamp(17px, 1.6vw, 20px)/1.35 var(--font-display); color: var(--text); transition: color .2s;
}
.faq-q:hover { color: var(--accent-hover); }
.faq-q:focus-visible { outline-offset: 4px; }
.faq-icon {
  width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid var(--border-hover); position: relative;
  transition: transform .4s var(--ease-out), border-color .2s, background .2s;
}
.faq-icon::before, .faq-icon::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); border-color: var(--accent); background: rgba(var(--accent-rgb), .12); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease-out); }
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 56px 24px 0; max-width: 68ch; }
.faq-q[aria-expanded="true"] + .faq-a { grid-template-rows: 1fr; }

/* ── CTA band ── */
.cta { text-align: center; padding: clamp(72px, 10vw, 140px) var(--gutter); border-radius: 28px; overflow: hidden; position: relative;
  background: radial-gradient(600px 300px at 50% 0%, rgba(var(--accent-rgb), .22), transparent 70%), var(--surface-alt); border: 1px solid var(--border); }
.cta::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(var(--text-rgb), .12) 1px, transparent 1px); background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%); }
.cta > * { position: relative; }
.cta .h2 { font-size: clamp(38px, 6vw, 80px); }
.cta .lead { margin: 24px auto 40px; }

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.me { display: flex; align-items: center; gap: 18px; margin: 40px 0 32px; }
.me img { width: 76px; height: 76px; border-radius: 18px; object-fit: cover; border: 1px solid var(--border-hover); }
.me .name { font: 600 18px var(--font-display); color: var(--text); }
.me .role { font-size: 14px; }
.meta { display: grid; gap: 14px; }
.meta li { display: flex; align-items: center; gap: 12px; list-style: none; font-size: 15px; }
.meta svg { width: 18px; height: 18px; color: var(--signal); flex: none; }
.form { padding: clamp(24px, 3.5vw, 36px); display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 8px; }
.field label { font: 500 13px var(--font-body); color: var(--text); }
.field label .opt { color: var(--text-tertiary); font-weight: 400; margin-left: 6px; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); font: 400 15px/1.5 var(--font-body); transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-tertiary); opacity: .75; }
.field input:hover, .field textarea:hover { border-color: var(--border-hover); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .18); }
.field input:disabled, .field textarea:disabled { opacity: .5; }
.field [aria-invalid="true"] { border-color: var(--error); }
.form .btn { justify-content: center; width: 100%; }
#contact-msg { min-height: 1.2em; font-size: 14px; }
#contact-msg.error { color: var(--error); }
.success { text-align: center; padding: 32px 8px; }
.success-icon { width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; color: var(--success); background: rgba(var(--success-rgb),.1); border: 1px solid rgba(var(--success-rgb),.35); }
.success-title { font: 600 24px var(--font-display); color: var(--text); margin-bottom: 8px; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(var(--bg-rgb), .3); border-top-color: var(--accent-ink); border-radius: 50%; animation: spin .65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ── */
.footer { padding: 36px 0 44px; border-top: 1px solid var(--border); background: var(--bg-deep); font-size: 14px; }
.footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.status { position: relative; }
.status-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); font: 500 12px/1 var(--font-mono); color: var(--text-secondary); transition: border-color .2s, color .2s; }
.status-btn:hover, .status-btn[aria-expanded="true"] { border-color: rgba(var(--signal-rgb), .45); color: var(--text); }
.status-sheet {
  position: absolute; right: 0; bottom: calc(100% + 10px); width: min(320px, calc(100vw - 40px)); padding: 16px 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border-hover); box-shadow: 0 30px 80px -20px rgba(0,0,0,.9);
  font: 400 12px/1.9 var(--font-mono); color: var(--text-secondary);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .25s, transform .3s var(--ease-out);
}
.status-sheet b { color: var(--text); font-weight: 500; }
.status-sheet .k { color: var(--text-tertiary); }
.status:hover .status-sheet, .status-btn[aria-expanded="true"] + .status-sheet { opacity: 1; transform: none; pointer-events: auto; }

/* ── Reveal ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-visual { inset: 0; opacity: .55; }
  .hero-visual::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(var(--bg-rgb), .3) 60%); }
  .section-head.split { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento > * { grid-column: span 1 !important; }
  .bento > :nth-child(1), .bento > :nth-child(6) { grid-column: span 2 !important; }
  .project { grid-template-columns: 1fr; }
  .project .scene { order: -1; }
  .projects { gap: 72px; }
  .quotes, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 68px 12px auto; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px;
    border-radius: 18px; background: var(--surface); border: 1px solid var(--border-hover); box-shadow: 0 30px 80px -20px rgba(0,0,0,.9);
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .25s, transform .3s var(--ease-out);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a:not(.btn) { min-height: 48px; font-size: 16px; }
  .nav-links .btn { margin: 8px 0 0; justify-content: center; }
}
@media (max-width: 640px) {
  .hero { padding-top: 104px; }
  .hero-foot { display: none; }
  .bento { grid-template-columns: 1fr; gap: 12px; }
  .bento > *:nth-child(n) { grid-column: 1 / -1 !important; }
  /* compact service cards: icon beside the title, no empty min-height */
  .svc, .svc-feature { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; row-gap: 10px; align-items: center; min-height: 0; }
  .svc .svc-icon { margin: 0; }
  .svc h3 { margin: 0; font-size: 19px; }
  .svc p { grid-column: 1 / -1; font-size: 15px; }
  .svc-feature .flow { position: static; grid-column: 1 / -1; order: 3; width: 100%; max-width: 360px; margin-top: 6px; }
  .svc-wide { grid-template-columns: 44px 1fr; }
  .svc-wide > div:not(.svc-icon) { display: contents; }
  .svc-wide .btn { grid-column: 1 / -1; margin: 6px 0 0; justify-self: start; }
  .card { padding: 22px; }
  .stats { grid-template-columns: 1fr; gap: 0; }
  .stat { display: flex; align-items: baseline; justify-content: space-between; padding: 18px 0; }
  .stat-lbl { margin: 0; }
  .field-row { grid-template-columns: 1fr; }
  .bk { grid-template-columns: 1fr; }
  .bk-side { display: none; }
  .scene { aspect-ratio: 1 / 1; }
  .faq-a p { padding-right: 0; }
  .footer .container { flex-direction: column; align-items: flex-start; }
  .status-sheet { left: 0; right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .net-static .pulse, .wf .pkt, .svc-feature .flow .spark { display: none; }
}
