/* ---------- Tokens ---------- */
:root {
  --bg: oklch(0.985 0.002 260);
  --bg-elev: oklch(1 0 0);
  --glass-c: 1 0 0;
  --bg-glass: oklch(var(--glass-c) / 0.55);
  --fg: oklch(0.18 0.01 260);
  --fg-dim: oklch(0.42 0.008 260);
  --fg-mute: oklch(0.62 0.006 260);
  --line: oklch(0 0 0 / 0.08);
  --line-strong: oklch(0 0 0 / 0.14);
  --accent-h: 250;
  --accent: oklch(0.55 0.18 var(--accent-h));
  --accent-dim: oklch(0.62 0.15 var(--accent-h));
  --plasma: oklch(0.55 0.18 260);
  --ember: oklch(0.62 0.16 28);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --pad-sec: clamp(80px, 10vw, 160px);
  --pad-x: clamp(20px, 5vw, 80px);

  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --font-serif: "Instrument Serif", "Times New Roman", serif;

  --ease-out: cubic-bezier(.2,.7,.2,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
}

html[lang="he"] {
  --font-sans: "Heebo", "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Suez One", "Frank Ruhl Libre", "Instrument Serif", serif;
}
/* Suez One has no italic — a synthesized (faux) slant distorts Hebrew letterforms, so keep accent text upright in Hebrew */
html[lang="he"] .display em,
html[lang="he"] .section-title em,
html[lang="he"] .hero-stats .num em,
html[lang="he"] .metrics-row .k em,
html[lang="he"] .cta h2 em,
html[lang="he"] .about h2 em,
html[lang="he"] .foot-wordmark em,
html[lang="he"] .case-title {
  font-style: normal;
}
html[lang="he"] body { font-feature-settings: normal; }
html[dir="rtl"] .marquee-track { animation-direction: reverse; }
html[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(4px); }
html[dir="rtl"] .hero-stats > div,
html[dir="rtl"] .metrics-row > div { padding-right: 0; padding-left: 18px; border-right: 0; border-left: 1px solid var(--line); }
html[dir="rtl"] .hero-stats > div:last-child,
html[dir="rtl"] .metrics-row > div:last-child { border-left: 0; }
html[dir="rtl"] .service { border-right: 0; border-left: 1px solid var(--line); }
html[dir="rtl"] .services-grid { border-left: 0; border-right: 1px solid var(--line); }
html[dir="rtl"] .service .glyph { right: auto; left: 28px; }
html[dir="rtl"] .quote .mark { transform: scaleX(-1); }
html[dir="rtl"] .term-line .prompt { transform: scaleX(-1); display: inline-block; }
html[dir="rtl"] .tweaks { right: auto; left: 20px; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { background: var(--bg); color: var(--fg); font-family: var(--font-sans); }
body {
  background-image:
    radial-gradient(1100px 700px at 80% -10%, oklch(0.78 0.14 var(--accent-h) / 0.18), transparent 60%),
    radial-gradient(900px 600px at 0% 30%, oklch(0.78 0.12 320 / 0.12), transparent 60%),
    radial-gradient(700px 500px at 50% 100%, oklch(0.85 0.10 200 / 0.18), transparent 60%);
  background-attachment: fixed;
}
body {
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: white; }

/* global noise overlay */
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/></svg>");
}
.noise.off { display: none; }

/* ambient cursor spotlight */
.cursor-glow {
  position: fixed; inset: 0; z-index: 4; pointer-events: none;
  opacity: 0; transition: opacity .6s;
  background: radial-gradient(560px circle at var(--cx, 50%) var(--cy, 50%), oklch(0.78 0.18 var(--accent-h) / 0.16), transparent 70%);
  mix-blend-mode: multiply;
}
.cursor-glow.on { opacity: 1; }
@media (pointer: coarse), (prefers-reduced-motion: reduce) { .cursor-glow { display: none; } }

/* scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 60;
  width: 100%; height: 2px;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--plasma));
  box-shadow: 0 0 16px var(--accent);
  will-change: transform;
}
html[dir="rtl"] .scroll-progress { transform-origin: 100% 50%; }
html.motion-reduced .scroll-progress { display: none; }

/* ---------- Layout ---------- */
main { position: relative; z-index: 2; }
section { position: relative; padding: var(--pad-sec) var(--pad-x); }
.container { max-width: 1320px; margin: 0 auto; width: 100%; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
.display {
  font-size: clamp(44px, 8.2vw, 128px);
  letter-spacing: -0.035em;
  line-height: 0.95;
  font-weight: 500;
}
.display em {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
}

/* animated gradient accent text — used across headings' emphasis word */
.section-title em, .display em, .cta h2 em, .case-title em, html[lang="he"] .case-title {
  background: linear-gradient(100deg, var(--accent), var(--plasma) 45%, var(--accent) 90%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: grad-shift 7s ease-in-out infinite;
}
@keyframes grad-shift { 0%, 100% { background-position: 0% center; } 50% { background-position: 100% center; } }
html.motion-reduced .section-title em, html.motion-reduced .display em, html.motion-reduced .cta h2 em, html.motion-reduced .case-title em { animation: none; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
  animation: eyebrow-pulse 2.4s ease-in-out infinite;
}
@keyframes eyebrow-pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 12px var(--accent); } 50% { opacity: .55; box-shadow: 0 0 4px var(--accent); } }
html.motion-reduced .eyebrow::before { animation: none; }
.kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); }
h2.section-title {
  font-size: clamp(32px, 5vw, 68px);
  max-width: 20ch;
  letter-spacing: -0.03em;
}
.section-title em, .cta h2 em, .about h2 em, .proof .section-title em {
  font-family: var(--font-serif); font-style: italic;
}
p.lede { font-size: clamp(16px, 1.4vw, 20px); color: var(--fg-dim); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  --_bg: transparent;
  --_fg: var(--fg);
  --_bd: var(--line-strong);
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  background: var(--_bg); color: var(--_fg);
  border: 1px solid var(--_bd);
  transition: transform .35s var(--ease-out), background .3s, color .3s, border-color .3s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn .arrow {
  display: inline-block; transition: transform .4s var(--ease-out);
}
.btn:hover .arrow { transform: translateX(4px); }
.btn.primary {
  --_bg: var(--fg);
  --_fg: white;
  --_bd: var(--fg);
  box-shadow: 0 0 0 0 var(--accent);
}
.btn.primary:hover { box-shadow: 0 10px 40px -10px var(--accent); }
.btn.ghost:hover { background: oklch(0 0 0 / 0.04); border-color: var(--line-strong); }

/* ---------- Glass card ---------- */
.glass {
  background: linear-gradient(180deg, oklch(var(--glass-c) / 0.7), oklch(var(--glass-c) / 0.45));
  border: 1px solid oklch(var(--glass-c) / 0.6);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 20px 60px -30px oklch(0 0 0 / 0.2);
}

/* ---------- Reveal ---------- */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: reveal-in 1s var(--ease-out) forwards;
  }
  @keyframes reveal-in {
    from { opacity: 0; transform: translateY(26px); filter: blur(8px); }
    to { opacity: 1; transform: none; filter: blur(0); }
  }
  .reveal.d1 { animation-delay: .06s; }
  .reveal.d2 { animation-delay: .14s; }
  .reveal.d3 { animation-delay: .22s; }
  .reveal.d4 { animation-delay: .3s; }
  .reveal.d5 { animation-delay: .38s; }
}
html.motion-reduced .reveal { animation: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 50; padding: 10px 14px 10px 22px;
  display: flex; align-items: center; gap: 22px;
  border-radius: 999px;
  background: oklch(var(--glass-c) / 0.65);
  border: 1px solid oklch(var(--glass-c) / 0.7);
  box-shadow: 0 10px 40px -20px oklch(0 0 0 / 0.2);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  font-size: 14px;
  transition: box-shadow .4s var(--ease-out);
}
.nav:hover { box-shadow: 0 20px 60px -30px oklch(0 0 0 / 0.9); }
.nav .logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.nav .logo-mark {
  width: 22px; height: 22px; object-fit: contain;
  filter: drop-shadow(0 1px 2px oklch(0 0 0 / 0.2));
}
.nav ul { display: flex; gap: 4px; list-style: none; }
.nav ul a {
  padding: 8px 12px; border-radius: 999px; color: var(--fg-dim); transition: color .25s, background .25s;
}
.nav ul a:hover { color: var(--fg); background: oklch(0 0 0 / 0.04); }
.nav .nav-cta {
  position: relative; overflow: hidden;
  padding: 8px 14px; border-radius: 999px;
  background: var(--fg); color: white;
  font-weight: 500;
  white-space: nowrap; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .25s, box-shadow .3s;
  box-shadow: 0 0 0 0 oklch(0.85 0.2 90 / 0.6);
  animation: cta-pulse 3.4s ease-in-out infinite;
}
.nav .nav-cta .bolt {
  flex-shrink: 0;
  color: oklch(0.85 0.2 90);
  filter: drop-shadow(0 0 3px oklch(0.85 0.2 90 / 0.9));
  animation: bolt-flicker 3.4s ease-in-out infinite;
}
.nav .nav-cta span { flex-shrink: 0; white-space: nowrap; }
.nav .nav-cta::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, oklch(1 1 1 / 0.55), transparent);
  transform: skewX(-20deg);
  animation: cta-sweep 3.4s ease-in-out infinite;
}
@keyframes cta-sweep { 0%, 55% { left: -60%; } 75%, 100% { left: 130%; } }
@keyframes bolt-flicker { 0%, 55% { opacity: 0.55; } 62% { opacity: 1; } 68% { opacity: 0.4; } 74%, 100% { opacity: 0.55; } }
@keyframes cta-pulse { 0%, 55% { box-shadow: 0 0 0 0 oklch(0.85 0.2 90 / 0); } 68% { box-shadow: 0 0 18px 2px oklch(0.85 0.2 90 / 0.5); } 100% { box-shadow: 0 0 0 0 oklch(0.85 0.2 90 / 0); } }
html.motion-reduced .nav .nav-cta, html.motion-reduced .nav .nav-cta .bolt, html.motion-reduced .nav .nav-cta::after { animation: none; }
.nav .nav-cta:hover { background: var(--accent); }

