/* ============================================================
   PergolaLand – Markisen Konfigurator
   Dark Luxury · Playfair Display · Champagne Gold #C9A96E
   ============================================================ */
:root {
  --bg:          #0A0B0F;
  --bg-2:        #111318;
  --bg-3:        #181B22;
  --bg-4:        #1E2229;
  --gold:        #C9A96E;
  --gold-light:  #DFC08A;
  --gold-dim:    #8B7340;
  --gold-bg:     rgba(201,169,110,.08);
  --gold-border: rgba(201,169,110,.22);
  --text:        #F0ECE4;
  --text-muted:  #8A8680;
  --text-dim:    #5A5752;
  --border:      rgba(255,255,255,.07);
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 4px 32px rgba(0,0,0,.55);
  --ff-serif:    'Playfair Display', Georgia, serif;
  --ff-sans:     'Inter', system-ui, sans-serif;
  --trans:       .2s ease;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--ff-sans); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
img, svg, video, canvas { display: block; max-width: 100%; }
input, textarea, button, select { font-family: inherit; font-size: inherit; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
h1,h2,h3 { margin-top: 0; }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: 60px; padding: 0 32px;
  background: rgba(10,11,15,.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
}
.header-inner {
  width: 100%; max-width: 1300px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 6px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-serif); font-size: 17px; font-weight: 700; color: var(--bg);
}
.logo-text { font-family: var(--ff-serif); font-size: 18px; font-weight: 600; color: var(--text); letter-spacing: .02em; }
.header-tagline { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); opacity: .8; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 32px 60px;
  background: linear-gradient(160deg, #0F1018 0%, #0A0B0F 70%);
  border-bottom: 1px solid var(--border);
}
.hero-grain {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 55% at 50% 110%, rgba(201,169,110,.07) 0%, transparent 70%);
}
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 55%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
.hero-inner { position: relative; max-width: 720px; margin: 0 auto; text-align: center; }
.hero-eyebrow {
  display: inline-block; margin-bottom: 18px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold-border); padding: 5px 14px; border-radius: 20px;
}
.hero-title {
  font-family: var(--ff-serif); font-size: clamp(36px, 6vw, 56px);
  font-weight: 600; line-height: 1.18; color: var(--text); margin-bottom: 18px;
}
.hero-title em { color: var(--gold); font-style: italic; }
.hero-sub { font-size: 15px; color: var(--text-muted); letter-spacing: .04em; }

/* ── Layout ───────────────────────────────────────────────── */
.configurator-wrap { padding: 48px 24px 80px; }
.configurator-layout {
  max-width: 1260px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 420px; gap: 40px; align-items: start;
}
@media (max-width: 1020px) {
  .configurator-layout { grid-template-columns: 1fr; }
  .viz-panel { order: -1; }
}

/* ── Steps ────────────────────────────────────────────────── */
.steps-panel { display: flex; flex-direction: column; gap: 6px; }
.step {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; transition: border-color var(--trans);
}
.step.active { border-color: var(--gold-border); }
.step-header { padding: 22px 28px 14px; display: flex; align-items: center; gap: 16px; }
.step-num { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 600; flex-shrink: 0; }
.step-title { font-family: var(--ff-serif); font-size: 20px; font-weight: 600; color: var(--text); }
.step > *:not(.step-header) { padding: 0 28px 26px; }

/* ── Type Cards (Step 1) ─────────────────────────────────── */
.type-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
@media (max-width: 600px) { .type-cards { grid-template-columns: 1fr; } }
.type-card { cursor: pointer; }
.type-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.type-card-inner {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 12px 14px; text-align: center;
  background: var(--bg-3); display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: border-color var(--trans), background var(--trans);
}
.type-card:hover .type-card-inner { border-color: var(--gold-dim); background: var(--bg-4); }
.type-card input:checked ~ .type-card-inner {
  border-color: var(--gold); background: var(--gold-bg);
  box-shadow: 0 0 0 1px var(--gold-border) inset;
}
.type-icon { width: 80px; height: 44px; }
.type-icon svg { width: 100%; height: 100%; }
.type-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.type-desc { font-size: 11px; color: var(--text-muted); line-height: 1.45; }

