/* =========================================================
   Smiltis Žilinskas — portfolio
   Palette: ink black + acid lime, violet as a quiet second accent
   ========================================================= */

:root {
  --bg: #09090c;
  --bg-2: #0e0f13;
  --surface: #121318;
  --surface-2: #181a20;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #edeef2;
  --muted: #979aa6;
  --dim: #5f626d;
  --lime: #cbff4d;
  --lime-soft: rgba(203, 255, 77, 0.1);
  --lime-ink: #0d1100;
  --violet: #9b8cff;

  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
button { font: inherit; }

::selection { background: var(--lime); color: var(--lime-ink); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 8px; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 600;
}
.skip-link:focus { left: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.25s;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn:hover { transform: translateY(-2px); }

.btn--primary { background: var(--lime); color: var(--lime-ink); }
.btn--primary:hover { box-shadow: 0 12px 32px -12px rgba(203, 255, 77, 0.6); }

.btn--ghost { border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.04); }

.btn--dark { background: var(--bg); color: var(--text); }
.btn--dark:hover { box-shadow: 0 16px 32px -14px rgba(0, 0, 0, 0.55); }
.btn--dark svg { color: var(--lime); }

.btn--outline-dark { border-color: rgba(13, 17, 0, 0.35); color: var(--lime-ink); }
.btn--outline-dark:hover { background: rgba(13, 17, 0, 0.06); border-color: rgba(13, 17, 0, 0.6); }

.btn--sm { height: 40px; padding: 0 18px; font-size: 14.5px; }
.btn--sm:hover { transform: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.nav.is-scrolled,
.nav-open .nav {
  background: rgba(9, 9, 12, 0.78);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  backdrop-filter: saturate(150%) blur(16px);
  border-color: var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 20px; height: 72px; }

.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.035em; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--lime);
  color: var(--lime-ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  transition: transform 0.3s var(--ease);
}
.brand:hover .brand__mark { transform: rotate(-8deg); }

.nav__links { display: flex; gap: 2px; }
.nav__links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  transition: color 0.2s, background-color 0.2s;
}
.nav__links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: transparent;
  cursor: pointer;
}
.nav__toggle span { width: 16px; height: 1.5px; background: var(--text); transition: transform 0.25s var(--ease); }
.nav-open .nav__toggle span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-open .nav__toggle span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; padding: 160px 0 100px; }

.hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 60% 0%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 65% at 60% 0%, #000 25%, transparent 75%);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px circle at 85% 10%, rgba(203, 255, 77, 0.14), transparent 60%),
    radial-gradient(520px circle at 5% 70%, rgba(155, 140, 255, 0.1), transparent 60%);
}

.hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: center; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(203, 255, 77, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(203, 255, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(203, 255, 77, 0); }
}

.hero__title {
  margin: 28px 0 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5.6vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero__title em { font-style: normal; color: var(--lime); }

.hero__lead { max-width: 54ch; color: var(--muted); font-size: clamp(1.05rem, 1.4vw, 1.2rem); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 48px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; }
.stats dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.035em;
}
.stats dd span { color: var(--lime); }
.stats dt { max-width: 17ch; color: var(--muted); font-size: 14px; line-height: 1.4; }

/* Hero visual — animated pipeline */
.hero__visual { position: relative; }

.flow {
  position: relative;
  padding: 8px;
  border: 1px solid var(--line-2);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.flow__bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px 14px; }
.flow__dots { display: flex; gap: 6px; }
.flow__dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a2c34; }
.flow__bar code { margin-left: 6px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.flow__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
}
.flow__live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2.4s infinite; }

.flow__body { padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); }
.flow__step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  transition: background-color 0.3s;
}
.flow__step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 24.5px;
  top: 38px;
  bottom: -12px;
  width: 1.5px;
  background: var(--line-2);
  transition: background-color 0.4s;
}
.flow__step.is-done:not(:last-child)::before { background: rgba(203, 255, 77, 0.45); }
.flow__step.is-running { background: rgba(255, 255, 255, 0.035); }

