/* ── Civita (URW) – lokal eingebettet als WOFF2 ─────────────────────── */
@font-face { font-family: 'Civita'; src: url('fonts/CivitaReg.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Civita'; src: url('fonts/CivitaIta.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Civita'; src: url('fonts/CivitaBol.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Civita'; src: url('fonts/CivitaBolIta.woff2') format('woff2'); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Civita'; src: url('fonts/CivitaXBol.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --brand: #029FE2;
  --brand-soft: #E8F6FD;
  --brand-dark: #0B4E6F;
  --ink: #1F2A33;
  --ink-soft: #4a6070;
  --surface: #FFFFFF;
  --line: #E4ECF2;
  --shadow: 0 6px 24px rgba(10, 40, 60, 0.06), 0 2px 6px rgba(10, 40, 60, 0.04);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: linear-gradient(180deg, #FBFCFD 0%, #F1F8FC 100%);
  color: var(--ink);
  font-family: 'Civita', Georgia, serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
h1, h2, h3, .tag-main, .state-badge, .info-value, .rpm-btn, .readout-btn {
  font-family: 'Civita', Georgia, serif;
}

.site-header {
  max-width: 1200px; margin: 0 auto;
  padding: 36px 32px 18px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.logo { width: 280px; height: auto; display: block; }
.tagline { display: flex; flex-direction: column; border-left: 2px solid var(--brand); padding: 4px 0 4px 20px; }
.tag-main { font-weight: 700; font-size: 18px; color: var(--brand-dark); letter-spacing: 0.2px; }
.tag-sub { font-style: italic; font-size: 18px; color: var(--ink-soft); margin-top: 2px; }

.app {
  max-width: 1200px; margin: 0 auto;
  padding: 18px 32px 64px;
  display: grid; gap: 28px;
}

/* PREVIEW */
.preview-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.preview-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.preview-header h2 { margin: 0; font-size: 22px; font-weight: 700; color: var(--brand-dark); }
.state-badge {
  background: var(--brand-soft); color: var(--brand-dark);
  border-radius: 999px; padding: 6px 14px;
  font-weight: 700; font-size: 14px; letter-spacing: 0.5px;
}
.canvas-wrap {
  position: relative; width: 100%; aspect-ratio: 16/9;
  border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, #FBFCFD 0%, #F1F8FC 100%);
}
.canvas-wrap.demo-wrap { aspect-ratio: 960/360; }
#scene, #demoScene { width: 100%; height: 100%; display: block; }
.demo-hint {
  margin: 14px 4px 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* INFO */
.info-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.info-item { display: flex; flex-direction: column; gap: 4px; }
.info-item.highlight .info-value { color: var(--brand-dark); font-size: 26px; }
.info-label { font-size: 12.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; }
.info-value { font-size: 20px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

/* CONTROLS */
.controls { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.control-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  position: relative; overflow: hidden;
}
.control-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: #B86BC9;
}
.control-card h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: var(--ink); }
.control-sub { margin: 2px 0 14px; font-size: 13px; color: var(--ink-soft); }

.preset-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.rpm-btn, .readout-btn {
  background: #F5FAFD; color: var(--brand-dark);
  border: 1.5px solid transparent; border-radius: 999px;
  padding: 8px 14px; font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.18s ease;
}
.rpm-btn:hover, .readout-btn:hover {
  background: var(--brand-soft); border-color: var(--brand);
}
.rpm-btn.active, .readout-btn.active {
  background: var(--brand); color: white; border-color: var(--brand);
}

.slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 10px; border-radius: 999px;
  background: #F0F5F8;
  outline: none; margin: 8px 0 6px;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: #B86BC9;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  cursor: pointer; transition: transform 0.15s;
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.12); }
.slider::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: #B86BC9;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  cursor: pointer;
}

.tick-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
  font-size: 10px; color: var(--ink-soft);
  margin-top: 4px; text-align: center; font-variant-numeric: tabular-nums;
}
.tick-row span:first-child { text-align: left; }
.tick-row span:last-child { text-align: right; }

.info-row.single {
  font-size: 14px; color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 12px; margin-top: 10px;
  text-align: center;
}

/* EXPLAINERS */
.explainers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.explain-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.explain-card h3 {
  margin: 0 0 10px; font-size: 17px; font-weight: 800; color: var(--ink);
}
.explain-card p { margin: 0 0 10px; font-size: 14px; color: var(--ink-soft); }
.explain-card .examples { margin: 0; padding-left: 18px; }
.explain-card .examples li { font-size: 13.5px; color: var(--ink-soft); margin: 6px 0; }

/* FOOTER */
.site-footer {
  display: flex; justify-content: space-between;
  max-width: 1200px; margin: 0 auto;
  padding: 18px 32px; flex-wrap: wrap; gap: 8px;
  color: var(--ink-soft); font-size: 14px; font-style: italic;
}
.footer-nav a { color: var(--brand-dark); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .controls { grid-template-columns: 1fr; }
  .info-card { grid-template-columns: repeat(2, 1fr); }
  .site-header { padding: 24px 20px 12px; gap: 16px; }
  .app { padding: 12px 20px 48px; gap: 20px; }
  .logo { width: 220px; }
}
