/* ============================================================
   SPLENDOR SYSTEMS — Schematic redesign
   Aesthetic: engineering blueprint / CAD precision
   Geist (geometric sans) + Geist Mono · blue-tech · light+dark
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');

/* ---------- Tokens ---------- */
:root {
  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", monospace;

  /* accent — overridable by tweaks */
  --accent-h: 222;
  --accent-c: 0.165;
  --accent: oklch(0.62 var(--accent-c) var(--accent-h));
  --accent-bright: oklch(0.7 0.17 var(--accent-h));
  --accent-soft: oklch(0.62 var(--accent-c) var(--accent-h) / 0.12);
  --accent-line: oklch(0.62 var(--accent-c) var(--accent-h) / 0.35);

  --radius: 4px;
  --maxw: 1320px;
  --gut: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --grid-unit: 32px;
}

/* DARK (default) */
:root, [data-theme="dark"] {
  --bg: oklch(0.16 0.012 250);
  --bg-1: oklch(0.185 0.013 250);
  --bg-2: oklch(0.215 0.014 250);
  --ink: oklch(0.96 0.005 250);
  --ink-2: oklch(0.78 0.012 250);
  --ink-3: oklch(0.6 0.012 250);
  --line: oklch(0.96 0.005 250 / 0.1);
  --line-2: oklch(0.96 0.005 250 / 0.18);
  --grid: oklch(0.96 0.005 250 / 0.045);
  --grid-strong: oklch(0.96 0.005 250 / 0.08);
  --card: oklch(0.2 0.013 250 / 0.6);
  --glass: oklch(0.18 0.013 250 / 0.7);
  --shadow: 0 1px 0 oklch(1 0 0 / 0.04) inset, 0 20px 50px -20px oklch(0 0 0 / 0.6);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: oklch(0.985 0.003 250);
  --bg-1: oklch(0.965 0.005 250);
  --bg-2: oklch(0.94 0.006 250);
  --ink: oklch(0.22 0.02 255);
  --ink-2: oklch(0.42 0.018 255);
  --ink-3: oklch(0.58 0.015 255);
  --line: oklch(0.22 0.02 255 / 0.12);
  --line-2: oklch(0.22 0.02 255 / 0.2);
  --grid: oklch(0.22 0.02 255 / 0.05);
  --grid-strong: oklch(0.22 0.02 255 / 0.09);
  --card: oklch(1 0 0 / 0.6);
  --glass: oklch(1 0 0 / 0.72);
  --accent: oklch(0.52 0.17 var(--accent-h));
  --accent-bright: oklch(0.55 0.18 var(--accent-h));
  --shadow: 0 1px 0 oklch(1 0 0 / 0.6) inset, 0 18px 40px -22px oklch(0.4 0.05 255 / 0.45);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* gate theme transition until after first paint to avoid load-time color interpolation glitch */
[data-ready] body { transition: background-color 0.45s var(--ease), color 0.45s var(--ease); }

::selection { background: var(--accent); color: white; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ---------- Blueprint background grid ---------- */
.blueprint {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: var(--grid-unit) var(--grid-unit);
  mask-image: radial-gradient(120% 90% at 50% 0%, black 30%, transparent 90%);
  transition: opacity 0.5s var(--ease);
}
.blueprint::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px);
  background-size: calc(var(--grid-unit) * 5) calc(var(--grid-unit) * 5);
  mask-image: radial-gradient(110% 80% at 50% 0%, black 10%, transparent 80%);
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
main { position: relative; z-index: 1; }
section { position: relative; }

.section-pad { padding-block: clamp(72px, 11vw, 160px); }

/* section divider line with edge ticks */
.rule {
  position: relative;
  height: 1px;
  background: var(--line);
  max-width: var(--maxw);
  margin-inline: auto;
}

/* eyebrow / kicker */
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
}
.kicker .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* headings */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; margin: 0; }
.display {
  font-size: clamp(44px, 8.2vw, 116px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.96;
}
.display .it { font-style: italic; font-weight: 300; color: var(--ink-2); }
.h2 { font-size: clamp(30px, 4.4vw, 56px); letter-spacing: -0.03em; }
.lead { font-size: clamp(18px, 2vw, 22px); color: var(--ink-2); line-height: 1.5; font-weight: 400; }

.mono { font-family: var(--font-mono); }
.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Buttons ---------- */
.btn {
  --b: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
  white-space: nowrap;
}
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-bright); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.link-inline {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); border-bottom: 1px solid var(--line-2);
  padding-bottom: 3px;
  white-space: nowrap;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), gap 0.3s var(--ease);
}
.link-inline:hover { color: var(--accent); border-color: var(--accent); gap: 12px; }

