/* ============================================================
   Evgeniy Kuznetsov — Frontend Portfolio
   Design: dark canvas · glass cards · soft moon-silver accent
   ============================================================ */

:root {
  /* Palette (overridable by tweaks) */
  --bg: oklch(0.14 0.005 250);
  --bg-2: oklch(0.17 0.006 250);
  --surface: oklch(0.19 0.008 250 / 0.55);
  --border: oklch(1 0 0 / 0.08);
  --border-strong: oklch(1 0 0 / 0.14);
  --text: oklch(0.97 0.005 240);
  --text-mute: oklch(0.72 0.01 240);
  --text-faint: oklch(0.55 0.01 240);

  /* Accent — violet */
  --accent: oklch(0.72 0.2 295);
  --accent-soft: oklch(0.72 0.2 295 / 0.16);
  --accent-glow: oklch(0.72 0.2 295 / 0.4);

  /* Orb hues (subtle gradient backdrop) */
  --orb-1: oklch(0.55 0.18 270);
  --orb-2: oklch(0.6 0.14 195);
  --orb-3: oklch(0.55 0.15 320);

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

  --font-sans: Inter, "Segoe UI", Roboto, Arial, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", ui-monospace, monospace;

  --container: 1280px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
  letter-spacing: -0.005em;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* ----------------------------------------------------------------
   Background layers
   ---------------------------------------------------------------- */
.bg-layers {
  position: fixed; inset: 0;
  z-index: 0; pointer-events: none;
  overflow: hidden;
}
.bg-orbs, .bg-noise, .bg-vignette {
  position: absolute; inset: 0;
}

.bg-orbs::before, .bg-orbs::after, .bg-orbs > i {
  content: ''; position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  mix-blend-mode: screen;
  animation: orb 28s ease-in-out infinite;
}
.bg-orbs::before {
  width: 620px; height: 620px;
  left: -10%; top: -15%;
  background: radial-gradient(circle at 30% 30%, var(--orb-1), transparent 65%);
}
.bg-orbs::after {
  width: 540px; height: 540px;
  right: -8%; top: 22%;
  background: radial-gradient(circle at 60% 40%, var(--orb-2), transparent 65%);
  animation-delay: -10s;
}
.bg-orbs > i {
  width: 480px; height: 480px;
  left: 40%; bottom: -20%;
  background: radial-gradient(circle at 50% 50%, var(--orb-3), transparent 65%);
  animation-delay: -18s;
}

@keyframes orb {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(40px, -30px, 0) scale(1.08); }
  66%      { transform: translate3d(-30px, 40px, 0) scale(0.95); }
}

.bg-noise {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.035; mix-blend-mode: overlay;
}
.bg-vignette {
  background:
    radial-gradient(ellipse at 50% 0%, transparent 0%, rgba(0,0,0,0.4) 70%),
    linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.55) 100%);
}

/* ----------------------------------------------------------------
   Layout
   ---------------------------------------------------------------- */
.page { position: relative; z-index: 1; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

section { padding: 120px 0; position: relative; }

/* ----------------------------------------------------------------
   Nav
   ---------------------------------------------------------------- */
.nav {
  position: fixed; top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 8px 8px 18px;
  width: min(calc(100vw - 32px), 1080px);
  justify-content: space-between;
  background: oklch(0.15 0.005 250 / 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 12px 40px rgba(0,0,0,0.4);
  font-size: 13px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text-mute);
  padding-right: 12px;
  border-right: 1px solid var(--border);
  margin-right: 8px;
  transition: color 0.2s;
}
.nav-logo:hover { color: var(--text); }
.nav-logo .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.nav-links { display: flex; gap: 2px; flex: 1; justify-content: center; }
.nav-phone {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--text-mute);
  transition: color 0.2s, background 0.2s;
}
.nav-phone:hover { color: var(--text); background: oklch(1 0 0 / 0.04); }
.nav-phone svg { width: 11px; height: 11px; }
@media (max-width: 900px) { .nav-phone span { display: none; } }
@media (max-width: 640px) { .nav-phone { display: none; } }
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-mute);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: oklch(1 0 0 / 0.04); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--accent);
  color: oklch(0.14 0.005 250);
  border-radius: 999px;
  font-weight: 500;
  margin-left: 4px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { box-shadow: 0 0 0 4px var(--accent-soft); }

@media (max-width: 760px) {
  .nav { padding: 6px 6px 6px 12px; font-size: 12px; gap: 0; }
  .nav-logo { display: flex; }
  .nav-links a { padding: 6px 10px; }
  .nav-cta span { display: none; }
}

/* ----------------------------------------------------------------
   Hero
   ---------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 140px; padding-bottom: 80px;
}
.hero-inner {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}
.hero-inner > .hero-art { align-self: stretch; display: flex; align-items: center; max-width: 460px; justify-self: end; }
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-art { order: -1; max-width: 520px; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 8px;
  background: oklch(1 0 0 / 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.eyebrow .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.78 0.18 145);
  box-shadow: 0 0 0 0 oklch(0.78 0.18 145 / 0.6);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 oklch(0.78 0.18 145 / 0.6); }
  100% { box-shadow: 0 0 0 12px oklch(0.78 0.18 145 / 0); }
}

.hero h1 {
  font-size: clamp(40px, 5.6vw, 76px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 28px 0 0;
  max-width: 22ch;
}
.hero h1 em {
  display: block;
  margin-top: 18px;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--text) 30%, var(--text-faint) 60%, var(--text) 90%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 9s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.hero h1 em {
  font-style: normal;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.72em;
  letter-spacing: -0.01em;
}

.hero-sub {
  margin: 28px 0 0;
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text-mute);
  max-width: 56ch;
  line-height: 1.55;
}

.hero-meta {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.hero-meta > div {
  padding: 20px 24px 20px 0;
  border-right: 1px solid var(--border);
}
.hero-meta > div:last-child { border-right: 0; padding-right: 0; }
.hero-meta .k {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.hero-meta .v {
  margin-top: 8px;
  font-size: 17px;
  color: var(--text);
}

.hero-actions {
  margin-top: 40px;
  display: flex; flex-wrap: wrap; gap: 12px;
}

@media (max-width: 760px) {
  .hero-meta { grid-template-columns: repeat(2, 1fr); }
  .hero-meta > div:nth-child(2) { border-right: 0; }
  .hero-meta > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}

/* ----------------------------------------------------------------
   Hero — Code Card
   ---------------------------------------------------------------- */