.flow__state {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px dashed var(--dim);
  transition: background-color 0.3s, border-color 0.3s;
}
.flow__step.is-running .flow__state {
  border: 2px solid rgba(203, 255, 77, 0.2);
  border-top-color: var(--lime);
  animation: spin 0.7s linear infinite;
}
.flow__step.is-done .flow__state { border: 0; background: var(--lime); }
.flow__step.is-done .flow__state::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 4.5px;
  width: 5px;
  height: 10px;
  border: solid var(--lime-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
@keyframes spin { to { transform: rotate(360deg); } }

.flow__label { font-size: 15px; color: var(--dim); transition: color 0.3s; }
.flow__step.is-running .flow__label,
.flow__step.is-done .flow__label { color: var(--text); }
.flow__meta {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}
.flow__foot {
  display: flex;
  justify-content: space-between;
  padding: 14px 14px 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
}
.flow__foot strong { color: var(--lime); font-weight: 500; }

.float {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(18, 19, 24, 0.88);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 12.5px;
  white-space: nowrap;
  animation: float 7s ease-in-out infinite;
}
.float i { width: 8px; height: 8px; border-radius: 2px; background: var(--violet); }
.float--a { top: -22px; right: -18px; }
.float--b { bottom: -56px; left: -24px; animation-delay: -3.5s; }
.float--b i { background: var(--lime); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  padding: 24px 0;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; gap: 44px; padding-right: 44px; }
.marquee__group span {
  display: inline-flex;
  align-items: center;
  gap: 44px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--muted);
  white-space: nowrap;
}
.marquee__group span::after {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--lime);
  transform: rotate(45deg);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 9vw, 120px) 0; }
.section--tight { padding-top: clamp(40px, 6vw, 80px); }
.section--alt {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.018) 12%, rgba(255, 255, 255, 0.018) 88%, transparent);
}

.section__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px 48px;
  margin-bottom: 56px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--lime);
}
.eyebrow::before { content: ""; width: 20px; height: 1px; background: currentColor; }
.eyebrow--dark { color: var(--lime-ink); }

.h2 {
  max-width: 17ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.section__intro { max-width: 42ch; color: var(--muted); font-size: 1.05rem; }

/* ---------- Cards (shared) ---------- */
.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.3s;
}
.card:hover { border-color: var(--line-2); }
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(203, 255, 77, 0.075), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.spot:hover::before { opacity: 1; }

.card h3 {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.42rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.card p { color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service--wide { grid-column: span 2; }
.service h3 { margin-bottom: 10px; }
.service p { max-width: 52ch; }

.service__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 30px;
  border: 1px solid rgba(203, 255, 77, 0.2);
  border-radius: 14px;
  background: var(--lime-soft);
  color: var(--lime);
}
.service__icon svg { width: 22px; height: 22px; }

.service__split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: end; height: 100%; }

