/* ============================================================
   ENTEL CONTAINER — Design Tokens
   Industrial / Robust. Navy + Orange. Heavy display type.
   ============================================================ */

:root {
  /* Navy ramp (Entel CI) */
  --navy-900: #0A1626;
  --navy-800: #0F2540;
  --navy-700: #1B3658;
  --navy-500: #2C4A6F;
  --navy-300: #6A7E9A;

  /* Neutrals — mostly white, faint warm tint */
  --paper:    #FAFAF7;
  --paper-2:  #F1EEE8;
  --concrete: #E5E3DD;
  --steel:    #98A0AA;
  --ink:      #0A1626;
  --muted:    #5A6878;
  --line:     #1C2D45;

  /* Accent — Entel Container-Rot (default). Hoffmann-Orange & Hi-Vis-Gelb via Tweaks. */
  --accent:        #8B2E1C;
  --accent-ink:    #FFFFFF;
  --accent-soft:   #F2E0DC;
  /* Hellere Akzent-Variante für Text auf dunklen (navy-800/900) Hintergründen —
     --accent selbst hat dort nur ~1.8:1 Kontrast (WCAG braucht 4.5:1 für Text). */
  --accent-on-dark: #E8845F;

  /* Status — #2E8B57 (Original) hatte auf hellem UND dunklem Hintergrund
     zu wenig Kontrast (3.53:1 auf --ok-Chip-Hellhintergrund, 4.28:1 im
     dunklen Header) — analog zu --accent-on-dark aufgeteilt. */
  --ok:         #267649;
  --ok-on-dark: #30915B;
  --warn:  #E8B41F;

  /* Type — Bricolage Grotesque variable (wdth 75→100), Inter Tight, JetBrains Mono */
  --f-display: "Bricolage Grotesque", "Helvetica Neue", system-ui, sans-serif;
  --f-body:    "Inter Tight", "Inter", "Helvetica Neue", system-ui, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Radii — kept small. Industrial corners. */
  --r-1: 2px;
  --r-2: 4px;
  --r-3: 8px;

  /* Spacing scale */
  --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;

  /* Layout */
  --max-w: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
}

/* ---------- Base reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Prevent intrinsic-size grid blowouts (Photo aspect-ratio expanding tracks) */
:where(.wrap, .hero-grid, .kfg, .met-grid, .met-detail, .anf-grid,
       .seo-block, .size-row, .metal-sec__body, .step-grid, .hof-steps,
       .rev-grid, .allowed-grid, .trust-grid, .hero-util__row) > * {
  min-width: 0;
}
:where(.met-detail__photo, .seo-block__photo, .size-row__photo,
       .metal-sec__photo, .anf-map, .door__photo) { min-width: 0; }

