:root {
  --accent-h: 305;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Instrument Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --maxw: 1180px;
  --radius: 16px;
}
html[data-theme="dark"] {
  --bg: oklch(0.165 0.008 250);
  --bg-raise: oklch(0.205 0.01 250);
  --surface: oklch(0.225 0.012 250);
  --ink: oklch(0.95 0.005 100);
  --muted: oklch(0.71 0.012 250);
  --line: oklch(1 0 0 / 0.1);
  --line-strong: oklch(1 0 0 / 0.18);
  --accent: oklch(0.86 0.21 var(--accent-h));
  --accent-soft: oklch(0.86 0.21 var(--accent-h) / 0.12);
  --on-accent: oklch(0.18 0.03 var(--accent-h));
  --term-bg: oklch(0.13 0.008 250);
  --shadow: 0 24px 60px oklch(0 0 0 / 0.4);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: oklch(0.972 0.004 100);
  --bg-raise: oklch(0.99 0.002 100);
  --surface: oklch(1 0 0);
  --ink: oklch(0.22 0.012 250);
  --muted: oklch(0.48 0.012 250);
  --line: oklch(0 0 0 / 0.1);
  --line-strong: oklch(0 0 0 / 0.18);
  --accent: oklch(0.52 0.16 var(--accent-h));
  --accent-soft: oklch(0.52 0.16 var(--accent-h) / 0.1);
  --on-accent: oklch(0.985 0.005 100);
  --term-bg: oklch(0.21 0.012 250);
  --shadow: 0 24px 60px oklch(0 0 0 / 0.12);
  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}
