/* =============================================================
   incūdex — Dachmarken-Website
   Design-Tokens aus „incudex Logo.dc.html“ / Brand Guidelines:
   dark-first Graphit-System mit einem warmen Signalton (Ember).
   ============================================================= */

:root {
  /* Flächen */
  --bg: #0C0F14;
  --canvas: #0F131A;
  --s1: #161B24;
  --s2: #1D242F;
  --s3: #252E3B;

  /* Linien */
  --border: #2A3340;
  --border-strong: #3A4757;

  /* Text */
  --text-hi: #EEF1F5;
  --text-mid: #A3ADBB;
  --text-low: #6C7787;

  /* Signal — Ember bleibt in beiden Fassungen dieselbe Markenfarbe */
  --ember: #F97D4E;
  --ember-deep: #D85E2F;
  --arc: #4FA6E8;
  --success: #4FB477;
  --warning: #E0A83D;
  --danger: #E5624A;

  /* Signalfarben als Text. Auf Hell greift jeweils die tiefe Fassung —
     Ember selbst liegt dort bei 2:1 und bleibt reine Markenfarbe. */
  --accent-text: var(--ember);
  --arc-text: var(--arc);
  --success-text: var(--success);
  --warning-text: var(--warning);
  --danger-text: var(--danger);
  --accent-hover: #ffa077;

  /* Effekte */
  --tile: radial-gradient(120% 120% at 30% 0%, #212B39, #0A0D12);
  --hero-glow: radial-gradient(80% 60% at 50% -10%, rgba(249, 125, 78, .16), transparent 60%);
  --header-bg: rgba(12, 15, 20, .72);
  --rule: rgba(238, 241, 245, .24);
  --glow: 0 0 40px rgba(249, 125, 78, .30);
  --shadow-1: 0 8px 24px rgba(0, 0, 0, .40);
  --shadow-2: 0 24px 60px rgba(0, 0, 0, .55);

  /* Maße */
  --radius: 16px;
  --radius-tile: 22px;
  --wrap: 1180px;
  --pad: 28px;

  /* Typo */
  --f-display: 'Space Grotesk', system-ui, sans-serif;
  --f-body: 'Space Grotesk', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ---------------------------------------------------------------
   Light-Fassung — getönte Variante desselben Systems, keine zweite
   Marke. Werte aus „incudex Logo.dc.html“; Dark bleibt Standard und
   greift, solange nichts anderes gewählt wurde.
   --------------------------------------------------------------- */
:root[data-theme="light"] {
  --bg: #DDE4EC;
  --canvas: #E9EEF3;
  --s1: #F2F5F8;
  --s2: #FFFFFF;
  --s3: #FFFFFF;

  --border: #BFC9D6;
  --border-strong: #9AA7B8;

  --text-hi: #101A28;
  --text-mid: #3E4B5C;
  --text-low: #4A5563;

  --ember-deep: #9E3410;
  --accent-text: #9E3410;
  --arc-text: #1B6FB0;
  --success-text: #1D6B3E;
  --warning-text: #8A5A12;
  --danger-text: #B3341E;
  --accent-hover: #D85E2F;

  --tile: radial-gradient(120% 120% at 30% 0%, #FFFFFF, #DDE4EC);
  --hero-glow: radial-gradient(80% 60% at 50% -10%, rgba(249, 125, 78, .20), transparent 60%);
  --header-bg: rgba(233, 238, 243, .78);
  --rule: #9AA7B8;
  --shadow-1: 0 8px 24px rgba(16, 26, 40, .10);
  --shadow-2: 0 24px 60px rgba(16, 26, 40, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-hi);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img, svg { display: block; }
::selection { background: rgba(249, 125, 78, .28); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }

.container { max-width: var(--wrap); margin: 0 auto; }

/* Mikrolabel: Mono, Versalien, .14em — Hausregel */
.mono-label {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-low);
}

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

@keyframes emberpulse { 0%, 100% { opacity: .5 } 50% { opacity: 1 } }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ember); color: #1a0a03; padding: 10px 16px;
  border-radius: 8px; font-family: var(--f-mono); font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

/* =============================== Header =============================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: 14px var(--pad);
  display: flex; align-items: center; gap: 16px;
}
/* Horizontales Lockup nach dem Abschnitt „Lockups · horizontal“ der
   Logo-Seite: Bildmarke · Trennlinie · Schriftzug. Maße dort 64×72,
   Abstand 24, Linie 1×54, Schriftzug 163×36 — hier auf 30 px
   Bildmarkenhöhe skaliert (Faktor 0,4167). */
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand__emblem { width: 27px; height: 30px; }
.brand__rule { width: 1px; height: 23px; background: var(--rule); flex: none; }
.brand__wordmark { width: 68px; height: 15px; }

.nav {
  margin-left: auto; display: flex; align-items: center; gap: 26px;
}
.nav__link {
  font-family: var(--f-mono); font-weight: 500; font-size: 11px; line-height: 1;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-mid);
}
.nav__link:hover { color: var(--text-hi); }
.nav__cta {
  font-family: var(--f-display); font-weight: 600; font-size: 13px;
  color: #1a0a03; background: var(--ember);
  border-radius: 9px; padding: 9px 15px;
}
.nav__cta:hover { background: #ff9160; color: #1a0a03; }

.lang-switch {
  display: inline-flex; border: 1px solid var(--border-strong);
  border-radius: 8px; overflow: hidden;
}
.lang-switch button {
  font-family: var(--f-mono); font-weight: 600; font-size: 11px; line-height: 1;
  background: transparent; color: var(--text-mid); border: 0; cursor: pointer;
  padding: 7px 9px; transition: color .15s ease, background .15s ease;
}
.lang-switch button[aria-pressed="true"] { color: #1a0a03; background: var(--ember); }
.lang-switch button:not([aria-pressed="true"]):hover { color: var(--text-hi); }

/* Logo-Paare: je Fassung die passende Vektordatei. */
.only-light { display: none; }
:root[data-theme="light"] .only-dark { display: none; }
:root[data-theme="light"] .only-light { display: block; }

/* Farbschema-Umschalter — Bauweise wie der Sprachumschalter. */
.theme-switch {
  display: inline-flex; border: 1px solid var(--border-strong);
  border-radius: 8px; overflow: hidden;
}
.theme-switch button {
  display: grid; place-items: center;
  background: transparent; color: var(--text-mid); border: 0; cursor: pointer;
  padding: 6px 9px; transition: color .15s ease, background .15s ease;
}
.theme-switch button svg { width: 14px; height: 14px; }
.theme-switch button[aria-pressed="true"] { color: #1a0a03; background: var(--ember); }
.theme-switch button:not([aria-pressed="true"]):hover { color: var(--text-hi); }

.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--text-hi);
}
.nav-toggle svg { width: 18px; height: 18px; }

/* =============================== Buttons =============================== */
.btn {
  display: inline-block; cursor: pointer;
  font-family: var(--f-display); font-weight: 600; font-size: 15px;
  border-radius: 10px; padding: 13px 22px;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, color .15s ease;
}
.btn--primary { color: #1a0a03; background: var(--ember); border: 1px solid var(--ember); }
.btn--primary:hover { background: #ff9160; border-color: #ff9160; color: #1a0a03; transform: translateY(-1px); }
.btn--ghost { color: var(--text-hi); background: transparent; border: 1px solid var(--border-strong); }
.btn--ghost:hover { border-color: var(--ember); color: var(--accent-hover); }
.btn[disabled] { opacity: .5; cursor: progress; }

/* =============================== Hero =============================== */
.hero {
  position: relative; overflow: hidden;
  background: var(--tile); border-bottom: 1px solid var(--border);
}
.hero__glow {
  position: absolute; inset: 0; pointer-events: none;
  background: var(--hero-glow);
}
.hero__inner {
  position: relative; max-width: var(--wrap); margin: 0 auto;
  padding: clamp(64px, 10vw, 120px) var(--pad);
  display: flex; flex-direction: column; align-items: flex-start; gap: 26px;
}
.hero h1 {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(38px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -.03em;
  margin: 0; max-width: 17ch; text-wrap: balance;
}
.hero h1 .accent { color: var(--accent-text); }
.hero__sub {
  font-family: var(--f-mono); font-weight: 400;
  font-size: clamp(15px, 2.2vw, 21px); line-height: 1.45;
  color: var(--text-mid); margin: 0; max-width: 44ch;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero__platforms {
  font-family: var(--f-mono); font-weight: 500; font-size: 11px; line-height: 1.8;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-low); margin-top: 6px;
}

/* =============================== Sections =============================== */
.section { max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 8vw, 90px) var(--pad); }
.section--alt { border-top: 1px solid var(--border); background: var(--canvas); max-width: none; padding: 0; }
.section--alt > .section { padding-top: clamp(56px, 8vw, 90px); }

.section-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.section-head__num {
  font-family: var(--f-mono); font-weight: 600; font-size: 12px; line-height: 1;
  letter-spacing: .18em; color: var(--accent-text);
}
.section-head h2 {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(28px, 4vw, 40px); line-height: 1.05; letter-spacing: -.02em; margin: 0;
}
.section-head__en { font-family: var(--f-mono); font-size: 15px; line-height: 1; color: var(--text-low); }
.section-lead {
  font-size: 16px; line-height: 1.55; color: var(--text-mid);
  max-width: 64ch; margin: 0 0 34px;
}

/* =============================== Produkte =============================== */
.products-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px;
}
.product {
  display: flex; flex-direction: column; align-items: flex-start; color: inherit;
  background: var(--s1);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent, var(--border-strong));
  border-radius: var(--radius); padding: 22px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
a.product:hover {
  border-color: var(--border-strong); border-top-color: var(--accent);
  transform: translateY(-3px); box-shadow: var(--shadow-1); color: inherit;
}
.product__head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.product__dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); flex: none; }
.product__head h3 { font-family: var(--f-display); font-weight: 600; font-size: 19px; line-height: 1; margin: 0; }
.product__de { font-size: 14px; line-height: 1.45; color: var(--text-mid); margin: 0; }
.product__en { font-family: var(--f-mono); font-size: 12.5px; line-height: 1.4; color: var(--text-low); margin: 3px 0 0; }
.product__plat {
  font-family: var(--f-mono); font-weight: 500; font-size: 10px; line-height: 1.5;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-low);
  margin-top: auto; padding-top: 16px;
}
.chip {
  font-family: var(--f-mono); font-weight: 600; font-size: 10px; line-height: 1.4;
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  padding: 3px 8px; border-radius: 999px;
  color: var(--accent); border: 1px solid var(--accent); background: rgba(255, 255, 255, .04);
}
.chip--alpha { color: var(--warning-text); border-color: rgba(224, 168, 61, .55); }
.chip--wip { color: var(--arc-text); border-color: rgba(79, 166, 232, .55); }
.e2e-tag {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-family: var(--f-mono); font-weight: 600; font-size: 10.5px; letter-spacing: .06em;
  color: var(--accent-text); background: rgba(249, 125, 78, .09);
  border: 1px solid rgba(249, 125, 78, .45); border-radius: 999px; padding: 4px 10px;
}
.e2e-tag svg { width: 12px; height: 12px; flex: none; }
.more-box {
  margin-top: 16px; border: 1px dashed var(--border-strong); border-radius: 12px;
  padding: 16px 22px; font-family: var(--f-mono); font-size: 13.5px; color: var(--text-low);
}

