/* =========================================================
   ACCUTECH NETWORKS INC. — design tokens + components
   ========================================================= */
:root {
  /* Surfaces (neutral, deep graphite) */
  --bg: #0a0c0e;
  --surface-1: #0f1215;
  --surface-2: #14181c;
  --surface-3: #1a1f24;

  /* Lines */
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-control: rgba(255, 255, 255, 0.34); /* >= 3:1 on bg for controls */

  /* Text */
  --text: #eceff1;
  --text-2: #a6adb4;
  --text-3: #808891;

  /* Single accent */
  --accent: #46e3a0;
  --accent-ink: #04170f;
  --accent-soft: rgba(70, 227, 160, 0.12);

  /* Semantic (desaturated) */
  --ok: #7cc9a3;
  --warn: #d9b46a;
  --err: #d98a7c;

  /* Type scale (1.25) */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5625rem;
  --fs-2xl: 1.953rem;
  --fs-3xl: clamp(2rem, 4vw, 3.05rem);
  --fs-4xl: clamp(2.5rem, 6.4vw, 5rem);

  /* Spacing (4px base) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 144px;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  /* Shadow (subtle depth only) */
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 40px -24px rgba(0, 0, 0, 0.7);

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur: 150ms;
  --dur-reveal: 800ms;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--fs-md);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, canvas, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.num { font-variant-numeric: tabular-nums; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; }

/* Ambient grain-free background grid */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 70%);
  opacity: 0.5;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--btn-h);
  padding: 0 var(--s-5);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-control); }

@media (hover: hover) {
  .btn-primary:hover { background: #6ceab4; }
  .btn-ghost:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, 0.5); }
  .btn:hover svg.arrow { transform: translateX(3px); }
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  border-bottom: 1px solid var(--line-control);
  padding-bottom: 2px;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
@media (hover: hover) {
  .link:hover { border-color: var(--accent); color: var(--accent); }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(10, 12, 14, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  min-height: 44px;
}
.brand-mark { width: 26px; height: 26px; color: var(--accent); }
.brand-name { font-size: 15px; white-space: nowrap; }
.brand-name span { color: var(--text-3); font-weight: 500; }

.nav { display: flex; align-items: center; gap: var(--s-1); }
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 var(--s-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--text-2);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav a.is-active { color: var(--text); }
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: var(--s-3);
  right: var(--s-3);
  bottom: 6px;
  height: 1px;
  background: var(--accent);
}
@media (hover: hover) {
  .nav a:hover { color: var(--text); background: var(--surface-2); }
}

.header-cta { display: flex; align-items: center; gap: var(--s-3); }
.header-cta .btn { --btn-h: 38px; padding: 0 var(--s-4); }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-control);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.menu-toggle:active { transform: scale(0.96); }
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.menu-toggle span { position: relative; }
.menu-toggle span::before,
.menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -5px; }
.menu-toggle span::after { top: 5px; }
.is-open .menu-toggle span { background: transparent; }
.is-open .menu-toggle span::before { transform: translateY(5px) rotate(45deg); }
.is-open .menu-toggle span::after { transform: translateY(-5px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  z-index: 49;
  background: rgba(10, 12, 14, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: var(--s-3) var(--gutter) var(--s-6);
}
.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-lg);
  color: var(--text);
}
.mobile-nav .btn { margin-top: var(--s-5); width: 100%; }
.is-open + .mobile-nav { display: block; animation: drop var(--dur-reveal) var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 920px) {
  .nav, .header-cta .btn { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- Section primitives ---------- */
.section { position: relative; padding-block: clamp(80px, 12vw, var(--s-10)); }
.section + .section { border-top: 1px solid var(--line); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-6) var(--s-8);
  align-items: end;
  margin-bottom: clamp(48px, 7vw, 88px);
}
.section-head h2 { font-size: var(--fs-3xl); margin-top: var(--s-4); max-width: 16ch; }
.section-head p { color: var(--text-2); font-size: var(--fs-lg); line-height: 1.55; max-width: 46ch; }
@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--header-h) + var(--s-8));
  padding-bottom: var(--s-7);
  overflow: hidden;
  isolation: isolate;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 12, 14, 0) 40%, var(--bg) 100%),
    linear-gradient(90deg, rgba(10, 12, 14, 0.85) 0%, rgba(10, 12, 14, 0.2) 60%, rgba(10, 12, 14, 0) 100%);
}