/* ── Sliders (Step 2) ────────────────────────────────────── */
.inputs-grid { display: flex; flex-direction: column; gap: 26px; }
.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-label { font-size: 13px; font-weight: 500; color: var(--text-muted); letter-spacing: .04em; }
.input-row { display: flex; align-items: center; gap: 14px; }
.slider {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 2px; outline: none; cursor: pointer;
  background: linear-gradient(to right, var(--gold) 0%, var(--gold) var(--pct,33%), var(--bg-4) var(--pct,33%));
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(201,169,110,.25); cursor: pointer;
  transition: box-shadow var(--trans);
}
.slider::-webkit-slider-thumb:hover { box-shadow: 0 0 0 5px rgba(201,169,110,.35); }
.slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--bg);
}
.input-value-wrap { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.num-input {
  width: 72px; padding: 6px 8px; text-align: center;
  background: var(--bg-4); border: 1px solid var(--border);
  border-radius: 7px; color: var(--text); font-size: 14px; font-weight: 500;
  transition: border-color var(--trans);
}
.num-input:focus { outline: none; border-color: var(--gold); }
.unit { font-size: 13px; color: var(--text-muted); min-width: 22px; }
.range-limits { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); }

/* ── Tuch (Step 3) ───────────────────────────────────────── */
.sub-section { margin-bottom: 20px; }
.sub-section:last-child { margin-bottom: 0; }
.sub-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.radio-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { cursor: pointer; }
.pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.pill span {
  display: block; padding: 7px 16px;
  border: 1px solid var(--border); border-radius: 20px;
  font-size: 13px; color: var(--text-muted); background: var(--bg-3);
  transition: border-color var(--trans), color var(--trans), background var(--trans);
}
.pill:hover span { border-color: var(--gold-dim); color: var(--text); }
.pill input:checked ~ span { border-color: var(--gold); color: var(--gold); background: var(--gold-bg); }
.color-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.swatch {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition: transform var(--trans), border-color var(--trans);
  box-shadow: 0 2px 8px rgba(0,0,0,.4); flex-shrink: 0;
}
.swatch:hover { transform: scale(1.12); }
.swatch.selected { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,169,110,.35); }
.color-name-display { font-size: 13px; color: var(--gold); font-weight: 500; min-height: 20px; }

