/* ═══════════════════════════════════════════════════════════
   DOCOSEON — site.css
   Design system, layout, components. Every line carries information.
   ═══════════════════════════════════════════════════════════ */

/* ── Font ── */
@font-face {
  font-family: "Mona Sans";
  src: url("/assets/fonts/MonaSans-VF.woff2") format("woff2");
  font-weight: 300 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC,
    U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-adjusted fallback to prevent layout shift */
@font-face {
  font-family: "Mona Sans Fallback";
  src: local("Segoe UI"), local("Roboto"), local("Helvetica Neue"), local("Arial");
  size-adjust: 100%;
  ascent-override: 92%;
  descent-override: 22%;
  line-gap-override: 0%;
}

/* ── Tokens ── */
:root {
  color-scheme: dark;

  /* surfaces */
  --ink-950: #050A14;
  --ink-900: #08101F;
  --ink-800: #0D1830;
  --band-blue: #0A1838;

  /* lines */
  --line: rgba(150, 175, 220, .18);
  --line-strong: rgba(150, 175, 220, .34);
  --grid: rgba(150, 175, 220, .07);

  /* text */
  --text-1: #EAF0FA;
  --text-2: #A9B6CE;
  --text-3: #7B8AA6;

  /* signal */
  --signal: #5C9DFF;
  --alert: #FF8A7A;

  /* type */
  --font: "Mona Sans", "Mona Sans Fallback", "Bahnschrift", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-h1: clamp(2.75rem, 1.4rem + 5vw, 5rem);
  --fs-h2: clamp(2rem, 1.2rem + 2.8vw, 3.75rem);
  --fs-h3: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  --fs-lead: clamp(1.125rem, 1.02rem + .5vw, 1.375rem);
  --fs-body: 1.0625rem;
  --fs-small: .9375rem;
  --fs-fig: .875rem;

  /* layout */
  --max: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(72px, 9vw, 144px);
  --gap: 16px;
  --rail: 0px;

  /* motion */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --t-fast: 160ms;
  --t-med: 320ms;
}
@media (min-width: 900px)  { :root { --gap: 24px; } }
@media (min-width: 1360px) { :root { --rail: 56px; } }

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-2);
  background: var(--ink-950);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--signal); color: var(--ink-950); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { list-style: none; }
button { font: inherit; border: none; background: none; cursor: pointer; }

/* ══════════════════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════════════════ */
.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
  position: relative;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

section {
  position: relative;
  padding-block: var(--section);
}

.section-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

.bg-900 { background: var(--ink-900); }
.bg-band { background: var(--band-blue); }

/* ── Grid overlay (hero + CTA) ── */
.grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.grid-overlay .container { height: 100%; }
.grid-lines {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  height: 100%;
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}
.grid-lines span {
  border-left: 1px solid var(--grid);
}
.grid-lines span:last-child {
  border-right: 1px solid var(--grid);
}

/* ══════════════════════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════════════════════ */
h1, h2, h3 {
  color: var(--text-1);
  line-height: 1.05;
  font-weight: 400;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); letter-spacing: -0.03em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.02em; max-width: 20ch; }
h3 { font-size: var(--fs-h3); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 56ch;
  margin-top: 24px;
  text-wrap: pretty;
}

p { max-width: 66ch; text-wrap: pretty; }

.text-3 { color: var(--text-3); }
.fs-small { font-size: var(--fs-small); }
.fs-fig { font-size: var(--fs-fig); font-weight: 500; }

.statement {
  font-weight: 300;
  font-size: clamp(1.75rem, 1rem + 2.6vw, 3rem);
  letter-spacing: -0.02em;
  max-width: 28ch;
  line-height: 1.2;
  color: var(--text-1);
}

/* Weight-as-meaning: rejected / affirmed */
.wt-reject { font-weight: 300; color: var(--text-2); }
.wt-affirm { font-weight: 500; color: var(--text-1); }

/* ══════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 28px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn-primary {
  background: var(--text-1);
  color: var(--ink-950);
}
.btn-primary:hover { background: #fff; }

.btn-sm { height: 40px; padding: 0 20px; font-size: var(--fs-small); }

/* Text link (secondary action) */
.link {
  color: var(--text-1);
  text-decoration-line: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color var(--t-fast);
}
.link:hover { text-decoration-color: var(--signal); }

/* ══════════════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(5, 10, 20, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Mark + wordmark */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-1);
}
.brand:focus-visible { outline-offset: 6px; }
.brand .mark { flex-shrink: 0; }
.wordmark {
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.24em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: var(--fs-small);
  font-weight: 400;
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--t-fast);
}
.nav-links a:hover { color: var(--text-1); }