.hero h1 {
  font-size: var(--fs-4xl);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  max-width: 14ch;
  margin-top: var(--s-5);
}
.hero h1 .muted { color: var(--text-3); }
.hero-lede {
  margin-top: var(--s-5);
  max-width: 52ch;
  font-size: var(--fs-lg);
  line-height: 1.55;
  color: var(--text-2);
}
.hero-actions { margin-top: var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-3); }

.hero-meta {
  margin-top: clamp(56px, 9vw, 112px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-2);
}
.hero-meta > div {
  padding: var(--s-5) var(--s-5) 0 0;
  display: grid;
  gap: 2px;
}
.hero-meta > div + div { padding-left: var(--s-5); border-left: 1px solid var(--line); }
.hero-meta dt { font-size: var(--fs-xs); color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; }
.hero-meta dd { margin: 0; font-size: var(--fs-md); color: var(--text); font-variant-numeric: tabular-nums; }
.status-live { display: inline-flex; align-items: center; gap: 8px; }
.status-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(70, 227, 160, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(70, 227, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(70, 227, 160, 0); }
}
@media (max-width: 760px) {
  .hero-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-meta > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero-meta > div:nth-child(n + 3) { border-top: 1px solid var(--line); margin-top: var(--s-5); }
}

/* ---------- Practice cards (services) ---------- */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-1);
}
.practice {
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 40px);
  min-height: 520px;
  transition: background-color var(--dur) var(--ease);
}
.practice + .practice { border-left: 1px solid var(--line-2); }
.practice::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.045), transparent 60%);
  transition: opacity var(--dur) var(--ease);
}
@media (hover: hover) {
  .practice:hover::before { opacity: 1; }
  .practice:hover .practice-icon { color: var(--accent); border-color: rgba(70, 227, 160, 0.4); }
}
.practice-top { display: flex; justify-content: space-between; align-items: flex-start; }
.practice-index { font-size: var(--fs-sm); color: var(--text-3); font-variant-numeric: tabular-nums; }
.practice-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--text-2);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.practice-icon svg { width: 22px; height: 22px; }
.practice h3 { margin-top: var(--s-8); font-size: var(--fs-xl); max-width: 18ch; }
.practice > p { margin-top: var(--s-4); color: var(--text-2); }
.practice ul { margin-top: auto; padding-top: var(--s-6); display: grid; }
.practice li {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.practice li span:last-child { color: var(--text-3); font-variant-numeric: tabular-nums; }

@media (max-width: 980px) {
  .practice-grid { grid-template-columns: 1fr; }
  .practice { min-height: 0; }
  .practice + .practice { border-left: 0; border-top: 1px solid var(--line-2); }
  .practice h3 { margin-top: var(--s-6); }
}

/* ---------- Capabilities (tabs) ---------- */
.cap {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.tablist {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--line-2);
  border-radius: calc(var(--r-md) + 4px);
  background: var(--surface-1);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tablist::-webkit-scrollbar { display: none; }
.tab {
  min-height: 40px;
  padding: 0 var(--s-4);
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.tab:active { transform: scale(0.98); }
.tab[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 0 0 1px var(--line-2) inset; }
@media (hover: hover) {
  .tab:hover:not([aria-selected="true"]) { color: var(--text); }
}

.panel[hidden] { display: none; }
.panel { animation: fade-up 480ms var(--ease); }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.panel h3 { margin-top: var(--s-6); font-size: var(--fs-2xl); max-width: 20ch; }
.panel > p { margin-top: var(--s-4); color: var(--text-2); max-width: 52ch; }
.feature-list { margin-top: var(--s-6); display: grid; gap: 0; }
.feature-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: var(--s-3);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--line);
}
.feature-list li:last-child { border-bottom: 1px solid var(--line); }
.feature-list svg { width: 18px; height: 18px; margin-top: 3px; color: var(--accent); }
.feature-list strong { display: block; font-weight: 500; }
.feature-list span { display: block; font-size: var(--fs-sm); color: var(--text-2); margin-top: 2px; }

.diagram {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.03), transparent 60%),
    var(--surface-1);
  aspect-ratio: 5 / 4;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.diagram-head {
  position: absolute;
  inset: 0 0 auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.diagram svg { position: absolute; inset: 48px 0 0 0; width: 100%; height: calc(100% - 48px); }
.diagram .d-line { stroke: rgba(255, 255, 255, 0.16); stroke-width: 1; fill: none; }
.diagram .d-flow {
  stroke: var(--accent);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 4 10;
  animation: flow 1.6s linear infinite;
}
@keyframes flow { to { stroke-dashoffset: -28; } }
.diagram .d-node { fill: var(--surface-3); stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; }
.diagram .d-node-accent { fill: var(--surface-3); stroke: var(--accent); stroke-width: 1.25; }
.diagram .d-label { fill: var(--text-2); font-size: 11px; font-family: inherit; letter-spacing: 0.04em; }
.diagram .d-label-dim { fill: var(--text-3); font-size: 10px; font-family: inherit; letter-spacing: 0.06em; }
.diagram .d-ping { fill: var(--accent); transform-box: fill-box; transform-origin: center; animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { opacity: 0.6; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
.d-panel[hidden] { display: none; }

.cap > * { min-width: 0; }
@media (max-width: 980px) {
  .cap { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Security console ---------- */
.console-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.console-copy h2 { font-size: var(--fs-3xl); margin-top: var(--s-4); max-width: 15ch; }
.console-copy > p { margin-top: var(--s-5); color: var(--text-2); font-size: var(--fs-lg); line-height: 1.55; max-width: 44ch; }
.metric-row {
  margin-top: var(--s-7);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-2);
}
.metric-row > div { padding-top: var(--s-4); }
.metric-row > div + div { padding-left: var(--s-4); border-left: 1px solid var(--line); }
.metric-row strong { display: block; font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.metric-row span { font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }

.console {
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: #0c0f11;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.console-bar .dots { display: flex; gap: 6px; }
.console-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line-2); }
.console-body {
  padding: var(--s-4) var(--s-5) var(--s-5);
  min-height: 360px;
  font-size: 13px;
  line-height: 1.75;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.console-line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: var(--s-3);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 300ms var(--ease), transform 300ms var(--ease);
}
.console-line.on { opacity: 1; transform: none; }
.console-line .t { color: var(--text-3); }
.console-line .msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid currentColor;
}
.tag-ok { color: var(--ok); }
.tag-warn { color: var(--warn); }
.tag-err { color: var(--err); }
.tag-info { color: var(--text-3); }
.console-foot {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.progress {
  flex: 1;
  height: 2px;
  background: var(--line-2);
  border-radius: 2px;
  overflow: hidden;
}
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 400ms var(--ease); }

@media (max-width: 980px) {
  .console-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .console-line { grid-template-columns: 54px minmax(0, 1fr) auto; font-size: 12px; }
  .console-body { padding-inline: var(--s-4); }
}

/* ---------- Process ---------- */
.process {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}
.process-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--line-2);
}
.process-track i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}
.step { position: relative; padding: var(--s-6) var(--s-5) 0 0; }
.step + .step { padding-left: var(--s-5); border-left: 1px solid var(--line); }
.step-num {
  font-size: var(--fs-sm);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.step h3 { margin-top: var(--s-6); font-size: var(--fs-lg); }
.step p { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--text-2); }
.step::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-control);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.step + .step::before { left: -4px; }
.step.is-lit::before { background: var(--accent); border-color: var(--accent); }