/* ---------- Container ---------- */
.wrap { max-width: var(--max-w); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Type system ---------- */
.h-hero {
  font-family: var(--f-display);
  font-weight: 700;
  font-variation-settings: "wdth" 80;
  font-size: clamp(46px, 8.5vw, 124px);
  line-height: 0.88;
  letter-spacing: -0.025em;
}
.h-section {
  font-family: var(--f-display);
  font-weight: 600;
  font-variation-settings: "wdth" 90;
  font-size: clamp(32px, 4.5vw, 60px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.h-card {
  font-family: var(--f-display);
  font-weight: 600;
  font-variation-settings: "wdth" 95;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.eyebrow {
  font-family: var(--f-mono);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 500;
  color: var(--muted);
}
.mono { font-family: var(--f-mono); }
.kicker {
  font-family: var(--f-mono);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1.5px solid currentColor;
  background: transparent;
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  border-radius: 0;
  transition: transform .08s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn--primary:hover { filter: brightness(1.05); }
.btn--dark {
  background: var(--navy-800);
  color: #fff;
  border-color: var(--navy-800);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost-on-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.4);
}
.btn--ghost-on-dark:hover { background: rgba(255,255,255,.08); }
.btn--lg { padding: 17px 26px; font-size: 16px; }
.btn--sm { padding: 9px 14px; font-size: 13px; }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Chips / tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
  color: var(--muted);
}
.chip--ok { color: var(--ok-on-dark); }
.chip--accent { color: var(--accent); border-color: var(--accent); }

/* ---------- Foto-Placeholder (duotone navy gradient) ---------- */
.photo {
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 30% 30%, rgba(255,255,255,.06) 0%, transparent 60%),
    linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  color: rgba(255,255,255,.6);
}
.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse 60% 40% at 70% 80%, rgba(232,84,31,.18) 0%, transparent 70%);
  pointer-events: none;
}
/* When filled with a real image, drop the placeholder texture overlay */
.photo--filled { background: var(--navy-900); }
.photo--filled::after {
  background: linear-gradient(180deg, transparent 30%, rgba(10,22,38,.45) 100%);
  z-index: 1;
}
.photo__label {
  position: absolute;
  inset: auto 16px 16px 16px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.95);
  padding: 0;
  border: 0;
  border-left: 2px solid var(--accent);
  padding-left: 10px;
  display: block;
  width: auto;
  max-width: calc(100% - 32px);
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.photo--light {
  background:
    radial-gradient(ellipse 80% 60% at 30% 30%, rgba(15,37,64,.04) 0%, transparent 60%),
    linear-gradient(135deg, var(--paper-2) 0%, var(--concrete) 100%);
  color: var(--navy-800);
}
.photo--light::after {
  background:
    repeating-linear-gradient(0deg, rgba(15,37,64,.025) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse 60% 40% at 70% 80%, rgba(232,84,31,.1) 0%, transparent 70%);
}
.photo--light .photo__label {
  color: var(--navy-800);
}

/* ---------- Section spacing ---------- */
.section { padding-block: clamp(56px, 9vw, 112px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section--dark { background: var(--navy-800); color: #fff; }
.section--paper-2 { background: var(--paper-2); }

/* Divider line */
.rule { height: 2px; background: var(--ink); border: 0; margin: 0; }
.rule--soft { height: 1px; background: rgba(10,22,38,.12); }
.rule--on-dark { background: rgba(255,255,255,.2); }

/* ---------- STAMP — rotated ink-stamp badge ---------- */
.stamp {
  --stamp-rot: -8deg;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 18px 10px;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  transform: rotate(var(--stamp-rot));
  position: relative;
  background: transparent;
  /* slight ink-bleed effect */
  filter: drop-shadow(0 0 0.5px var(--accent));
}
.stamp::before, .stamp::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px;
  height: 1px; background: var(--accent);
  opacity: .6;
}
.stamp::before { top: 6px; }
.stamp::after  { bottom: 6px; }
.stamp__lg {
  font-family: var(--f-display);
  font-weight: 600;
  font-variation-settings: "wdth" 85;
  font-size: 20px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1;
  margin: 2px 0;
}

/* ---------- CHAPTER NUMBER — compact accent pill, industrial look ---------- */
.chapter-num {
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  color: var(--accent);
  letter-spacing: .14em;
  -webkit-text-stroke: 0;
  -webkit-text-fill-color: currentColor;
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid var(--accent);
  background: transparent;
}
.chapter-num--solid {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- Utility ---------- */
.stack > * + * { margin-top: var(--gap, 16px); }
.cluster { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Focus — Doppelring (weiß + dunkel) statt Akzentfarbe: var(--accent) hat auf
   Navy-Hintergruenden nur ~1.8:1 Kontrast (WCAG braucht 3:1 fuer Fokus-Indikatoren).
   Weisser Ring greift auf dunklen Sections, dunkler Ring-Schatten auf hellen — so
   ist immer mindestens einer der beiden Ringe ausreichend kontrastreich sichtbar. */
:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--ink);
  border-radius: 1px;
}

/* Nur für Screenreader — visuell versteckt, aber im Accessibility-Tree lesbar */
.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;
}

/* Skip-Link — visuell versteckt bis Tastatur-Fokus */
.skip-link {
  position: absolute;
  top: -999px;
  left: 8px;
  z-index: 999;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border-radius: var(--r-2);
}
.skip-link:focus {
  top: 8px;
}

/* Scrollbar reset for iframe */
html { scroll-behavior: smooth; }
