/* akustix – Car-Hifi Einbauten | Stylesheet */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --ink: #18181a;
  --ink-soft: #55565c;
  --line: #e2e0da;
  --accent: #e0262b;
  --accent-ink: #b81d22;
  --accent-soft: #fdecec;
  --code: #f0eee9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --max: 1120px;
  --text: 720px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --surface: #1a1b1e;
    --ink: #ececee;
    --ink-soft: #a3a4ab;
    --line: #2c2d31;
    --accent: #ff4a4f;
    --accent-ink: #ff7a7e;
    --accent-soft: #2a1617;
    --code: #232428;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 16px; top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: var(--max); margin: 0 auto; padding: 0 20px;
  height: 64px; display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 20px; letter-spacing: -.02em; }
.brand svg { width: 34px; height: 22px; color: var(--accent); flex: none; }
.brand span b { color: var(--accent); font-weight: 750; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a {
  display: block; padding: 8px 12px; border-radius: 999px;
  color: var(--ink-soft); text-decoration: none; font-size: 15px; font-weight: 550;
}
.nav a:hover { color: var(--ink); background: var(--code); }
.nav a[aria-current="true"] { color: var(--accent-ink); background: var(--accent-soft); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; width: 42px; height: 40px; cursor: pointer; }
.menu-btn svg { width: 20px; height: 20px; }

@media (max-width: 760px) {
  .menu-btn { display: grid; place-items: center; }
  .nav { position: absolute; left: 0; right: 0; top: 64px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; margin: 0; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px 12px 14px; }
  .nav a { border-radius: 10px; padding: 12px 14px; font-size: 16px; }
}

/* ---------- Layout ---------- */
main { display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.prose { max-width: var(--text); }

/* ---------- Hero (Start) ---------- */
.hero { padding: 72px 0 40px; position: relative; overflow: hidden; }
.hero .eyebrow, .page-head .eyebrow {
  display: inline-block; font-size: 13px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink);
}
.hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.05; letter-spacing: -.035em; margin: 12px 0 18px; max-width: 14ch; }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: var(--ink-soft); max-width: 56ch; margin: 0; }
.hero .wave { position: absolute; right: -40px; top: 40px; width: min(560px, 60vw); color: var(--accent); opacity: .9; pointer-events: none; }
@media (max-width: 760px) { .hero { padding-top: 44px; } .hero .wave { position: static; width: 100%; margin-top: 28px; opacity: .8; } }