.pipeline { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.pipeline span {
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
}
.pipeline i { width: 1.5px; height: 14px; margin-left: 22px; background: linear-gradient(var(--line-2), var(--lime)); }
.pipeline .pipeline__out { border-color: rgba(203, 255, 77, 0.4); background: var(--lime-soft); color: var(--lime); }

.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.modules li {
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.modules li:hover { color: var(--lime); border-color: rgba(203, 255, 77, 0.35); }

/* ---------- Work ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter {
  padding: 11px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}
.filter:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.filter[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.filter span { margin-left: 7px; font-family: var(--font-mono); font-size: 11px; opacity: 0.55; }

.projects { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; gap: 16px; }
.project { display: flex; flex-direction: column; gap: 14px; min-height: 270px; }
.project[hidden] { display: none; }
.project--feature { grid-column: span 2; }
.project--feature h3 { max-width: 24ch; font-size: clamp(1.6rem, 2.4vw, 2.05rem); }
.project .tags { margin-top: auto; padding-top: 10px; }

.project__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--dim);
}
.project__industry { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.project__industry::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }


.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; margin: 6px 0 2px; }
.checklist li { position: relative; padding-left: 28px; font-size: 15px; line-height: 1.45; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(203, 255, 77, 0.3);
  border-radius: 6px;
  background: var(--lime-soft);
}
.checklist li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 5.5px;
  width: 4px;
  height: 8px;
  border: solid var(--lime);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.metric { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-block: 1px solid var(--line); }
.metric strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.1rem;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--lime);
}
.metric span { max-width: 16ch; color: var(--muted); font-size: 14px; line-height: 1.35; }

.sources { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sources span {
  padding: 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.sources svg { width: 18px; height: 18px; color: var(--dim); }
.sources .sources__out { border-color: rgba(203, 255, 77, 0.4); background: var(--lime-soft); color: var(--lime); }

.work__note { margin-top: 28px; color: var(--muted); font-size: 15px; }
.work__note strong { color: var(--text); font-weight: 600; }

/* ---------- Statement ---------- */
.statement { padding: clamp(56px, 8vw, 96px) 0; border-block: 1px solid var(--line); }
.statement__text {
  max-width: 26ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.4vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.statement__text span { color: var(--dim); }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { display: flex; flex-direction: column; gap: 12px; padding-top: 32px; }
.step__num { margin-bottom: 18px; font-family: var(--font-mono); font-size: 13px; color: var(--lime); }
.step__num::after { content: ""; display: block; width: 100%; height: 1px; margin-top: 14px; background: linear-gradient(90deg, var(--lime), transparent 70%); opacity: 0.5; }

/* ---------- Stack ---------- */
.stack { border-bottom: 1px solid var(--line); }
.stack__row { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.stack__row h3 {
  padding-top: 9px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.stack__row ul { display: flex; flex-wrap: wrap; gap: 8px; }
.stack__row li {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 15px;
  transition: color 0.2s, border-color 0.2s;
}
.stack__row li:hover { color: var(--lime); border-color: rgba(203, 255, 77, 0.35); }

/* ---------- Contact ---------- */
.contact { padding: clamp(40px, 6vw, 80px) 0 clamp(72px, 9vw, 120px); }
.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(36px, 7vw, 96px);
  border-radius: 32px;
  background: var(--lime);
  color: var(--lime-ink);
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(13, 17, 0, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 17, 0, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 60% 90% at 100% 50%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 90% at 100% 50%, #000, transparent 75%);
}
.cta::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -160px;
  z-index: -1;
  width: 460px;
  height: 460px;
  border: 1px solid rgba(13, 17, 0, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(13, 17, 0, 0.04), 0 0 0 120px rgba(13, 17, 0, 0.03);
}
.cta__title {
  max-width: 18ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.cta__text { max-width: 46ch; margin: 22px 0 36px; font-size: 1.1rem; color: rgba(13, 17, 0, 0.72); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta__meta { margin-top: 28px; font-family: var(--font-mono); font-size: 13px; color: rgba(13, 17, 0, 0.6); }

/* ---------- Footer ---------- */
.footer { padding: 28px 0 36px; border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer a { color: var(--muted); transition: color 0.2s; }
.footer a:hover { color: var(--lime); }

/* ---------- Legal pages ---------- */
.legal { padding: 140px 0 96px; }
.legal__inner { max-width: calc(760px + var(--gutter) * 2); }
.legal__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.legal__updated { margin: 14px 0 48px; font-family: var(--font-mono); font-size: 13px; color: var(--dim); }
.legal h2 {
  margin: 44px 0 12px;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}
.legal p { margin-bottom: 14px; color: var(--muted); }
.legal p strong { color: var(--text); font-weight: 600; }
.legal p a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s var(--ease) calc(var(--d, 0) * 80ms),
    transform 0.8s var(--ease) calc(var(--d, 0) * 80ms),
    border-color 0.3s;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero { padding-top: 140px; }
  .hero__grid { grid-template-columns: 1fr; gap: 80px; }
  .hero__visual { width: 100%; max-width: 560px; }

  .services { grid-template-columns: repeat(2, 1fr); }
  .service--full-md { grid-column: span 2; }

  .projects { grid-template-columns: repeat(2, 1fr); }
  .project--wide-md { grid-column: span 2; }

  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: fixed;
    top: 72px;
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    padding: 8px;
    border: 1px solid var(--line-2);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0.2s;
  }
  .nav-open .nav__links { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: 14px 16px; font-size: 16px; color: var(--text); }

  .section__head { grid-template-columns: 1fr; margin-bottom: 40px; }
  .service__split { grid-template-columns: 1fr; gap: 28px; }
  .checklist { grid-template-columns: 1fr; }
  .stack__row { grid-template-columns: 1fr; gap: 12px; }
  .stack__row h3 { padding-top: 0; }
}

@media (max-width: 640px) {
  .hero { padding: 116px 0 80px; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .stats dt { font-size: 12.5px; }
  .float { font-size: 11.5px; padding: 8px 12px; }
  .float--a { top: -18px; right: 8px; }
  .float--b { bottom: -46px; left: 8px; }
  .flow__step { gap: 12px; padding: 12px; }
  .flow__step:not(:last-child)::before { left: 22.5px; top: 36px; bottom: -10px; }
  .flow__label { font-size: 14px; }

  .services,
  .projects,
  .steps { grid-template-columns: 1fr; }
  .service--wide,
  .service--full-md,
  .project--feature,
  .project--wide-md { grid-column: auto; }

  .card { padding: 24px; }
  .project { min-height: 0; }
  .modules { grid-template-columns: repeat(3, 1fr); }
  .cta { border-radius: 24px; }
  .btn { height: 50px; padding: 0 20px; }
  .cta .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