/* ---------- Nav ---------- */
.statusbar {
  position: relative; z-index: 50;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  background: var(--bg);
}
.statusbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 30px; }
.statusbar .seg { display: flex; align-items: center; gap: 7px; }
.statusbar .blink { width: 6px; height: 6px; border-radius: 50%; background: oklch(0.72 0.17 150); animation: blink 2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.statusbar .hide-sm { display: flex; }

nav.bar {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
/* solid, readable header once the page is scrolled off the top */
nav.bar.scrolled { background: var(--bg); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.5); }
nav.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.brand .glyph {
  width: 26px; height: 26px; border-radius: 6px;
  position: relative; flex: none;
  background: var(--accent);
  display: grid; place-items: center;
  overflow: hidden;
}
.brand .glyph svg { width: 66%; height: 66%; display: block; }
.brand b { color: var(--accent); font-weight: 400; }
.brand .bn { display: flex; flex-direction: column; line-height: 1.02; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: 14px; color: var(--ink-2); padding: 8px 12px; border-radius: var(--radius);
  position: relative; transition: color 0.25s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-right { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: var(--radius);
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2);
  display: grid; place-items: center; transition: all 0.3s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .ico-sun { display: none; }
[data-theme="light"] .theme-toggle .ico-sun { display: block; }
[data-theme="light"] .theme-toggle .ico-moon { display: none; }
.nav-login { font-size: 14px; color: var(--ink-2); padding: 8px 12px; transition: color 0.25s; }
.nav-login:hover { color: var(--ink); }

.menu-btn {
  display: none;
  width: 40px; height: 40px; border-radius: var(--radius);
  border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--ink-2); place-items: center;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.menu-btn:hover { border-color: var(--accent); color: var(--accent); }
.menu-btn svg { width: 18px; height: 18px; }
.nav-links .nav-drop-cta { display: none; }   /* CTA block shows only in the mobile dropdown */

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero .wrap { padding-top: clamp(56px, 9vw, 120px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-top: 26px; max-width: 14ch; }
.hero .lead { margin-top: 30px; max-width: 46ch; }
.hero-cta { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

/* hero schematic visual */
.schematic {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(4px);
  aspect-ratio: 1 / 1.05;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.schematic .corner { position: absolute; width: 12px; height: 12px; border: 1px solid var(--accent); }
.schematic .corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.schematic .corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.schematic .corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.schematic .corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.schematic .tag {
  position: absolute; top: 14px; left: 16px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
}
.schematic .tag.r { left: auto; right: 16px; }
.schematic svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* stats */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  margin-top: clamp(48px, 7vw, 88px);
}
.stat { padding: 26px 24px 26px 0; position: relative; }
.stat + .stat { padding-left: 24px; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 26px; bottom: 26px; width: 1px; background: var(--line); }
.stat .num { font-size: clamp(38px, 4.4vw, 60px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; display: flex; align-items: baseline; gap: 4px; }
.stat .num .suf { font-size: 0.45em; color: var(--accent); font-weight: 500; }
.stat .cap { margin-top: 12px; font-size: 13.5px; color: var(--ink-3); line-height: 1.4; max-width: 22ch; }

/* ---------- Section header ---------- */
.sec-head { display: grid; grid-template-columns: 1fr; gap: 22px; max-width: 920px; }
.sec-head.split { grid-template-columns: 1fr auto; align-items: end; max-width: none; gap: 32px; }
.sec-head h2 { max-width: 18ch; }

/* ---------- Studio ---------- */
.studio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; margin-top: 56px; }
.studio-copy p { color: var(--ink-2); font-size: clamp(16px, 1.5vw, 18px); margin: 0 0 20px; max-width: 52ch; }
.studio-copy p strong { color: var(--ink); font-weight: 500; }
.studio-side {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 4px;
  position: relative; background: var(--card);
}
.contrast-row { display: grid; gap: 4px; }
.contrast { padding: 22px 24px; border-radius: 3px; position: relative; }
.contrast.bad { background: oklch(0.6 0.02 30 / 0.06); }
.contrast.good { background: var(--accent-soft); }
.contrast .ct-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.contrast.bad .ct-label { color: oklch(0.65 0.13 30); }
.contrast.good .ct-label { color: var(--accent); }
.contrast .ct-text { font-size: 15px; color: var(--ink-2); line-height: 1.5; }

/* ---------- Services ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.svc {
  position: relative; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); overflow: hidden;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), background 0.4s var(--ease);
}
.svc::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(120% 80% at 50% -10%, var(--accent-soft), transparent 60%);
  transition: opacity 0.5s var(--ease);
}
.svc:hover { transform: translateY(-4px); border-color: var(--accent-line); }
.svc:hover::before { opacity: 1; }
.svc .br { position: absolute; width: 14px; height: 14px; opacity: 0; transition: opacity 0.4s var(--ease); }
.svc:hover .br { opacity: 1; }
.svc .br.tl { top: 8px; left: 8px; border-top: 1.5px solid var(--accent); border-left: 1.5px solid var(--accent); }
.svc .br.br2 { bottom: 8px; right: 8px; border-bottom: 1.5px solid var(--accent); border-right: 1.5px solid var(--accent); }
.svc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.svc-no { font-family: var(--font-mono); font-size: 13px; color: var(--accent); letter-spacing: 0.05em; }
.svc-cat { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 100px; padding: 4px 10px; white-space: nowrap; }
.svc-ico { width: 44px; height: 44px; margin-bottom: 20px; color: var(--accent); }
.svc h3 { font-size: 22px; margin-bottom: 12px; letter-spacing: -0.02em; }
.svc p { color: var(--ink-2); font-size: 15px; line-height: 1.55; margin: 0 0 22px; }
.svc ul { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.svc li { font-size: 13.5px; color: var(--ink-2); font-family: var(--font-mono); display: flex; gap: 10px; }
.svc li::before { content: "—"; color: var(--accent); }

/* ---------- Work ---------- */
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; }
.case {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 30px; overflow: hidden;
  display: flex; flex-direction: column; min-height: 280px;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.case:hover { border-color: var(--accent-line); transform: translateY(-4px); }
.case-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.case-no { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.1em; }
.case-cat { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.case h3 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 12px; letter-spacing: -0.025em; }
.case p { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; margin: 0 0 auto; max-width: 46ch; }
.case-metrics { display: flex; gap: 28px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.case-metric .m { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.case-metric .l { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.case .arrow-c { position: absolute; top: 28px; right: 28px; color: var(--ink-3); opacity: 0; transform: translate(-4px, 4px); transition: all 0.4s var(--ease); }
.case:hover .arrow-c { opacity: 1; transform: translate(0,0); color: var(--accent); }

/* ---------- Process ---------- */
.proc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 56px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { padding: 30px; position: relative; border-right: 1px solid var(--line); background: var(--card); transition: background 0.4s var(--ease); }
.step:last-child { border-right: 0; }
.step:hover { background: var(--accent-soft); }
.step-no { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 40px; display: flex; align-items: center; gap: 8px; }
.step-no::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.step h3 { font-size: 20px; margin-bottom: 10px; }
.step p { color: var(--ink-2); font-size: 14px; line-height: 1.5; margin: 0; }
.guarantee {
  margin-top: 20px; border: 1px solid var(--accent-line); border-radius: var(--radius);
  background: var(--accent-soft); padding: 32px clamp(28px, 4vw, 48px);
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
}
.guarantee .g-ico { width: 48px; height: 48px; color: var(--accent); }
.guarantee .g-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.guarantee p { margin: 0; font-size: clamp(16px, 1.8vw, 21px); color: var(--ink); line-height: 1.45; font-weight: 500; max-width: 62ch; letter-spacing: -0.01em; }

/* ---------- Portal ---------- */
.portal-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(36px, 5vw, 72px); align-items: center; margin-top: 56px; }
.portal-list { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 4px; }
.portal-item { padding: 20px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 18px; }
.portal-item:last-child { border-bottom: 1px solid var(--line); }
.portal-item .pn { font-family: var(--font-mono); font-size: 12px; color: var(--accent); padding-top: 3px; }
.portal-item h4 { font-size: 17px; margin-bottom: 6px; font-weight: 600; }
.portal-item p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; max-width: 42ch; }

/* portal mock UI */
.portal-app {
  border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden;
  background: var(--bg-1); box-shadow: var(--shadow);
}
.pa-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.pa-bar .dots { display: flex; gap: 6px; }
.pa-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); display: block; }
.pa-bar .url { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); margin-left: 4px; }
.pa-bar .live { margin-left: auto; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: oklch(0.72 0.17 150); display: flex; align-items: center; gap: 6px; }
.pa-bar .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: oklch(0.72 0.17 150); }
.pa-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; }
.pa-head .t { font-weight: 600; font-size: 15px; }
.pa-tickets { padding: 0 12px 12px; display: grid; gap: 8px; }
.ticket {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--card);
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.ticket:hover { border-color: var(--accent-line); transform: translateX(3px); }
.ticket .tid { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.ticket .tt { grid-column: 1 / 2; font-size: 14px; font-weight: 500; }
.ticket .meta { grid-column: 1 / 2; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.ticket .time { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); text-align: right; }
.badge { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 9px; border-radius: 100px; justify-self: end; white-space: nowrap; }
.badge.prog { background: var(--accent-soft); color: var(--accent); }
.badge.crit { background: oklch(0.62 0.2 25 / 0.14); color: oklch(0.68 0.2 25); }
.badge.done { background: oklch(0.62 0.13 150 / 0.14); color: oklch(0.66 0.14 150); }
.pa-foot { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.pa-stat { padding: 16px 18px; border-right: 1px solid var(--line); }
.pa-stat:last-child { border-right: 0; }
.pa-stat .n { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; }
.pa-stat .l { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }

/* ---------- Tech marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding-block: 22px; -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: scroll 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.04em; color: var(--ink-3); display: flex; align-items: center; gap: 56px; white-space: nowrap; }
.marquee-track span::after { content: "/"; color: var(--accent); }
@keyframes scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: 48px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; background: none; border: 0; text-align: left; color: var(--ink);
  padding: 24px 0; display: flex; align-items: center; gap: 20px; font-size: clamp(17px, 2vw, 21px); font-weight: 500; letter-spacing: -0.015em;
}
.faq-q .qn { font-family: var(--font-mono); font-size: 12px; color: var(--accent); flex: none; width: 28px; }
.faq-q .qx { margin-left: auto; flex: none; width: 22px; height: 22px; position: relative; transition: transform 0.4s var(--ease); }
.faq-q .qx::before, .faq-q .qx::after { content: ""; position: absolute; background: var(--ink-2); transition: opacity 0.3s; }
.faq-q .qx::before { top: 50%; left: 0; right: 0; height: 1.5px; transform: translateY(-50%); }
.faq-q .qx::after { left: 50%; top: 0; bottom: 0; width: 1.5px; transform: translateX(-50%); }
.faq-item.open .qx { transform: rotate(135deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease); }
.faq-a > div { overflow: hidden; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a p { margin: 0; padding: 0 0 28px 48px; color: var(--ink-2); font-size: 16px; line-height: 1.6; max-width: 74ch; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); margin-top: 56px; }
.contact-info .lead { margin-bottom: 40px; max-width: 40ch; }
.info-row { display: grid; gap: 4px; padding: 20px 0; border-top: 1px solid var(--line); }
.info-row:last-of-type { border-bottom: 1px solid var(--line); }
.info-row .il { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.info-row .iv { font-size: 16px; color: var(--ink); }
.info-row .iv a:hover { color: var(--accent); }

.form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field.row2 { grid-template-columns: 1fr 1fr; gap: 20px; }
.field label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.field label .req { color: var(--accent); }
.input, .textarea {
  width: 100%; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 14px 16px; color: var(--ink); font-family: var(--font-sans); font-size: 15px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { resize: vertical; min-height: 130px; line-height: 1.5; }
.form .note { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.field.full { grid-column: 1 / -1; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); position: relative; z-index: 1; background: var(--bg); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-block: 64px; }
.foot-brand p { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; margin: 18px 0 0; max-width: 40ch; }
.foot-col h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 18px; font-weight: 500; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.foot-col a { font-size: 14.5px; color: var(--ink-2); transition: color 0.25s; }
.foot-col a:hover { color: var(--accent); }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; padding-block: 22px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.04em; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; } .reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; } .reveal.d4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- cursor crosshair ---------- */
.xhair { position: fixed; z-index: 999; pointer-events: none; mix-blend-mode: difference; opacity: 0; transition: opacity 0.3s; }
.xhair .lh, .xhair .lv { position: fixed; background: oklch(1 0 0 / 0.4); }
.xhair .lh { height: 1px; left: 0; right: 0; }
.xhair .lv { width: 1px; top: 0; bottom: 0; }
@media (hover: none) { .xhair { display: none; } }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .schematic { max-width: 460px; }
  .studio-grid, .portal-grid, .contact-grid { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .proc-grid { grid-template-columns: 1fr 1fr; }
  .proc-grid .step:nth-child(2) { border-right: 0; }
  .proc-grid .step:nth-child(1), .proc-grid .step:nth-child(2) { border-bottom: 1px solid var(--line); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .guarantee { grid-template-columns: 1fr; gap: 18px; }

  /* ---- mobile nav ---- */
  .statusbar .hide-sm { display: none; }
  nav.bar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .menu-btn { display: grid; }
  .nav-right .nav-login, .nav-right .btn-primary { display: none; }  /* moved into dropdown */
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 10px 16px 16px;
    box-shadow: 0 22px 44px -22px rgba(0, 0, 0, .55);
  }
  body.nav-open .nav-links { display: flex; }
  .nav-links a { padding: 13px 8px; font-size: 15.5px; color: var(--ink); }
  .nav-links a::after { display: none; }
  .nav-links .nav-drop-cta {
    display: flex; flex-direction: column; gap: 10px;
    margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line);
  }
  .nav-links .nav-drop-cta .btn-primary { justify-content: center; }
}
@media (max-width: 620px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .stat:nth-child(3)::before { display: none; }
  .proc-grid { grid-template-columns: 1fr; }
  .proc-grid .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .field.row2 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .sec-head.split { grid-template-columns: 1fr; }

  /* status bar: trim to fit small phones (keep status + live clock) */
  .statusbar { font-size: 10px; letter-spacing: 0.03em; }
  .statusbar .wrap { gap: 10px; }
  .statusbar .loc { display: none; }

  /* kicker eyebrow: let it wrap instead of overflowing */
  .kicker { flex-wrap: wrap; row-gap: 4px; font-size: 11px; letter-spacing: 0.08em; gap: 7px; }
  .kicker::before { display: none; }

  /* schematic FIG tag: shrink and drop the long suffix */
  .schematic .tag { font-size: 9px; letter-spacing: 0.05em; }
  .schematic .tag-ext { display: none; }
}

/* ---------- Django integration: messages + form errors ---------- */
.form-alert {
  grid-column: 1 / -1;
  display: flex; align-items: flex-start; gap: 10px;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 14px; line-height: 1.5;
  border: 1px solid var(--line-2);
}
.form-alert::before { content: "◇"; flex: none; line-height: 1.5; }
.form-alert.ok { border-color: oklch(0.62 0.13 150 / 0.5); background: oklch(0.62 0.13 150 / 0.12); color: oklch(0.72 0.14 150); }
.form-alert.err { border-color: oklch(0.62 0.2 25 / 0.5); background: oklch(0.62 0.2 25 / 0.12); color: oklch(0.7 0.2 25); }
.field .field-error { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: oklch(0.7 0.2 25); margin-top: 2px; }
.input.has-error, .textarea.has-error { border-color: oklch(0.62 0.2 25 / 0.7); }

/* fixed toast for post-redirect messages */
.toast-wrap { position: fixed; top: 44px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(92vw, 460px); }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  border-radius: var(--radius); padding: 13px 16px;
  font-size: 14px; line-height: 1.45;
  background: var(--glass); backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); color: var(--ink);
  animation: toast-in 0.4s var(--ease);
}
.toast.ok { border-color: oklch(0.62 0.13 150 / 0.5); }
.toast.err { border-color: oklch(0.62 0.2 25 / 0.5); }
.toast::before { content: "◇"; flex: none; color: var(--accent); }
.toast.err::before { content: "✕"; color: oklch(0.7 0.2 25); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } }
