/* ANGER ENGINEERING – gemeinsames Stylesheet. Variablen in :root verwenden. */

/* Schriften lokal gehostet (IBM Plex, SIL Open Font License 1.1 – siehe /assets/fonts/OFL.txt) */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-v23-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-v23-latin-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-v23-latin-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-v23-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-v23-latin-500.woff2") format("woff2"); }

:root {
  --bg: #16191D;
  --surface: #1C1F23;
  --surface-2: #23272C;
  --line: #2E333A;
  --line-2: #3A4048;
  --line-3: #4A5059;
  --steel: #8A9099;
  --text: #F2F2EF;
  --text-2: #B9BEC5;
  --text-3: #D5D8DC;
  --accent: #FF6A13;
  --accent-tint: rgba(255, 106, 19, 0.06);
  --error: #FF8A5B;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --wrap: 1240px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--text); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; line-height: 1.15; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--bg); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.mono { font-family: var(--mono); }
.muted { color: var(--steel); }
.dim { color: var(--text-2); }
.acc { color: var(--accent); }

/* Kopf */
.hdr { border-bottom: 1px solid var(--line); }
.hdr .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; }
.brand-mark { font-family: var(--mono); font-weight: 500; font-size: 18px; letter-spacing: 0.08em; color: var(--text); }
.brand-mark span { color: var(--steel); }
.brand-sub { font-family: var(--mono); font-size: 12px; color: var(--steel); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 15px; }
.nav a { text-decoration: none; padding: 6px 0; }
.nav a[aria-current="page"] { color: var(--accent); }
.subnav { border-bottom: 1px solid var(--line); background: var(--surface); }
.subnav .wrap { display: flex; flex-wrap: wrap; font-size: 14px; }
.subnav a { text-decoration: none; padding: 14px 20px; color: var(--steel); }
.subnav a:first-child { padding-left: 0; }
.subnav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 2px 0 var(--accent); }

/* Buttons */
.btn { display: inline-block; text-decoration: none; font-family: var(--sans); font-weight: 500; font-size: 16px; padding: 15px 24px; border-radius: var(--radius); border: 1px solid var(--accent); background: var(--accent); color: var(--bg); cursor: pointer; line-height: 1.3; }
.btn:hover { color: var(--bg); filter: brightness(1.08); }
.btn-sm { font-size: 15px; padding: 11px 18px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-3); font-weight: 400; }
.btn-ghost:hover { color: var(--text); border-color: var(--steel); filter: none; }
.btns { display: flex; flex-wrap: wrap; gap: 16px; }

/* Sektionen */
.sec { border-bottom: 1px solid var(--line); }
.sec > .wrap { padding-top: 88px; padding-bottom: 88px; }
.sec.alt { background: var(--surface); }
.tex { background-image: repeating-linear-gradient(0deg, rgba(242, 242, 239, 0.035) 0 1px, transparent 1px 8px); }
.eyebrow { font-family: var(--mono); font-size: 13px; color: var(--steel); letter-spacing: 0.1em; margin-bottom: 16px; text-transform: uppercase; }
.eyebrow.acc { color: var(--accent); margin-bottom: 24px; }
.h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.05; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 24px; text-wrap: balance; }
.h1 .sub { color: var(--steel); display: block; }
.h2 { font-size: clamp(28px, 3.2vw, 36px); font-weight: 600; margin-bottom: 48px; }
.h2.tight { margin-bottom: 20px; }
.lead { font-size: 19px; line-height: 1.6; color: var(--text-2); max-width: 640px; margin-bottom: 40px; }
.body { font-size: 17px; line-height: 1.65; color: var(--text-2); }
.hero > .wrap { padding-top: 88px; padding-bottom: 80px; }
.row { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.row.top { align-items: flex-start; }
.col { flex: 1 1 460px; min-width: 0; }
.col-narrow { flex: 1 1 340px; min-width: 0; }
.col-wide { flex: 2 1 560px; min-width: 0; }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 48px; }
.head-row .h2 { margin-bottom: 0; }

/* 1px-Raster */
.cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 260px), 100%), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cell { background: var(--surface); padding: 28px; }
.alt .cell, .cells.on-alt .cell { background: var(--bg); }
.cell .no { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-bottom: 12px; }
.cell h3 { font-size: 19px; font-weight: 500; margin-bottom: 10px; line-height: 1.3; }
.cell p { font-size: 15px; line-height: 1.6; color: var(--text-2); }
a.cell { text-decoration: none; display: flex; flex-direction: column; gap: 14px; }
a.cell:hover h3 { color: var(--accent); }

/* Stückliste / Tabellen */
.tbl-box { border: 1px solid var(--line); overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 15px; }
.tbl th { font-family: var(--mono); font-size: 12px; color: var(--steel); text-align: left; font-weight: 400; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 18px 20px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: top; line-height: 1.55; }
.tbl td:first-child { font-family: var(--mono); color: var(--steel); width: 72px; }
.tbl td:nth-child(2) { color: var(--text); font-weight: 500; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.final { background: var(--accent-tint); }
.tbl tr.final td:first-child, .tbl tr.final td:nth-child(2) { color: var(--accent); }
.gate { display: inline-block; margin-top: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--accent); border: 1px solid var(--accent); padding: 3px 8px; font-weight: 400; }
.note { font-family: var(--mono); font-size: 12px; color: var(--steel); margin-top: 16px; }

/* Zeichnungskopf */
.titleblock { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; }
.titleblock > div { padding: 12px 16px; border-right: 1px solid var(--line); }
.titleblock > div:last-child { border-right: 0; }
.titleblock .k { color: var(--steel); }
.titleblock .v { margin-top: 4px; }
.panel { border: 1px solid var(--line); background: var(--surface); }
.ph { background: var(--surface); min-height: var(--h, 220px); display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font-family: var(--mono); font-size: 12px; color: var(--steel); line-height: 1.6; }
.ph-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 1px; background: var(--line); }
.dim-line { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--steel); }
.dim-line i { flex: 1; border-top: 1px solid var(--line-3); }

/* Liste mit Symbol (Grenzen etc.) */
.rows { border: 1px solid var(--line); }
.rows > div { display: flex; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.55; }
.rows > div:last-child { border-bottom: 0; }
.rows .sym { font-family: var(--mono); font-size: 13px; color: var(--steel); flex: 0 0 28px; }
.rows b { font-weight: 500; }
.rows span.d { color: var(--text-2); }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq summary { font-size: 18px; font-weight: 500; cursor: pointer; }
.faq p { font-size: 16px; line-height: 1.6; color: var(--text-2); margin-top: 14px; max-width: 820px; }

/* Abschluss-CTA */
.cta { text-align: center; }
.cta > .wrap { padding-top: 96px; padding-bottom: 96px; }
.cta h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 20px; }
.cta p { font-size: 18px; color: var(--text-2); margin-bottom: 36px; }
.cta .btns { justify-content: center; }

/* Fuß */
.ftr { border-top: 1px solid var(--line); }
.ftr .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 28px; font-size: 14px; color: var(--steel); }
.ftr .links { display: flex; flex-wrap: wrap; gap: 24px; }
.ftr a { color: var(--steel); }