.hero-art {
  position: relative;
  width: 100%;
  min-height: 420px;
}
.code-card {
  position: relative;
  width: 100%;
  background: oklch(0.16 0.008 280 / 0.65);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 30px 80px -20px rgba(0,0,0,0.6),
    0 0 0 1px var(--accent-soft);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.code-card::before {
  content: '';
  position: absolute; inset: -1px;
  background:
    radial-gradient(circle at 80% 0%, var(--accent-soft), transparent 50%),
    radial-gradient(circle at 0% 100%, oklch(0.6 0.14 195 / 0.16), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.code-card:hover { transform: perspective(1400px) rotateY(-4deg) rotateX(1deg) translateY(-4px); }

.code-head {
  position: relative; z-index: 1;
  display: flex; align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.code-dots { display: flex; gap: 6px; }
.code-dots i {
  width: 10px; height: 10px; border-radius: 50%;
  background: oklch(1 0 0 / 0.1);
  border: 1px solid oklch(1 0 0 / 0.06);
}
.code-dots i:nth-child(1) { background: oklch(0.7 0.16 25 / 0.7); }
.code-dots i:nth-child(2) { background: oklch(0.85 0.16 90 / 0.7); }
.code-dots i:nth-child(3) { background: oklch(0.78 0.18 145 / 0.7); }

.code-file {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.02em;
  display: inline-flex; align-items: center; gap: 6px;
}
.code-file svg { width: 11px; height: 11px; opacity: 0.6; }
.code-status {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: oklch(0.78 0.18 145);
}
.code-status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.78 0.18 145);
  box-shadow: 0 0 8px oklch(0.78 0.18 145 / 0.5);
}

.code-body {
  position: relative; z-index: 1;
  padding: 18px 0 18px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0;
  min-height: 320px;
}
.code-line {
  display: grid;
  grid-template-columns: 38px 1fr;
  padding: 0 18px 0 0;
  position: relative;
}
.code-line .ln {
  text-align: right;
  padding-right: 14px;
  color: oklch(1 0 0 / 0.18);
  user-select: none;
  font-variant-numeric: tabular-nums;
}
.code-line .src { white-space: pre; overflow: hidden; }
.code-line.is-typing::after {
  content: '';
  position: absolute;
  right: 18px; top: 4px; bottom: 4px;
  width: 7px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Syntax highlight */
.tk-tag    { color: oklch(0.78 0.16 320); }
.tk-attr   { color: oklch(0.82 0.14 90); }
.tk-str    { color: oklch(0.82 0.14 145); }
.tk-key    { color: oklch(0.78 0.18 295); }
.tk-com    { color: oklch(1 0 0 / 0.32); font-style: italic; }
.tk-pun    { color: oklch(1 0 0 / 0.4); }
.tk-fn     { color: oklch(0.85 0.14 220); }
.tk-num    { color: oklch(0.82 0.14 60); }
.tk-text   { color: oklch(0.92 0.005 240); }

.code-foot {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.code-foot .right { display: flex; gap: 14px; }
.code-foot .ok::before {
  content: '✓'; color: oklch(0.78 0.18 145); margin-right: 6px;
}

/* Floating chips around card */
.chip {
  position: absolute;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: oklch(0.18 0.008 280 / 0.85);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  box-shadow: 0 10px 30px -8px rgba(0,0,0,0.5);
  animation: float-y 6s ease-in-out infinite;
}
.chip svg { width: 11px; height: 11px; color: var(--accent); }
.chip--a { top: -14px; left: -22px; animation-delay: -2s; }
.chip--b { right: -18px; top: 30%; animation-delay: -4s; }
.chip--c { bottom: -16px; left: 20%; }
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@media (max-width: 980px) {
  .chip--a { left: 4%; top: -12px; }
  .chip--b { right: 4%; }
  .chip--c { display: none; }
}
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              background 0.2s, box-shadow 0.3s, border-color 0.2s;
  will-change: transform;
}
.btn-primary {
  background: var(--accent);
  color: oklch(0.14 0.005 250);
  box-shadow: 0 0 0 1px var(--accent), 0 10px 30px -8px var(--accent-glow);
}
.btn-primary:hover {
  box-shadow: 0 0 0 1px var(--accent), 0 0 0 6px var(--accent-soft), 0 14px 40px -8px var(--accent-glow);
}
.btn-ghost {
  border: 1px solid var(--border-strong);
  background: oklch(1 0 0 / 0.02);
  color: var(--text);
}
.btn-ghost:hover { background: oklch(1 0 0 / 0.06); border-color: oklch(1 0 0 / 0.2); }

.btn .label { position: relative; z-index: 1; }
.btn svg { width: 14px; height: 14px; transition: transform 0.3s; }
.btn:hover svg { transform: translateX(2px); }

/* ----------------------------------------------------------------
   Section headers
   ---------------------------------------------------------------- */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
}
.section-head .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.section-head h2 {
  margin: 14px 0 0;
  font-size: clamp(34px, 4.5vw, 60px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.02;
  max-width: 18ch;
}
.section-head p {
  margin: 0;
  max-width: 42ch;
  color: var(--text-mute);
  font-size: 16px;
  line-height: 1.55;
}

/* ----------------------------------------------------------------
   Cards (glass)
   ---------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%),
              oklch(1 0 0 / 0.06), transparent 40%);
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover { border-color: var(--border-strong); }

/* ----------------------------------------------------------------
   About
   ---------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

.about-main {
  padding: 40px;
}
.about-main p {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 20px;
}
.about-main p + p { color: var(--text-mute); font-size: 17px; }

.about-side { display: grid; grid-template-rows: 1fr 1fr; gap: 24px; }
.about-side .card { padding: 28px; }
.about-side .k {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.about-side .v {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-top: 10px;
}
.about-side .sub {
  margin-top: 6px;
  color: var(--text-mute);
  font-size: 14px;
}

/* ----------------------------------------------------------------
   Services
   ---------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

.service {
  padding: 28px;
  min-height: 200px;
  display: flex; flex-direction: column;
}
.service .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.service h3 {
  margin: 18px 0 12px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.service p {
  margin: 0;
  color: var(--text-mute);
  font-size: 14px;
  line-height: 1.55;
  flex: 1;
}
.service .tag {
  margin-top: 24px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.service .tag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ----------------------------------------------------------------
   Stack
   ---------------------------------------------------------------- */
.stack-wrap { padding: 40px; }
.stack-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 900px) { .stack-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 500px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }
.stack-item {
  background: oklch(0.16 0.005 250);
  padding: 24px 18px;
  display: flex; flex-direction: column; align-items: center;
  gap: 10px;
  transition: background 0.3s;
}
.stack-item:hover { background: oklch(0.2 0.008 250); }
.stack-item .glyph {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--accent);
  font-weight: 500;
}
.stack-item .name {
  font-size: 13px;
  color: var(--text);
}
.stack-item .lvl {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.stack-marquee {
  margin-top: 32px;
  display: flex; overflow: hidden;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.stack-marquee-track {
  display: flex; gap: 48px;
  animation: marquee 38s linear infinite;
  flex-shrink: 0;
  padding-right: 48px;
}
.stack-marquee span {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-mute);
  letter-spacing: 0.02em;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 12px;
}
.stack-marquee span::after {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: var(--text-faint);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ----------------------------------------------------------------
   Works
   ---------------------------------------------------------------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 760px) { .works-grid { grid-template-columns: 1fr; } }

.work {
  padding: 0;
  display: flex; flex-direction: column;
}
.work-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    repeating-linear-gradient(135deg,
      oklch(0.22 0.01 250) 0 1px, transparent 1px 14px),
    linear-gradient(135deg, oklch(0.2 0.01 260), oklch(0.16 0.005 250));
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.work-thumb::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, oklch(1 0 0 / 0.06), transparent 40%);
}
.work-thumb .placeholder {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 6px 12px;
  border: 1px dashed oklch(1 0 0 / 0.18);
  border-radius: 6px;
  background: oklch(0.14 0.005 250 / 0.6);
}
.work-body { padding: 24px 28px 28px; }
.work-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.work-meta .live {
  display: inline-flex; align-items: center; gap: 6px;
  color: oklch(0.78 0.18 145);
}
.work-meta .live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.78 0.18 145);
}
.work h3 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.work p {
  margin: 0;
  color: var(--text-mute);
  font-size: 14px;
  line-height: 1.55;
}
.work .tags {
  margin-top: 18px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.work .tags span {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--text-mute);
}
.work .arrow {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--accent);
  transition: gap 0.3s;
}
.work:hover .arrow { gap: 14px; }