.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border-radius: 999px;
  background: oklch(0 0 0 / 0.04);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.lang-switch button {
  padding: 5px 10px; border-radius: 999px;
  color: var(--fg-mute);
  transition: color .25s, background .25s;
}
.lang-switch button.on {
  background: var(--fg);
  color: white;
}
@media (max-width: 780px) {
  .nav ul { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  padding-top: 140px;
  padding-bottom: 80px;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(to right, oklch(0 0 0 / 0.04) 1px, transparent 1px) 0 0 / 60px 60px,
    linear-gradient(to bottom, oklch(0 0 0 / 0.04) 1px, transparent 1px) 0 0 / 60px 60px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 40%, transparent 75%);
}
.hero-orb {
  position: absolute; z-index: 0; pointer-events: none;
  width: 900px; height: 900px;
  left: 50%; top: 30%;
  transform: translate(-50%, -30%);
  background: radial-gradient(closest-side, oklch(0.78 0.18 var(--accent-h) / 0.28), transparent 70%);
  filter: blur(20px);
}
.hero-orb.two {
  width: 600px; height: 600px;
  left: 15%; top: 65%;
  background: radial-gradient(closest-side, oklch(0.78 0.16 320 / 0.22), transparent 70%);
}
.hero-orb.three {
  width: 500px; height: 500px;
  left: 85%; top: 20%;
  background: radial-gradient(closest-side, oklch(0.84 0.14 200 / 0.22), transparent 70%);
}
.hero-inner { position: relative; z-index: 3; display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
}
.hero h1 { margin: 22px 0 28px; }
.hero-sub { font-size: clamp(16px, 1.35vw, 19px); color: var(--fg-dim); max-width: 48ch; margin-bottom: 36px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  margin-top: 64px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.hero-stats > div { padding-right: 18px; border-right: 1px solid var(--line); }
.hero-stats > div:last-child { border-right: 0; }
.hero-stats .num { font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -0.03em; }
.hero-stats .num em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--accent);
}
.hero-stats .lbl { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-mute); margin-top: 6px; }
@media (max-width: 720px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 18px 0; }
  .hero-stats > div:nth-child(2) { border-right: 0; }
}