@media (max-width: 860px) {
  .process { grid-template-columns: 1fr; padding-left: var(--s-5); }
  .process-track { left: 0; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .process-track i { transform-origin: top; transform: scaleY(var(--p, 0)); }
  .step, .step + .step { padding: 0 0 var(--s-7) var(--s-4); border-left: 0; }
  .step::before, .step + .step::before { left: calc(-1 * var(--s-5) - 3px); top: 6px; }
  .step h3 { margin-top: var(--s-2); }
}

/* ---------- Industries ---------- */
.industries {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-2);
}
.industry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-4);
  padding: var(--s-5) var(--s-5) var(--s-5) 0;
  border-bottom: 1px solid var(--line);
  transition: background-color var(--dur) var(--ease);
}
.industry:not(:nth-child(3n + 1)) { padding-left: var(--s-5); border-left: 1px solid var(--line); }
.industry .idx { font-size: var(--fs-xs); color: var(--text-3); padding-top: 4px; font-variant-numeric: tabular-nums; }
.industry h3 { font-size: var(--fs-md); font-weight: 500; letter-spacing: -0.01em; }
.industry p { margin-top: var(--s-1); font-size: var(--fs-sm); color: var(--text-2); }
@media (max-width: 860px) {
  .industries { grid-template-columns: 1fr 1fr; }
  .industry:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .industry:nth-child(2n) { padding-left: var(--s-5); border-left: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .industries { grid-template-columns: 1fr; }
  .industry:nth-child(2n) { padding-left: 0; border-left: 0; }
}

/* ---------- Principles (marquee) ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: var(--s-5);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  gap: var(--s-8);
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
  font-size: var(--fs-xl);
  color: var(--text-3);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.marquee-track span::after {
  content: "";
  width: 6px;
  height: 6px;
  border: 1px solid var(--text-3);
  transform: rotate(45deg);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Company ---------- */
.company {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
}
.company h2 { font-size: var(--fs-3xl); margin-top: var(--s-4); max-width: 14ch; }
.company-body p { color: var(--text-2); font-size: var(--fs-lg); line-height: 1.6; }
.company-body p + p { margin-top: var(--s-5); }
.facts { margin-top: var(--s-7); display: grid; }
.facts div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; color: var(--text); }
@media (max-width: 860px) {
  .company { grid-template-columns: minmax(0, 1fr); }
  .facts div { grid-template-columns: 120px minmax(0, 1fr); }
}

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-1);
}
.contact-info { padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; }
.contact-info h2 { font-size: var(--fs-3xl); margin-top: var(--s-4); max-width: 12ch; }
.contact-info > p { margin-top: var(--s-4); color: var(--text-2); max-width: 40ch; }
.contact-list { margin-top: auto; padding-top: var(--s-7); display: grid; }
.contact-item {
  display: grid;
  gap: 4px;
  padding: var(--s-4) 0;
  border-top: 1px solid var(--line);
}
.contact-item dt { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.contact-item dd { margin: 0; }
.contact-item a.mail {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  font-size: var(--fs-xl);
  letter-spacing: -0.01em;
  transition: color var(--dur) var(--ease);
}
.contact-item a.mail svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
@media (hover: hover) {
  .contact-item a.mail:hover { color: var(--accent); }
  .contact-item a.mail:hover svg { transform: translate(2px, -2px); }
}
.copy-btn {
  margin-left: var(--s-2);
  min-height: 32px;
  padding: 0 var(--s-3);
  border: 1px solid var(--line-control);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: var(--fs-xs);
  cursor: pointer;
  position: relative;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.copy-btn::before { content: ""; position: absolute; inset: -6px; } /* expand hit area */
.copy-btn:active { transform: scale(0.98); }
.copy-btn.is-done { color: var(--accent); border-color: var(--accent); }
@media (hover: hover) {
  .copy-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.55); }
}
.mail-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); }