/* ---------- Projekt-Karten ---------- */
.section-title { font-size: 14px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin: 48px 0 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); }
.card > a.cover { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--code); }
.card > a.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover > a.cover img { transform: scale(1.03); }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 21px; letter-spacing: -.015em; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card .meta { font-size: 13px; color: var(--ink-soft); font-weight: 550; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.chips { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips a { display: inline-block; font-size: 13.5px; padding: 4px 10px; border-radius: 999px; background: var(--code); color: var(--ink); text-decoration: none; }
.chips a:hover { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Seitenkopf + Tabs ---------- */
.page-head { padding: 48px 0 8px; }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.1; letter-spacing: -.03em; margin: 8px 0 12px; }
.page-head p.lead { font-size: 19px; color: var(--ink-soft); margin: 0; max-width: 60ch; }
.tabs { margin: 28px 0 8px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; counter-reset: step; }
.tabs a {
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 12px 14px; color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 15px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--code); color: var(--ink-soft); font-size: 12px; font-weight: 700;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs a[aria-current="page"]::before { background: var(--accent); color: #fff; }

/* ---------- Inhalt ---------- */
.content { padding: 24px 0 64px; display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 56px; align-items: start; }
.content.full { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 980px) { .content { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.article { min-width: 0; }
.article > * { max-width: var(--text); }
.article > .gallery, .article > .table-wrap, .article > figure.wide, .article > .specs { max-width: none; }
.article h2 { font-size: 27px; letter-spacing: -.02em; line-height: 1.2; margin: 56px 0 14px; padding-top: 4px; }
.article h2:first-child { margin-top: 16px; }
.article h3 { font-size: 20px; letter-spacing: -.01em; margin: 34px 0 8px; }
.article p { margin: 0 0 16px; }
.article ol, .article ul { padding-left: 1.3em; margin: 0 0 18px; }
.article li { margin: 4px 0; }
.article li::marker { color: var(--ink-soft); }
.article strong { font-weight: 650; }

ol.steps { list-style: none; padding: 0; counter-reset: s; }
ol.steps > li { counter-increment: s; position: relative; padding: 2px 0 2px 42px; margin: 10px 0; }
ol.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: 2px;
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 14px;
}
ol.steps ol { margin-top: 6px; }

.note {
  border-left: 3px solid var(--accent); background: var(--surface); padding: 14px 18px; border-radius: 0 10px 10px 0;
  margin: 20px 0; color: var(--ink); box-shadow: var(--shadow);
}
.note.muted { border-left-color: var(--line); color: var(--ink-soft); }
.note p:last-child { margin-bottom: 0; }

/* Inhaltsverzeichnis rechts */
.toc { position: sticky; top: 96px; font-size: 14.5px; }
.toc h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin: 0 0 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-soft); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--accent-ink); border-left-color: var(--accent); }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin: 22px 0 30px; }
.gallery figure, figure.single { margin: 0; }
.gallery a, figure.single a, figure.wide a { display: block; border-radius: 10px; overflow: hidden; background: var(--code); cursor: zoom-in; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease, opacity .2s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption, figure.single figcaption, figure.wide figcaption { font-size: 13.5px; color: var(--ink-soft); margin-top: 8px; line-height: 1.4; }
figure.single { max-width: 340px; margin: 20px 0 28px; }
figure.wide { margin: 22px 0 30px; }
figure.wide img { width: 100%; }
figure.wide.light a { background: #fff; }

/* ---------- Tabellen / Specs ---------- */
.table-wrap { overflow-x: auto; margin: 20px 0 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); background: var(--code); font-weight: 650; white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 650; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
s { color: var(--ink-soft); }

.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin: 20px 0 28px; }
.spec { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.spec h3 { margin: 0 0 2px !important; font-size: 17px !important; }
.spec .role { font-size: 13px; color: var(--accent-ink); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.spec dl { margin: 10px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14.5px; }
.spec dt { color: var(--ink-soft); }
.spec dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Weiter/Zurück ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; max-width: var(--text); }
.pager a {
  display: block; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  text-decoration: none; color: var(--ink);
}
.pager a:hover { border-color: var(--accent); }
.pager small { display: block; color: var(--ink-soft); font-size: 13px; }
.pager b { font-weight: 650; }
.pager .next { text-align: right; grid-column: 2; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--ink-soft); font-size: 14.5px; }
.site-footer .inner { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--ink-soft); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }

.promo {
  display: flex; align-items: center; gap: 18px; padding: 18px 20px; margin: 48px 0 0; max-width: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink);
}
.promo:hover { border-color: var(--accent); }
.promo .sun { flex: none; width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, #ffb347, #ff6a3d); display: grid; place-items: center; color: #fff; }
.promo small { display: block; color: var(--ink-soft); font-size: 13.5px; }

/* ---------- Lightbox ---------- */
dialog.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
  color: #fff;
}
dialog.lightbox::backdrop { background: rgba(8, 8, 10, .92); }
.lightbox .stage { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 64px 24px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 6px; }
.lightbox p { margin: 14px 0 0; font-size: 15px; color: #d6d6d8; text-align: center; max-width: 70ch; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.1); border: 0; color: #fff; width: 46px; height: 46px; border-radius: 50%;
  cursor: pointer; display: grid; place-items: center; font-size: 22px;
}
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lightbox .close { top: 14px; right: 14px; }
.lightbox .prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .count { position: absolute; top: 24px; left: 20px; font-size: 14px; color: #aaa; }
@media (max-width: 600px) {
  .lightbox .stage { padding: 60px 8px 20px; }
  .lightbox .prev, .lightbox .next { top: auto; bottom: 16px; transform: none; }
  .lightbox img { max-height: calc(100vh - 190px); }
}

/* ---------- Formular ---------- */
.form { display: grid; gap: 16px; max-width: 560px; margin-top: 20px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.form input, .form textarea {
  font: inherit; font-weight: 400; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.form textarea { min-height: 160px; resize: vertical; }
.form .hp { position: absolute; left: -5000px; }
.btn { justify-self: start; font: inherit; font-weight: 650; padding: 11px 22px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--accent-ink); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .toc, .pager, .promo, .site-footer nav { display: none; } body { background: #fff; color: #000; } }