/* =============================== Leistungen =============================== */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.service { background: var(--s1); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.service__k {
  font-family: var(--f-mono); font-weight: 500; font-size: 10px; line-height: 1;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 14px;
}
.service h3 { font-family: var(--f-display); font-weight: 600; font-size: 20px; line-height: 1.1; margin: 0 0 8px; }
.service p { font-size: 14px; line-height: 1.5; color: var(--text-mid); margin: 0; }
.service p.en { font-family: var(--f-mono); font-size: 12.5px; line-height: 1.4; color: var(--text-low); margin: 8px 0 0; }

/* =============================== Kontakt =============================== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 36px; }
.contact-form {
  background: var(--s1); border: 1px solid var(--border); border-radius: 18px;
  padding: clamp(24px, 4vw, 36px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field--wide { grid-column: 1 / -1; }
.field label {
  font-family: var(--f-mono); font-weight: 500; font-size: 10px; line-height: 1;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-low);
}
.field input, .field textarea {
  font-family: var(--f-body); font-size: 15px; color: var(--text-hi);
  background: var(--canvas); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 12px 14px; width: 100%; resize: vertical; outline: none;
}
.field textarea { min-height: 118px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-low); }
.field input:focus, .field textarea:focus {
  border-color: var(--ember); box-shadow: 0 0 0 3px rgba(249, 125, 78, .28);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-note { font-family: var(--f-mono); font-size: 12.5px; line-height: 1.5; color: var(--text-low); }
.form-note a { color: var(--text-mid); }
.form-note input[type="checkbox"] { accent-color: var(--ember); vertical-align: middle; margin-right: 4px; }
.form-status { grid-column: 1 / -1; font-family: var(--f-mono); font-size: 13.5px; min-height: 20px; }
.form-status--ok { color: var(--success-text); }
.form-status--err { color: var(--danger-text); }
.contact-fallback { margin-top: 20px; }
.contact-mail {
  display: inline-block; margin-top: 8px;
  font-family: var(--f-mono); font-size: 15px; color: var(--accent-text);
  background: var(--canvas); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 13px 18px;
}
.contact-mail:hover { border-color: var(--ember); }

/* =============================== Footer =============================== */
.site-footer { border-top: 1px solid var(--border); background: var(--canvas); }
.site-footer__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 44px var(--pad);
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
}
.site-footer .brand { gap: 9px; }
.site-footer .brand__emblem { width: 23px; height: 26px; }
.site-footer .brand__rule { height: 20px; }
.site-footer .brand__wordmark { width: 59px; height: 13px; }
.site-footer__meta { font-family: var(--f-mono); font-size: 12px; line-height: 1.6; color: var(--text-low); }
.site-footer nav { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer nav a {
  font-family: var(--f-mono); font-weight: 500; font-size: 11px; line-height: 1;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-mid);
}
.site-footer nav a:hover { color: var(--text-hi); }