.map {
  position: relative;
  min-height: 460px;
  border-left: 1px solid var(--line-2);
  background: var(--surface-2);
}
.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) invert(0.9) contrast(0.88) brightness(0.95);
  transition: filter 400ms var(--ease);
}
@media (hover: hover) {
  .map:hover iframe { filter: grayscale(0.2) invert(0) contrast(1) brightness(1); }
}
.map-chip {
  position: absolute;
  left: var(--s-4);
  bottom: var(--s-4);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 40px;
  padding: 0 var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line-control);
  background: rgba(10, 12, 14, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: var(--fs-sm);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.map-chip svg { width: 14px; height: 14px; }
@media (hover: hover) {
  .map-chip:hover { border-color: var(--accent); }
}
@media (max-width: 920px) {
  .contact { grid-template-columns: minmax(0, 1fr); }
  .map { border-left: 0; border-top: 1px solid var(--line-2); min-height: 360px; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--s-8) var(--s-6);
  margin-top: var(--s-9);
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: var(--s-6);
}
.footer-top p { margin-top: var(--s-4); color: var(--text-2); font-size: var(--fs-sm); max-width: 36ch; }
.footer-col h4 { font-size: var(--fs-xs); font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.footer-col ul { margin-top: var(--s-3); display: grid; }
.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  transition: color var(--dur) var(--ease);
}
@media (hover: hover) {
  .footer-col a:hover { color: var(--text); }
}
.footer-col address { font-style: normal; font-size: var(--fs-sm); color: var(--text-2); margin-top: var(--s-3); line-height: 1.7; }
.footer-bottom {
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.footer-word {
  margin-top: var(--s-8);
  font-size: clamp(3rem, 13vw, 11rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
}
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-top > :first-child { grid-column: 1 / -1; }
}

/* ---------- Legal pages ---------- */
.legal-hero {
  padding-top: calc(var(--header-h) + var(--s-9));
  padding-bottom: var(--s-7);
  border-bottom: 1px solid var(--line);
}
.legal-hero h1 { font-size: var(--fs-3xl); margin-top: var(--s-4); }
.legal-hero p { margin-top: var(--s-4); color: var(--text-2); max-width: 60ch; }
.legal-hero .meta { margin-top: var(--s-5); font-size: var(--fs-sm); color: var(--text-3); font-variant-numeric: tabular-nums; }

.legal {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  padding-block: var(--s-8);
}
.toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.toc h2 { font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.toc ol { margin-top: var(--s-3); counter-reset: toc; display: grid; border-left: 1px solid var(--line-2); }
.toc a {
  display: block;
  padding: 7px 0 7px var(--s-4);
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: var(--fs-sm);
  color: var(--text-3);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.toc a.is-active { color: var(--text); border-left-color: var(--accent); }
@media (hover: hover) {
  .toc a:hover { color: var(--text); }
}

.prose { max-width: 72ch; color: var(--text-2); }
.prose section + section { margin-top: var(--s-7); padding-top: var(--s-7); border-top: 1px solid var(--line); }
.prose h2 { color: var(--text); font-size: var(--fs-xl); display: flex; gap: var(--s-3); align-items: baseline; }
.prose h2 .n { font-size: var(--fs-sm); color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.prose h3 { color: var(--text); font-size: var(--fs-md); margin-top: var(--s-5); }
.prose p { margin-top: var(--s-4); line-height: 1.75; }
.prose ul { margin-top: var(--s-3); display: grid; gap: var(--s-2); }
.prose li { position: relative; padding-left: var(--s-5); line-height: 1.7; }
.prose li::before { content: ""; position: absolute; left: 4px; top: 0.75em; width: 6px; height: 1px; background: var(--text-3); }
.prose a { color: var(--text); border-bottom: 1px solid var(--line-control); transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease); }
@media (hover: hover) {
  .prose a:hover { color: var(--accent); border-color: var(--accent); }
}
.prose strong { color: var(--text); font-weight: 500; }
.prose .callout {
  margin-top: var(--s-5);
  padding: var(--s-4) var(--s-5);
  border-left: 2px solid var(--accent);
  background: var(--surface-1);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--text-2);
}

@media (max-width: 920px) {
  .legal { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--header-h) var(--gutter) var(--s-7);
}
.notfound .code { font-size: clamp(5rem, 20vw, 12rem); font-weight: 600; letter-spacing: -0.06em; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.25); font-variant-numeric: tabular-nums; }
.notfound p { margin-top: var(--s-4); color: var(--text-2); }
.notfound .btn { margin-top: var(--s-6); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* Hero headline word stagger */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split .w > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 900ms var(--ease);
  transition-delay: calc(var(--i) * 55ms + 120ms);
}
.split.in .w > span { transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .reveal, .split .w > span, .console-line { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