.nav-cta {
  height: 40px;
  padding: 0 20px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink-950);
  background: var(--text-1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background var(--t-fast);
}
.nav-cta:hover { background: #fff; }

/* Hamburger */
.menu-toggle {
  display: none;
  width: 32px;
  height: 24px;
  position: relative;
  z-index: 101;
  color: var(--text-1);
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--t-med) var(--ease), opacity var(--t-fast);
}
.menu-toggle span + span { margin-top: 7px; }

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(8.5px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* Mobile overlay */
.mobile-nav {
  position: fixed; inset: 0; z-index: 99;
  background: var(--ink-950);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-med) var(--ease);
}
.mobile-nav[aria-hidden="false"] { opacity: 1; pointer-events: all; }
.mobile-nav nav {
  display: flex; flex-direction: column; align-items: center; gap: 2rem;
}
.mobile-nav a {
  font-size: 1.5rem; font-weight: 400; color: var(--text-2);
  text-decoration: none; transition: color var(--t-fast);
}
.mobile-nav a:hover { color: var(--text-1); }

/* ══════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}

.hero-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text {
  grid-column: 1 / 7;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero-body {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 48ch;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-figure {
  grid-column: 7 / 13;
  display: flex;
  justify-content: center;
}
.hero-figure svg {
  width: 100%;
  max-width: 480px;
  height: auto;
}

/* ── Hero signal animation (the one permitted autoplay) ── */
.hero-signal {
  opacity: 0;
}
.hero-signal-active .hero-signal {
  animation: signal-fade 4.5s var(--ease) forwards;
}

@keyframes signal-fade {
  0%   { opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Signal position keyframes: moves from PROBLEM to CAPABILITY */
.signal-dot {
  animation: signal-move 4.5s var(--ease) forwards;
}
@keyframes signal-move {
  0%   { transform: translate(0, 0); }
  12%  { transform: translate(0, 76px); }
  28%  { transform: translate(-50px, 180px); }
  48%  { transform: translate(0, 290px); }
  68%  { transform: translate(0, 390px); }
  88%  { transform: translate(0, 470px); }
  100% { transform: translate(0, 470px); }
}

/* Layer highlight as signal passes: stagger via nth-child */
.sys-layer {
  transition: stroke var(--t-med);
}
.hero-signal-active .sys-layer:nth-child(1) {
  animation: layer-lit 0.8s var(--ease) 0.5s both;
}
.hero-signal-active .sys-layer:nth-child(2) {
  animation: layer-lit 0.8s var(--ease) 1.2s both;
}
.hero-signal-active .sys-layer:nth-child(3) {
  animation: layer-lit 0.8s var(--ease) 1.2s both;
}
.hero-signal-active .sys-layer:nth-child(4) {
  animation: layer-lit 0.8s var(--ease) 2.0s both;
}
.hero-signal-active .sys-layer:nth-child(5) {
  animation: layer-lit 0.8s var(--ease) 2.8s both;
}
.hero-signal-active .sys-layer:nth-child(6) {
  animation: layer-lit 0.8s var(--ease) 3.6s both;
}

@keyframes layer-lit {
  0%   { stroke: var(--line); }
  50%  { stroke: var(--signal); }
  100% { stroke: var(--line-strong); }
}

/* ══════════════════════════════════════════════════════════
   PROCESS SECTION (combined difference + pipeline)
   ══════════════════════════════════════════════════════════ */
.process-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  margin-top: 56px;
}

.process-figure {
  grid-column: 1 / 6;
}
.process-figure svg {
  width: 100%;
  height: auto;
}

.process-explorer {
  grid-column: 7 / 13;
}

/* Stage tabs */
.stage-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.stage-list [role="tab"] {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-3);
  font-size: 1.2rem;
  font-weight: 400;
  cursor: pointer;
  transition: color var(--t-fast);
  text-align: left;
  width: 100%;
}
.stage-list [role="tab"]:hover { color: var(--text-2); }
.stage-list [role="tab"][aria-selected="true"] { color: var(--text-1); }
.stage-list [role="tab"][aria-selected="true"] .stage-num { color: var(--signal); }

.stage-num {
  font-size: var(--fs-small);
  font-weight: 500;
  min-width: 28px;
  color: var(--text-3);
  transition: color var(--t-fast);
  font-variant-numeric: tabular-nums;
}