a { color: inherit; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
em { font-style: normal; color: var(--accent); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 14px 0 0;
  text-wrap: balance;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn svg { flex: 0 0 auto; }
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 6px 24px var(--accent-soft);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px oklch(0.86 0.21 var(--accent-h) / 0.3); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 14.5px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}
.brand {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand b { color: var(--accent); font-weight: 500; }
.nav-links { display: flex; gap: 26px; margin-left: 12px; }
.nav-links a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.lang-switch {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-switch button {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  background: none;
  border: none;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-switch button.active { background: var(--ink); color: var(--bg); }

.theme-toggle, .icon-link {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: none;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(20deg); }
.icon-link { text-decoration: none; }
.icon-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
html[data-theme="light"] .icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 75% 90% at 70% 10%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 75% 90% at 70% 10%, black 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  padding-block: 92px 96px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.4vw, 64px);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 22px 0 24px;
  text-wrap: balance;
}
.hero-sub {
  font-size: 19px;
  color: var(--muted);
  max-width: 54ch;
  text-wrap: pretty;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-loc {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 30px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.hero-loc .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* hero visual: photo + terminal composition */
.hero-visual { position: relative; width: 100%; max-width: 470px; justify-self: end; }
.hero-photo {
  display: block;
  width: min(58%, 254px);
  height: auto; /* override the height attribute so aspect-ratio wins */
  aspect-ratio: 1 / 0.92;
  object-fit: cover;
  margin-left: auto;
  margin-right: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  transition: opacity 0.6s ease;
}

/* terminal card */
.terminal {
  background: var(--term-bg);
  border: 1px solid oklch(1 0 0 / 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  width: min(86%, 410px);
  margin: -30px auto 0 0;
  transform: rotate(-1.3deg);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid oklch(1 0 0 / 0.08);
}
.terminal-bar .tdot { width: 11px; height: 11px; border-radius: 50%; background: oklch(1 0 0 / 0.16); }
.terminal-bar .ttitle {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: oklch(0.72 0.01 250);
}
.terminal-body {
  padding: 22px 22px 26px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 2.05;
  color: oklch(0.86 0.01 250);
  display: flex;
  flex-direction: column;
}
.tline { opacity: 0; }
.tline.t-cmd { color: oklch(0.95 0.005 100); }
.tline.t-done { color: oklch(0.86 0.21 var(--accent-h)); font-weight: 500; margin-top: 6px; }
.tline.t-done::after {
  content: "";
  display: inline-block;
  width: 9px;
  height: 17px;
  background: oklch(0.86 0.21 var(--accent-h));
  margin-left: 7px;
  vertical-align: -3px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes lineIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .tline { animation: lineIn 0.45s ease forwards; }
  .tline:nth-child(1) { animation-delay: 0.3s; }
  .tline:nth-child(2) { animation-delay: 0.9s; }
  .tline:nth-child(3) { animation-delay: 1.5s; }
  .tline:nth-child(4) { animation-delay: 2.1s; }
  .tline:nth-child(5) { animation-delay: 2.7s; }
  .tline:nth-child(6) { animation-delay: 3.4s; }
}
@media (prefers-reduced-motion: reduce) {
  .tline { opacity: 1; }
  .tline.t-done::after { animation: none; }
}

/* ---------- Stack strip ---------- */
.stack { border-bottom: 1px solid var(--line); }
.stack-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 34px;
  padding-block: 22px;
}
.stack-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.stack-items { display: flex; flex-wrap: wrap; gap: 10px 30px; }
.stack-items span {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.82;
}

/* ---------- Value props ---------- */
.vprops {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-block: 64px;
}
.vprop { display: flex; flex-direction: column; gap: 8px; }
.vprop h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.015em;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.vprop h3::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--accent);
  flex: 0 0 auto;
  transform: rotate(45deg) translateY(-1px);
}
.vprop p { color: var(--muted); font-size: 15.5px; text-wrap: pretty; }

/* ---------- Sections ---------- */
section.block { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }

/* services */
#services { border-top: 1px solid var(--line); }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.svc-card {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.svc-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.svc-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.svc-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.svc-card > p { color: var(--muted); font-size: 15.5px; text-wrap: pretty; }
.svc-list {
  list-style: none;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.svc-list li {
  font-size: 14.5px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.svc-list li::before { content: "+"; font-family: var(--font-mono); color: var(--accent); font-weight: 500; }

/* selected work */
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.work-card {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.work-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.work-shot {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.work-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.4s ease;
}
.work-card:hover .work-shot img { transform: scale(1.04); }
.work-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 8px; }
.work-tag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.work-body h3 {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.work-body p { color: var(--muted); font-size: 15px; text-wrap: pretty; }

/* CTA band */
.band {
  border-block: 1px solid var(--line);
  background: var(--accent-soft);
}
.band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 40px;
  padding-block: 44px;
}
.band-copy { flex: 1 1 380px; }
.band-copy h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.band-copy p { color: var(--muted); margin-top: 6px; }

/* process */
#process { border-top: 1px solid var(--line); }
.proc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  counter-reset: step;
}
.proc-step {
  position: relative;
  padding: 30px 26px 8px 0;
  border-top: 2px solid var(--line-strong);
}
.proc-step::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 46px;
  height: 2px;
  background: var(--accent);
}
.proc-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.proc-step h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin: 10px 0 8px;
}
.proc-step p { color: var(--muted); font-size: 15px; text-wrap: pretty; }

/* testimonials */
#clients { border-top: 1px solid var(--line); }
.ts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ts-card {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ts-mark {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 800;
  line-height: 0.6;
  color: var(--accent);
  height: 22px;
}
.ts-quote { font-size: 15.5px; color: var(--muted); text-wrap: pretty; flex: 1; }
.ts-person { display: flex; align-items: center; gap: 14px; }
.ts-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  flex: 0 0 auto;
}
.ts-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.ts-role { font-size: 13.5px; color: var(--muted); }

/* final CTA */
.final {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 110px 0 100px;
  position: relative;
  overflow: hidden;
}
.final::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -120px;
  transform: translateX(-50%);
  width: 620px;
  height: 320px;
  background: radial-gradient(ellipse at center, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.final h2 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}
.final p { color: var(--muted); font-size: 19px; margin: 18px auto 38px; max-width: 46ch; }
.final-ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; position: relative; }
.final-mail {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
}
.final-mail a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent); }

/* footer */
footer {
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 30px;
  padding-block: 30px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}
.foot-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(64px, 12vw, 168px);
  letter-spacing: -0.04em;
  line-height: 0.86;
  text-align: center;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  user-select: none;
  margin-bottom: -0.14em;
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; padding-block: 64px 72px; }
  .hero-visual { justify-self: start; }
  .vprops, .svc-grid, .ts-grid, .work-grid { grid-template-columns: 1fr; }
  .proc-grid { grid-template-columns: 1fr 1fr; gap: 26px 30px; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .proc-grid { grid-template-columns: 1fr; }
  .nav-cta { display: none; }
  body { font-size: 16px; }
}
