/* Farben und Schriften wie auf der Plattform */
:root {
  --bg: #ECEEF0;
  --surface: #FFFFFF;
  --surface-2: #F5F6F7;
  --text: #1A1F24;
  --muted: #55606B;
  --line: #D2D7DD;
  --steel: #2747A8;
  --steel-ink: #FFFFFF;
  --brass: #8A6B22;
  --ruby: #A3243B;
  --head: Bahnschrift, "DIN Alternate", "DIN Condensed", "D-DIN", "Roboto Condensed", "Arial Narrow", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111518;
    --surface: #1A1F24;
    --surface-2: #151A1E;
    --text: #E7EAED;
    --muted: #9BA4AE;
    --line: #2C343C;
    --steel: #7D99E8;
    --steel-ink: #0E1420;
    --brass: #C9A14A;
    --ruby: #E2637B;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
}
a { color: var(--steel); text-underline-offset: .15em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--steel); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--steel); color: var(--steel-ink); padding: .6rem 1rem; border-radius: 6px; z-index: 20; }
.skip:focus { top: 1rem; }

.wrap { width: min(1120px, 100% - 2 * clamp(1.25rem, 4vw, 2.5rem)); margin-inline: auto; }
.narrow { max-width: 44rem; }

h1, h2, h3 {
  font-family: var(--head);
  font-stretch: 80%;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.005em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.4rem; font-stretch: 85%; }

/* Kopfzeile */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.mark {
  display: flex; align-items: center; gap: .6rem;
  color: var(--text); text-decoration: none;
  font-family: var(--head); font-stretch: 80%; font-weight: 600; font-size: 1.55rem; letter-spacing: .01em;
}
.mark-dial { width: 30px; height: 30px; }
.top-cta {
  font-weight: 600; font-size: .98rem; text-decoration: none; color: var(--steel);
  padding: .45rem .9rem; border: 1.5px solid currentColor; border-radius: 6px;
}
.top-cta:hover { background: color-mix(in srgb, var(--steel) 10%, transparent); }

/* Hero */
.hero { padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3.5rem, 7vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.status { display: inline-flex; align-items: center; gap: .55rem; font-size: .95rem; font-weight: 600; color: var(--muted); margin-bottom: 1.4rem; }
.status::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--ruby); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 34em; margin-top: 1.4rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.note { color: var(--muted); font-size: .95rem; }

.btn {
  appearance: none; border: 0; cursor: pointer; display: inline-block;
  background: var(--steel); color: var(--steel-ink);
  font: 600 1.05rem/1 var(--body);
  padding: 1rem 1.5rem; border-radius: 6px; text-decoration: none;
}
.btn:hover { background: color-mix(in srgb, var(--steel) 85%, var(--text)); }

/* Zifferblatt */
.visual { position: relative; padding-bottom: 4rem; }
.dial { display: block; width: 100%; max-width: 410px; margin-left: auto; }
.d-case { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.d-face { fill: var(--surface-2); stroke: var(--line); stroke-width: 1; }
.d-band { fill: none; stroke: var(--brass); stroke-width: 5; stroke-linecap: round; }
.d-tick { stroke: var(--muted); stroke-width: 1; }
.d-index { stroke: var(--text); stroke-width: 4.5; }
.d-hour, .d-min { stroke: var(--text); stroke-linecap: round; }
.d-hour { stroke-width: 6.5; }
.d-min { stroke-width: 4; }
.d-sec { stroke: var(--ruby); stroke-width: 1.6; stroke-linecap: round; }
.d-cap { fill: var(--ruby); }
.mark-dial .d-case { stroke: var(--text); stroke-width: 7; fill: transparent; }
.mark-dial .d-face { fill: none; stroke: none; }
.mark-dial .d-band { stroke-width: 12; }
.mark-dial .d-index { stroke-width: 9; }
.mark-dial .d-hour { stroke-width: 13; }
.mark-dial .d-min { stroke-width: 9; }

/* Preisband */
.band {
  --from: 16%; --to: 78%; --at: 51%;
  position: absolute; left: 0; bottom: 0;
  width: min(340px, 90%); margin: 0;
  background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: 8px;
  padding: 1rem 1.15rem 1.05rem;
  box-shadow: 0 22px 44px -26px rgba(26, 31, 36, .5);
}
.band-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .92rem; }
.band-head strong { font-weight: 600; }
.band-tag { color: var(--muted); font-size: .85rem; }
.band-track { position: relative; height: 10px; border-radius: 5px; background: var(--line); margin: 1.15rem 0 .55rem; }
.band-range { position: absolute; top: 0; bottom: 0; left: var(--from); right: calc(100% - var(--to)); background: var(--brass); border-radius: 5px; }
.band-mark {
  position: absolute; top: -5px; left: var(--at);
  width: 4px; height: 20px; border-radius: 2px; background: var(--text);
  transform: translateX(-50%);
  animation: band-mark 1.2s .5s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes band-mark { from { left: var(--from); opacity: 0; } to { left: var(--at); opacity: 1; } }
.band-scale { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.band-scale .median { color: var(--text); font-weight: 600; }
.band-foot { margin-top: .55rem; font-size: .82rem; color: var(--muted); }

/* Abschnitte */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--line); }
.section.plain { border-top: 0; min-height: 55vh; }
.section-head { max-width: 40em; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--muted); margin-top: 1rem; font-size: 1.1rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.75rem); counter-reset: schritt; }
.steps li { counter-increment: schritt; padding-top: 1.1rem; border-top: 3px solid var(--steel); }
.steps li::before {
  content: counter(schritt);
  display: block; margin-bottom: .8rem;
  font-family: var(--head); font-stretch: 75%; font-weight: 600; font-size: 3.4rem; line-height: 1;
  color: var(--brass);
}
.steps p { color: var(--muted); margin-top: .6rem; max-width: 26em; }

