/* sonussound.de – Farben und Maße 1:1 aus src/ui/MixerUi.cpp (kBg, kCardBg, kAccent…, coloredButton, fader).
   Keine Farbe außerhalb dieser Liste. */
:root {
  --bg: #1c1f26;          /* kBg     0.11 0.12 0.15 */
  --panel: #262933;       /* kPanel  0.15 0.16 0.20 */
  --card: #303340;        /* kCardBg 0.19 0.20 0.25 */
  --track: #0f1114;       /* kTrack  0.06 0.065 0.08 */
  --gray: #424554;        /* kGray   0.26 0.27 0.33 */
  --gray-h: #575a69;      /* kGray + 0.08 (Hover) */
  --border: rgba(77, 82, 102, .6);   /* ImGuiCol_Border */
  --tab-h: #4d668c;       /* TabHovered */
  --tab-sel: #40577a;     /* TabSelected */

  --in: #59bff2;          /* Hardware Input  */
  --out: #8ce68c;         /* Hardware Output */
  --vi: #f2b34d;          /* Virtual Input   */
  --vo: #f280a6;          /* Virtual Output (Sonus Out) */
  --app: #cc8cf2;         /* Software (Apps) */
  --pad: #4dd1c2;         /* Pads   */
  --player: #8f94ff;      /* Player */
  --red: #d14242;         /* nur MUTE */

  --text: #e0e3ed;        /* kTextLight */
  --text-dark: #0f0f14;   /* kTextDark  */
  --muted: #a8adbf;       /* 0.66 0.68 0.75 */
  --dim: #8c91a1;         /* 0.55 0.57 0.63 */

  --r: 4px;               /* FrameRounding */
  --r-card: 6px;          /* ChildRounding */
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Hintergrund (Canvas, fest hinter allem) ---------- */
#hex { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.page { position: relative; z-index: 1; }

/* ---------- Reiterleiste = Navigation ---------- */
.tabbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 4px;
  padding: 6px 12px; background: rgba(28, 31, 38, .82);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.tabbar .brand {
  display: flex; align-items: center; gap: 8px; margin-right: 10px;
  font-weight: 600; letter-spacing: .18em; font-size: 14px; text-decoration: none;
}
.tabbar .brand img { width: 28px; height: 28px; display: block; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 4px 10px; border-radius: var(--r); background: var(--panel);
  text-decoration: none; white-space: nowrap; font-size: 15px; color: var(--text);
  transition: background .12s;
}
.tab:hover { background: var(--tab-h); }
.tab[aria-current="true"] { background: var(--tab-sel); }
.helpbtn {
  width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--dim);
  background: transparent; color: var(--dim); font: 600 15px var(--font); cursor: pointer; flex: none;
}
.helpbtn:hover { color: var(--text); border-color: var(--text); }
.helpbtn[aria-pressed="true"] { background: var(--text); color: var(--card); border-color: var(--text); }

/* ---------- Knöpfe (coloredButton) ---------- */
.btn {
  --c: var(--gray);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 0; border-radius: var(--r);
  background: var(--c); color: var(--text); font: 500 16px var(--font);
  text-decoration: none; cursor: pointer; transition: filter .1s, transform .1s;
}
.btn:hover { filter: brightness(1.18); }   /* bg + 0.08 */
.btn:active { filter: brightness(1.32); transform: translateY(1px); }   /* bg + 0.15 */
.btn.on { color: var(--text-dark); }
.btn.in { --c: var(--in); color: var(--text-dark); }
.btn:focus-visible, .tab:focus-visible, .etile:focus-visible { outline: 2px solid var(--in); outline-offset: 2px; }
.btn.ed { --c: var(--gray); color: var(--text-dark); width: 100%; min-height: 40px; padding: 0 10px; font-size: 15px; }
.btn small { font-size: 12px; opacity: .75; }
.btn.ed.small { width: auto; min-height: 32px; padding: 0 14px; font-size: 13px; }

/* ---------- Abschnitte ---------- */
section { padding: 88px 16px; }
#signalweg { padding-top: 28px; }
.wrap { max-width: 1180px; margin: 0 auto; }
.kicker-line { width: 48px; height: 2px; background: var(--c, var(--in)); margin-bottom: 18px; border-radius: 1px; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 0 0 12px; font-weight: 600; letter-spacing: -.01em; }
.lead { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 0 36px; }

/* ---------- Hero ---------- */
.hero {
  display: grid; align-items: center;
  padding: 48px 16px 8px; position: relative;
  /* Hero füllt den Bildschirm bis auf ~110 px: dort steht die Überschrift „Sonus im Mittelpunkt". */
  min-height: calc(100svh - 45px - 110px);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; width: 100%; }