/* Live terminal */
.term {
  position: relative;
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, oklch(var(--glass-c) / 0.75), oklch(var(--glass-c) / 0.55));
  border: 1px solid oklch(var(--glass-c) / 0.7);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow:
    0 40px 80px -30px oklch(0 0 0 / 0.18),
    inset 0 1px 0 oklch(var(--glass-c) / 0.8);
}

/* ==== Hero phone carousel (replaces terminal) ==== */
.phone-stage {
  position: relative;
  display: grid; place-items: center;
  width: 100%;
  min-height: 620px;
  perspective: 1600px;
  transform-style: preserve-3d;
}

.phone-halo {
  position: absolute; inset: 0;
  background:
    radial-gradient(40% 50% at 50% 50%, oklch(0.78 0.20 var(--accent-h) / 0.35), transparent 70%),
    radial-gradient(60% 60% at 50% 50%, oklch(0.82 0.16 320 / 0.18), transparent 80%);
  filter: blur(20px);
  pointer-events: none;
}

.phone-ring {
  position: absolute; top: 50%; left: 50%;
  width: 540px; height: 540px;
  margin: -270px 0 0 -270px;
  border-radius: 50%;
  border: 1px dashed oklch(0.55 0.18 var(--accent-h) / 0.35);
  pointer-events: none;
  transition: transform .03s linear;
}
.phone-ring::before {
  content: ""; position: absolute; inset: 30px;
  border-radius: 50%;
  border: 1px solid oklch(0 0 0 / 0.06);
}
.phone-ring::after {
  content: ""; position: absolute;
  width: 10px; height: 10px; border-radius: 50%;
  top: -6px; left: 50%; margin-left: -5px;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent);
}

.phone-orbit-dot {
  position: absolute; top: 50%; left: 50%;
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  pointer-events: none;
}

.phone-3d {
  position: relative;
  z-index: 2;
  transform-style: preserve-3d;
  transition: transform .12s linear;
}

.phone-flipper {
  position: relative;
  width: 280px;
  height: 580px;
  transform-style: preserve-3d;
  transition: transform 1.2s cubic-bezier(.65, .05, .25, 1);
}

.phone-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 44px;
}
.phone-face.back { transform: rotateY(180deg); }

.phone-frame {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 44px;
  padding: 10px;
  background:
    linear-gradient(160deg, oklch(0.32 0.012 260), oklch(0.16 0.008 260) 50%, oklch(0.28 0.012 260));
  box-shadow:
    0 60px 120px -40px oklch(0 0 0 / 0.45),
    0 0 0 2px oklch(0 0 0 / 0.4),
    inset 0 0 0 1.5px oklch(var(--glass-c) / 0.08),
    inset 0 1px 0 oklch(var(--glass-c) / 0.18);
  overflow: hidden;
}

.phone-notch {
  position: absolute; top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 96px; height: 26px;
  background: oklch(0.05 0 0);
  border-radius: 0 0 16px 16px;
  z-index: 5;
  box-shadow: inset 0 -2px 4px oklch(0 0 0 / 0.5);
}
.phone-notch::after {
  content: ""; position: absolute; right: 12px; top: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: oklch(0.18 0.02 260);
  box-shadow: inset 1px 1px 2px oklch(0 0 0 / 0.6);
}

.phone-shot {
  position: absolute; inset: 10px;
  width: calc(100% - 20px); height: calc(100% - 20px);
  border-radius: 34px;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .7s ease, transform 1.2s ease;
}
.phone-shot.on { opacity: 1; transform: scale(1); }

.phone-glare {
  position: absolute; inset: 10px;
  border-radius: 34px;
  pointer-events: none;
  background:
    linear-gradient(115deg, oklch(var(--glass-c) / 0.18) 0%, oklch(var(--glass-c) / 0) 28%, oklch(var(--glass-c) / 0) 72%, oklch(var(--glass-c) / 0.08) 100%);
  z-index: 4;
}

.phone-dots {
  position: absolute; bottom: 8px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px;
  z-index: 3;
}
.phone-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0 0 0 / 0.12);
  transition: background .3s, width .3s;
}
.phone-dots span.on {
  background: var(--accent);
  width: 22px; border-radius: 3px;
}

@media (max-width: 1000px) {
  .phone-stage { min-height: 560px; }
  .phone-flipper { width: 240px; height: 500px; }
  .phone-ring { width: 460px; height: 460px; margin: -230px 0 0 -230px; }
}
.term-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-mute);
}
.term-dots { display: flex; gap: 6px; }
.term-dots span { width: 10px; height: 10px; border-radius: 50%; background: oklch(0 0 0 / 0.1); }
.term-dots span:nth-child(1) { background: oklch(0.72 0.16 28 / 0.8); }
.term-dots span:nth-child(2) { background: oklch(0.82 0.16 85 / 0.8); }
.term-dots span:nth-child(3) { background: oklch(0.78 0.15 145 / 0.8); }
.term-title { margin-left: auto; letter-spacing: 0.08em; text-transform: uppercase; }
.term-body {
  font-family: var(--font-mono); font-size: 13px; line-height: 1.7;
  padding: 20px 22px 24px;
  min-height: 300px;
  color: var(--fg-dim);
}
.term-line { display: flex; gap: 10px; }
.term-line .prompt { color: var(--accent); user-select: none; }
.term-line .out { color: var(--fg); }
.term-line .muted { color: var(--fg-mute); }
.term-line .tag { color: var(--plasma); }
.term-cursor {
  display: inline-block; width: 8px; height: 15px; vertical-align: -2px;
  background: var(--accent); margin-left: 2px;
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.term-bars { display: grid; gap: 6px; margin-top: 8px; }
.term-bar { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; font-size: 12px; }
.term-bar .track { position: relative; height: 4px; background: oklch(0 0 0 / 0.08); border-radius: 2px; overflow: hidden; }
.term-bar .fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: inherit; }

/* Marquee */
.marquee {
  position: relative; overflow: hidden;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: oklch(var(--glass-c) / 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex; gap: 64px; width: max-content;
  animation: scroll-x 38s linear infinite;
}
html.motion-reduced .marquee-track { animation: none; }
.marquee-track span {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-mute);
  display: inline-flex; align-items: center; gap: 14px;
}
.marquee-track span::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--line-strong);
}
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---------- Services ---------- */
.sec-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end;
  margin-bottom: 64px;
}
@media (max-width: 820px) {
  .sec-head { grid-template-columns: 1fr; gap: 16px; }
}

