/* ==========================================================================
   Team Codex GmbH – Stylesheet
   Self-hosted fonts only (GDPR). No external requests.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colors */
  --bg: #0a0f1c;
  --bg-2: #0d1424;
  --surface: #111a2d;
  --surface-2: #16213a;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.26);
  --text: #e7ebf3;
  --text-soft: #c3cada;
  --muted: #8f9ab0;
  --accent: #3ddc97;          /* the one strong accent */
  --accent-soft: rgba(61, 220, 151, 0.12);
  --accent-line: rgba(61, 220, 151, 0.35);
  --accent-ink: #03150d;
  --warn: #f5c451;

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

  /* Layout */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 72px;
  --section-y: clamp(80px, 11vw, 140px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

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

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px;
  border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  --_bg: transparent; --_fg: var(--text); --_bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  background: var(--_bg); color: var(--_fg);
  border: 1px solid var(--_bd); border-radius: 10px;
  font-weight: 600; font-size: 15.5px; letter-spacing: -0.005em; text-decoration: none;
  cursor: pointer; transition: transform .15s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { --_bd: var(--text-soft); }
.btn:active { transform: translateY(1px); }
.btn--primary { --_bg: var(--accent); --_fg: var(--accent-ink); --_bd: var(--accent); }
.btn--primary:hover { --_bg: #5ae6a9; --_bd: #5ae6a9; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(10, 15, 28, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(10, 15, 28, 0.88); }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; flex: none; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__name span { color: var(--muted); font-weight: 500; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav__list { display: flex; gap: 26px; list-style: none; }
.nav__list a { text-decoration: none; color: var(--text-soft); font-size: 15px; font-weight: 500; transition: color .15s ease; }
.nav__list a:hover, .nav__list a[aria-current="true"] { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 14px; }

.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; font-family: var(--font-mono); font-size: 12.5px; }
.lang-switch a, .lang-switch span { padding: 6px 9px; text-decoration: none; color: var(--muted); line-height: 1; }
.lang-switch [aria-current="page"] { background: var(--surface-2); color: var(--text); }
.lang-switch a:hover { color: var(--text); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 10px;
  background: transparent; border: 1px solid var(--line-strong); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 1.5px; background: var(--text); border-radius: 2px;
  position: relative; transition: transform .2s ease, background-color .2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1080px) {
  .nav__list { gap: 18px; }
}
@media (max-width: 960px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 28px;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .js .nav.is-open { transform: none; opacity: 1; visibility: visible; transition: opacity .2s ease, transform .2s ease; }
  .js .nav__list { flex-direction: column; gap: 0; }
  .js .nav__list a { display: block; padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .js .nav__actions { padding-top: 20px; justify-content: space-between; }
  .no-js .site-header { height: auto; position: static; }
  .no-js .site-header .container { flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
  .no-js .nav { flex-wrap: wrap; gap: 14px; }
  .no-js .nav__list { flex-wrap: wrap; gap: 14px; }
}

/* ---------- Sections (shared) ---------- */
.section { padding: var(--section-y) 0; position: relative; }
.section--alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; margin-bottom: clamp(44px, 6vw, 72px); }
.section__head--stack { grid-template-columns: minmax(0, 760px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em; color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.section__title { font-size: clamp(32px, 4.4vw, 52px); font-weight: 680; letter-spacing: -0.032em; }
.section__lead { color: var(--text-soft); font-size: clamp(17px, 1.5vw, 19px); max-width: 560px; }
@media (max-width: 860px) {
  .section__head { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Hero ---------- */
.hero { position: relative; margin-top: calc(-1 * var(--header-h)); padding: calc(var(--header-h) + clamp(48px, 7vw, 96px)) 0 clamp(64px, 8vw, 104px); overflow: hidden; isolation: isolate; }
.hero::before {
  /* subtle engineering grid */
  content: ""; position: absolute; inset: -1px 0 0 0; z-index: -2;
  background-image:
    linear-gradient(to right, rgba(148,163,184,.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148,163,184,.07) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 30%, transparent 78%);
          mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 30%, transparent 78%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; width: 760px; height: 760px; right: -220px; top: -260px;
  background: radial-gradient(circle, rgba(61,220,151,.14), transparent 62%);
  pointer-events: none;
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(40px, 5vw, 72px); align-items: center; }
.hero__status {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  padding: 7px 14px 7px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-soft); background: rgba(17,26,45,.6);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(61,220,151,.16); flex: none; }
.hero__title { font-size: clamp(40px, 5.6vw, 72px); font-weight: 720; letter-spacing: -0.04em; line-height: 1.04; }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__lead { margin-top: 26px; font-size: clamp(17.5px, 1.6vw, 20px); color: var(--text-soft); max-width: 590px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 40px; list-style: none; font-size: 14.5px; color: var(--muted); }
.hero__facts li { display: inline-flex; align-items: center; gap: 9px; }
.hero__facts svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

/* Terminal */
.terminal {
  position: relative;
  background: linear-gradient(180deg, #0f1729, #0c1322);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.02) inset;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.75;
  overflow: hidden;
}
.terminal__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.terminal__bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3550; display: block; }
.terminal__bar span { margin-left: 10px; }
.terminal__body { padding: 20px 22px 24px; color: var(--text-soft); overflow-x: auto; }
.terminal__body p { white-space: pre; }
.t-prompt { color: var(--accent); }
.t-dim { color: var(--muted); }
.t-ok { color: var(--accent); }
.t-run { color: var(--warn); }
.t-key { color: #e7ebf3; }
.cursor { display: inline-block; width: 8px; height: 1.1em; background: var(--accent); vertical-align: -3px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }
.terminal__foot { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.terminal__foot div { padding: 14px 18px; border-right: 1px solid var(--line); }
.terminal__foot div:last-child { border-right: 0; }
.terminal__foot strong { display: block; font-family: var(--font-sans); font-size: 22px; color: var(--text); font-weight: 680; letter-spacing: -0.02em; line-height: 1.2; }
.terminal__foot small { color: var(--muted); font-size: 11.5px; }

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero::after { right: -360px; top: -320px; }
}
@media (max-width: 480px) {
  .hide-sm { display: none; }
  .hero__status { font-size: 12px; }
  .terminal { font-size: 12px; }
  .terminal__body { padding: 16px 16px 20px; }
  .terminal__foot div { padding: 12px 12px; }
  .terminal__foot strong { font-size: 19px; }
  .hero__ctas .btn { flex: 1 1 100%; }
}

/* ---------- Tech strip ---------- */
.stack-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); overflow: hidden; position: relative; }
.stack-strip__label { position: absolute; left: 0; top: 0; bottom: 0; z-index: 2; display: flex; align-items: center; padding: 0 22px 0 var(--gutter); background: linear-gradient(90deg, var(--bg-2) 72%, transparent); font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.stack-strip__track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.stack-strip:hover .stack-strip__track { animation-play-state: paused; }
.stack-strip ul { display: flex; list-style: none; flex: none; }
.stack-strip li { padding: 18px 22px; font-family: var(--font-mono); font-size: 14px; color: var(--text-soft); white-space: nowrap; display: flex; align-items: center; gap: 22px; }
.stack-strip li::after { content: "/"; color: var(--line-strong); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .stack-strip__track { animation: none; }
  .stack-strip { overflow-x: auto; }
}
@media (max-width: 640px) { .stack-strip__label { display: none; } }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.service {
  grid-column: span 4;
  position: relative; display: flex; flex-direction: column;
  padding: 30px 28px 28px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(22,33,58,.55), rgba(17,26,45,.35));
  transition: border-color .2s ease, transform .2s ease, background-color .2s ease;
}
.service:hover { border-color: var(--accent-line); }
.service--wide { grid-column: span 6; }
.service__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.service__icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
.service__icon svg { width: 22px; height: 22px; }
.service__num { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.service h3 { font-size: 21px; margin-bottom: 10px; }
.service p { color: var(--text-soft); font-size: 15.5px; }
.service__points { list-style: none; margin-top: 16px; display: grid; gap: 7px; font-size: 15px; color: var(--text-soft); }
.service__points li { position: relative; padding-left: 20px; }
.service__points li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 8px; height: 1.5px; background: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin-top: auto; padding-top: 22px; }
.tags li { font-family: var(--font-mono); font-size: 12px; color: var(--text-soft); padding: 4px 9px; border: 1px solid var(--line-strong); border-radius: 6px; background: rgba(10,15,28,.5); line-height: 1.5; }
@media (max-width: 1080px) {
  .service, .service--wide { grid-column: span 6; }
  .service:last-child { grid-column: span 12; }
}
@media (max-width: 700px) {
  .service, .service--wide { grid-column: span 12; }
  .service { padding: 26px 22px 24px; }
}

/* ---------- Why ---------- */
.why { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.why__intro { position: sticky; top: calc(var(--header-h) + 32px); }
.why__intro .section__lead { margin-top: 22px; }
.why__quote { margin: 36px 0 0; padding: 22px 24px; border-left: 2px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text); font-size: 17px; }
.why__quote span { display: block; margin-top: 10px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.why__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; list-style: none; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.why__item { padding: 28px 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.why__item strong { display: block; font-size: 38px; font-weight: 700; letter-spacing: -0.035em; line-height: 1; margin-bottom: 14px; color: var(--text); }
.why__item strong small { font-size: 18px; color: var(--accent); font-weight: 600; margin-left: 2px; letter-spacing: 0; }
.why__item h3 { font-size: 17.5px; margin-bottom: 8px; }
.why__item p { color: var(--text-soft); font-size: 15px; }
.why__item .mono-label { font-family: var(--font-mono); font-size: 12px; color: var(--accent); display: block; margin-bottom: 14px; }
@media (max-width: 960px) {
  .why { grid-template-columns: minmax(0, 1fr); }
  .why__intro { position: static; }
}
@media (max-width: 560px) {
  .why__list { grid-template-columns: minmax(0, 1fr); }
  .why__item { padding: 24px 20px; }
}

/* ---------- References ---------- */
.refs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; list-style: none; }
.ref {
  display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); position: relative; overflow: hidden;
}
.ref::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 64px; background: var(--accent); }
.ref__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.ref__sector { color: var(--accent); }
.ref h3 { font-size: 20px; margin-bottom: 4px; }
.ref__role { color: var(--text-soft); font-size: 15.5px; font-weight: 500; margin-bottom: 16px; }
.ref ul.ref__points { list-style: none; display: grid; gap: 8px; color: var(--text-soft); font-size: 15px; }
.ref ul.ref__points li { position: relative; padding-left: 20px; }
.ref ul.ref__points li::before { content: "›"; position: absolute; left: 3px; top: 0; color: var(--accent); font-family: var(--font-mono); }
.ref--featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 48px; padding: 34px; background: linear-gradient(135deg, rgba(61,220,151,.07), rgba(17,26,45,1) 45%); border-color: var(--accent-line); }
.ref--featured .ref__meta, .ref--featured h3, .ref--featured .ref__role { grid-column: 1; }
.ref--featured .ref__left { grid-column: 1; }
.ref--featured .ref__right { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
.ref--featured h3 { font-size: 24px; }
.refs__note { margin-top: 28px; font-size: 14px; color: var(--muted); display: flex; gap: 10px; align-items: flex-start; }
.refs__note svg { width: 16px; height: 16px; margin-top: 4px; flex: none; color: var(--muted); }
@media (max-width: 860px) {
  .refs { grid-template-columns: minmax(0, 1fr); }
  .ref--featured { grid-template-columns: minmax(0, 1fr); padding: 28px; }
  .ref--featured .ref__right { grid-column: 1; grid-row: auto; margin-top: 8px; }
}
@media (max-width: 480px) { .ref { padding: 24px 20px; } .ref--featured { padding: 24px 20px; } }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; counter-reset: step; position: relative; }
.process::before { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 1px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px); }
.step { position: relative; padding-right: 28px; }
.step__num { position: relative; z-index: 1; width: 47px; height: 47px; display: grid; place-items: center; border-radius: 12px; background: var(--bg); border: 1px solid var(--accent-line); color: var(--accent); font-family: var(--font-mono); font-size: 14px; font-weight: 600; margin-bottom: 26px; }
.section--alt .step__num { background: var(--bg-2); }
.step h3 { font-size: 20px; margin-bottom: 10px; }
.step p { color: var(--text-soft); font-size: 15.5px; }
.step__out { margin-top: 16px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.step__out b { color: var(--text-soft); font-weight: 500; }
@media (max-width: 960px) {
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 0; }
  .process::before { display: none; }
}
@media (max-width: 560px) {
  .process { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .step { padding: 0 0 34px 70px; }
  .step__num { position: absolute; left: 0; top: 0; margin: 0; }
  .step:not(:last-child)::before { content: ""; position: absolute; left: 23px; top: 52px; bottom: 6px; width: 1px; background: var(--line-strong); }
  .step:last-child { padding-bottom: 0; }
}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.portrait {
  /* Placeholder: replace the monogram by an <img> (see README) */
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(to right, rgba(148,163,184,.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(to bottom, rgba(148,163,184,.06) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(circle at 30% 20%, rgba(61,220,151,.16), transparent 60%),
    var(--surface);
  display: grid; place-items: center;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait__mono { font-size: clamp(88px, 11vw, 140px); font-weight: 760; letter-spacing: -0.06em; color: var(--text); line-height: 1; }
.portrait__mono span { color: var(--accent); }
.portrait__tag { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; justify-content: space-between; gap: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
.about__body .section__title { margin-bottom: 26px; }
.about__body p { color: var(--text-soft); margin-bottom: 18px; max-width: 680px; }
.about__body p strong { color: var(--text); font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 34px; border-top: 1px solid var(--line); max-width: 680px; }
.facts div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts div:nth-child(odd) { padding-right: 20px; }
.facts dt { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 550; font-size: 15.5px; }
@media (max-width: 860px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 300px; }
}
@media (max-width: 420px) { .facts { grid-template-columns: minmax(0, 1fr); } .facts div:nth-child(odd) { padding-right: 0; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.contact__lead { color: var(--text-soft); margin-top: 22px; font-size: 18px; }
.contact__mail {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 34px;
  font-size: clamp(17px, 1.8vw, 21px); font-weight: 600; text-decoration: none; letter-spacing: -0.01em;
  padding-bottom: 6px; border-bottom: 1px solid var(--accent-line); word-break: break-all;
}
.contact__mail:hover { border-bottom-color: var(--accent); }
.contact__mail svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.contact__list { list-style: none; margin-top: 36px; display: grid; gap: 14px; font-size: 15.5px; color: var(--text-soft); }
.contact__list li { display: flex; gap: 12px; align-items: flex-start; }
.contact__list svg { width: 18px; height: 18px; margin-top: 4px; color: var(--accent); flex: none; }

.form { padding: clamp(24px, 3.5vw, 40px); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 550; color: var(--text-soft); }
.field label .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px;
  font-size: 16px; transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238f9ab0' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.field input::placeholder, .field textarea::placeholder { color: #5f6a80; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61,220,151,.18); }
.field input:user-invalid, .field textarea:user-invalid { border-color: #f07178; }
.check { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-soft); }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.check a { color: var(--text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 6px; }
.form__hint { font-size: 13px; color: var(--muted); flex: 1 1 220px; max-width: 340px; }
.form__status { grid-column: 1 / -1; font-size: 14.5px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--accent-line); background: var(--accent-soft); }
.form__status[hidden] { display: none; }
@media (max-width: 960px) { .contact { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .form__grid { grid-template-columns: minmax(0, 1fr); }
  .form__foot .btn { width: 100%; }
}

/* ---------- CTA band ---------- */
.cta-band { padding: clamp(56px, 7vw, 88px) 0; border-top: 1px solid var(--line); background:
  radial-gradient(ellipse 60% 120% at 100% 50%, rgba(61,220,151,.12), transparent 60%), var(--bg-2); }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.cta-band h2 { font-size: clamp(26px, 3.2vw, 38px); max-width: 720px; letter-spacing: -0.03em; }
.cta-band p { color: var(--text-soft); margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 14.5px; color: var(--muted); }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.footer__grid p { margin-top: 16px; max-width: 360px; }
.footer__grid h2 { font-size: 13px; font-family: var(--font-mono); font-weight: 500; color: var(--text-soft); letter-spacing: 0.02em; margin-bottom: 14px; }
.footer__grid ul { list-style: none; display: grid; gap: 8px; }
.footer__grid a { text-decoration: none; color: var(--muted); }
.footer__grid a:hover { color: var(--text); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 12.5px; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .footer__grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Legal pages ---------- */
.legal { padding: clamp(48px, 7vw, 88px) 0 var(--section-y); }
.legal .container { max-width: calc(820px + 2 * var(--gutter)); }
.legal h1 { font-size: clamp(34px, 4.6vw, 50px); letter-spacing: -0.035em; margin-bottom: 14px; }
.legal .legal__sub { color: var(--muted); font-family: var(--font-mono); font-size: 13px; margin-bottom: 44px; }
.legal h2 { font-size: 22px; margin: 44px 0 14px; padding-top: 24px; border-top: 1px solid var(--line); }
.legal h3 { font-size: 17px; margin: 26px 0 10px; }
.legal p, .legal li { color: var(--text-soft); font-size: 16px; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; margin: 10px 0; display: grid; gap: 6px; }
.legal address { font-style: normal; color: var(--text-soft); line-height: 1.75; }
.legal a { color: var(--text); text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.legal a:hover { text-decoration-color: var(--accent); }
.ph {
  /* visible placeholder – must be replaced before go-live */
  display: inline; padding: 1px 6px; border-radius: 4px;
  background: rgba(245, 196, 81, .14); color: var(--warn); border: 1px dashed rgba(245, 196, 81, .55);
  font-family: var(--font-mono); font-size: .88em; white-space: normal;
}
.notice { margin: 0 0 36px; padding: 16px 18px; border: 1px dashed rgba(245,196,81,.5); border-radius: 10px; background: rgba(245,196,81,.07); color: var(--text-soft); font-size: 14.5px; }
.notice strong { color: var(--warn); }
.dl-legal { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 10px 24px; margin: 0; }
.dl-legal dt { color: var(--muted); font-size: 15px; }
.dl-legal dd { margin: 0; color: var(--text-soft); }
@media (max-width: 560px) { .dl-legal { grid-template-columns: minmax(0, 1fr); gap: 2px; } .dl-legal dd { margin-bottom: 12px; } }

/* ---------- 404 ---------- */
.not-found { min-height: calc(100dvh - var(--header-h) - 200px); display: grid; place-items: center; text-align: center; padding: 80px 0; }
.not-found h1 { font-size: clamp(40px, 6vw, 64px); letter-spacing: -0.04em; }
.not-found p { color: var(--text-soft); margin: 16px 0 32px; }

/* ---------- Reveal on scroll (progressive enhancement) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Print ---------- */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .stack-strip, .nav-toggle, .form, .cta-band { display: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Simple nav (legal pages) ---------- */
.js .nav.nav--simple, .nav.nav--simple {
  position: static; opacity: 1; visibility: visible; transform: none;
  flex-direction: row; padding: 0; background: none; border: 0; max-height: none; overflow: visible;
}
.nav--simple .nav__actions { padding-top: 0 !important; }
@media (max-width: 480px) { .nav--simple .btn { display: none; } }
.legal .btn { text-decoration: none; } .legal .btn--primary { color: var(--accent-ink); }
.terminal__body p > span:first-child { display: inline-block; width: 1ch; text-align: center; }

/* ---------- Services: training banner ---------- */
.services__extra { display: flex; gap: 22px; align-items: flex-start; margin-top: 18px; padding: 26px 28px; border: 1px dashed var(--accent-line); border-radius: var(--radius); background: rgba(61,220,151,.04); }
.services__extra .service__icon { flex: none; }
.services__extra h3 { font-size: 19px; margin-bottom: 6px; }
.services__extra p { color: var(--text-soft); font-size: 15.5px; max-width: 860px; }
@media (max-width: 560px) { .services__extra { flex-direction: column; gap: 14px; padding: 22px 20px; } }