/* ── Antrieb (Step 4) ────────────────────────────────────── */
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .radio-cards { grid-template-columns: 1fr; } }
.radio-card { cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-card-inner {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; display: flex; align-items: center; gap: 14px;
  background: var(--bg-3); transition: border-color var(--trans), background var(--trans);
}
.radio-card:hover .radio-card-inner { border-color: var(--gold-dim); }
.radio-card input:checked ~ .radio-card-inner { border-color: var(--gold); background: var(--gold-bg); }
.radio-card-icon { width: 32px; height: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--gold); }
.radio-card-icon svg { width: 22px; height: 22px; }
.radio-card-name { font-size: 13px; font-weight: 600; color: var(--text); }
.radio-card-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Optionen (Step 5) ───────────────────────────────────── */
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .options-grid { grid-template-columns: 1fr; } }
.option-toggle { cursor: pointer; display: block; }
.option-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.option-inner {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-3); transition: border-color var(--trans), background var(--trans);
}
.option-toggle:hover .option-inner { border-color: var(--gold-dim); }
.option-toggle input:checked ~ .option-inner { border-color: var(--gold); background: var(--gold-bg); }
.option-check {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px;
  border: 1.5px solid var(--border); border-radius: 5px; background: var(--bg-4);
  transition: background var(--trans), border-color var(--trans); position: relative;
}
.option-toggle input:checked ~ .option-inner .option-check { background: var(--gold); border-color: var(--gold); }
.option-toggle input:checked ~ .option-inner .option-check::after {
  content: '✓'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--bg); font-weight: 700;
}
.option-name { font-size: 13px; font-weight: 500; color: var(--text); }
.option-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Formular (Step 6) ───────────────────────────────────── */
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 500px) { .form-row.two-col { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 6px; }
.form-input, .form-textarea {
  width: 100%; padding: 11px 14px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  transition: border-color var(--trans), box-shadow var(--trans);
}
.form-input:focus, .form-textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,.12);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); }
.form-input.error { border-color: #E53E3E !important; }
.form-textarea { resize: vertical; min-height: 80px; }

.summary-box {
  background: var(--bg-4); border: 1px solid var(--gold-border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 18px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px;
}
.summary-box:empty { display: none; }
.sum-row { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.sum-key { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.sum-val { font-size: 13px; font-weight: 500; color: var(--text); }

.btn-submit {
  width: 100%; padding: 15px 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  border: none; border-radius: var(--radius); cursor: pointer;
  color: var(--bg); font-size: 15px; font-weight: 600; letter-spacing: .04em;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: opacity var(--trans), transform var(--trans);
}
.btn-submit:hover { opacity: .9; transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-arrow { font-size: 18px; }
.form-notice { font-size: 11px; color: var(--text-dim); text-align: center; margin-top: 10px; }
.form-feedback { min-height: 20px; margin-top: 10px; text-align: center; font-size: 13px; }
.form-feedback.error-msg { color: #FC8181; }
.form-feedback.loading { color: var(--gold); }

/* ── Visualization Panel ─────────────────────────────────── */
.viz-sticky { position: sticky; top: 76px; }
.viz-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.viz-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.viz-type-badge {
  font-size: 12px; font-weight: 600; color: var(--gold);
  background: var(--gold-bg); border: 1px solid var(--gold-border);
  padding: 4px 12px; border-radius: 14px;
}
#markise-canvas {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-2);
}
.viz-specs {
  margin-top: 16px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.spec-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
}
.spec-row:last-child { border-bottom: none; }
.spec-key { font-size: 12px; color: var(--text-muted); }
.spec-val { font-size: 13px; font-weight: 500; color: var(--text); text-align: right; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); padding: 24px 32px; background: var(--bg-2); }
.footer-inner {
  max-width: 1260px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--text-muted); flex-wrap: wrap;
}
.footer-brand { font-family: var(--ff-serif); color: var(--text); font-weight: 600; }
.footer-sep { color: var(--text-dim); }
.footer-link { color: var(--text-muted); transition: color var(--trans); }
.footer-link:hover { color: var(--gold); }

/* ── Success Overlay ─────────────────────────────────────── */
.success-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(10,11,15,.88); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.success-overlay.visible { opacity: 1; pointer-events: auto; }
.success-card {
  background: var(--bg-2); border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg); padding: 48px 40px;
  text-align: center; max-width: 420px; width: 100%; box-shadow: var(--shadow);
}
.success-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--bg); font-size: 28px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.success-title { font-family: var(--ff-serif); font-size: 28px; color: var(--text); margin-bottom: 12px; }
.success-text { font-size: 15px; color: var(--text-muted); margin-bottom: 28px; line-height: 1.6; }
.btn-secondary {
  padding: 12px 28px; background: transparent;
  border: 1px solid var(--gold-border); border-radius: var(--radius);
  cursor: pointer; color: var(--gold); font-size: 14px; font-weight: 500;
  transition: background var(--trans), border-color var(--trans);
}
.btn-secondary:hover { background: var(--gold-bg); border-color: var(--gold); }

/* ── 2D/3D Toggle ────────────────────────────────────────── */
.viz-mode-toggle { display: flex; gap: 4px; margin-left: auto; }
.viz-mode-btn {
  padding: 5px 14px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--gold-border); border-radius: 20px;
  background: transparent; color: var(--text-muted); cursor: pointer;
  transition: background var(--trans), color var(--trans), border-color var(--trans);
}
.viz-mode-btn:hover { border-color: var(--gold-dim); color: var(--text); }
.viz-mode-btn.active { background: var(--gold-bg); border-color: var(--gold); color: var(--gold); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 48px 20px 36px; }
  .configurator-wrap { padding: 28px 14px 60px; }
  .step-header { padding: 18px 20px 12px; }
  .step > *:not(.step-header) { padding: 0 20px 20px; }
  .summary-box { grid-template-columns: 1fr; }
  .site-header { padding: 0 16px; }
  .header-tagline { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