.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(300px, auto); gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
/* bento: first card takes a double-wide hero slot */
.service:nth-child(1) { grid-column: span 2; }
@media (max-width: 960px) { .services-grid { grid-template-columns: repeat(2, 1fr); } .service:nth-child(1) { grid-column: span 2; } }
@media (max-width: 620px) { .services-grid { grid-template-columns: 1fr; } .service:nth-child(1) { grid-column: span 1; } }

.service {
  position: relative;
  padding: 36px 32px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  transition: color .3s;
  min-height: 320px;
  display: flex; flex-direction: column;
}
.service::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), oklch(0.78 0.18 var(--accent-h) / 0.18), transparent 40%);
  opacity: 0; transition: opacity .4s;
}
.service:hover::before { opacity: 1; }
.service .idx {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-mute); letter-spacing: 0.1em;
}
.service h3 {
  font-size: clamp(22px, 2vw, 30px);
  margin: 38px 0 14px;
  letter-spacing: -0.02em;
}
.service p { color: var(--fg-dim); font-size: 15px; max-width: 36ch; }
.service .svc-list {
  margin-top: auto; padding-top: 24px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.service .svc-list span {
  font-family: var(--font-mono); font-size: 11px;
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--fg-dim);
}
.service .glyph {
  position: absolute; top: 28px; right: 28px;
  width: 48px; height: 48px; border-radius: 10px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  transition: transform .6s var(--ease-out), border-color .4s;
}
.service:hover .glyph { transform: rotate(8deg) scale(1.06); border-color: var(--accent); }
.service .arrow-cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px; font-size: 13px; font-family: var(--font-mono);
  color: var(--fg); letter-spacing: 0.04em;
}
.service .arrow-cta .ln {
  position: relative; width: 28px; height: 1px; background: var(--fg);
  transition: width .4s var(--ease-out);
}
.service:hover .arrow-cta .ln { width: 48px; }

/* ---------- Case study (featured) ---------- */
.case {
  position: relative;
  margin-bottom: 28px;
  padding: clamp(32px, 5vw, 72px);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(var(--glass-c) / 0.7);
  background:
    radial-gradient(80% 60% at 100% 0%, oklch(0.78 0.16 var(--accent-h) / 0.22), transparent 60%),
    radial-gradient(60% 60% at 0% 100%, oklch(0.85 0.10 200 / 0.22), transparent 60%),
    linear-gradient(160deg, oklch(var(--glass-c) / 0.65), oklch(var(--glass-c) / 0.4));
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 30px 80px -30px oklch(0 0 0 / 0.2);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  overflow: hidden;
}
.case::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, oklch(0 0 0 / 0.03) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(to bottom, oklch(0 0 0 / 0.03) 1px, transparent 1px) 0 0 / 40px 40px;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 50%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 100% at 50% 50%, #000 20%, transparent 70%);
}
@media (max-width: 900px) {
  .case { grid-template-columns: 1fr; }
}
.case-copy { position: relative; z-index: 2; }
.case-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid oklch(0.55 0.18 var(--accent-h) / 0.35);
  background: oklch(0.55 0.18 var(--accent-h) / 0.08);
  color: var(--accent);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.case-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }
.case-title {
  margin: 22px 0 10px;
  font-size: clamp(36px, 4.4vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1;
}
html[lang="he"] .case-title { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.02em; }
.case-sub { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); }
.case-body { margin: 20px 0 28px; color: var(--fg-dim); font-size: clamp(15px, 1.2vw, 17px); max-width: 52ch; line-height: 1.55; }
.case-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px;
  margin-bottom: 28px; padding-top: 24px;
  border-top: 1px solid var(--line);
}
.case-meta .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); margin-bottom: 4px; }
.case-meta .val { font-size: 14px; color: var(--fg); }

/* Phone stack */
.case-phones {
  position: relative;
  z-index: 2;
  height: 560px;
  display: flex; align-items: center; justify-content: center;
  perspective: 1400px;
}
@media (max-width: 900px) { .case-phones { height: 480px; } }
.case-phone {
  position: absolute;
  width: 220px;
  aspect-ratio: 9/19.5;
  border-radius: 32px;
  padding: 8px;
  background: linear-gradient(160deg, oklch(0.28 0.01 260), oklch(0.14 0.01 260));
  border: 1px solid oklch(0 0 0 / 0.2);
  box-shadow:
    0 40px 80px -20px oklch(0 0 0 / 0.35),
    inset 0 1px 0 oklch(var(--glass-c) / 0.08);
  transition: transform .8s var(--ease-out), opacity .8s var(--ease-out), filter .8s var(--ease-out);
  cursor: pointer;
  will-change: transform;
}
.case-phone::before {
  content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 14px; border-radius: 10px;
  background: oklch(0.08 0.01 260);
  z-index: 2;
}
.case-phone .screen {
  width: 100%; height: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: oklch(0.18 0.01 260);
  position: relative;
}
.case-phone .screen img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  display: block;
}
.case-phone[data-pos="-2"] { transform: translateX(-220px) translateZ(-200px) rotateY(22deg); opacity: 0.4; filter: blur(2px); }
.case-phone[data-pos="-1"] { transform: translateX(-120px) translateZ(-80px) rotateY(16deg); opacity: 0.85; }
.case-phone[data-pos="0"]  { transform: translateZ(40px) rotateY(0deg); z-index: 3; box-shadow: 0 60px 120px -30px oklch(0 0 0 / 0.45), 0 0 80px -10px oklch(0.78 0.18 var(--accent-h) / 0.4); }
.case-phone[data-pos="1"]  { transform: translateX(120px) translateZ(-80px) rotateY(-16deg); opacity: 0.85; }
.case-phone[data-pos="2"]  { transform: translateX(220px) translateZ(-200px) rotateY(-22deg); opacity: 0.4; filter: blur(2px); }

html[dir="rtl"] .case-phone[data-pos="-2"] { transform: translateX(220px) translateZ(-200px) rotateY(-22deg); }
html[dir="rtl"] .case-phone[data-pos="-1"] { transform: translateX(120px) translateZ(-80px) rotateY(-16deg); }
html[dir="rtl"] .case-phone[data-pos="1"]  { transform: translateX(-120px) translateZ(-80px) rotateY(16deg); }
html[dir="rtl"] .case-phone[data-pos="2"]  { transform: translateX(-220px) translateZ(-200px) rotateY(22deg); }

