@font-face { font-family: 'Plex Mono'; src: url('/fonts/plex-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/plex-mono-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --void: #0A0908;
  --ink: #141210;
  --bone: #E8DCC8;
  --sand: #C2A878;
  --amber: #D97904;
  --line: rgba(232, 220, 200, 0.18);
  --mono: 'Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --pad: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { background: #2B2D5C; color: var(--bone); }
a { color: var(--bone); text-decoration-color: var(--sand); text-underline-offset: 3px; }
a:hover { color: var(--amber); text-decoration-color: var(--amber); }
b { font-weight: 600; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; letter-spacing: -0.01em; }
p, li, dd { text-wrap: pretty; }

header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 28px var(--pad) 0;
  font-size: 11px; font-weight: 600; letter-spacing: 0.32em;
}
.brand { text-decoration: none; }
.lang a { text-decoration: none; color: var(--sand); }
.lang a.suggested { color: var(--bone); animation: pulse 2.4s var(--ease) 2; }
.lang .sep { margin: 0 0.6em; color: var(--sand); }
.lang [aria-current] { color: var(--amber); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

main { padding: 0 var(--pad); max-width: 1120px; margin: 0 auto; }

/* hero: text only; the 3D object owns the stage behind it. The diagram is its own block. */
.hero {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 78vh; padding: clamp(56px, 10vh, 120px) 0 clamp(40px, 7vh, 80px);
}
.diagram .wiring { max-width: 640px; }
.hero-text { animation: rise 0.9s var(--ease) both; }
h1 { font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.1rem); line-height: 1.15; max-width: 20ch; }
.lede { margin-top: 1.4em; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem); color: var(--sand); max-width: 52ch; }
.actions { margin-top: 2em; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.btn {
  display: inline-block; background: var(--amber); color: var(--void);
  font-weight: 600; letter-spacing: 0.06em; text-decoration: none;
  padding: 14px 22px; border-radius: 3px; border: 0; font: inherit; font-weight: 600; cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.btn:hover { background: #F08A10; color: var(--void); transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; }
.alt { color: var(--sand); font-size: 0.95rem; }

.wiring { animation: rise 0.9s var(--ease) 0.15s both; }
.wiring svg { width: 100%; height: auto; display: block; }
.wiring .src rect, .wiring .out rect { fill: var(--ink); stroke: var(--line); stroke-width: 1; }
/* wires are drawn by default; with motion (motion.css) they draw themselves when the diagram scrolls into view */
.wiring .gate rect:last-of-type { animation: blink 3s steps(1) 2.2s infinite; }
.wiring figcaption { margin-top: 12px; font-size: 0.8rem; color: var(--sand); max-width: 48ch; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.band { padding: clamp(40px, 7vh, 72px) 0; border-top: 1px solid var(--line); max-width: 72ch; }
.band h2 { font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem); margin-bottom: 0.9em; }
.band p + p, .band ul + p, .band ol + p, .band dl + p { margin-top: 1.1em; }
.band p { max-width: 68ch; }

.tasks { margin-top: 1em; padding-left: 0; list-style: none; max-width: 68ch; }
.tasks li { padding: 10px 0 10px 1.4em; position: relative; border-bottom: 1px solid var(--line); }
.tasks li::before { content: '·'; position: absolute; left: 0.3em; color: var(--amber); font-weight: 600; }

.steps { counter-reset: step; list-style: none; padding: 0; max-width: 68ch; }
.steps li { counter-increment: step; position: relative; padding: 12px 0 12px 2.6em; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 12px;
  width: 1.7em; height: 1.7em; display: grid; place-items: center;
  border: 1px solid var(--sand); border-radius: 50%; color: var(--sand); font-size: 0.85rem; line-height: 1;
}
.contract { color: var(--sand); font-size: 0.95rem; }

.prices { display: grid; gap: 14px; max-width: 68ch; }
.prices div { display: grid; grid-template-columns: minmax(0, 24ch) 1fr; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.prices dt { color: var(--sand); }
.prices dd { font-weight: 600; }
.tax, .honest { font-size: 0.95rem; color: var(--sand); }

.inquiry p { max-width: 68ch; }
.form { margin-top: 1.6em; display: grid; gap: 18px; max-width: 60ch; }
.form label { display: block; font-size: 0.9rem; color: var(--sand); }
.form label > input, .form label > textarea, .form label > select { display: block; margin-top: 6px; }
.form .opt { font-weight: 400; opacity: 0.8; }
.form input, .form textarea, .form select {
  font: inherit; font-size: 1rem; color: var(--bone); background: var(--ink);
  border: 1px solid var(--line); border-radius: 3px; padding: 12px 14px; width: 100%;
  transition: border-color 0.2s var(--ease);
}
.form textarea { resize: vertical; min-height: 7.5em; }
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--sand) 50%), linear-gradient(135deg, var(--sand) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.form input:focus-visible, .form textarea:focus-visible, .form select:focus-visible { outline: none; border-color: var(--amber); }
.form input:user-invalid, .form textarea:user-invalid { border-color: #E0533A; }
.form .pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.form .hint { margin-top: -8px; font-size: 0.85rem; color: var(--sand); }
.form .btn { justify-self: start; margin-top: 4px; }
.consent { font-size: 0.85rem; color: var(--sand); max-width: 60ch; }
.channels { margin-top: 2em; font-size: 0.95rem; color: var(--sand); }

footer {
  margin-top: clamp(40px, 8vh, 96px); padding: 36px var(--pad) 56px;
  border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--sand); line-height: 1.7;
}
footer p { max-width: 80ch; }
footer p + p { margin-top: 0.6em; }
footer a { color: var(--sand); }
footer a:hover { color: var(--amber); }

/* long-form pages: privacy, thanks */
.doc { max-width: 72ch; padding: clamp(48px, 8vh, 96px) 0; }
.doc h1 { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.2rem); margin-bottom: 1.2em; }
.doc h2 { font-size: 1.15rem; margin: 2em 0 0.6em; }
.doc p + p, .doc ul + p, .doc p + ul { margin-top: 0.9em; }
.doc ul { padding-left: 1.3em; }
.doc li + li { margin-top: 0.35em; }
.doc table { border-collapse: collapse; width: 100%; font-size: 0.9rem; margin: 1em 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.doc th { color: var(--sand); font-weight: 600; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 48px; }
  .wiring { max-width: 560px; }
  .prices div { grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-text, .wiring { animation: none; }
  .wiring .wire path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
  .wiring .gate rect:last-of-type { animation: none; }
  .lang a.suggested { animation: none; }
  .btn { transition: none; }
}

/* 3D background (hero3d.js, restored 2026-11-05). Fixed behind the page; with JS or WebGL
   off the canvas stays transparent and the page reads as before. */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; }
#gl.on { opacity: 1; }
#grain {
  position: fixed; inset: -100%; z-index: 30; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.055; mix-blend-mode: overlay; animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0,0); } 17% { transform: translate(-3%,2%); } 34% { transform: translate(2%,-3%); }
  51% { transform: translate(-2%,-2%); } 68% { transform: translate(3%,1%); } 85% { transform: translate(-1%,3%); } 100% { transform: translate(0,0); }
}
header, main, footer { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { #grain { animation: none; } #gl { transition: none; } }

/* Stage layout, only while the 3D scene runs (hero3d.js adds .stage to <html>): every block
   gets a full screen and a screen of empty space after it, where the object dissolves and
   reforms. Without JS, WebGL or with reduced motion the page stays compact. */
/* GSAP ScrollTrigger mismeasures every trigger on resize/rotation under smooth scrolling */
html.stage { scroll-behavior: auto; }
.stage .hero { min-height: 100dvh; }
.stage main > section + section { margin-top: 100vh; border-top: 0; }
.stage main > section:last-of-type { margin-bottom: 30vh; }
/* the same layout from the first paint wherever the scene will run, so nothing moves when it
   starts after load (hero3d.js); .flat (no WebGL2, no gsap) falls back to the compact page */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  html:has(#gl):not(.flat) { scroll-behavior: auto; }
  html:has(#gl):not(.flat) .hero { min-height: 100dvh; }
  html:has(#gl):not(.flat) main > section + section { margin-top: 100vh; border-top: 0; }
  html:has(#gl):not(.flat) main > section:last-of-type { margin-bottom: 30vh; }
}

/* short page (2026-11-05): one bold line per block */
/* the kicker is the h1 (it carries the search phrase); these three undo the h1 rules so it looks as before */
.kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase; color: var(--sand); margin-bottom: 1.6em; line-height: inherit; max-width: none; text-wrap: pretty; }
.hero .headline { font-size: clamp(2.2rem, 1.2rem + 4.4vw, 4.6rem); line-height: 1.05; max-width: 14ch; text-wrap: balance; font-weight: 600; letter-spacing: -0.01em; }
.hero .lede { font-size: clamp(1.1rem, 0.95rem + 0.7vw, 1.5rem); color: var(--bone); }
.stat { margin-top: 2.4em; font-size: 0.85rem; color: var(--sand); max-width: 46ch; }
.stat em { font-style: italic; }
.stat .src { display: block; margin-top: 0.3em; font-size: 0.75rem; opacity: 0.7; }
.big { font-size: clamp(1.6rem, 1rem + 2.6vw, 3rem); line-height: 1.15; font-weight: 600; max-width: 20ch; text-wrap: balance; }
.diagram .big { margin-bottom: 1em; }
.swap { list-style: none; padding: 0; font-size: clamp(1.3rem, 0.9rem + 1.8vw, 2.2rem); line-height: 1.3; font-weight: 600; }
.swap li { padding: 0.35em 0; }
.swap li > span { color: var(--sand); font-weight: 400; }
.band .tax { margin-top: 1.2em; font-size: 0.85rem; color: var(--sand); }

/* centred page (HR short page): every block sits on the axis of the 3D object behind it;
   the form keeps left-aligned fields inside a centred column */
.center .hero { align-items: center; text-align: center; }
.center .hero .headline, .center .hero .lede, .center .stat { margin-left: auto; margin-right: auto; }
.center .actions { justify-content: center; }
.center .band { margin-left: auto; margin-right: auto; text-align: center; }
.center .big { margin-left: auto; margin-right: auto; }
.center .diagram .wiring { margin-left: auto; margin-right: auto; }
.center .swap { justify-content: center; }
.center .swap li { justify-content: center; }
.center .inquiry > p { margin-left: auto; margin-right: auto; }
.center .form { margin-left: auto; margin-right: auto; text-align: left; }
.center .form .btn { justify-self: stretch; }
@media (min-width: 760px) { .center .swap li > span { text-align: right; } .center .swap li > b { text-align: left; } }