/* =============================== Rechtstexte =============================== */
.legal { max-width: 820px; margin: 0 auto; padding: 64px var(--pad) 80px; }
.legal h1 {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(30px, 4vw, 44px); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 8px;
}
.legal .lead { font-family: var(--f-mono); font-size: 13px; color: var(--text-low); margin: 0 0 40px; }
.legal h2 { font-family: var(--f-display); font-weight: 600; font-size: 22px; line-height: 1.1; margin: 40px 0 12px; }
.legal h3 { font-family: var(--f-display); font-weight: 600; font-size: 17px; margin: 24px 0 8px; }
.legal p, .legal li { font-size: 16px; line-height: 1.7; color: var(--text-mid); }
.legal ul { padding-left: 20px; }
.legal address { font-style: normal; color: var(--text-hi); line-height: 1.7; }
.back-link { font-family: var(--f-mono); font-size: 13px; }

/* =============================== Responsive =============================== */
@media (max-width: 900px) {
  :root { --pad: 22px; }
  .contact-form { grid-template-columns: 1fr; }
  .nav { gap: 18px; }
}

@media (max-width: 700px) {
  .nav__link, .nav__cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav[data-open="true"] {
    position: absolute; top: 62px; right: var(--pad); left: var(--pad);
    flex-direction: column; align-items: stretch; gap: 12px;
    background: rgba(12, 15, 20, .97); border: 1px solid var(--border);
    border-radius: 12px; padding: 16px;
  }
  .nav[data-open="true"] .nav__link { display: block; }
  .nav[data-open="true"] .nav__cta { display: block; text-align: center; }
  .site-footer nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