.case-dots {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px;
  z-index: 5;
}
.case-dots button {
  width: 32px; height: 3px; border-radius: 2px;
  background: oklch(0 0 0 / 0.12);
  transition: background .3s, width .3s;
}
.case-dots button.on { background: var(--accent); width: 48px; }

.case-screen-name {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  padding: 6px 14px; border-radius: 999px;
  background: oklch(var(--glass-c) / 0.85);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim);
  z-index: 10;
}

.case-view {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 500; font-size: 14px;
  transition: transform .3s var(--ease-out), box-shadow .3s;
}
.case-view:hover { transform: translateY(-2px); box-shadow: 0 10px 40px -10px var(--accent); }
.projects {
  position: relative;
}
.proj-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 460px; gap: 18px;
}
.proj-grid > * { height: 100%; min-height: 0; }
.proj-grid .reveal { display: flex; }
.proj-grid .proj { width: 100%; height: 100%; }
@media (max-width: 1000px) { .proj-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .proj-grid { grid-template-columns: 1fr; grid-auto-rows: 360px; } }

.proj {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  isolation: isolate;
  cursor: pointer;
  transition: transform .6s var(--ease-out), border-color .4s;
  transform-style: preserve-3d;
  perspective: 1000px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.proj:hover { border-color: var(--line-strong); }
.proj { background: oklch(var(--glass-c) / 0.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.proj::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 50%), oklch(1 1 1 / 0.4), transparent 45%);
  opacity: 0; transition: opacity .4s; mix-blend-mode: overlay;
}
.proj:hover::after { opacity: 1; }
.proj .canvas {
  position: absolute; inset: 0; z-index: 0;
  transition: transform .8s var(--ease-out);
}
.proj:hover .canvas { transform: scale(1.04); }

