/* =============================================================
   ELITE CODERS — site.css
   Shared stylesheet for / and /en/. Editorial-tech design system:
   monochrome ink/paper base, one signal accent, hairline grid,
   grotesque display type with a serif italic counterpoint.
   ============================================================= */

/* ---------- Tokens ---------- */
:root {
  --font-sans: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1240px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --nav-h: 68px;
  --radius: 6px;
  --radius-lg: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 160ms var(--ease);
  --t-med: 320ms var(--ease);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0b;
  --bg-2: #101012;
  --bg-3: #17171a;
  --fg: #f3f1ea;
  --fg-2: #b6b4ab;
  --fg-3: #7d7b74;
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.20);
  --accent: #ff6a2b;
  --accent-soft: rgba(255, 106, 43, 0.14);
  --accent-ink: #0a0a0b;
  --ok: #4ade80;
  --err: #fb7185;
  --code-bg: #0d0d0f;
  --code-fg: #d7d5cc;
  --code-comment: #6b6a64;
  --code-key: #ff8a5b;
  --code-str: #c9d67e;
  --code-fn: #8fd3ff;
  --hero-glow: radial-gradient(55% 45% at 72% 42%, rgba(255, 106, 43, 0.16) 0%, rgba(255, 106, 43, 0) 70%);
  --grid-line: rgba(255, 255, 255, 0.06);
  --nav-bg: rgba(10, 10, 11, 0.72);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8);
  --anim-a: #ff6a2b;
  --anim-b: #ffb08a;
  --anim-c: #ffd6c2;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f3ee;
  --bg-2: #ffffff;
  --bg-3: #ecebe4;
  --fg: #121212;
  --fg-2: #4b4a46;
  --fg-3: #7b7a74;
  --line: rgba(18, 18, 18, 0.12);
  --line-2: rgba(18, 18, 18, 0.24);
  --accent: #e8420c;
  --accent-soft: rgba(232, 66, 12, 0.10);
  --accent-ink: #ffffff;
  --ok: #15803d;
  --err: #be123c;
  --code-bg: #141412;
  --code-fg: #e6e4dc;
  --code-comment: #7a7972;
  --code-key: #ff8a5b;
  --code-str: #c9d67e;
  --code-fn: #8fd3ff;
  --hero-glow: radial-gradient(55% 45% at 72% 42%, rgba(232, 66, 12, 0.12) 0%, rgba(232, 66, 12, 0) 70%);
  --grid-line: rgba(18, 18, 18, 0.07);
  --nav-bg: rgba(245, 243, 238, 0.78);
  --shadow: 0 20px 50px -24px rgba(18, 18, 18, 0.35);
  --anim-a: #e8420c;
  --anim-b: #b5300a;
  --anim-c: #ff6a2b;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-optical-sizing: auto;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.hero-grid > *, .approach > *, .panels, .service-body > *, .contact-grid > *, .footer-grid > *, .section-head > * { min-width: 0; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; padding: .6rem 1rem; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); font-weight: 600; }
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Typographic utilities */
.mono { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.accent { color: var(--accent); }

/* Reveal on scroll (cheap, transform/opacity only) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  height: 46px; padding: 0 1.25rem;
  border-radius: 999px; border: 1px solid var(--line-2);
  font-weight: 500; font-size: .95rem; letter-spacing: -0.005em;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
}
.btn:hover { border-color: var(--fg); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; transition: transform var(--t-fast); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-accent:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn-lg { height: 54px; padding: 0 1.6rem; font-size: 1.02rem; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background var(--t-med), border-color var(--t-med);
}
.nav.is-scrolled { background: var(--nav-bg); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: -0.02em; font-size: 1.05rem; }
.brand-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--fg); color: var(--bg); display: grid; place-items: center; }
.brand-mark svg { width: 16px; height: 16px; }
.brand-dot { color: var(--accent); }
.nav-links { display: flex; gap: .25rem; }
.nav-links a {
  position: relative; display: inline-block; padding: .45rem .7rem;
  font-size: .92rem; color: var(--fg-2); border-radius: 999px;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-links a:hover { color: var(--fg); background: var(--bg-3); }
.nav-links a.active { color: var(--fg); }
.nav-links a.active::after { content: ""; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); transform: translateX(-50%); }
.nav-actions { display: flex; align-items: center; gap: .5rem; }
.lang { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em; color: var(--fg-3); padding: .4rem .55rem; border-radius: 999px; border: 1px solid var(--line); }
.lang:hover { border-color: var(--line-2); color: var(--fg); }
.lang .on { color: var(--fg); }
.icon-btn { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--fg-2); transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast); }
.icon-btn:hover { border-color: var(--line-2); color: var(--fg); background: var(--bg-3); }
.icon-btn svg { width: 18px; height: 18px; }
html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }
.nav-cta { height: 40px; }
.burger { display: none; }
.burger span { display: block; width: 18px; height: 1.5px; background: currentColor; margin: 2.5px auto; transition: transform var(--t-fast), opacity var(--t-fast); }
.nav.menu-open .burger span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav.menu-open .burger span:nth-child(2) { opacity: 0; }
.nav.menu-open .burger span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

.drawer {
  display: none; position: fixed; inset: var(--nav-h) 0 0 0; z-index: 49;
  background: var(--bg); padding: 1.25rem var(--gutter) 2rem;
  flex-direction: column; gap: .25rem; overflow-y: auto;
}
.drawer.open { display: flex; }
.drawer a, .drawer button { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: 1.3rem; font-weight: 500; letter-spacing: -0.02em; text-align: left; width: 100%; }
.drawer .mono-index { font-family: var(--font-mono); font-size: .72rem; color: var(--fg-3); margin-right: .8rem; }
.drawer .drawer-meta { font-family: var(--font-mono); font-size: .75rem; color: var(--fg-3); letter-spacing: .06em; text-transform: uppercase; }
.drawer .btn { margin-top: 1.25rem; justify-content: center; border-bottom: 1px solid var(--line-2); font-size: 1rem; padding: 0 1.25rem; }

@media (max-width: 1023px) {
  .nav-links, .nav-cta, .nav-actions .lang { display: none; }
  .burger { display: block; }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; min-height: calc(100svh - var(--nav-h)); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1200ms ease; }
.hero-canvas.is-ready { opacity: 1; }
.hero-bg { position: absolute; inset: 0; z-index: -3; pointer-events: none; background: var(--hero-glow); }
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 100%);
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 100%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-vignette { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, transparent 30%, var(--bg) 100%); }
.hero-inner { padding-top: clamp(4rem, 12vh, 8rem); padding-bottom: clamp(2rem, 5vh, 3.5rem); }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.5rem; }
.hero-eyebrow .pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero-eyebrow .pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--accent); opacity: .7; animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-eyebrow .pulse::after { animation: none; } }
.hero-title {
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: .98; letter-spacing: -0.035em; font-weight: 600;
  max-width: 18ch;
}
.hero-title em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; font-size: 1.06em; color: var(--fg); }
.hero-title em .accent { color: var(--accent); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: end; margin-top: 2rem; }
.hero-lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--fg-2); max-width: 52ch; line-height: 1.55; }
.hero-lead strong { color: var(--fg); font-weight: 600; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero-side { display: grid; gap: .9rem; justify-items: start; }
.hero-side .mono { line-height: 1.7; }
.hero-side .side-list { display: grid; gap: .35rem; font-size: .95rem; color: var(--fg-2); }
.hero-side .side-list li { display: flex; gap: .6rem; align-items: baseline; }
.hero-side .side-list li::before { content: "—"; color: var(--accent); }

.metrics { margin-top: clamp(2.5rem, 7vh, 4.5rem); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); }
.metric { padding: 1.4rem 1.25rem 1.5rem 0; border-right: 1px solid var(--line); }
.metric + .metric { padding-left: 1.25rem; }
.metric:last-child { border-right: 0; }
.metric-value { font-size: clamp(1.9rem, 3.4vw, 2.8rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.metric-value small { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: .6em; color: var(--accent); margin-left: .1em; }
.metric-label { margin-top: .6rem; font-size: .84rem; color: var(--fg-3); line-height: 1.45; text-wrap: pretty; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-side { display: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .metric:nth-child(3) { padding-left: 0; }
}
@media (max-width: 480px) {
  .hero { min-height: auto; }
  .hero-title { max-width: none; }
  .metrics { grid-template-columns: 1fr; }
  .metric { border-right: 0 !important; padding-left: 0 !important; border-top: 1px solid var(--line); }
  .metric:first-child { border-top: 0; }
}

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding-block: .8rem; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 3rem; animation: marquee 48s linear infinite; }
.marquee-track span { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); white-space: nowrap; }
.marquee-track span::before { content: "◆"; font-size: .55em; margin-right: 3rem; color: var(--accent); vertical-align: middle; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; flex-wrap: wrap; width: auto; } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.5rem 3rem; align-items: start; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-index { display: flex; align-items: center; gap: .75rem; padding-top: .7rem; }
.section-index::after { content: ""; flex: 1; height: 1px; background: var(--line); max-width: 120px; }
.section-title { font-size: clamp(2rem, 4.4vw, 3.4rem); letter-spacing: -0.035em; line-height: 1.02; }
.section-title em { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 1.05em; }
.section-sub { margin-top: 1rem; color: var(--fg-2); max-width: 56ch; font-size: 1.05rem; text-wrap: pretty; }
@media (max-width: 800px) { .section-head { grid-template-columns: minmax(0, 1fr); gap: 1rem; } }

/* ---------- Approach (tabs) ---------- */
.approach { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.tabs { display: grid; border-top: 1px solid var(--line); }
.tab {
  display: grid; grid-template-columns: 2.6rem 1fr auto; align-items: center; gap: .5rem;
  padding: 1.15rem 0; border-bottom: 1px solid var(--line); text-align: left;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem); font-weight: 500; letter-spacing: -0.02em; color: var(--fg-2);
  transition: color var(--t-fast), padding-left var(--t-med);
}
.tab .idx { font-family: var(--font-mono); font-size: .72rem; color: var(--fg-3); }
.tab .arrow { width: 18px; height: 18px; opacity: 0; transform: translateX(-6px); transition: opacity var(--t-fast), transform var(--t-fast); color: var(--accent); }
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { color: var(--fg); }
.tab[aria-selected="true"] .idx { color: var(--accent); }
.tab[aria-selected="true"] .arrow { opacity: 1; transform: none; }
.panel[hidden] { display: none; }
.panel { animation: fade-in 320ms var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel-title { font-size: clamp(1.35rem, 2.2vw, 1.85rem); letter-spacing: -0.03em; line-height: 1.15; }
.panel-desc { margin-top: .9rem; color: var(--fg-2); font-size: 1.02rem; max-width: 60ch; }
.panel-list { margin-top: 1.25rem; display: grid; gap: .55rem; }
.panel-list li { display: flex; gap: .7rem; align-items: baseline; font-size: .97rem; color: var(--fg); }
.panel-list li::before { content: "→"; color: var(--accent); font-family: var(--font-mono); flex: none; }

.code { margin-top: 1.75rem; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--code-bg); color: var(--code-fg); box-shadow: var(--shadow); }
.code-bar { display: flex; align-items: center; gap: .75rem; padding: .6rem .9rem; border-bottom: 1px solid rgba(255,255,255,.08); font-family: var(--font-mono); font-size: .74rem; color: rgba(255,255,255,.55); }
.code-bar .dots { display: flex; gap: 5px; }
.code-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.18); }
.code-bar .fname { flex: 1; }
.copy { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--font-mono); font-size: .72rem; padding: .35rem .6rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.75); transition: border-color var(--t-fast), color var(--t-fast); }
.copy:hover { border-color: rgba(255,255,255,.4); color: #fff; }
.copy.copied { border-color: var(--ok); color: var(--ok); }
.copy svg { width: 12px; height: 12px; }
.code pre { margin: 0; padding: 1.1rem 1.2rem 1.25rem; overflow-x: auto; font-family: var(--font-mono); font-size: .84rem; line-height: 1.65; tab-size: 2; counter-reset: ln; }
.code pre code { display: block; }
.code .ln { display: block; padding-left: 2.4rem; position: relative; min-height: 1.65em; }
.code .ln::before { counter-increment: ln; content: counter(ln); position: absolute; left: 0; width: 1.6rem; text-align: right; color: rgba(255,255,255,.28); }
.c { color: var(--code-comment); font-style: italic; }
.k { color: var(--code-key); }
.s { color: var(--code-str); }
.f { color: var(--code-fn); }

@media (max-width: 900px) {
  .approach { grid-template-columns: minmax(0, 1fr); }
  .tabs { display: flex; overflow-x: auto; gap: .5rem; border-top: 0; padding-bottom: .5rem; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { display: inline-flex; flex: none; grid-template-columns: none; padding: .55rem .9rem; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; }
  .tab .arrow { display: none; }
  .tab[aria-selected="true"] { border-color: var(--fg); background: var(--fg); color: var(--bg); }
  .tab[aria-selected="true"] .idx { color: var(--accent); }
}

/* ---------- Services (details accordion) ---------- */
.services { border-top: 1px solid var(--line); }
.service { border-bottom: 1px solid var(--line); }
.service summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 3.5rem 1fr auto; align-items: center; gap: 1rem;
  padding: 1.5rem 0; -webkit-tap-highlight-color: transparent;
}
.service summary::-webkit-details-marker { display: none; }
.service .num { font-family: var(--font-mono); font-size: .78rem; color: var(--fg-3); transition: color var(--t-fast); }
.service h3 { font-size: clamp(1.3rem, 2.6vw, 2rem); font-weight: 500; letter-spacing: -0.03em; transition: color var(--t-fast); }
.service .plus { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: background var(--t-fast), transform var(--t-med), border-color var(--t-fast); }
.service .plus svg { width: 14px; height: 14px; }
.service summary:hover .num { color: var(--accent); }
.service summary:hover .plus { border-color: var(--fg); }
.service[open] .plus { background: var(--fg); color: var(--bg); border-color: var(--fg); transform: rotate(45deg); }
.service[open] .num { color: var(--accent); }
.service-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem 3rem; padding: 0 0 2.25rem 4.5rem; }
.service-desc { color: var(--fg-2); font-size: 1.05rem; max-width: 62ch; text-wrap: pretty; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.25rem; }
.chip { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .02em; padding: .35rem .65rem; border: 1px solid var(--line); border-radius: 999px; color: var(--fg-2); }
.result { border-left: 2px solid var(--accent); padding-left: 1.25rem; align-self: start; }
.result .mono { margin-bottom: .5rem; display: block; }
.result-val { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.result-desc { margin-top: .6rem; color: var(--fg-2); font-size: .95rem; }
@supports (interpolate-size: allow-keywords) {
  .service { interpolate-size: allow-keywords; }
  .service::details-content { block-size: 0; overflow-y: clip; transition: block-size var(--t-med), content-visibility var(--t-med) allow-discrete; }
  .service[open]::details-content { block-size: auto; }
}
@media (max-width: 800px) {
  .service summary { grid-template-columns: 2.4rem 1fr auto; padding: 1.2rem 0; }
  .service-body { grid-template-columns: minmax(0, 1fr); padding-left: 0; gap: 1.5rem; }
}

/* ---------- Stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-2); }
.stack-col { padding: 1.5rem 1.4rem 1.6rem; border-right: 1px solid var(--line); }
.stack-col:last-child { border-right: 0; }
.stack-col .mono { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.1rem; }
.stack-col .mono svg { width: 16px; height: 16px; color: var(--accent); }
.stack-col h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 1rem; }
.stack-list { display: grid; }
.stack-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-top: 1px dashed var(--line); font-size: .9rem; }
.stack-list li span { color: var(--fg-3); }
.stack-list li strong { font-weight: 500; text-align: right; }
@media (max-width: 1000px) {
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-col:nth-child(2) { border-right: 0; }
  .stack-col:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .stack-grid { grid-template-columns: minmax(0, 1fr); }
  .stack-col { border-right: 0; }
  .stack-col + .stack-col { border-top: 1px solid var(--line); }
}

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 2rem 2rem 2.25rem 0; border-right: 1px solid var(--line); position: relative; }
.step + .step { padding-left: 2rem; }
.step:last-child { border-right: 0; padding-right: 0; }
.step-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2.5rem; }
.step-num { font-family: var(--font-serif); font-style: italic; font-size: clamp(2.6rem, 4vw, 3.6rem); line-height: 1; color: var(--fg); }
.step-num::before { content: "0"; color: var(--fg-3); }
.badge { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; padding: .35rem .6rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.step h3 { font-size: 1.35rem; letter-spacing: -0.025em; }
.step p { margin-top: .8rem; color: var(--fg-2); font-size: .98rem; text-wrap: pretty; }
@media (max-width: 860px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { border-right: 0; padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
  .step + .step { padding-left: 0; }
  .step-top { margin-bottom: 1.25rem; }
}

/* ---------- Contact ---------- */
.contact { position: relative; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact-title { font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -0.04em; line-height: 1; }
.contact-title em { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 1.05em; }
.contact-sub { margin-top: 1.25rem; color: var(--fg-2); font-size: 1.05rem; max-width: 48ch; }
.contact-mail { display: inline-flex; align-items: center; gap: .6rem; margin-top: 2rem; font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 500; letter-spacing: -0.02em; border-bottom: 1px solid var(--line-2); padding-bottom: .25rem; transition: border-color var(--t-fast), color var(--t-fast); }
.contact-mail:hover { border-color: var(--accent); color: var(--accent); }
.contact-mail svg { width: 20px; height: 20px; }
.contact-meta { margin-top: 2.5rem; display: grid; gap: 1.25rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.contact-meta .row { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; font-size: .92rem; }
.contact-meta .row .mono { padding-top: .2rem; }
.contact-meta .row div { color: var(--fg-2); line-height: 1.6; }
.contact-meta .row strong { color: var(--fg); font-weight: 500; }
@media (max-width: 480px) { .contact-meta .row { grid-template-columns: 1fr; gap: .3rem; } }

.form-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow); }
.form-card h3 { font-size: 1.3rem; letter-spacing: -0.025em; }
.form-card > p { margin-top: .35rem; color: var(--fg-3); font-size: .92rem; }
.form { margin-top: 1.5rem; display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .84rem; font-weight: 500; color: var(--fg-2); }
.input {
  width: 100%; height: 48px; padding: 0 .9rem; border-radius: var(--radius); border: 1px solid var(--line-2);
  background: var(--bg); color: var(--fg); font: inherit; font-size: .96rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
textarea.input { height: auto; min-height: 132px; padding: .8rem .9rem; resize: vertical; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 2.4rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; }
.input::placeholder { color: var(--fg-3); }
.input:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.has-error .input { border-color: var(--err); }
.field-error { display: none; font-size: .8rem; color: var(--err); }
.field.has-error .field-error { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form .btn { width: 100%; justify-content: center; margin-top: .25rem; }
.form .btn[disabled] { opacity: .7; cursor: wait; }
.form .btn.is-success { background: var(--ok); border-color: var(--ok); color: #06210f; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.feedback { display: none; font-size: .9rem; line-height: 1.5; padding: .9rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); }
.feedback.success { display: block; border-color: var(--ok); color: var(--fg); }
.feedback.error { display: block; border-color: var(--err); color: var(--fg); }
.feedback a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.form-note { font-size: .78rem; color: var(--fg-3); text-align: center; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-top: clamp(3rem, 6vw, 5rem); overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.footer-brand p { margin-top: .9rem; color: var(--fg-2); max-width: 36ch; font-size: .95rem; }
.footer h4 { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); font-weight: 500; margin-bottom: 1rem; }
.footer-links { display: grid; gap: .5rem; }
.footer-links a { color: var(--fg-2); font-size: .95rem; transition: color var(--t-fast); }
.footer-links a:hover { color: var(--fg); }
.footer-legal { font-size: .86rem; color: var(--fg-2); line-height: 1.75; }
.footer-legal strong { color: var(--fg); font-weight: 500; }
.wordmark { margin-top: clamp(2.5rem, 6vw, 4.5rem); font-size: clamp(3.4rem, 14vw, 13rem); line-height: .82; font-weight: 700; letter-spacing: -0.05em; color: var(--fg); opacity: .08; white-space: nowrap; user-select: none; pointer-events: none; text-align: center; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.25rem 0 1.75rem; border-top: 1px solid var(--line); margin-top: 1.5rem; font-size: .8rem; color: var(--fg-3); }
.footer-bottom .mono { display: flex; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
