@font-face { font-family: "Hanken Grotesk"; src: url(fonts/HankenGrotesk.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(fonts/InstrumentSerif-Regular.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(fonts/InstrumentSerif-Italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --paper: #f4f1ea; --card: #fffdf8; --ink: #15171b; --mut: #6a6e75;
  --line: #d9d3c6; --red: #e5482d; --red-dark: #c2371f; --night: #0e1116;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper); color: var(--ink); font-family: var(--sans);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------- Kopfzeile */
.mast {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px); border-bottom: 1px solid var(--ink);
}
.logo { font-family: var(--serif); font-size: 28px; line-height: 1; text-decoration: none; letter-spacing: -.01em; }
.logo::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 4px; background: var(--red); border-radius: 50%; }
.mast nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.mast nav a { text-decoration: none; }
.mast nav a:hover { color: var(--red-dark); }
.mast nav a.lang { padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.mast nav a.lang:hover { border-color: var(--ink); color: var(--ink); }
.mast .who { color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34vw; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper); font: 600 14px var(--sans);
  text-decoration: none; cursor: pointer; transition: background .15s, color .15s, transform .15s;
}
.btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: transparent; color: var(--red-dark); border-color: var(--line); }
.btn.danger:hover { background: var(--red-dark); color: #fff; border-color: var(--red-dark); }
.btn:disabled { opacity: .5; cursor: default; }
.mast nav a.btn { color: var(--paper); }
.mast nav a.btn:hover { color: #fff; }

/* ------------------------------------------------------------ Startseite */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 5vw, 72px);
  align-items: center; padding: clamp(40px, 8vw, 104px) clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--ink);
}
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--red-dark); }
.hero h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 7.4vw, 104px);
  line-height: .96; letter-spacing: -.02em; margin: 18px 0 24px;
}
.hero h1 em { color: var(--red); }
.hero p { max-width: 34em; font-size: 18px; color: #3b3e44; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.mock {
  background: var(--night); color: #f3efe7; border-radius: 10px; padding: 22px;
  box-shadow: 18px 18px 0 var(--ink); transform: rotate(1.2deg);
  background-image: radial-gradient(90% 70% at 100% 0%, rgba(229, 72, 45, .22), transparent 62%);
}
.mock-head { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.mock-head b { font-family: var(--serif); font-weight: 400; font-size: 26px; }
.mock-head span { font-size: 26px; font-weight: 300; font-variant-numeric: tabular-nums; }
.mock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.mock-card { background: rgba(255, 255, 255, .07); border-top: 2px solid rgba(255, 255, 255, .16); border-radius: 5px; padding: 12px; }
.mock-card small { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #9aa1ab; }
.mock-card small i { font-style: normal; color: var(--red); font-weight: 700; margin-right: 8px; }
.mock .mock-card p { margin-top: 6px; font-family: var(--serif); font-size: 19px; line-height: 1.1; color: #f3efe7; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--ink); }
.steps div { padding: 34px clamp(16px, 4vw, 48px) 40px; border-right: 1px solid var(--line); }
.steps div:last-child { border-right: 0; }
.steps span { font-family: var(--serif); font-size: 54px; line-height: 1; color: var(--red); }
.steps h3 { margin: 10px 0 6px; font-size: 18px; }
.steps p { color: var(--mut); font-size: 15px; }

.duty { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(20px, 5vw, 72px); padding: clamp(36px, 6vw, 80px) clamp(16px, 4vw, 48px); }
.duty h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4vw, 48px); line-height: 1.02; }
.duty p { color: #3b3e44; margin-bottom: 12px; max-width: 46em; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 20px clamp(16px, 4vw, 48px); border-top: 1px solid var(--ink); font-size: 13px; color: var(--mut); }

/* ------------------------------------------------------------ Anmeldung */
.auth { max-width: 440px; margin: clamp(32px, 8vw, 96px) auto; padding: 0 16px; min-height: 52vh; }
.auth h1 { font-family: var(--serif); font-weight: 400; font-size: 52px; line-height: 1; margin-bottom: 8px; }
.auth > p { color: var(--mut); margin-bottom: 26px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--mut); margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=url], .field select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--card); color: var(--ink); font: 15px var(--sans);
}
.field input:focus, .field select:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-bottom: 14px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--red); width: 16px; height: 16px; flex: none; }
.msg { min-height: 22px; margin: 6px 0 12px; font-size: 14px; color: var(--red-dark); }
.msg.ok { color: #2c6e49; }
.auth .btn { width: 100%; padding: 13px; }
.auth .alt { margin-top: 18px; font-size: 14px; color: var(--mut); text-align: center; }

/* ------------------------------------------------------------ Bedingungen */
.doc { max-width: 760px; margin: clamp(28px, 6vw, 72px) auto; padding: 0 16px 60px; }
.doc h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6vw, 64px); line-height: 1; margin-bottom: 14px; }
.doc h2 { font-size: 18px; margin: 28px 0 6px; }
.doc p, .doc li { color: #3b3e44; margin-bottom: 8px; }
.doc ul { padding-left: 20px; }
.foot .links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
button.mail { background: none; border: 0; padding: 0; font: inherit; color: var(--red-dark); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
button.mail:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.doc a { color: var(--red-dark); }
.doc .note { font-size: 14px; color: var(--mut); margin-top: 24px; }
.draft { padding: 12px 14px; border: 1px solid var(--red); border-radius: 6px; background: #fbe9e4; color: var(--red-dark); font-size: 14px; margin-bottom: 20px; }

/* ----------------------------------------------------------- Konfigurator */
.app { display: grid; grid-template-columns: 240px minmax(300px, 380px) minmax(0, 1fr); min-height: calc(100vh - 66px); }
.side { border-right: 1px solid var(--line); padding: 20px 14px; }
.side h2, .panel h2, .stagebox h2 { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); }
.side .btn { width: 100%; margin: 12px 0 16px; }
.wlist { list-style: none; }
.wlist button {
  display: block; width: 100%; text-align: left; padding: 10px; border: 0; border-left: 2px solid transparent;
  background: none; font: 15px var(--sans); color: var(--ink); cursor: pointer; border-radius: 0 6px 6px 0;
}
.wlist button small { display: block; color: var(--mut); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wlist button:hover { background: #ebe6da; }
.wlist button.on { border-left-color: var(--red); background: var(--card); font-weight: 600; }
.empty { color: var(--mut); font-size: 14px; padding: 8px 2px; }

.panel { padding: 20px; border-right: 1px solid var(--line); overflow-y: auto; max-height: calc(100vh - 66px); }
.panel h2 { margin: 22px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.panel h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; min-width: 0; }
.hint { font-size: 12.5px; color: var(--mut); margin: -8px 0 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--card); }
.seg label { flex: 1; text-align: center; font-size: 14px; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 9px 6px; }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--red); outline-offset: -2px; }
.field input[type=range] { width: 100%; accent-color: var(--red); }
.field input[type=color] { width: 100%; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); }
.field output { float: right; font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: 0; text-transform: none; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.actions { display: flex; gap: 8px; align-items: center; margin-top: 18px; position: sticky; bottom: -20px; background: var(--paper); padding: 12px 0 20px; border-top: 1px solid var(--line); }
.actions .msg { margin: 0; flex: 1; min-height: 0; }

.stagebox { padding: 20px clamp(16px, 2.5vw, 36px); min-width: 0; }
.stagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.stagehead .seg { width: 220px; }
.frame { background: #d9d3c6; border: 1px solid var(--ink); border-radius: 8px; overflow: hidden; box-shadow: 10px 10px 0 var(--ink); }
.frame.s { aspect-ratio: 16 / 9; width: 100%; max-width: 1100px; }
.frame.w { width: min(100%, 440px); height: 560px; }
.frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.share { margin-top: 34px; max-width: 1100px; }
.share h2 { margin-bottom: 10px; }
.share .field { margin-bottom: 12px; }
.share code {
  display: block; flex: 1; min-width: 0; padding: 10px 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 6px; font: 13px ui-monospace, Menlo, monospace; overflow-x: auto; white-space: nowrap;
}
.share .row { align-items: stretch; }

@media (max-width: 1100px) {
  .app { grid-template-columns: 200px minmax(0, 1fr); }
  .stagebox { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .panel { max-height: none; }
}
@media (max-width: 760px) {
  .hero, .duty { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps div { border-right: 0; border-bottom: 1px solid var(--line); }
  .mock { transform: none; box-shadow: 8px 8px 0 var(--ink); }
  .app { grid-template-columns: 1fr; }
  .side, .panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .mast nav { gap: 12px; }
}