.proj .meta {
  position: relative; z-index: 2;
  padding: 24px; background: linear-gradient(to top, oklch(var(--glass-c) / 0.92), oklch(var(--glass-c) / 0.4) 70%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.proj .meta .cat { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); }
.proj .meta h3 { font-size: clamp(20px, 1.6vw, 26px); margin-top: 6px; letter-spacing: -0.02em; }
.proj .meta .row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.proj .meta .link {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  transition: background .3s, color .3s, border-color .3s;
}
.proj:hover .meta .link { background: var(--accent); color: white; border-color: var(--accent); }
.proj.wide { grid-column: span 1; }
@media (min-width: 1001px) {
  .proj.tall { grid-row: span 1; }
  .proj.big { grid-column: span 1; grid-row: span 1; }
}

/* project card entrance: 3D flip-in instead of plain fade */
.proj-grid .reveal { animation-name: proj-in; }
@keyframes proj-in {
  from { opacity: 0; transform: translateY(36px) rotateX(12deg) scale(.97); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* marquee: pause + highlight on hover */
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { transition: color .3s, transform .3s; }
.marquee-track span:hover { color: var(--fg); transform: scale(1.08); }
.c-rush {
  background:
    radial-gradient(80% 60% at 70% 20%, oklch(0.85 0.14 var(--accent-h) / 0.45), transparent 60%),
    radial-gradient(80% 60% at 20% 90%, oklch(0.85 0.12 200 / 0.4), transparent 60%),
    linear-gradient(160deg, oklch(0.97 0.005 260), oklch(0.94 0.008 260));
}
.c-rush .phone {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-8deg);
  width: 150px; aspect-ratio: 9/19; border-radius: 28px;
  background: oklch(0.18 0.01 260);
  border: 1px solid oklch(0 0 0 / 0.2);
  box-shadow: 0 40px 80px -20px oklch(0 0 0 / 0.3);
  padding: 10px;
}
.c-rush .phone .screen {
  width: 100%; height: 100%; border-radius: 20px; background: linear-gradient(160deg, oklch(0.22 0.01 260), oklch(0.16 0.01 260));
  padding: 12px 10px; display: flex; flex-direction: column; gap: 6px;
  font-family: var(--font-mono); font-size: 8px; color: var(--fg-dim);
}
.c-rush .phone .screen .h { height: 18px; border-radius: 5px; background: oklch(var(--glass-c) / 0.04); }
.c-rush .phone .screen .card { height: 32px; border-radius: 5px; background: oklch(var(--glass-c) / 0.05); display:flex; align-items:center; padding: 0 8px; justify-content: space-between; }
.c-rush .phone .screen .card.on { background: var(--accent); color: var(--bg); }

.c-atlas {
  background:
    radial-gradient(90% 80% at 50% 20%, oklch(0.92 0.04 var(--accent-h)), transparent 70%),
    linear-gradient(160deg, oklch(0.98 0.005 260), oklch(0.95 0.005 260));
  overflow: hidden;
}
.c-atlas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.c-atlas .sparkline { stroke: var(--accent); stroke-width: 1.5; fill: none; filter: drop-shadow(0 0 10px var(--accent)); }
.c-atlas .grid-l { stroke: oklch(0 0 0 / 0.08); stroke-width: 0.5; }

.c-halo {
  background:
    conic-gradient(from 120deg at 50% 50%, oklch(0.85 0.10 var(--accent-h)), oklch(0.86 0.10 320), oklch(0.85 0.10 200), oklch(0.85 0.10 var(--accent-h))),
    oklch(0.96 0.005 260);
  overflow: hidden;
}
.c-halo .ring {
  position: absolute; top: 50%; left: 50%;
  width: 260px; height: 260px; border-radius: 50%;
  border: 1px solid oklch(0 0 0 / 0.15);
  transform: translate(-50%, -50%);
}
.c-halo .ring.b { width: 360px; height: 360px; border-color: oklch(0 0 0 / 0.08); }
.c-halo .ring.c { width: 460px; height: 460px; border-color: oklch(0 0 0 / 0.04); }
.c-halo .dot {
  position: absolute; top: 50%; left: 50%;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 30px var(--accent);
  transform: translate(-50%, -50%);
  animation: orbit 12s linear infinite;
  transform-origin: 0 0;
}
html.motion-reduced .c-halo .dot { animation: none; }
@keyframes orbit {
  from { transform: translate(-50%, -50%) rotate(0deg) translateX(130px) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg) translateX(130px) rotate(-360deg); }
}

.c-forge {
  background:
    linear-gradient(160deg, oklch(0.96 0.02 60), oklch(0.94 0.005 260));
  overflow: hidden;
  padding: 24px;
}
.c-forge .browser {
  position: absolute; top: 40px; left: 40px; right: -40px; bottom: -40px;
  border-radius: 14px; border: 1px solid var(--line-strong);
  background: white;
  box-shadow: 0 30px 60px -20px oklch(0 0 0 / 0.25);
  overflow: hidden;
}
.c-forge .browser .bar { height: 32px; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 12px; gap: 6px; }
.c-forge .browser .bar i { width: 9px; height: 9px; border-radius: 50%; background: oklch(0 0 0 / 0.12); }
.c-forge .browser .pane { padding: 16px; display: grid; grid-template-columns: 60px 1fr; gap: 12px; height: calc(100% - 32px); }
.c-forge .browser .side { background: oklch(0 0 0 / 0.04); border-radius: 8px; }
.c-forge .browser .main { background: oklch(0 0 0 / 0.03); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.c-forge .browser .row { height: 10px; border-radius: 3px; background: oklch(0 0 0 / 0.07); }
.c-forge .browser .row.w70 { width: 70%; background: var(--accent); opacity: 0.5; }

.c-pulse {
  background: linear-gradient(160deg, oklch(0.95 0.008 260), oklch(0.92 0.01 var(--accent-h)));
  overflow: hidden;
}
.c-pulse .wave { position: absolute; inset: 0; }
.c-pulse .wave path { stroke: var(--accent); stroke-width: 1.2; fill: none; opacity: 0.7; }

/* Image-based project canvases (real portfolio shots) */
.canvas-img-wrap {
  position: absolute; inset: 0;
  overflow: hidden;
  display: grid; place-items: center;
}
.canvas-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform .9s var(--ease-out), filter .6s;
  filter: saturate(1.05);
}
.proj:hover .canvas-img { transform: scale(1.04); filter: saturate(1.15); }

/* Psifas — Hebrew poetry magazine: warm paper-cream backdrop */
.c-psifas {
  background:
    radial-gradient(80% 70% at 30% 20%, oklch(0.94 0.04 80 / 0.6), transparent 60%),
    linear-gradient(160deg, oklch(0.97 0.01 80), oklch(0.93 0.02 60));
}
.c-psifas .canvas-img { object-position: center 18%; }

/* Chess — desktop screenshot with rich wood tones */
.c-chess {
  background: linear-gradient(160deg, oklch(0.22 0.02 60), oklch(0.14 0.01 40));
}
.c-chess .canvas-img { object-fit: contain; padding: 16px; background: oklch(0.18 0.015 50); }

/* Zecher LaChurban — deep navy mobile app */
.c-zecher {
  background:
    radial-gradient(70% 70% at 50% 30%, oklch(0.42 0.07 230 / 0.7), transparent 70%),
    linear-gradient(160deg, oklch(0.28 0.04 240), oklch(0.18 0.03 240));
  display: grid; place-items: center;
}
.c-zecher .canvas-img-wrap {
  display: grid; place-items: center;
  padding: 28px;
}
.c-zecher .canvas-img {
  width: auto; height: 100%;
  max-width: 60%;
  border-radius: 28px;
  box-shadow:
    0 30px 60px -20px oklch(0 0 0 / 0.5),
    0 0 0 8px oklch(0.12 0.01 240),
    0 0 0 9px oklch(var(--glass-c) / 0.08);
  object-fit: cover;
  object-position: center top;
}

/* Mekor HaBeracha — mystic teal/violet android app */
.c-mekor {
  background:
    radial-gradient(70% 70% at 50% 30%, oklch(0.55 0.12 220 / 0.5), transparent 70%),
    linear-gradient(160deg, oklch(0.32 0.06 260), oklch(0.20 0.05 280));
  display: grid; place-items: center;
}
.c-mekor .canvas-img-wrap {
  display: grid; place-items: center;
  padding: 28px;
}
.c-mekor .canvas-img {
  width: auto; height: 100%;
  max-width: 60%;
  border-radius: 28px;
  box-shadow:
    0 30px 60px -20px oklch(0 0 0 / 0.5),
    0 0 0 8px oklch(0.10 0.01 260),
    0 0 0 9px oklch(var(--glass-c) / 0.08);
  object-fit: cover;
  object-position: center top;
}

/* ---------- Process ---------- */
.process {
  position: relative;
}
.timeline {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
}
@media (max-width: 960px) { .timeline { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .timeline { grid-template-columns: 1fr; } }
.timeline::before {
  content: ""; position: absolute; left: 0; right: 0; top: 40px; height: 1px;
  background: linear-gradient(to right, transparent, var(--line-strong) 10%, var(--line-strong) 90%, transparent);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 1.4s var(--ease-out);
}
html[dir="rtl"] .timeline::before { transform-origin: 100% 50%; }
.timeline.in::before { transform: scaleX(1); }
html.motion-reduced .timeline::before { transform: scaleX(1); transition: none; }
.step {
  position: relative; padding: 0 28px 32px 0;
}
.step .node {
  position: relative;
  width: 80px; height: 80px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 14px; color: var(--fg);
  background: oklch(var(--glass-c) / 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong);
  z-index: 2;
  transition: border-color .5s, color .4s;
}
.step .node::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid transparent; transition: border-color .5s, transform .5s;
}
.step.in .node { border-color: var(--accent); color: var(--accent); }
.step.in .node::after { border-color: oklch(0.82 0.18 var(--accent-h) / 0.3); }
.step h3 { margin: 28px 0 10px; font-size: 22px; letter-spacing: -0.02em; }
.step p { color: var(--fg-dim); font-size: 14px; max-width: 30ch; }
.step .tag-row { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.step .tag-row span { font-family: var(--font-mono); font-size: 11px; color: var(--fg-mute); }
.step .tag-row span::before { content: "—"; margin-right: 6px; opacity: 0.5; }

/* ---------- Proof ---------- */
.proof-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 960px) { .proof-grid { grid-template-columns: 1fr; } }
.quote {
  padding: 32px; border-radius: var(--radius-lg);
  border: 1px solid oklch(var(--glass-c) / 0.7);
  background: linear-gradient(180deg, oklch(var(--glass-c) / 0.7), oklch(var(--glass-c) / 0.45));
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 20px 60px -30px oklch(0 0 0 / 0.18);
  display: flex; flex-direction: column; gap: 20px;
  min-height: 280px;
  transition: border-color .3s, transform .5s var(--ease-out);
}
.quote:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.quote .mark {
  font-family: var(--font-serif); font-size: 64px; line-height: 0.8;
  color: var(--accent);
}
.quote blockquote { font-size: 17px; line-height: 1.5; color: var(--fg); }
.quote .by { margin-top: auto; display: flex; align-items: center; gap: 12px; }
.quote .ava {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--plasma));
}
.quote .who { font-size: 14px; }
.quote .who small { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--fg-mute); margin-top: 2px; }

