/* =========================================================
   VA TECH — Industrietechnik / Anlagenbau
   Design system: cold steel + single hot molten-metal spark
   Type: Archivo (display) · IBM Plex Sans (body) · IBM Plex Mono (data)
   ========================================================= */

:root {
  /* Steel base */
  --anthracite:   #171B1F;
  --anthracite-2: #21262B;
  --anthracite-3: #2C333A;
  --steel:        #5B6670;
  --steel-soft:   #8A939B;
  --line:         #CBD1D6;
  --line-dark:    #363E45;

  /* Cool light surfaces (deliberately NOT warm cream) */
  --zinc:      #E7EAEC;
  --zinc-2:    #F1F3F4;
  --paper:     #FCFCFD;

  /* The single accent: molten-metal spark */
  --hot:       #E8451F;
  --hot-deep:  #B7330F;

  --display: 'Archivo', system-ui, sans-serif;
  --body:    'IBM Plex Sans', system-ui, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, monospace;

  --wrap: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  background: var(--zinc);
  color: var(--anthracite);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Layout helpers ---------- */
.wrap { width: min(100% - 3rem, var(--wrap)); margin-inline: auto; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hot);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--hot);
  display: inline-block;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}

/* ---------- Skip link + focus ---------- */
.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--anthracite); color: #fff;
  padding: 0.7rem 1rem; z-index: 999; font-family: var(--mono); font-size: 0.8rem;
}
.skip:focus { left: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--hot);
  outline-offset: 3px;
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--zinc) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: 0.02em;
  display: inline-flex; align-items: baseline; gap: 0.18em;
}
.brand .dot { color: var(--hot); }
.brand small {
  font-family: var(--mono); font-weight: 400;
  font-size: 0.6rem; letter-spacing: 0.22em;
  color: var(--steel); text-transform: uppercase;
  margin-left: 0.6rem; align-self: center;
}
.nav__links { display: flex; align-items: center; gap: 1.7rem; }
.nav__links a {
  font-family: var(--mono); font-size: 0.76rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--steel); padding: 0.4rem 0; position: relative;
  transition: color 0.2s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; background: var(--hot);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--anthracite); }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  background: var(--anthracite);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
/* faint engineering grid */
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 15% 0%, #000 30%, transparent 78%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 0;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
}
.hero__col--text { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.hero .eyebrow { color: var(--hot); }
.hero h1 {
  font-size: clamp(2.7rem, 6.6vw, 5.3rem);
  color: var(--paper);
  margin-bottom: 1.4rem;
}
.hero h1 .hl { color: var(--hot); }
.hero__lead {
  max-width: 46ch; color: #C6CCD1;
  font-size: 1.12rem; margin: 0 0 2.2rem;
}
.hero__actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* Figure frame: clearly a photo slot with technical corner brackets */
.figure {
  position: relative;
  aspect-ratio: 4 / 5;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 10px, transparent 10px 20px),
    var(--anthracite-2);
  border: 1px solid var(--line-dark);
  display: grid; place-content: center; text-align: center;
  margin-bottom: -1px;
}
.figure__label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--steel-soft);
}
.figure__label b { display: block; color: #A9B2B9; font-weight: 500; margin-bottom: 0.35rem; }
.figure::before, .figure::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 2px solid var(--hot);
}
.figure::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.figure::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.figure--light {
  background:
    repeating-linear-gradient(45deg, rgba(23,27,31,0.045) 0 10px, transparent 10px 20px),
    var(--zinc-2);
  border-color: var(--line);
}
.figure--light .figure__label { color: var(--steel); }
.figure--light .figure__label b { color: var(--anthracite); }
.figure--wide { aspect-ratio: 16 / 9; }
.figure--tall { aspect-ratio: 3 / 4; }