.hero h1 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.04; margin: 0 0 18px; font-weight: 600; letter-spacing: -.02em; }
.hero h1 .flow { background: linear-gradient(90deg, var(--in), var(--vi) 33%, var(--vo) 66%, var(--out)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { font-size: 19px; color: var(--muted); max-width: 520px; margin: 0 0 28px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.facts { display: flex; gap: 22px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.facts li { font-size: 14px; color: var(--dim); }
.facts span { display: block; }
.facts b { display: block; color: var(--text); font-size: 20px; font-weight: 600; }
.facts li:nth-child(1) b { color: var(--in); }
.facts li:nth-child(2) b { color: var(--out); }
.facts li:nth-child(3) b { color: var(--vi); }
.facts li:nth-child(4) b { color: var(--vo); }

.mini { display: flex; gap: 9px; padding: 12px; background: rgba(38, 41, 51, .72); border: 1px solid var(--border); border-radius: 10px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); font: 14px/1.25 "Helvetica Neue", Helvetica, Arial, sans-serif; user-select: none; -webkit-user-select: none; }
.mini .a-card { padding-bottom: 8px; }
.mini-cap { text-align: center; font-size: 13px; color: var(--dim); margin-top: 10px; }

.scrollhint { position: relative; margin: 22px auto 0; width: max-content; grid-column: 1 / -1; color: var(--dim); font-size: 13px; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.scrollhint::after { content: ""; width: 10px; height: 10px; border-right: 1.5px solid var(--dim); border-bottom: 1.5px solid var(--dim); transform: rotate(45deg); animation: bob 2s infinite; }
@keyframes bob { 50% { transform: translateY(4px) rotate(45deg); } }

/* ---------- Signalweg ---------- */
.ring { width: 100%; max-width: 860px; margin: 0 auto; }
.ring svg { display: block; width: 100%; height: auto; overflow: visible; }
.ring .core-hex { fill: #262933; stroke: var(--in); stroke-width: 1.5; filter: drop-shadow(0 0 18px rgba(89, 191, 242, .25)); }
.ring .core-t { fill: var(--text); font: 600 15px var(--font); letter-spacing: .28em; }
.ring .ring-node rect { fill: rgba(48, 51, 64, .92); stroke-width: 1.5; }
.ring .ring-node:hover rect { fill: #363948; }
.ring .rn { font: 15px var(--font); }
.ring .rs { font: 12.5px var(--font); fill: var(--dim); }
.ring .fine { fill: none; stroke-width: 1; stroke-dasharray: 3 7; opacity: .9; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -20; } }
@media (prefers-reduced-motion: reduce) { .ring .fine { animation: none; } }
.ring-note { text-align: center; color: var(--dim); font-size: 14px; margin: 14px auto 0; max-width: 560px; }
.fine-key { display: inline-block; width: 26px; border-top: 1px dashed var(--in); vertical-align: middle; margin-right: 8px; }

/* ---------- Editionen in der Simulation ---------- */
.editions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.etile { display: block; text-align: left; text-decoration: none; padding: 12px 14px; border-radius: var(--r-card); cursor: pointer;
  background: rgba(48, 51, 64, .85); border: 1px solid var(--border); border-top: 3px solid var(--e); color: var(--text); font: 14px/1.45 var(--font);
  transition: background .15s, box-shadow .15s; }
.etile:hover { background: rgba(60, 63, 78, .92); }
.etile.sel { box-shadow: inset 0 0 0 2px var(--e); background: color-mix(in srgb, var(--e) 12%, #303340); }
.etile b { display: block; color: var(--e); font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.etile small { display: block; color: var(--muted); font-size: 13px; }
.etile i { font-style: normal; color: var(--k); }
.window { background: rgba(28, 31, 38, .9); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.window .chrome { display: flex; align-items: center; gap: 7px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--border); }
.window .chrome i { width: 11px; height: 11px; border-radius: 50%; background: var(--gray); }
.window .chrome span { margin-left: 10px; font-size: 13px; color: var(--dim); }
.window .replay { margin-left: auto; border: 0; background: transparent; color: var(--dim); font: 13px var(--font); cursor: pointer; }
.window .replay:hover { color: var(--text); }

/* ---------- Zielgruppen ---------- */
.uses { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.use { background: rgba(48, 51, 64, .78); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px; transition: border-color .15s, transform .15s; }
.use:hover { border-color: var(--c); transform: translateY(-2px); }
.use h3 { margin: 0 0 6px; font-size: 18px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.use h3::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--c); transform: rotate(45deg); }
.use p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.chain { display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; }
.chain span { padding: 2px 7px; border-radius: 3px; color: var(--text-dark); background: var(--k); }

/* ---------- Editionen ---------- */
.ed-table { width: 100%; border-collapse: collapse; background: rgba(38, 41, 51, .85); border-radius: var(--r-card); overflow: hidden; font-size: 15px; }
.ed-table th, .ed-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid rgba(77, 82, 102, .45); }
.ed-table th:not(:first-child), .ed-table td:not(:first-child) { text-align: center; }
.ed-table thead th { background: var(--panel); font-weight: 600; }
.ed-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .02); }
.ed-table .y { color: var(--in); }
.ed-table .n { color: var(--dim); }
.ed-table .q { color: var(--red); font-weight: 600; }
.ed-table .ed-ask { font-size: 12px; font-weight: 400; color: var(--muted); }
.ed-table tfoot td { border-bottom: 0; padding-top: 16px; padding-bottom: 16px; }
.ed-scroll { overflow-x: auto; border-radius: var(--r-card); border: 1px solid var(--border); }

/* ---------- Hilfe & Feedback Kacheln ---------- */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.box { background: rgba(48, 51, 64, .82); border: 1px solid var(--border); border-radius: var(--r-card); padding: 22px; }
.box h3 { margin: 0 0 6px; font-weight: 500; font-size: 20px; }
.box p { color: var(--muted); margin: 0 0 16px; }

/* ---------- Texte bearbeiten (Entwurf) ---------- */
.texte { padding-top: 40px; padding-bottom: 40px; }
.texte .wrap { background: rgba(38, 41, 51, .9); border: 1px dashed var(--border); border-radius: var(--r-card); padding: 18px; }
.texte h3 { margin: 0 0 4px; font-weight: 500; }
.texte p { color: var(--muted); margin: 0 0 12px; }
.texte-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.texte-row .btn { min-height: 36px; font-size: 14px; }
#texte-count { color: var(--dim); font-size: 14px; }
#texte-out { width: 100%; background: var(--track); color: var(--text); border: 1px solid var(--border); border-radius: var(--r); padding: 10px; font: 13px/1.4 ui-monospace, Menlo, monospace; resize: vertical; }
body.editmode [data-t] { outline: 1px dashed rgba(242, 179, 77, .55); outline-offset: 3px; cursor: text; }
body.editmode [data-t]:focus { outline: 2px solid var(--vi); }

footer { padding: 28px 16px 40px; color: var(--dim); font-size: 14px; border-top: 1px solid var(--border); background: rgba(28, 31, 38, .8); }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }

/* ---------- Hilfe-Modus der Website (wie in der App) ---------- */
body.helpmode, body.helpmode * { cursor: help !important; }
body.helpmode [data-help] { outline: 1px dashed rgba(89, 191, 242, .35); outline-offset: 2px; }
.helptip {
  position: fixed; z-index: 50; max-width: 300px; padding: 10px 12px; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--r-card); font-size: 14px; color: var(--text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); pointer-events: none;
}
.helptip b { display: block; color: var(--in); margin-bottom: 2px; font-weight: 500; }


/* ---------- Burger-Menü (Handy) ---------- */
.burger { display: none; width: 40px; height: 36px; margin-left: auto; border: 0; border-radius: var(--r); background: var(--panel); cursor: pointer; position: relative; }
.burger span, .burger span::before, .burger span::after { position: absolute; left: 11px; width: 18px; height: 2px; border-radius: 1px; background: var(--text); content: ""; }
.burger span { top: 17px; }
.burger span::before { left: 0; top: -6px; }
.burger span::after { left: 0; top: 6px; }
.tabbar.open .burger span { background: transparent; }
.tabbar.open .burger span::before { transform: translateY(6px) rotate(45deg); }
.tabbar.open .burger span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Mini-Board: passt sich der Breite an ---------- */
.mini-fit { position: relative; }
.mini { width: max-content; transform-origin: 0 0; }

/* ---------- Simulation im Breitformat ---------- */
.window .wide-close, .window .wide-hint { display: none; }
.window.wide { position: fixed; inset: 0; z-index: 300; border-radius: 0; border: 0; display: flex; flex-direction: column; background: var(--bg); }
.window.wide .stage-wrap { margin: auto; overflow: hidden; }
.window.wide .wide-open { display: none; }
.window.wide .wide-close { display: inline-block; margin-left: 14px; font-size: 16px; color: var(--text); }
.window.wide .replay:first-of-type { margin-left: auto; }
@media (orientation: portrait) and (max-width: 760px) {
  .window.wide .wide-hint { display: block; text-align: center; padding: 10px; color: var(--vi); font-size: 14px; }
}
body.wide-on { overflow: hidden; }

/* ---------- Editionen: Umschalter am Handy ---------- */
.ed-switch { display: none; gap: 6px; margin-bottom: 12px; }
.ed-switch button { flex: 1; min-height: 40px; border: 1px solid var(--border); border-top: 3px solid var(--e); border-radius: var(--r); background: rgba(48, 51, 64, .85); color: var(--e); font: 600 15px var(--font); cursor: pointer; }
.ed-switch button.sel { background: var(--e); color: var(--text-dark); }


/* ---------- Unterseiten (Meldung, Impressum, Datenschutz) ---------- */
.sub-page { max-width: 820px; margin: 0 auto; padding: 36px 16px 72px; }
.doc { background: rgba(38, 41, 51, .9); border: 1px solid var(--border); border-radius: var(--r-card); padding: 26px 28px 30px; line-height: 1.6; }
.doc h1 { margin: 0 0 6px; font-size: clamp(28px, 4vw, 38px); line-height: 1.15; }
.doc h2 { margin: 28px 0 8px; font-size: 20px; color: var(--in); font-weight: 600; }
.doc p, .doc ul { margin: 0 0 10px; }
.doc ul { padding-left: 22px; }
.doc .lead { margin-bottom: 18px; }
.doc .note { color: var(--dim); font-size: 14px; }
.doc address { font-style: normal; }
.doc a { color: var(--in); }
.form { display: grid; gap: 14px; margin-top: 18px; }
.form label { display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
.form label b { color: var(--text); font-weight: 500; }
.form input, .form textarea, .form select { width: 100%; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--border); background: var(--track); color: var(--text); font: 15px var(--font); }
.form textarea { min-height: 160px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--in); outline-offset: 0; }
.form .row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.form .bad { outline: 2px solid var(--red); }
.art { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.art button { min-height: 44px; border-radius: var(--r); border: 1px solid var(--border); border-top: 3px solid var(--e); background: var(--card); color: var(--e); font: 600 15px var(--font); cursor: pointer; }
.art button.sel { background: var(--e); color: var(--text-dark); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.done { padding: 16px; border-radius: var(--r-card); background: rgba(140, 230, 140, .1); border: 1px solid var(--out); }
.done code { display: block; margin: 8px 0; padding: 8px 10px; background: var(--track); border-radius: var(--r); word-break: break-all; font-size: 13px; }
.state { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 14px; color: var(--text-dark); background: var(--k); }
.form-err { color: var(--red); min-height: 1.4em; }
@media (max-width: 560px) { .form .row3 { grid-template-columns: 1fr; } .doc { padding: 18px 16px 22px; } }

/* ---------- Handy ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero .wrap > * { min-width: 0; }
  .two { grid-template-columns: 1fr; }
  .editions { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .tabbar { flex-wrap: wrap; }
  .tabbar .tabs { display: none; flex: 1 1 100%; flex-direction: column; gap: 4px; padding: 8px 0 4px; order: 3; }
  .tabbar.open .tabs { display: flex; }
  .tabbar .tab { padding: 10px 12px; font-size: 16px; }
  .burger { display: block; }
  .helpbtn { display: none; }
  .ed-switch { display: flex; }
  .ed-scroll { overflow: visible; }
  .ed-table tr > :not(:nth-child(1)) { display: none; }
  #edtable[data-col="2"] tr > :nth-child(2), #edtable[data-col="3"] tr > :nth-child(3),
  #edtable[data-col="4"] tr > :nth-child(4), #edtable[data-col="5"] tr > :nth-child(5) { display: table-cell; }
  .ed-table th:first-child, .ed-table td:first-child { width: 58%; }
  .window .replay { font-size: 12px; white-space: nowrap; }
  .window .chrome i, .window .chrome span { display: none; }
  .window .chrome .replay:first-of-type { margin-left: 0; }
}
@media (max-width: 560px) {
  section { padding: 64px 16px; }
  .hero { padding-top: 28px; padding-bottom: 40px; min-height: auto; }
  .hero p.sub { font-size: 17px; }
  .hero .ctas .btn { flex: 1 1 100%; }
  .tabbar .brand span { display: none; }
  .scrollhint { display: none; }
  .facts { gap: 16px; }
}
.ed-soon { margin-top: 12px; text-align: center; color: var(--muted); }