.metrics-row {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.metrics-row > div { padding-right: 18px; border-right: 1px solid var(--line); }
.metrics-row > div:last-child { border-right: 0; }
.metrics-row .k { font-size: clamp(28px, 3vw, 44px); letter-spacing: -0.03em; }
.metrics-row .k em { font-family: var(--font-serif); color: var(--accent); font-style: italic; font-weight: 400; }
.metrics-row .l { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-mute); margin-top: 8px; }
@media (max-width: 720px) {
  .metrics-row { grid-template-columns: repeat(2, 1fr); gap: 18px 0; }
  .metrics-row > div:nth-child(2) { border-right: 0; }
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
}
.cta-inner {
  position: relative;
  padding: clamp(48px, 7vw, 110px);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(var(--glass-c) / 0.7);
  background:
    radial-gradient(120% 80% at 0% 0%, oklch(0.78 0.18 var(--accent-h) / 0.18), transparent 60%),
    radial-gradient(120% 80% at 100% 100%, oklch(0.78 0.15 320 / 0.18), transparent 60%),
    linear-gradient(160deg, oklch(var(--glass-c) / 0.7), oklch(var(--glass-c) / 0.5));
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 30px 80px -40px oklch(0 0 0 / 0.25);
  overflow: hidden;
}
.cta-inner::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, oklch(0 0 0 / 0.04) 1px, transparent 1px) 0 0 / 60px 60px,
    linear-gradient(to bottom, oklch(0 0 0 / 0.04) 1px, transparent 1px) 0 0 / 60px 60px;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 50%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 100% at 50% 50%, #000 20%, transparent 70%);
  pointer-events: none;
}
.cta h2 {
  font-size: clamp(42px, 6vw, 96px); letter-spacing: -0.035em; line-height: 0.95;
  max-width: 14ch;
}
.cta h2 em { font-family: var(--font-serif); font-weight: 400; font-style: italic; color: var(--accent); }
.cta p.lede { margin: 20px 0 32px; max-width: 50ch; }
.cta-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line);
}
@media (max-width: 720px) { .cta-meta { grid-template-columns: 1fr; } }
.cta-meta .lbl { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-mute); margin-bottom: 6px; }
.cta-meta .val { font-size: 15px; }

