/* ── 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;
  --bg: #FBFCFD;
  --surface: #FFFFFF;
  --line: #E4ECF2;
  --shadow: 0 6px 24px rgba(10, 40, 60, 0.06), 0 2px 6px rgba(10, 40, 60, 0.04);
  --aperture: #029FE2;
  --shutter: #F0A020;
  --iso: #4AA859;
  --dof: #B86BC9;
  --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', 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1, h2, h3, .tag-main, .value-chip, .preset, .ev-badge, .dof-label {
  font-family: 'Civita', 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', 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-family: 'Civita', 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  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);
}

.preview-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ev-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;
}

.exp-hint {
  font-family: 'Civita', 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 17px;
  color: var(--ink-soft);
}

.canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  background: #D8E4EC;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  background: #111;
}

.frame-corners .c {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 3px solid var(--brand);
  pointer-events: none;
}
.frame-corners .tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.frame-corners .tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.frame-corners .bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.frame-corners .br { bottom: 10px; right: 10px; border-left: none; border-top: none; }


.preview-toggle {
  margin-top: 16px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--ink-soft);
}

.switch input { display: none; }

.slider-sw {
  width: 40px;
  height: 22px;
  background: #D8E4EC;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s;
  flex: none;
}
.slider-sw::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}
.switch input:checked + .slider-sw { background: var(--brand); }
.switch input:checked + .slider-sw::after { transform: translateX(18px); }

/* CONTROLS */
.controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.control-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 20px;
  position: relative;
  overflow: hidden;
}
.control-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: currentColor;
}
.control-card.aperture { color: var(--aperture); }
.control-card.shutter  { color: var(--shutter); }
.control-card.iso      { color: var(--iso); }

.control-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}
.control-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.2px;
}
.control-sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.value-chip {
  background: color-mix(in srgb, currentColor 14%, white);
  color: inherit;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  min-width: 72px;
  text-align: center;
}

/* slider */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 15%, #F0F5F8);
  outline: none;
  margin: 8px 0 6px;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: currentColor;
  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: currentColor;
  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(10, 1fr);
  gap: 2px;
  font-size: 10px;
  color: var(--ink-soft);
  margin-top: 4px;
  margin-bottom: 14px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.info-row strong { color: var(--ink); font-weight: 700; }

/* TRIANGLE */
.triangle-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}
.triangle-text h2 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.15;
}
.triangle-text .subtitle {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.6;
}
.triangle-text .subtitle:last-child { margin-bottom: 0; }
.triangle-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}
.triangle-svg {
  width: 100%;
  max-width: 440px;
  height: auto;
}

@media (max-width: 820px) {
  .triangle-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px;
  }
}

/* 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);
  display: flex;
  align-items: center;
  gap: 10px;
}
.explain-card p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--ink-soft);
}
.explain-card p.hint {
  background: #F5FAFD;
  border-left: 3px solid var(--brand);
  padding: 10px 12px;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  margin-bottom: 0;
}
.explain-card code {
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'SF Mono', Menlo, monospace;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.dot-aperture { background: var(--aperture); }
.dot-shutter  { background: var(--shutter); }
.dot-iso      { background: var(--iso); }
.dot-dof      { background: var(--dof); }

/* PRESETS */
.preset-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
}
.preset-card h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-dark);
}
.preset-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.preset {
  background: #F5FAFD;
  color: var(--brand-dark);
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}
.preset:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  transform: translateY(-1px);
}
.preset.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.site-footer {
  text-align: center;
  padding: 18px;
  color: var(--ink-soft);
  font-size: 14px;
  font-family: 'Civita', 'Source Serif 4', Georgia, serif;
  font-style: italic;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .controls { grid-template-columns: 1fr; }
  .site-header { padding: 24px 20px 12px; gap: 16px; }
  .app { padding: 12px 20px 48px; gap: 20px; }
  .logo { width: 220px; }
  .tagline { border-left: 0; padding: 0; }
  .tag-main { font-size: 15px; }
  .tag-sub { font-size: 15px; }
}