/* ----------------------------------------------------------------
   CTA section
   ---------------------------------------------------------------- */
.cta-card {
  padding: 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  background:
    radial-gradient(circle at 20% 0%, var(--accent-soft), transparent 40%),
    radial-gradient(circle at 80% 100%, oklch(0.6 0.14 195 / 0.18), transparent 40%);
  pointer-events: none;
}
.cta-card > * { position: relative; z-index: 1; }
.cta-card h2 {
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
  max-width: 18ch;
  margin-left: auto; margin-right: auto;
}
.cta-card p {
  margin: 24px auto 0;
  max-width: 50ch;
  color: var(--text-mute);
  font-size: 17px;
  line-height: 1.55;
}
.cta-card .channels {
  margin-top: 40px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
}
@media (max-width: 600px) { .cta-card { padding: 40px 24px; } }

/* ----------------------------------------------------------------
   Footer
   ---------------------------------------------------------------- */
.footer {
  padding: 80px 0 32px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-mute);
  position: relative;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 64px;
}
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; gap: 28px; } }

.footer-brand p { margin: 14px 0 18px; max-width: 30ch; line-height: 1.55; }
.footer-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; color: var(--text); font-weight: 500;
  letter-spacing: -0.005em;
}
.footer-logo .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.footer-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-mute);
}
.footer-status .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.78 0.18 145);
  box-shadow: 0 0 0 0 oklch(0.78 0.18 145 / 0.6);
  animation: pulse 2.2s ease-out infinite;
}