/* Wahl-Kacheln (Start, Anfrage) */
.pick { text-align: left; cursor: pointer; font: inherit; color: var(--text); background: var(--surface); border: 0; border-radius: 0; padding: 28px 24px; min-height: 180px; }
.pick .top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 13px; margin-bottom: 18px; }
.pick .top .c { color: var(--accent); }
.pick .top .m { color: var(--steel); }
.pick .t { display: block; font-size: 20px; font-weight: 500; line-height: 1.3; margin-bottom: 10px; }
.pick .s { display: block; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.pick[aria-pressed="true"] { background: var(--surface-2); outline: 2px solid var(--accent); outline-offset: -2px; }
.pick-sm { min-height: 92px; padding: 18px 16px; font-size: 15px; line-height: 1.35; }
.pick-sm .c { display: block; font-family: var(--mono); font-size: 12px; color: var(--accent); margin-bottom: 8px; }
.way { border: 1px solid var(--line); border-top: 0; background: var(--surface); display: flex; flex-wrap: wrap; }
.way > div { padding: 28px 32px; border-right: 1px solid var(--line); }
.way > div:last-child { border-right: 0; display: flex; align-items: center; }
.way .txt { flex: 1 1 340px; min-width: 0; }
.way .steps { flex: 2 1 480px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; }
.chip { padding: 8px 12px; border: 1px solid var(--line-2); }
.chip .n { color: var(--steel); }
.chip.final { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 500; }
.chip.final .n { color: var(--bg); }
.sep { color: var(--line-3); }
.step-g { display: inline-flex; align-items: center; gap: 8px; }

/* Tabs / Umschalter */
.tabs { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); }
.tab { text-align: left; cursor: pointer; font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 0; border-radius: 0; padding: 16px 24px; min-width: 240px; }
.tab .n { font-family: var(--mono); font-size: 12px; display: block; margin-bottom: 4px; color: var(--accent); }
.tab[aria-selected="true"] { background: var(--surface-2); outline: 2px solid var(--accent); outline-offset: -2px; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { cursor: pointer; font: inherit; font-size: 15px; padding: 10px 14px; border-radius: var(--radius); min-height: 44px; background: transparent; color: var(--text); border: 1px solid var(--line-3); }
.toggle[aria-pressed="true"] { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* Werkstoff-Datenblatt */
.mat-tabs { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 24px; }
.mat-tabs button { cursor: pointer; font: inherit; font-size: 15px; padding: 14px 22px; min-height: 48px; border: 0; border-radius: 0; flex: 1 1 auto; background: var(--surface); color: var(--text); }
.mat-tabs button[aria-selected="true"] { background: var(--accent); color: var(--bg); font-weight: 500; }
.sheet { border: 1px solid var(--line); background: var(--bg); display: flex; flex-wrap: wrap; }
.sheet .l { flex: 1 1 380px; min-width: 0; padding: 32px; border-right: 1px solid var(--line); }
.sheet .r { flex: 1 1 420px; min-width: 0; }
.sheet .k { font-family: var(--mono); font-size: 12px; color: var(--steel); margin: 0 0 8px; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.sheet td { overflow-wrap: anywhere; }
.sheet td { padding: 14px 24px; border-bottom: 1px solid var(--line); }
.sheet td:first-child { color: var(--steel); width: 44%; }
.sheet td:last-child { font-family: var(--mono); }
.bar { display: inline-flex; gap: 3px; vertical-align: middle; }
.bar i { display: inline-block; width: 22px; height: 10px; background: var(--line); }
.bar i.on { background: var(--accent); }
.bar-w { font-family: var(--mono); font-size: 12px; color: var(--steel); margin-left: 12px; }

/* Projekte */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 24px; }
.card { border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; }
.card .body-c { padding: 24px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card .meta-top { font-family: var(--mono); font-size: 12px; display: flex; justify-content: space-between; gap: 12px; }
.card .meta-top .muted { white-space: nowrap; }
.card h2, .card h3 { font-size: 21px; font-weight: 500; line-height: 1.3; }
.card p { font-size: 15px; line-height: 1.6; color: var(--text-2); }
.card .meta { font-family: var(--mono); font-size: 12px; color: var(--steel); margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
/* hidden muss immer gewinnen, auch gegen display-Regeln einzelner Klassen (z. B. .form) */
[hidden] { display: none !important; }
.card[hidden] { display: none; }

/* Formular */
.form { display: flex; flex-direction: column; gap: 40px; }
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form legend, .flabel { font-family: var(--mono); font-size: 12px; color: var(--steel); letter-spacing: 0.08em; margin-bottom: 14px; padding: 0; text-transform: uppercase; display: block; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label.l { font-size: 14px; color: var(--text-2); }
.grid-f { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 20px; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea { background: var(--surface); border: 1px solid var(--line-2); color: var(--text); font: inherit; font-size: 16px; padding: 12px 14px; border-radius: var(--radius); width: 100%; }
input, select { height: 48px; }
textarea { line-height: 1.6; resize: vertical; }
input::placeholder, textarea::placeholder { color: #6E747C; }
.drop { border: 1px dashed var(--line-3); background: var(--surface); padding: 28px; text-align: center; cursor: pointer; display: block; }
.drop .t { display: block; font-size: 16px; margin-bottom: 6px; }
.drop .h { display: block; font-family: var(--mono); font-size: 12px; color: var(--steel); }
.file-in { position: absolute; width: 1px; height: 1px; opacity: 0; }
.files { font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.err { font-size: 13px; color: var(--error); }
.err[hidden], .files[hidden] { display: none; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: 0 0 auto; }
.boxed { border: 1px solid var(--line); background: var(--surface); padding: 24px; }
.boxed legend { padding: 0 8px; }
.boxed textarea, .boxed input { background: var(--bg); }
.methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.methods .pick { background: var(--bg); min-height: 96px; padding: 16px; }
.methods .pick .t { font-size: 15px; margin-bottom: 6px; }
.methods .pick .s { font-size: 13px; }
.aside { display: flex; flex-direction: column; gap: 24px; }
.aside .panel p.k { font-family: var(--mono); font-size: 12px; color: var(--steel); letter-spacing: 0.08em; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.aside .step { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; font-size: 15px; line-height: 1.5; }
.aside .step:last-child { border-bottom: 0; }
.aside .step .n { font-family: var(--mono); font-size: 13px; color: var(--steel); }
.aside .step:last-child .n { color: var(--accent); }
.done { border: 1px solid var(--line); background: var(--surface); padding: 40px; }

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .brand-sub { display: none; }
  .brand-mark { white-space: nowrap; font-size: 16px; }
  .nav { gap: 4px 20px; }
  .sec > .wrap { padding-top: 64px; padding-bottom: 64px; }
  .hero > .wrap { padding-top: 56px; padding-bottom: 56px; }
  .cards { grid-template-columns: 1fr; }
  .tab { min-width: 0; flex: 1 1 100%; }
  .tabs { display: flex; }
  .way > div { border-right: 0; border-bottom: 1px solid var(--line); flex-basis: 100%; }
  .sheet .l { border-right: 0; border-bottom: 1px solid var(--line); }
  .titleblock { --cols: 1 !important; }
  .titleblock > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .ph-grid { --cols: 1 !important; }
  .sheet td { padding: 12px 14px; }
  .sheet .l { padding: 24px 20px; }
  .bar i { width: 14px; }
  .bar-w { display: block; margin: 6px 0 0; }
}

/* Startseite: Zeichnung neben der Überschrift (ab Tablet ausgeblendet) */
.hero-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 48px; align-items: center; }
.hero-art { width: 100%; height: auto; display: block; }
@media (max-width: 960px) {
  .hero-head { grid-template-columns: minmax(0, 1fr); }
  .hero-art { display: none; }
}

/* Zeichnungen (Inline-SVG, Lösungsseiten) */
.drw { width: 100%; height: auto; display: block; }
.drw .o { stroke: var(--text-2); stroke-width: 1.4; stroke-linejoin: round; }
.drw .f0 { fill: var(--bg); }
.drw .f1 { fill: var(--surface-2); }
.drw .f2 { fill: var(--surface); }
.drw .f3 { fill: var(--line); }
.drw .hl { fill: var(--bg); stroke: var(--text-2); stroke-width: 1.2; }
.drw .ly { fill: none; stroke: var(--line-3); stroke-width: 0.6; }
.drw .sk { fill: none; stroke: var(--text-2); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.drw .h { fill: none; stroke: var(--steel); stroke-width: 1; stroke-dasharray: 4 3; }
.drw .c { fill: none; stroke: var(--line-3); stroke-width: 0.9; stroke-dasharray: 10 3 2 3; }
.drw .d { fill: none; stroke: var(--steel); stroke-width: 0.8; }
.drw .ah { fill: var(--steel); }
.drw .thin { fill: none; stroke: var(--text-2); stroke-width: 1.4; stroke-linejoin: round; }
.drw text { fill: var(--steel); font-family: var(--mono); font-size: 11px; }
.drw text.hand { font-style: italic; fill: var(--text-2); font-size: 12px; }
.drw-cell { background: var(--surface); padding: 12px; display: flex; flex-direction: column; justify-content: center; }
.drw-cell > .drw { max-width: 300px; margin: 0 auto; }
.drw-cell .cap { font-family: var(--mono); font-size: 12px; color: var(--steel); letter-spacing: .06em; margin-top: 10px; }
.drw-cell .cap.acc { color: var(--accent); }

/* Portrait */
.portrait { display: block; width: 100%; height: var(--h, 320px); object-fit: cover; object-position: 50% 30%; background: var(--surface); }

/* Anfrageformular: Honeypot unsichtbar, aber nicht display:none (manche Bots prüfen das) */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#f-send-err { margin: 0 0 12px; font-size: 15px; }

/* Fotos in Panels: füllen die Fläche, Ausschnitt bleibt mittig */
.photo { display: block; width: 100%; height: var(--h, 260px); object-fit: cover; object-position: 50% 45%; background: var(--surface); }

/* Abschlussmeldung nach dem Absenden: nicht direkt an der Oberkante kleben */
#anfrage-ok, #anfrage-done { scroll-margin-top: 32px; }