/* ---------- Footer ---------- */
footer {
  position: relative; z-index: 2;
  padding: 80px var(--pad-x) 40px;
  border-top: 1px solid var(--line);
}
.foot {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px;
}
@media (max-width: 820px) { .foot { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .foot { grid-template-columns: 1fr; } }
.foot h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); margin-bottom: 16px; font-weight: 500; }
.foot ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--fg-dim); }
.foot ul a { transition: color .2s; }
.foot ul a:hover { color: var(--fg); }
.foot-top { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.foot-top .logo-mark { width: 28px; height: 28px; object-fit: contain; }
.foot-top .brand { font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.foot-tag {
  font-size: 14px; color: var(--fg-dim); max-width: 32ch;
}
.foot-bot {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-mute);
}
.foot-wordmark {
  margin-top: 60px;
  font-size: clamp(60px, 18vw, 280px); letter-spacing: -0.05em; line-height: 0.85; font-weight: 500;
  background: linear-gradient(180deg, oklch(0 0 0 / 0.18), oklch(0 0 0 / 0.04));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  user-select: none;
}
.foot-wordmark em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  background: linear-gradient(180deg, var(--accent), oklch(0.65 0.14 var(--accent-h)));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- Tweaks panel ---------- */
.tweaks {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  width: 280px;
  border-radius: 16px;
  background: oklch(var(--glass-c) / 0.85);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px -30px oklch(0 0 0 / 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 18px;
  font-size: 13px;
  transform: translateY(calc(100% + 24px));
  transition: transform .5s var(--ease-out);
}
.tweaks.show { transform: none; }
.tweaks h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); margin-bottom: 14px; font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.tweak-row { margin-bottom: 14px; }
.tweak-row label { display: block; color: var(--fg-dim); margin-bottom: 6px; font-size: 12px; }
.tweak-row .opts { display: flex; gap: 4px; flex-wrap: wrap; }
.tweak-row .opts button {
  flex: 1;
  padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 12px; color: var(--fg-dim);
  font-family: var(--font-mono);
}
.tweak-row .opts button.on { background: var(--accent); color: white; border-color: var(--accent); }
.tweak-row input[type="range"] { width: 100%; accent-color: var(--accent); }
.tweak-row .hue-preview { display: flex; align-items: center; gap: 8px; }
.tweak-row .hue-preview i { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.tweak-row .hue-preview span { font-family: var(--font-mono); font-size: 12px; color: var(--fg); }


/* ===================== Dark theme ===================== */
html[data-theme="dark"] {
  --bg: oklch(0.16 0.012 265);
  --bg-elev: oklch(0.21 0.014 265);
  --fg: oklch(0.97 0.006 265);
  --fg-dim: oklch(0.76 0.012 265);
  --fg-mute: oklch(0.58 0.012 265);
  --line: oklch(1 0 0 / 0.10);
  --line-strong: oklch(1 0 0 / 0.20);
  --glass-c: 0.30 0.016 265;
}
html[data-theme="dark"] body {
  background-image:
    radial-gradient(1100px 700px at 80% -10%, oklch(0.6 0.16 var(--accent-h) / 0.30), transparent 60%),
    radial-gradient(900px 600px at 0% 30%, oklch(0.55 0.15 320 / 0.22), transparent 60%),
    radial-gradient(700px 500px at 50% 100%, oklch(0.6 0.12 200 / 0.22), transparent 60%);
}
html[data-theme="dark"] .noise { mix-blend-mode: screen; opacity: 0.05; }
html[data-theme="dark"] .cursor-glow { mix-blend-mode: screen; }
html[data-theme="dark"] .nav ul a:hover,
html[data-theme="dark"] .btn.ghost:hover { background: oklch(1 0 0 / 0.08); }
html[data-theme="dark"] .lang-switch { background: oklch(1 0 0 / 0.06); }
html[data-theme="dark"] .btn.primary { --_bg: var(--fg); --_fg: var(--bg); --_bd: var(--fg); }
html[data-theme="dark"] .lang-switch button.on { color: var(--bg); }
html[data-theme="dark"] .nav .nav-cta { color: var(--bg); }
html[data-theme="dark"] .nav .nav-cta:hover { color: #fff; }
html[data-theme="dark"] .service .glyph { border-color: var(--line-strong); }
html[data-theme="dark"] .hero-grid,
html[data-theme="dark"] .cta-inner::before,
html[data-theme="dark"] .case::before {
  background-image:
    linear-gradient(to right, oklch(1 0 0 / 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(1 0 0 / 0.05) 1px, transparent 1px);
}
html[data-theme="dark"] .foot-wordmark {
  background: linear-gradient(180deg, oklch(1 0 0 / 0.16), oklch(1 0 0 / 0.03));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* theme toggle button */
.theme-toggle {
  width: 34px; height: 34px; border-radius: 999px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  color: var(--fg-dim);
  transition: color .25s, background .25s, transform .5s var(--ease-out);
}
.theme-toggle:hover { color: var(--fg); background: oklch(var(--glass-c) / 0.5); transform: rotate(18deg); }
.theme-toggle svg { display: block; }
.theme-toggle .moon { display: none; }
html[data-theme="dark"] .theme-toggle .sun { display: none; }
html[data-theme="dark"] .theme-toggle .moon { display: block; }

/* ===================== Hero word reveal ===================== */
.hero h1 .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .word-in { display: inline-block; transform: translateY(110%); animation: word-up .95s var(--ease-out) forwards; }
  @keyframes word-up { to { transform: none; } }
}
html.motion-reduced .hero h1 .word-in { transform: none; animation: none; }

/* ===================== Scroll skew ===================== */
.proj-grid, .marquee-track { will-change: transform; }

/* ===================== About ===================== */
.about-inner {
  display: grid; grid-template-columns: 300px 1fr; gap: clamp(28px, 5vw, 72px); align-items: center;
}
@media (max-width: 780px) { .about-inner { grid-template-columns: 1fr; } }
.about-photo {
  position: relative; aspect-ratio: 4/5; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid oklch(var(--glass-c) / 0.6);
  box-shadow: 0 30px 70px -30px oklch(0 0 0 / 0.3);
  background: oklch(var(--glass-c) / 0.4);
  animation: photo-float 6s ease-in-out infinite;
}
@keyframes photo-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
html.motion-reduced .about-photo { animation: none; }
.about-photo image-slot { width: 100%; height: 100%; display: block; }
.about h2 { font-size: clamp(30px, 4vw, 56px); letter-spacing: -0.03em; line-height: 1.02; margin-bottom: 20px; }
.about h2 em { font-family: var(--font-serif); font-style: italic; }
.about p { color: var(--fg-dim); font-size: clamp(15px, 1.3vw, 18px); max-width: 52ch; margin-bottom: 16px; line-height: 1.6; }
.about .about-name { font-weight: 600; color: var(--fg); }
.about .about-role { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); margin-top: 4px; }

/* ===================== Contact form ===================== */
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; max-width: 640px; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form label { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); margin-bottom: 7px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 13px 16px; border-radius: 12px;
  background: oklch(var(--glass-c) / 0.5);
  border: 1px solid var(--line-strong); color: var(--fg);
  font: inherit; font-size: 15px; transition: border-color .25s, background .25s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); background: oklch(var(--glass-c) / 0.75); }
.contact-form textarea { min-height: 110px; resize: vertical; }
.contact-form .submit-row { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ===================== Project modal ===================== */
.modal-scrim {
  position: fixed; inset: 0; z-index: 200;
  background: oklch(0 0 0 / 0.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: clamp(16px, 4vw, 48px);
  opacity: 0; animation: scrim-in .35s var(--ease-out) forwards;
}
@keyframes scrim-in { to { opacity: 1; } }
.modal {
  position: relative; width: min(920px, 100%); max-height: 88vh; overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid oklch(var(--glass-c) / 0.6);
  background: linear-gradient(180deg, oklch(var(--glass-c) / 0.95), oklch(var(--glass-c) / 0.85));
  box-shadow: 0 50px 120px -40px oklch(0 0 0 / 0.5);
  transform: translateY(20px) scale(.98); opacity: 0;
  animation: modal-in .45s var(--ease-out) .05s forwards;
}
html[data-theme="dark"] .modal { background: linear-gradient(180deg, var(--bg-elev), oklch(0.17 0.013 265)); }
@keyframes modal-in { to { transform: none; opacity: 1; } }
.modal-head { padding: clamp(24px, 4vw, 40px) clamp(24px, 4vw, 40px) 20px; }
.modal-head .cat { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); }
.modal-head h3 { font-size: clamp(28px, 4vw, 46px); letter-spacing: -0.03em; margin: 8px 0 14px; }
.modal-head p { color: var(--fg-dim); font-size: 16px; line-height: 1.6; max-width: 60ch; }
.modal-gallery { display: flex; gap: 14px; overflow-x: auto; padding: 4px clamp(24px, 4vw, 40px) clamp(24px, 4vw, 40px); scroll-snap-type: x mandatory; }
.modal-gallery img { height: 460px; border-radius: 18px; scroll-snap-align: center; border: 1px solid var(--line); background: var(--bg-elev); }
.modal-gallery img.contain { object-fit: contain; }
.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  width: 38px; height: 38px; border-radius: 999px;
  display: grid; place-items: center;
  background: oklch(var(--glass-c) / 0.7); border: 1px solid var(--line-strong); color: var(--fg);
  backdrop-filter: blur(10px);
  transition: transform .3s, background .3s;
}
html[dir="rtl"] .modal-close { right: auto; left: 16px; }
.modal-close:hover { transform: rotate(90deg); background: var(--accent); color: #fff; }