.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-h {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.footer-col a {
  color: var(--text-mute);
  transition: color 0.2s, transform 0.3s;
  display: inline-block;
}
.footer-col a:hover { color: var(--text); transform: translateX(2px); }

.footer-bigmark {
  position: relative;
  text-align: center;
  padding: 8px 0 24px;
  border-top: 1px solid var(--border);
  overflow: hidden;
  user-select: none;
}
.footer-bigmark span {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(72px, 16vw, 220px);
  line-height: 0.9;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, var(--text-faint) 0%, transparent 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.55;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.footer-tech { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 6px; }
.footer-links a {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-mute);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.footer-links svg {
  width: 14px;
  height: 14px;
  display: block;
}
.footer-links a:hover { color: var(--text); border-color: var(--border-strong); background: oklch(1 0 0 / 0.04); }
.mono-faint { font-family: var(--font-mono); color: var(--text-faint); }

/* ----------------------------------------------------------------
   Guarantees strip
   ---------------------------------------------------------------- */
.guarantees { padding: 24px 0 0; }
.guarantees-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.g-item {
  display: flex; gap: 16px;
  padding: 28px 24px 28px 0;
  border-right: 1px solid var(--border);
}
.g-item:last-child { border-right: 0; }
.g-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: oklch(1 0 0 / 0.04);
  border: 1px solid var(--border);
  color: var(--accent);
}
.g-icon svg { width: 18px; height: 18px; }
.g-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text);
}
.g-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-mute);
  line-height: 1.45;
}
@media (max-width: 900px) {
  .guarantees-grid { grid-template-columns: repeat(2, 1fr); }
  .g-item:nth-child(2) { border-right: 0; }
  .g-item:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .g-item { padding: 22px 20px 22px 0; }
}
@media (max-width: 540px) {
  .guarantees-grid { grid-template-columns: 1fr; }
  .g-item { border-right: 0; border-bottom: 1px solid var(--border); }
  .g-item:last-child { border-bottom: 0; }
}

/* ----------------------------------------------------------------
   Sticky mobile CTA
   ---------------------------------------------------------------- */
