/* ============================================================
   INNO BAHNBAU — Redesign Design System ("Engineered Clarity")
   Tokens · Base · Type · Layout · Components · Utilities
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---- Tokens ---- */
:root {
  /* Brand */
  --red:        #E5342A;   /* refined signal red (was #E93728) */
  --red-600:    #C82A20;
  --red-700:    #A8221A;
  --red-50:     #FDEDEB;

  /* Ink / dark surfaces (warmer than old #0B0B0B) */
  --ink:        #15181D;
  --ink-2:      #1B1F26;
  --ink-3:      #232934;

  /* Steel-neutral scale */
  --c-950: #13161B;
  --c-900: #1B1F26;
  --c-800: #272D36;
  --c-700: #3A424E;
  --c-600: #545E6B;
  --c-500: #6B7480;
  --c-400: #8B939F;
  --c-300: #BEC5CE;
  --c-200: #DDE2E8;
  --c-150: #E7EBEF;
  --c-100: #EFF2F5;
  --c-50:  #F6F8FA;
  --white: #FFFFFF;

  /* Hi-vis safety accent — use VERY sparingly */
  --amber: #F5B70A;

  /* Semantic */
  --bg:          var(--white);
  --bg-soft:     var(--c-50);
  --surface:     var(--white);
  --text:        #14171C;
  --text-muted:  var(--c-500);
  --text-faint:  var(--c-400);
  --border:      var(--c-200);
  --border-soft: var(--c-150);

  /* Type */
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Radii — architectural, tight */
  --r-xs: 3px;
  --r-sm: 5px;
  --r-md: 8px;
  --r-lg: 12px;

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

  /* Shadows — restrained */
  --shadow-sm: 0 1px 2px rgba(20,23,28,.06), 0 1px 3px rgba(20,23,28,.05);
  --shadow-md: 0 4px 12px rgba(20,23,28,.08), 0 2px 4px rgba(20,23,28,.04);
  --shadow-lg: 0 18px 40px rgba(20,23,28,.13), 0 6px 14px rgba(20,23,28,.07);

  --maxw: 1200px;
  --nav-h: 72px;
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 2px; }

/* ---- Type scale ---- */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--text);
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; color: var(--text); }
.h-xxl { font-size: clamp(40px, 6.2vw, 88px); font-weight: 800; line-height: 0.96; letter-spacing: -0.03em; }
.h-xl  { font-size: clamp(32px, 4.4vw, 60px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.0; }
.h-lg  { font-size: clamp(26px, 3vw, 40px); }
.h-md  { font-size: clamp(21px, 2vw, 27px); }
.h-sm  { font-size: 19px; }
.lead  { font-size: clamp(17px, 1.4vw, 21px); line-height: 1.55; color: var(--c-600); font-weight: 400; }
.body  { font-size: 16px; color: var(--c-600); }
.small { font-size: 14px; }

/* Eyebrow / mono label — the precision motif */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--red);
  display: inline-block;
}
.eyebrow.on-dark { color: color-mix(in srgb, var(--red) 70%, white); }
.eyebrow.on-dark::before { background: var(--red); }
.eyebrow.plain::before { display: none; }

.mono { font-family: var(--font-mono); }
.mono-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- Layout ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }
.wrap-wide { max-width: none; }
.section { padding-block: clamp(64px, 9vw, 128px); }
.section-sm { padding-block: clamp(48px, 6vw, 80px); }
.on-ink { background: var(--ink); color: #EAECEF; }
.on-ink h1, .on-ink h2, .on-ink h3, .on-ink h4, .on-ink .display { color: #fff; }
.on-soft { background: var(--bg-soft); }
.divider { height: 1px; background: var(--border-soft); border: 0; }

.grid { display: grid; gap: var(--s-5); }
.flow > * + * { margin-top: var(--s-4); }

/* Section header block */
.sec-head { max-width: 720px; }
.sec-head .lead { margin-top: 18px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head.center .eyebrow { justify-content: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: var(--r-sm);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, color .15s ease, border-color .15s ease;
  border: 1.5px solid transparent; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-600); box-shadow: 0 6px 18px rgba(229,52,42,.28); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--white); }
.btn-ghost:hover { border-color: var(--c-400); background: var(--c-50); }
.btn-ghost.on-dark { background: transparent; border-color: rgba(255,255,255,.28); color: #fff; }
.btn-ghost.on-dark:hover { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.06); }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn .ar { transition: transform .18s ease; }
.btn:hover .ar { transform: translateX(3px); }

/* Text link with arrow */
.tlink {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: 15px; color: var(--text);
  border-bottom: 2px solid transparent; padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.tlink:hover { color: var(--red); border-color: var(--red); }
.tlink .ar { transition: transform .18s ease; }
.tlink:hover .ar { transform: translateX(3px); }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card-pad { padding: var(--s-6); }

/* ---- Misc components ---- */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  background: var(--c-100); color: var(--c-600); border: 1px solid var(--border-soft);
}
.pill.on-dark { background: rgba(255,255,255,.08); color: #CDD3DB; border-color: rgba(255,255,255,.12); }

.kicker-num {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--red); letter-spacing: 0.06em;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }

/* image utilities */
.img-cover { width: 100%; height: 100%; object-fit: cover; }
.duotone { filter: grayscale(.35) contrast(1.04); }
.media { position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--c-100); }
.media::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, transparent 40%, rgba(21,24,29,.55)); pointer-events:none; }
.media.plain::after { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---- Cookie consent ---- */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150; display: flex; justify-content: center; animation: cookieIn .4s cubic-bezier(.16,1,.3,1); }
@keyframes cookieIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.cookie-inner { width: 100%; max-width: 880px; background: var(--ink); color: #e7ebef; border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 18px 22px; display: flex; align-items: center; gap: 24px; }
.cookie-txt { font-size: 14px; line-height: 1.5; color: #c4cad2; margin: 0; flex: 1; }
.cookie-link { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.cookie-link:hover { color: var(--red); }
.cookie-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.cookie-actions .btn { padding: 10px 18px; font-size: 14px; }
.cookie-actions .btn-ghost { background: transparent; border-color: rgba(255,255,255,.28); color: #fff; }
.cookie-actions .btn-ghost:hover { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.06); }
@media (max-width: 640px) { .cookie-inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; } .cookie-actions { justify-content: stretch; } .cookie-actions .btn { flex: 1; justify-content: center; } }