.features { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); }
.feat-col > h3 {
  font-family: var(--body); font-stretch: 100%; font-size: 1rem; font-weight: 600; color: var(--muted);
  padding-bottom: .65rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--line);
}
.feat-col.planned > h3 { border-bottom-style: dashed; }
.feat-list { margin: 0; }
.feat-list dt { font-family: var(--head); font-stretch: 85%; font-weight: 600; font-size: 1.35rem; line-height: 1.15; margin-top: 1.7rem; }
.feat-list dt:first-child { margin-top: 0; }
.feat-list dd { margin: .4rem 0 0; color: var(--muted); max-width: 32em; }
.planned .feat-list dt { color: var(--muted); }

/* Warteliste */
.join { background: var(--surface); }
.join-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.join-lead { color: var(--muted); font-size: 1.1rem; margin-top: 1rem; max-width: 30em; }
.after { margin: 2rem 0 0; padding-left: 1.3rem; display: grid; gap: 1rem; color: var(--muted); }
.after li::marker { color: var(--brass); font-weight: 700; }
.after strong { color: var(--text); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem 1.25rem; }
.form.login { grid-template-columns: 1fr; max-width: 24rem; margin-top: 2rem; }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .95rem; }
.opt { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], select {
  width: 100%;
  font: inherit; color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 6px;
  padding: .75rem .85rem;
}
input:focus, select:focus { outline: none; border-color: var(--steel); box-shadow: 0 0 0 3px color-mix(in srgb, var(--steel) 28%, transparent); }
.invalid input, .invalid select { border-color: var(--ruby); }
.err { color: var(--ruby); font-size: .9rem; }
.field .check { display: flex; gap: .75rem; align-items: flex-start; font-weight: 400; color: var(--muted); font-size: .95rem; }
.check input { flex: none; width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--steel); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice { background: var(--bg); border-left: 4px solid var(--steel); border-radius: 6px; padding: 1.15rem 1.3rem; margin-bottom: 1.4rem; }
.notice h3 { margin-bottom: .5rem; }
.notice p { color: var(--muted); }
.notice.bad { border-left-color: var(--ruby); }
.notice.bad p { color: var(--text); }

/* Fragen */
.faq { max-width: 46rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative; cursor: pointer; list-style: none;
  padding: 1.15rem 2.5rem 1.15rem 0;
  font-family: var(--head); font-stretch: 85%; font-weight: 600; font-size: 1.3rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); color: var(--brass); font-size: 1.6rem; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 1.3rem; max-width: 40em; }

/* Rechtstexte */
.prose { max-width: 44rem; }
.prose h1 { margin-bottom: 2rem; }
.prose h2 { font-size: 1.6rem; margin: 2.4rem 0 .8rem; }
.prose p, .prose ul { margin: 0 0 1rem; }
.prose .todo { background: color-mix(in srgb, var(--ruby) 14%, transparent); padding: 0 .25rem; border-radius: 3px; }

/* Admin */
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.linkbtn { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: var(--steel); text-decoration: underline; cursor: pointer; }
.linkbtn.danger { color: var(--ruby); }
.table-scroll { overflow-x: auto; margin-top: 2rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th, .admin-table td { text-align: left; padding: .7rem .85rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table th { font-weight: 600; color: var(--muted); background: var(--surface-2); }
.admin-table tr.pending td { color: var(--muted); font-style: italic; }
code { font-size: .95em; background: var(--surface); padding: .1rem .3rem; border-radius: 4px; }

/* Fußzeile */
.foot { padding-block: 2.5rem; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.foot nav { display: flex; gap: 1.5rem; }
.foot a { color: var(--muted); }

@media (max-width: 880px) {
  .hero-grid, .join-grid, .features { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .dial { max-width: 330px; margin-inline: auto; }
  .visual { padding-bottom: 6rem; }
}
@media (max-width: 560px) {
  .form { grid-template-columns: 1fr; }
  .top-cta { padding: .4rem .7rem; font-size: .92rem; }
  .band { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .band-mark { animation: none; }
}