.sticky-cta {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 40;
  display: none;
  gap: 8px;
  pointer-events: none;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sticky-cta.in { transform: translateY(0); pointer-events: auto; }
.sticky-btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.sticky-btn.primary {
  background: var(--accent);
  color: oklch(0.14 0.005 250);
}
.sticky-btn.ghost {
  flex: 0 0 52px;
  width: 52px; padding: 14px;
  background: oklch(0.18 0.005 250 / 0.85);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.sticky-btn svg { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .sticky-cta { display: flex; }
}
html[data-theme="light"] .sticky-btn.primary { color: oklch(0.98 0.003 240); }
html[data-theme="light"] .sticky-btn.ghost { background: oklch(1 0 0 / 0.85); }
/* Inverted reveal: visible by default. JS adds .pre on load to hide,
   then adds .in to show with transition. Failsafe if JS never runs. */
.reveal, .reveal-stagger > * {
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.pre { opacity: 0; transform: translateY(28px); }
.reveal.pre.in, .reveal.in { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  transition-delay: calc(var(--i, 0) * 80ms);
}
.reveal-stagger.pre > * { opacity: 0; transform: translateY(20px); }
.reveal-stagger.pre.in > *, .reveal-stagger.in > * { opacity: 1; transform: translateY(0); }

/* ----------------------------------------------------------------
   Service price tag
   ---------------------------------------------------------------- */
.service .price {
  margin-top: 14px;
  display: inline-flex; align-items: baseline; gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  letter-spacing: -0.005em;
}
.service .price .from {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.service .price .val { font-size: 17px; font-weight: 500; }

/* Work image (replacing dashed placeholder) */
.work-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ----------------------------------------------------------------
   Process (How we work)
   ---------------------------------------------------------------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  counter-reset: step;
}
@media (max-width: 1000px) { .process-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .process-grid { grid-template-columns: 1fr; } }

.process-step {
  position: relative;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition: border-color 0.3s, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.process-step:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.process-step .step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.process-step .step-title {
  margin: 14px 0 8px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}
.process-step .step-sub {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-mute);
  margin: 0;
}
.process-step .step-time {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.process-step .step-time::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ----------------------------------------------------------------
   Reviews
   ---------------------------------------------------------------- */
.reviews-head {
  display: flex; gap: 24px; flex-wrap: wrap; align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.reviews-rating {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 14px 22px;
  border: 1px solid var(--border-strong);
  background: oklch(1 0 0 / 0.03);
  border-radius: 999px;
  transition: border-color 0.2s, background 0.2s;
}
.reviews-rating:hover { border-color: var(--accent); background: var(--accent-soft); }
.reviews-rating .stars {
  display: inline-flex; gap: 2px;
  color: oklch(0.85 0.16 90);
  font-size: 14px;
  letter-spacing: 1px;
}
.reviews-rating .score {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}
.reviews-rating .meta {
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-mute);
}
.reviews-rating .meta b { color: var(--text); font-weight: 500; }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .reviews-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .reviews-grid { grid-template-columns: 1fr; } }

.review {
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.review .stars {
  color: oklch(0.85 0.16 90);
  font-size: 13px;
  letter-spacing: 1px;
}
.review blockquote {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  flex: 1;
}
.review .author {
  display: flex; align-items: center; gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.review .author .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.review .author .name {
  font-size: 13px;
  color: var(--text);
}
.review .author .role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

/* ----------------------------------------------------------------
   FAQ
   ---------------------------------------------------------------- */
.faq-list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.faq-q {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px;
  padding: 26px 0;
  text-align: left;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color 0.2s;
}
.faq-q:hover { color: var(--accent); }
.faq-q .icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  position: relative;
  transition: background 0.2s, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.faq-q .icon::before,
.faq-q .icon::after {
  content: ''; position: absolute;
  background: var(--text);
  transition: transform 0.3s, background 0.2s;
}
.faq-q .icon::before { width: 10px; height: 1.5px; }
.faq-q .icon::after  { width: 1.5px; height: 10px; }
.faq-item.open .faq-q .icon { background: var(--accent); border-color: var(--accent); }
.faq-item.open .faq-q .icon::before,
.faq-item.open .faq-q .icon::after { background: oklch(0.14 0.005 250); }
.faq-item.open .faq-q .icon::after { transform: scaleY(0); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.faq-a-inner {
  padding: 0 0 26px;
  max-width: 70ch;
  color: var(--text-mute);
  font-size: 16px;
  line-height: 1.6;
}
.faq-a-inner p { margin: 0 0 10px; }
.faq-a-inner p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------
   Lead form
   ---------------------------------------------------------------- */
.lead-form {
  margin-top: 36px;
  display: grid;
  gap: 14px;
  text-align: left;
  max-width: 720px;
  margin-left: auto; margin-right: auto;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

.field { position: relative; display: flex; flex-direction: column; }
.field label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  background: oklch(1 0 0 / 0.03);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.field textarea { min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: oklch(1 0 0 / 0.05);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field.error input,
.field.error textarea {
  border-color: oklch(0.7 0.18 25);
  box-shadow: 0 0 0 4px oklch(0.7 0.18 25 / 0.15);
}

.budget-group { display: flex; flex-direction: column; }
.budget-radios {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.budget-radios input { position: absolute; opacity: 0; pointer-events: none; }
.budget-radios label {
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: oklch(1 0 0 / 0.02);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-mute);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.budget-radios label:hover { color: var(--text); border-color: oklch(1 0 0 / 0.22); }
.budget-radios input:checked + label {
  background: var(--accent);
  border-color: var(--accent);
  color: oklch(0.14 0.005 250);
}

.consent-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.5;
  text-align: left;
}
.consent-row input[type="checkbox"] {
  flex-shrink: 0;
  appearance: none;
  width: 18px; height: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: oklch(1 0 0 / 0.03);
  cursor: pointer;
  position: relative;
  margin-top: 1px;
  transition: background 0.2s, border-color 0.2s;
}
.consent-row input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.consent-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border: solid oklch(0.14 0.005 250);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.consent-row a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--text-faint); }
.consent-row a:hover { text-decoration-color: var(--accent); }

.form-submit-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 4px;
}
.form-submit-row .btn { padding: 16px 28px; }
.form-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.form-status {
  display: none;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  border: 1px solid var(--border-strong);
}
.form-status.is-ok { display: block; background: oklch(0.78 0.18 145 / 0.1); border-color: oklch(0.78 0.18 145 / 0.4); color: oklch(0.92 0.1 145); }
.form-status.is-err { display: block; background: oklch(0.7 0.18 25 / 0.1); border-color: oklch(0.7 0.18 25 / 0.4); color: oklch(0.9 0.12 25); }

.cta-divider {
  margin: 56px auto 28px;
  max-width: 200px;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.cta-divider::before,
.cta-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ----------------------------------------------------------------
   Footer extras
   ---------------------------------------------------------------- */
.footer-legal {
  margin-top: 14px;
  display: flex; flex-wrap: wrap; gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.footer-legal a { color: var(--text-mute); }
.footer-legal a:hover { color: var(--text); }

/* ----------------------------------------------------------------
   Mobile footer (visible only ≤768px; hidden on desktop)
   ---------------------------------------------------------------- */
.footer-mobile {
  display: none;
  flex-direction: column;
  gap: 22px;
  padding: 8px 0 28px;
}

/* CTA block */
.fm-cta {
  position: relative;
  padding: 28px 22px 26px;
  border-radius: 22px;
  background: oklch(0.17 0.008 280 / 0.6);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  overflow: hidden;
  text-align: left;
}
.fm-cta::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 100% 0%, var(--accent-soft), transparent 50%),
    radial-gradient(circle at 0% 100%, oklch(0.6 0.14 195 / 0.14), transparent 50%);
  pointer-events: none;
}
.fm-cta > * { position: relative; z-index: 1; }
.fm-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  background: oklch(1 0 0 / 0.03);
}
.fm-status .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.78 0.18 145);
  box-shadow: 0 0 0 0 oklch(0.78 0.18 145 / 0.6);
  animation: pulse 2.2s ease-out infinite;
}
.fm-cta-title {
  margin: 16px 0 6px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
.fm-cta-sub {
  margin: 0 0 18px;
  color: var(--text-mute);
  font-size: 14px;
  line-height: 1.5;
}
.fm-cta-btn {
  width: 100%;
  justify-content: center;
  padding: 14px 18px;
}

/* Profi.ru rating row */
.fm-rating {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: oklch(1 0 0 / 0.025);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fm-rating:hover { border-color: var(--accent); background: var(--accent-soft); }
.fm-rating-left {
  display: flex; flex-direction: column; gap: 2px;
  padding-right: 14px;
  border-right: 1px solid var(--border);
}
.fm-rating-score {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.fm-rating-stars {
  font-size: 11px;
  letter-spacing: 1px;
  color: oklch(0.85 0.16 90);
}
.fm-rating-meta {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-mute);
}
.fm-rating-meta b { color: var(--text); font-weight: 500; font-size: 13px; }

/* Contacts header */
.fm-h {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 4px 0 12px;
}

/* 2x2 contact grid */
.fm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fm-card {
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 16px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: oklch(1 0 0 / 0.02);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}
.fm-card:hover { border-color: var(--border-strong); background: oklch(1 0 0 / 0.05); }
.fm-card:active { transform: scale(0.98); }
.fm-card svg {
  width: 16px; height: 16px;
  color: var(--accent);
  margin-bottom: 4px;
}
.fm-card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.fm-card-value {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.005em;
}

/* Compact nav links — chip row */
.fm-links {
  display: flex; flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.fm-links a {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text-mute);
  background: oklch(1 0 0 / 0.02);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.fm-links a:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: oklch(1 0 0 / 0.05);
}

/* ----------------------------------------------------------------
   Legal pages
   ---------------------------------------------------------------- */
.legal-page {
  padding-top: 160px;
  padding-bottom: 80px;
  min-height: 100vh;
}
.legal-content {
  max-width: 820px;
}
.legal-page h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 12px;
}
.legal-page .legal-updated {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-bottom: 40px;
}
.legal-page h2 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 36px 0 14px;
  color: var(--text);
}
.legal-page p,
.legal-page li {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-mute);
  margin: 0 0 12px;
}
.legal-page ul { padding-left: 22px; margin: 0 0 18px; }
.legal-page a { color: var(--text); text-decoration: underline; text-decoration-color: var(--text-faint); text-underline-offset: 3px; }
.legal-page a:hover { text-decoration-color: var(--accent); }
.legal-back {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.legal-back:hover { color: var(--text); }

/* ----------------------------------------------------------------
   404 page
   ---------------------------------------------------------------- */
.error-page {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 140px 0 80px;
}
.error-card {
  max-width: 760px;
  padding: clamp(34px, 6vw, 64px);
}
.error-card .label {
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.error-card h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(42px, 7vw, 86px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.98;
}
.error-card p {
  margin: 24px 0 0;
  max-width: 560px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-mute);
}
.error-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ----------------------------------------------------------------
   Reduced motion
   ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .bg-orbs, .stack-marquee-track, .hero h1 .grad { animation: none !important; }
  .code-card { transform: none !important; }
}

/* ================================================================
   Mobile navigation — burger
   ================================================================ */
.nav-burger {
  display: none;
  position: relative;
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: oklch(1 0 0 / 0.04);
  margin-left: 4px;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.nav-burger:hover { background: oklch(1 0 0 / 0.08); }
.nav-burger span {
  position: absolute;
  left: 10px;
  width: 16px; height: 1.6px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s, top 0.3s;
}
.nav-burger span:nth-child(1) { top: 13px; }
.nav-burger span:nth-child(2) { top: 18px; }
.nav-burger span:nth-child(3) { top: 23px; }
.nav.is-open .nav-burger span:nth-child(1) { top: 18px; transform: rotate(45deg); }
.nav.is-open .nav-burger span:nth-child(2) { opacity: 0; }
.nav.is-open .nav-burger span:nth-child(3) { top: 18px; transform: rotate(-45deg); }

/* ================================================================
   Mobile (≤ 768px) — universal cleanup
   ================================================================ */
@media (max-width: 768px) {
  /* Base spacing */
  .container { padding: 0 18px; }
  section { padding: 64px 0; }

  /* ---- Nav: collapse to burger ---- */
  .nav {
    top: 10px;
    width: calc(100vw - 20px);
    padding: 6px 6px 6px 14px;
    gap: 4px;
  }
  .nav-logo { display: flex; }
  .nav-phone { display: none; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 14px;
    background: oklch(0.13 0.005 250 / 0.92);
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    box-shadow: 0 20px 50px -10px rgba(0,0,0,0.6);
    z-index: 51;
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-links a {
    padding: 12px 14px;
    font-size: 15px;
    color: var(--text);
    text-align: left;
    border-radius: 12px;
  }
  .nav-links a:hover { background: oklch(1 0 0 / 0.06); }
  .nav-burger { display: block; }
  .nav-cta {
    padding: 7px 12px;
    font-size: 12px;
  }
  .nav-cta span { display: inline; }

  .bg-orbs::before,
  .bg-orbs::after,
  .bg-orbs > i {
    filter: none;
    opacity: 0.22;
    mix-blend-mode: normal;
    animation: none;
  }
  .bg-orbs::before {
    width: min(70vw, 620px); height: min(70vw, 620px);
    left: -18%; top: -18%;
    background: radial-gradient(circle at 35% 35%, var(--orb-1), transparent 68%);
  }
  .bg-orbs::after {
    width: min(64vw, 540px); height: min(64vw, 540px);
    right: -20%; top: 24%;
    background: radial-gradient(circle at 55% 45%, var(--orb-2), transparent 70%);
  }
  .bg-orbs > i {
    width: min(58vw, 480px); height: min(58vw, 480px);
    left: 46%; bottom: -22%;
    background: radial-gradient(circle at 50% 50%, var(--orb-3), transparent 72%);
  }
  .nav,
  .nav-links,
  .code-card,
  .chip,
  .card,
  .sticky-btn,
  .process-step,
  .fm-cta {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* Body lock when menu open */
  html[data-nav-open="true"], html[data-nav-open="true"] body {
    overflow: hidden;
    touch-action: none;
  }

  /* ---- Section headings ---- */
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 36px;
    padding-bottom: 22px;
  }
  .section-head h2 { font-size: 30px; max-width: 100%; }
  .section-head p { font-size: 15px; max-width: 100%; }
  .section-head .label { font-size: 10px; }

  /* ---- Hero ---- */
  .hero {
    min-height: auto;
    padding-top: 110px;
    padding-bottom: 50px;
  }
  .hero-inner { gap: 32px; }
  .hero h1 {
    font-size: 36px;
    line-height: 1.05;
    margin-top: 18px;
    max-width: 100%;
  }
  .hero h1 em {
    margin-top: 12px;
    font-size: 14px;
  }
  .hero-sub {
    margin-top: 20px;
    font-size: 15px;
    line-height: 1.55;
  }
  .hero-actions { margin-top: 28px; gap: 10px; }
  .hero-actions .btn { padding: 12px 18px; font-size: 13px; flex: 1; justify-content: center; min-width: 0; }
  .hero-meta { margin-top: 36px; }
  .hero-meta > div { padding: 16px 14px 16px 0; }
  .hero-meta .k { font-size: 9px; }
  .hero-meta .v { font-size: 15px; margin-top: 6px; }
  .hero-art { max-width: 100%; min-height: auto; }
  .code-card { transform: none; }
  .code-card:hover { transform: translateY(-2px); }
  .code-body { min-height: 220px; font-size: 11px; line-height: 1.6; }
  .code-line { grid-template-columns: 30px 1fr; }
  .code-line .ln { padding-right: 10px; font-size: 10px; }
  .chip--c { display: none; }

  /* ---- About ---- */
  .about-grid { gap: 14px; }
  .about-main { padding: 26px; }
  .about-main p { font-size: 16px; }
  .about-main p + p { font-size: 15px; }
  .about-side { gap: 14px; }
  .about-side .card { padding: 22px; }
  .about-side .v { font-size: 22px; }

  /* ---- Guarantees ---- */
  .guarantees-grid { grid-template-columns: 1fr; }
  .g-item {
    padding: 20px 0;
    border-right: 0 !important;
    border-bottom: 1px solid var(--border);
  }
  .g-item:last-child { border-bottom: 0; }
  .g-icon { width: 32px; height: 32px; }
  .g-icon svg { width: 16px; height: 16px; }
  .g-title { font-size: 14px; }
  .g-sub { font-size: 13px; }

  /* ---- Services ---- */
  .services-grid { grid-template-columns: 1fr; gap: 12px; }
  .service { padding: 22px; min-height: auto; }
  .service h3 { font-size: 20px; margin: 14px 0 10px; }
  .service p { font-size: 14px; }
  .service .price .val { font-size: 16px; }
  .service .tag { margin-top: 18px; }

  /* ---- Stack ---- */
  .stack-wrap { padding: 24px; }
  .stack-grid { grid-template-columns: repeat(3, 1fr); }
  .stack-item { padding: 18px 10px; gap: 6px; }
  .stack-item .glyph { font-size: 15px; }
  .stack-item .name { font-size: 12px; }
  .stack-item .lvl { font-size: 9px; }
  .stack-marquee { margin-top: 20px; padding-top: 18px; }
  .stack-marquee-track { gap: 32px; padding-right: 32px; }
  .stack-marquee span { font-size: 12px; }

  /* ---- Works ---- */
  .works-grid { grid-template-columns: 1fr; gap: 14px; }
  .work-body { padding: 20px; }
  .work h3 { font-size: 20px; }
  .work-meta { font-size: 10px; }

  /* ---- Process ---- */
  .process-grid { grid-template-columns: 1fr; gap: 10px; }
  .process-step { padding: 22px 22px; }
  .process-step .step-title { font-size: 17px; margin: 10px 0 6px; }
  .process-step .step-sub { font-size: 13px; }
  .process-step .step-time { margin-top: 14px; }

  /* ---- Reviews ---- */
  .reviews-head { margin-bottom: 24px; }
  .reviews-rating {
    width: 100%;
    padding: 12px 16px;
    gap: 12px;
  }
  .reviews-rating .stars { font-size: 12px; }
  .reviews-rating .score { font-size: 18px; }
  .reviews-rating .meta { font-size: 10px; }
  .reviews-grid { grid-template-columns: 1fr; gap: 12px; }
  .review { padding: 22px; }
  .review blockquote { font-size: 14px; }

  /* ---- FAQ ---- */
  .faq-q {
    padding: 20px 0;
    font-size: 16px;
    gap: 14px;
  }
  .faq-q .icon { width: 26px; height: 26px; }
  .faq-a-inner { font-size: 14px; padding-bottom: 20px; }

  /* ---- CTA / Form ---- */
  .cta-card { padding: 34px 22px; text-align: left; }
  .cta-card h2 { font-size: 28px; margin: 0; max-width: 100%; }
  .cta-card p { margin: 16px 0 0; font-size: 14px; max-width: 100%; }
  .cta-card .channels { margin-top: 24px; gap: 8px; flex-direction: column; align-items: stretch; }
  .cta-card .channels .btn { justify-content: flex-start; padding: 12px 16px; font-size: 13px; }

  .lead-form { margin-top: 28px; gap: 12px; }
  .field input,
  .field textarea { padding: 12px 14px; font-size: 16px; /* 16px prevents iOS auto-zoom */ }
  .field textarea { min-height: 100px; }
  .budget-radios { gap: 6px; }
  .budget-radios label { padding: 9px 13px; font-size: 11px; }
  .consent-row { font-size: 11px; gap: 8px; }
  .form-submit-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .form-submit-row .btn { width: 100%; justify-content: center; }
  .form-note { text-align: center; font-size: 10px; }
  .form-status { font-size: 13px; padding: 12px 14px; }
  .cta-divider { margin: 36px auto 20px; max-width: 100%; font-size: 10px; }

  /* ---- Footer (mobile rewrite) ---- */
  .footer {
    padding: 40px 0 96px;
    border-top: 1px solid var(--border);
    background:
      radial-gradient(ellipse at 50% 0%, var(--accent-soft), transparent 60%),
      transparent;
  }
  .footer-top { display: none; }   /* desktop grid скрываем */
  .footer-mobile { display: flex; }

  .footer-bigmark { padding: 4px 0 16px; border-top: 0; }
  .footer-bigmark span {
    font-size: 26vw;
    line-height: 0.85;
    background: linear-gradient(180deg, var(--text-mute) 0%, transparent 90%);
    -webkit-background-clip: text;
    background-clip: text;
    opacity: 0.35;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding-top: 22px;
    font-size: 11px;
  }
  .footer-copy { color: var(--text-mute); line-height: 1.5; }
  .footer-tech { gap: 6px; color: var(--text-faint); }
  .footer-links {
    align-self: flex-start;
    gap: 8px;
  }
  .footer-links a { width: 32px; height: 32px; }

  .footer-legal {
    margin-top: 8px;
    flex-direction: column;
    gap: 8px;
    font-size: 11px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }
  .footer-legal a { padding: 4px 0; }
  .footer-legal span { display: none; }

  /* ---- Legal pages ---- */
  .legal-page { padding-top: 110px; padding-bottom: 60px; }
  .legal-page h1 { font-size: 32px; }
  .legal-page h2 { font-size: 19px; margin: 28px 0 10px; }
  .legal-page p, .legal-page li { font-size: 14px; }

  /* ---- Sticky CTA — leave room ---- */
  .sticky-cta {
    left: 10px; right: 10px; bottom: 10px;
    gap: 6px;
  }
  .sticky-btn { padding: 13px 14px; font-size: 13px; }
  .sticky-btn.ghost { flex: 0 0 46px; width: 46px; padding: 12px; }
}

/* ================================================================
   Small mobile (≤ 480px) — final tightening
   ================================================================ */
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  section { padding: 54px 0; }

  .nav {
    width: calc(100vw - 16px);
    padding: 5px 5px 5px 10px;
  }
  .hero { padding-top: 96px; padding-bottom: 30px; }
  .hero h1 { font-size: 30px; }
  .hero-sub { font-size: 14px; }
  .hero-meta { grid-template-columns: repeat(2, 1fr); margin-top: 28px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .code-card { display: none; } /* экономим экран — на самых узких прячем */
  .hero-art { display: none; }

  .section-head h2 { font-size: 26px; }
  .section-head { margin-bottom: 26px; padding-bottom: 16px; }

  .about-main { padding: 22px; }
  .about-main p { font-size: 15px; }

  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-wrap { padding: 18px; }

  .cta-card { padding: 28px 18px; }
  .cta-card h2 { font-size: 24px; }

  .reviews-rating { flex-wrap: wrap; }
  .reviews-rating .meta { font-size: 9px; }

  .faq-q { font-size: 15px; padding: 18px 0; }

  .footer-bigmark span { font-size: 26vw; }
}

/* ================================================================
   Landscape phones — keep hero from being a tunnel
   ================================================================ */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .hero { min-height: auto; padding-top: 100px; }
  .code-card { display: none; }
  .hero-art { display: none; }
}

/* ----------------------------------------------------------------
   Density
   ---------------------------------------------------------------- */
html[data-density="compact"] section { padding: 80px 0; }
html[data-density="compact"] .section-head { margin-bottom: 36px; padding-bottom: 18px; }
html[data-density="comfy"] section { padding: 160px 0; }
html[data-density="comfy"] .section-head { margin-bottom: 72px; }

/* Background variants */
html[data-bg="grid"] .bg-orbs { display: none; }
html[data-bg="off"] .bg-orbs { display: none; }

/* Light theme variant */
html[data-theme="light"] {
  --bg: oklch(0.98 0.003 240);
  --bg-2: oklch(0.96 0.004 240);
  --surface: oklch(1 0 0 / 0.6);
  --border: oklch(0 0 0 / 0.08);
  --border-strong: oklch(0 0 0 / 0.16);
  --text: oklch(0.18 0.005 250);
  --text-mute: oklch(0.42 0.01 250);
  --text-faint: oklch(0.58 0.01 250);
  --accent: oklch(0.25 0.01 250);
  --accent-soft: oklch(0.25 0.01 250 / 0.1);
  --accent-glow: oklch(0.25 0.01 250 / 0.18);
}
html[data-theme="light"] .nav {
  background: oklch(1 0 0 / 0.7);
}
html[data-theme="light"] .btn-primary { color: oklch(0.98 0.003 240); }
html[data-theme="light"] .work-thumb {
  background:
    repeating-linear-gradient(135deg, oklch(0.88 0.005 240) 0 1px, transparent 1px 14px),
    linear-gradient(135deg, oklch(0.96 0.004 240), oklch(0.92 0.005 240));
}
html[data-theme="light"] .stack-item { background: oklch(0.97 0.003 240); }
html[data-theme="light"] .bg-noise { opacity: 0.06; }
html[data-theme="light"] .bg-vignette {
  background:
    radial-gradient(ellipse at 50% 0%, transparent 0%, oklch(1 0 0 / 0.3) 70%),
    linear-gradient(to bottom, transparent 60%, oklch(0.9 0.005 240 / 0.4) 100%);
}