/* Spec rail: engineering datasheet strip */
.specrail {
  position: relative;
  border-top: 1px solid var(--line-dark);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.specrail__item {
  padding: 1.4rem 1.5rem;
  border-left: 1px solid var(--line-dark);
}
.specrail__item:first-child { border-left: 0; padding-left: 0; }
.specrail__k {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--steel-soft); margin: 0 0 0.4rem;
}
.specrail__v {
  font-family: var(--display); font-weight: 800; font-size: 1.75rem;
  color: var(--paper); letter-spacing: -0.02em;
}
.specrail__v .u { color: var(--hot); font-size: 0.9rem; margin-left: 0.15em; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em;
  text-transform: uppercase; font-weight: 500;
  padding: 0.95rem 1.5rem; border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.6rem;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.btn__arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--hot { background: var(--hot); color: #fff; }
.btn--hot:hover { background: var(--hot-deep); }
.btn--ghost { background: transparent; color: var(--paper); border-color: var(--line-dark); }
.btn--ghost:hover { border-color: var(--steel-soft); color: #fff; }
.btn--dark { background: var(--anthracite); color: #fff; }
.btn--dark:hover { background: var(--anthracite-3); }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section--paper { background: var(--paper); }
.section--dark { background: var(--anthracite); color: var(--paper); }
.section--dark h2, .section--dark h3 { color: var(--paper); }

.sec-head { max-width: 60ch; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.sec-head h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: 1rem; }
.sec-head p { color: var(--steel); font-size: 1.1rem; margin: 0; max-width: 54ch; }
.section--dark .sec-head p { color: #B4BBC1; }

/* Divisions grid */
.divisions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.division {
  background: var(--paper); padding: clamp(1.8rem, 3vw, 2.6rem);
  position: relative; transition: background 0.25s var(--ease);
}
.division:hover { background: var(--zinc-2); }
.division__code {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  color: var(--hot); margin-bottom: 1.4rem;
}
.division h3 { font-size: 1.5rem; margin-bottom: 0.7rem; }
.division p { color: var(--steel); font-size: 0.99rem; margin: 0 0 1.4rem; }
.division__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.04em;
  color: var(--steel); border: 1px solid var(--line);
  padding: 0.28rem 0.6rem;
}
.division__bar {
  position: absolute; left: 0; top: 0; width: 3px; height: 100%;
  background: var(--hot); transform: scaleY(0); transform-origin: top;
  transition: transform 0.3s var(--ease);
}
.division:hover .division__bar { transform: scaleY(1); }

/* Heritage split band */
.split {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.split__body h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); margin-bottom: 1.3rem; }
.split__body p { color: var(--steel); margin: 0 0 1.1rem; }
.section--dark .split__body p { color: #B4BBC1; }

/* Timeline (real chronology — order carries meaning) */
.timeline { list-style: none; padding: 0; margin: 2rem 0 0; }
.timeline li {
  display: grid; grid-template-columns: 88px 1fr; gap: 1.2rem;
  padding: 1.1rem 0; border-top: 1px solid var(--line-dark);
}
.section--paper .timeline li, .split .timeline li { border-top-color: var(--line); }
.timeline .yr { font-family: var(--mono); font-weight: 500; color: var(--hot); font-size: 0.95rem; }
.timeline .ev { color: var(--steel); }
.section--paper .timeline .ev { color: var(--anthracite); }

/* Stat row on light */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 2.5rem; }
.stat { background: var(--paper); padding: 1.6rem; }
.stat__v { font-family: var(--display); font-weight: 800; font-size: 2.1rem; letter-spacing: -0.02em; }
.stat__v .u { color: var(--hot); font-size: 0.85rem; }
.stat__k { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel); margin-top: 0.4rem; }

/* CTA band */
.cta {
  background: var(--hot); color: #fff;
  display: grid; grid-template-columns: 1.4fr auto; align-items: center; gap: 2rem;
  padding: clamp(2.5rem, 5vw, 3.5rem);
}
.cta h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); color: #fff; }
.cta p { margin: 0.6rem 0 0; color: #FFE2D8; max-width: 44ch; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); }
.contact__meta dt { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hot); margin-top: 1.6rem; }
.contact__meta dt:first-child { margin-top: 0; }
.contact__meta dd { margin: 0.3rem 0 0; font-size: 1.05rem; }
.form { display: grid; gap: 1.2rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--steel); }
.field input, .field textarea, .field select {
  font-family: var(--body); font-size: 1rem; padding: 0.85rem 0.9rem;
  border: 1px solid var(--line); background: var(--paper); color: var(--anthracite);
  transition: border-color 0.2s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--hot); outline: none; }
.field textarea { resize: vertical; min-height: 140px; }

/* =========================================================
   PAGE HEADER (interior pages)
   ========================================================= */
.pagehead { background: var(--anthracite); color: var(--paper); position: relative; overflow: hidden; }
.pagehead::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(110% 100% at 85% 0%, #000 25%, transparent 75%);
}
.pagehead__inner { position: relative; padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.pagehead h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); color: var(--paper); max-width: 18ch; }
.pagehead p { color: #B4BBC1; max-width: 52ch; margin: 1.3rem 0 0; font-size: 1.12rem; }
.crumb { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel-soft); margin-bottom: 1.4rem; }
.crumb .sep { color: var(--hot); margin: 0 0.5rem; }

/* Prose blocks */
.prose { max-width: 68ch; }
.prose h3 { font-size: 1.4rem; margin: 2.4rem 0 0.8rem; }
.prose p { color: var(--steel); margin: 0 0 1.1rem; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--anthracite); color: #A9B2B9; padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line-dark); }
.footer .brand { color: var(--paper); font-size: 1.5rem; }
.footer__tag { margin: 1rem 0 0; max-width: 32ch; font-size: 0.95rem; }
.footer h4 { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel-soft); margin: 0 0 1rem; font-weight: 400; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.footer ul a { font-size: 0.92rem; transition: color 0.2s var(--ease); }
.footer ul a:hover { color: var(--paper); }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-top: 1.8rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--steel); }

/* =========================================================
   REVEAL ANIMATION
   ========================================================= */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__col--fig { max-width: 380px; }
  .specrail { grid-template-columns: repeat(2, 1fr); }
  .specrail__item:nth-child(3) { border-left: 0; padding-left: 0; }
  .specrail__item { border-top: 1px solid var(--line-dark); }
  .specrail__item:first-child, .specrail__item:nth-child(2) { border-top: 0; }
  .divisions { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cta { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .nav__links.open {
    display: flex; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: 0.5rem 1.5rem 1.2rem;
  }
  .nav__links.open a { padding: 0.85rem 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav__toggle { display: inline-flex; }
  .form .row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 64px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn, .division__bar, .nav__links a::after { transition: none !important; }
}