.stage-panel {
  padding: 32px 0;
}
.stage-panel[hidden] { display: none; }
.stage-panel p {
  font-size: var(--fs-lead);
  color: var(--text-2);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════
   MESSY / REAL WORLD — toggle figure
   ══════════════════════════════════════════════════════════ */
.toggle-control {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  margin-bottom: 40px;
}
.toggle-control label {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  position: relative;
}
.toggle-control input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-control input:checked + span {
  color: var(--text-1);
}
.toggle-control label:has(input:checked) {
  background: var(--ink-800);
  color: var(--text-1);
}
.toggle-control label:has(input:focus-visible) {
  outline: 2px solid var(--signal);
  outline-offset: -2px;
}

.figure-as-found,
.figure-as-engineered {
  transition: opacity var(--t-med) var(--ease);
}
.figure-as-engineered { display: none; }
.toggle-state-engineered .figure-as-found { display: none; }
.toggle-state-engineered .figure-as-engineered { display: block; }

/* SVG figure shared styles */
.fig-svg {
  width: 100%;
  height: auto;
  max-width: 900px;
}
.fig-svg text {
  font-family: var(--font);
  font-weight: 500;
  font-size: 14px;
  fill: var(--text-1);
}
.fig-svg .fig-label-secondary {
  fill: var(--text-3);
}
.fig-svg .fig-stroke { stroke: var(--line); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.fig-svg .fig-stroke-strong { stroke: var(--line-strong); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.fig-svg .fig-signal-stroke { stroke: var(--signal); stroke-width: 2; fill: none; vector-effect: non-scaling-stroke; }
.fig-svg .fig-dash { stroke-dasharray: 6 4; }
.fig-svg .fig-fill { fill: rgba(150, 175, 220, .04); }
.fig-svg .fig-fill-signal { fill: rgba(92, 157, 255, .08); }
.fig-svg .fig-hatch { fill: url(#hatch); }
.fig-svg .signal-square { fill: var(--signal); }

figure {
  margin-block: 56px;
}
figcaption {
  font-size: var(--fs-small);
  color: var(--text-3);
  margin-top: 16px;
}

/* ══════════════════════════════════════════════════════════
   AI SECTION
   ══════════════════════════════════════════════════════════ */
.ai-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  margin-top: 56px;
  align-items: start;
}
.ai-text { grid-column: 1 / 6; }
.ai-figure { grid-column: 7 / 13; }

.ai-test {
  margin-top: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.ai-test p {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.5rem);
  font-weight: 500;
  color: var(--text-1);
  max-width: 40ch;
  line-height: 1.4;
}

/* ══════════════════════════════════════════════════════════
   ENGINEERING MAP (disciplines)
   ══════════════════════════════════════════════════════════ */
.eng-architecture {
  margin-top: 56px;
}
.eng-architecture svg {
  width: 100%;
  max-width: 900px;
  height: auto;
}

.eng-detail {
  margin-top: 56px;
}

.eng-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}
.eng-item {
  grid-column: span 4;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.eng-item h3 {
  font-size: var(--fs-h3);
  margin-bottom: 12px;
}
.eng-item p {
  font-size: var(--fs-body);
  color: var(--text-2);
}

/* ══════════════════════════════════════════════════════════
   CONCEPTS (Things That Should Exist)
   ══════════════════════════════════════════════════════════ */
.concept {
  padding-block: 56px;
  border-top: 1px solid var(--line);
}
.concept:first-child { border-top: none; }

.concept-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.concept-eyebrow {
  font-size: var(--fs-fig);
  font-weight: 500;
  color: var(--text-3);
}
.concept-num {
  font-size: clamp(3rem, 2rem + 3vw, 5rem);
  font-weight: 300;
  color: rgba(150, 175, 220, .08);
  line-height: 1;
}
.concept-title {
  font-size: var(--fs-h2);
  font-weight: 400;
  color: var(--text-1);
  margin-bottom: 12px;
  max-width: 24ch;
}
.concept-premise {
  font-size: var(--fs-lead);
  color: var(--text-2);
  margin-bottom: 48px;
  max-width: 56ch;
}

.concept-flow {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
}
.concept-phase h4 {
  font-size: var(--fs-fig);
  font-weight: 500;
  color: var(--text-3);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.concept-phase p {
  font-size: var(--fs-body);
  color: var(--text-2);
  line-height: 1.7;
}
.concept-phase-result p {
  color: var(--text-1);
}

/* Arrow between concept phases */
.concept-arrow {
  display: none;
}

/* ══════════════════════════════════════════════════════════
   PHILOSOPHY / MANIFESTO
   ══════════════════════════════════════════════════════════ */
.philosophy-pairs {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 56px;
  max-width: 800px;
}

.phil-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.phil-not, .phil-but {
  font-size: clamp(1.25rem, 0.9rem + 1.2vw, 1.75rem);
}
.phil-not {
  font-weight: 300;
  color: var(--text-3);
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
}
.phil-but {
  font-weight: 500;
  color: var(--text-1);
}

.phil-close {
  margin-top: 72px;
}
.phil-close p {
  font-size: clamp(1.6rem, 1rem + 2.6vw, 3rem);
  line-height: 1.2;
  max-width: 28ch;
}

/* ══════════════════════════════════════════════════════════
   AUDIENCE / FIT
   ══════════════════════════════════════════════════════════ */
.fit-list {
  margin-top: 56px;
  max-width: 700px;
}
.fit-list li {
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.5rem);
  font-weight: 400;
  color: var(--text-2);
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

/* ══════════════════════════════════════════════════════════
   CTA BAND
   ══════════════════════════════════════════════════════════ */
.cta-band {
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { max-width: 20ch; margin-inline: auto; }
.cta-band .lead { max-width: 40ch; margin-inline: auto; }

.cta-form {
  display: flex;
  gap: var(--gap);
  max-width: 540px;
  margin: 40px auto 0;
  align-items: stretch;
}
.cta-form input {
  flex: 1;
  height: 52px;
  padding: 0 16px;
  font-family: var(--font);
  font-size: var(--fs-body);
  color: var(--text-1);
  background: transparent;
  border: 1px solid var(--line-strong);
}
.cta-form input::placeholder { color: var(--text-3); }
.cta-form input:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.cta-form .btn { flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════ */
.site-footer {
  padding: 56px 0 32px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--gap);
  margin-bottom: 56px;
}

.footer-brand .wordmark {
  margin-bottom: 8px;
}
.footer-tagline {
  font-size: var(--fs-small);
  color: var(--text-3);
}

.footer-group h4 {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-3);
  margin-bottom: 16px;
}
.footer-group a {
  display: block;
  font-size: var(--fs-small);
  color: var(--text-3);
  text-decoration: none;
  padding: 4px 0;
  transition: color var(--t-fast);
}
.footer-group a:hover { color: var(--text-1); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  color: var(--text-3);
}
.footer-legal {
  display: flex;
  gap: 24px;
}
.footer-legal a {
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--t-fast);
}
.footer-legal a:hover { color: var(--text-1); }

/* ══════════════════════════════════════════════════════════
   CONTACT
   ══════════════════════════════════════════════════════════ */
.contact-page { padding-top: 140px; padding-bottom: 80px; }
.form-wrap { max-width: 640px; }

.contact-form { display: flex; flex-direction: column; gap: 24px; margin-top: 40px; }

.field label {
  display: block;
  font-size: var(--fs-small);
  color: var(--text-2);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-family: var(--font);
  font-size: var(--fs-body);
  color: var(--text-1);
  background: transparent;
  border: 1px solid var(--line-strong);
}
.field input:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: -2px;
}
.field textarea { height: 180px; padding: 16px; resize: vertical; }
.field .hint {
  font-size: var(--fs-small);
  color: var(--text-3);
  margin-top: 6px;
}

.field-error input, .field-error textarea {
  border-left: 2px solid var(--alert);
}
.error-msg {
  font-size: var(--fs-small);
  color: var(--alert);
  margin-top: 6px;
}

.form-submit {
  align-self: flex-start;
}

.alert {
  padding: 20px;
  margin-bottom: 24px;
  font-size: var(--fs-body);
  border-left: 2px solid;
}
.alert-success { border-color: #34D399; color: #6EE7B7; }
.alert-error   { border-color: var(--alert); color: var(--alert); }

.contact-email { margin-top: 24px; }
.contact-email a {
  color: var(--text-1);
  text-decoration-line: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  transition: text-decoration-color var(--t-fast);
}
.contact-email a:hover { text-decoration-color: var(--signal); }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 899px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; }

  .hero-layout { grid-template-columns: 1fr; }
  .hero-text { grid-column: 1 / -1; }
  .hero-figure { grid-column: 1 / -1; margin-top: 48px; }

  .process-layout { grid-template-columns: 1fr; }
  .process-figure { grid-column: 1 / -1; }
  .process-explorer { grid-column: 1 / -1; margin-top: 48px; }

  .ai-layout { grid-template-columns: 1fr; }
  .ai-text { grid-column: 1 / -1; }
  .ai-figure { grid-column: 1 / -1; margin-top: 48px; }

  .concept-flow { grid-template-columns: 1fr; gap: 32px; }
  .eng-item { grid-column: span 6; }
  .phil-pair { grid-template-columns: 1fr; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-form { flex-direction: column; }
}

@media (max-width: 599px) {
  .hero h1 { font-size: clamp(2.2rem, 1.2rem + 4vw, 3rem); }
  .eng-item { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .fit-list li { font-size: 1.1rem; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
