/* Pendler-Buddy – Verkaufsseite. Farben wie auf dem Gerät (ui.cpp / web.cpp). */
:root {
  --bg: #0a1224;
  --bg2: #0d1830;
  --card: #16223d;
  --line: #26344f;
  --header: #182c58;
  --text: #eef2f8;
  --muted: #96a5be;
  --accent: #ec0016;
  --blue: #1e6edc;
  --green: #46d264;
  --yellow: #ffcc00;
  --red: #ff483c;
  --radius: 14px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: #7fb0ff; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(26px, 4vw, 34px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(24, 44, 88, .92);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--accent);
}
.nav .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.nav .brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 19px; }
.nav .brand img { width: 38px; height: 38px; }
.nav .links { margin-left: auto; display: flex; gap: 20px; align-items: center; }
.nav .links a { color: var(--text); text-decoration: none; font-size: 15px; }
.nav .links a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 720px) { .nav .links a:not(.btn) { display: none; } }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px; border: 0;
  background: var(--blue); color: #fff; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }
.btn.red { background: var(--accent); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.nav .btn { padding: 8px 16px; font-size: 15px; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(36px, 6vw, 56px); letter-spacing: -.5px; }
.hero h1 .bar { display: block; width: 90px; height: 5px; background: var(--accent); margin-top: 16px; border-radius: 3px; }
.hero .lead { font-size: 20px; color: var(--muted); margin: 18px 0 26px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .facts { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 26px; font-size: 15px; color: var(--muted); }
.hero .facts span::before { content: "✓ "; color: var(--green); font-weight: 700; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: 32px; } }

/* Display-Nachbau */
.device {
  background: #1b1d22; border-radius: 22px; padding: 18px;
  box-shadow: 0 30px 60px rgba(0,0,0,.5), inset 0 0 0 2px #2a2d34;
  max-width: 500px; margin: 0 auto; width: 100%;
}
.device svg { display: block; width: 100%; height: auto; border-radius: 4px; }
.device-caption { text-align: center; font-size: 14px; color: var(--muted); margin-top: 12px; }

/* Abschnitte */
section { padding: 64px 0; }
section.alt { background: var(--bg2); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 18px; }

/* Funktionen */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.feature { background: var(--card); border-radius: var(--radius); padding: 22px; }
.feature .icon { font-size: 28px; margin-bottom: 10px; }
.feature p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* Foto-Platzhalter: durch <img> ersetzen, siehe README.md */
.photo {
  border: 2px dashed #3a4a6c; border-radius: var(--radius); background: var(--card);
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--muted); padding: 20px; aspect-ratio: 4 / 3; font-size: 15px; flex-direction: column;
}
.photo small { display: block; margin-top: 6px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; opacity: .8; }
img.shot { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; }
.gallery figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* Hin und zurück */

/* Was du brauchst / was du bekommst */
.needs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.needs .box { background: var(--card); border-radius: var(--radius); padding: 22px 24px; border: 1px solid var(--line); }
.needs .box.ours { border-color: var(--blue); }
.needs ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 15.5px; }
.needs li { margin: 6px 0; }
.needs li b { color: var(--text); font-weight: 600; }
@media (max-width: 760px) { .needs { grid-template-columns: 1fr; } }
.skill {
  display: flex; gap: 12px; align-items: flex-start; margin: 16px 0 32px; padding: 14px 18px;
  border-radius: 10px; background: rgba(255, 204, 0, .08); border: 1px solid rgba(255, 204, 0, .4); font-size: 16px;
}

/* Schritte */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; counter-reset: step; }
.step { background: var(--card); border-radius: var(--radius); padding: 22px 22px 22px 22px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; width: 36px; height: 36px; border-radius: 50%;
  align-items: center; justify-content: center; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 12px;
}
.step p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* Preise */
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: stretch; }
.price { background: var(--card); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; border: 1px solid var(--line); }
.price.main { border: 2px solid var(--blue); }
.price .tag { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.price.main .tag { color: #7fb0ff; }
.price .amount { font-size: 44px; font-weight: 800; margin: 6px 0 2px; }
.price .amount small { display: block; font-size: 15px; font-weight: 400; color: var(--muted); }
.price ul { padding: 0; margin: 16px 0 22px; list-style: none; flex: 1; }
.price li { padding: 6px 0 6px 26px; position: relative; font-size: 15.5px; }
.price li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.price .btn { text-align: center; }
.vat { font-size: 13.5px; color: var(--muted); margin-top: 18px; }

/* Technische Daten */
.specs { width: 100%; border-collapse: collapse; font-size: 16px; }
.specs th, .specs td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { color: var(--muted); font-weight: 500; width: 38%; padding-right: 16px; }
.specs.vergleich th { width: 24%; }
.specs.vergleich td + td { padding-left: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }

/* FAQ */
.faq details { background: var(--card); border-radius: 12px; margin-bottom: 10px; padding: 0 20px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 22px; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0 0 16px; font-size: 15.5px; }

/* Formular */
.form { background: var(--card); border-radius: var(--radius); padding: 28px; max-width: 720px; }
.form label { display: block; font-size: 14px; color: var(--muted); margin: 16px 0 6px; }
.form input[type=text], .form input[type=email], .form textarea {
  width: 100%; padding: 12px 14px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); font: inherit; font-size: 16px;
}
.form textarea { min-height: 90px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.form .choice { display: grid; gap: 10px; }
.form .choice label {
  display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); color: var(--text); font-size: 16px; cursor: pointer;
}
.form .choice label:has(input:checked) { border-color: var(--blue); }
.form .choice input { margin-top: 4px; accent-color: var(--blue); }
.form .choice small { display: block; color: var(--muted); font-size: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.form .total { margin: 16px 0 0; font-size: 18px; }
.form #colors { margin-top: 8px; }
.form .case {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: start;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-top: 16px;
}
.form .case h3 { margin: 0 0 6px; font-size: 17px; }
.form .case-preview { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
.form .case-preview .body, .form .case-preview .bezel { stroke: rgba(150, 165, 190, .45); stroke-width: 1.5; }
@media (max-width: 600px) { .form .case { grid-template-columns: 1fr; } }
.swatches { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
.swatches legend { font-size: 14px; color: var(--muted); padding: 0; margin-bottom: 8px; }
.swatches legend b { color: var(--text); font-weight: 600; }
.form .swatches label.sw { display: inline-block; margin: 0 6px 6px 0; cursor: pointer; position: relative; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw span {
  display: block; width: 30px; height: 30px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), 0 0 0 2px var(--bg2);
}
.sw.silk span { background-image: linear-gradient(135deg, rgba(255,255,255,0) 20%, rgba(255,255,255,.55) 45%, rgba(255,255,255,0) 60%) !important; }
.sw.wood span { background-image: repeating-linear-gradient(170deg, rgba(0,0,0,.25) 0 2px, rgba(0,0,0,0) 2px 6px) !important; }
.sw input:checked + span { box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), 0 0 0 2px var(--bg2), 0 0 0 4px var(--blue); }
.sw input:focus-visible + span { outline: 2px solid #7fb0ff; outline-offset: 4px; }
.sw.out { cursor: not-allowed; opacity: .3; }
.sw.out span::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--red); transform: translateX(-50%) rotate(45deg); }
.form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form .submit { margin-top: 24px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.notice { border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; font-size: 15.5px; }
.notice.ok { background: rgba(70, 210, 100, .12); border: 1px solid var(--green); }
.notice.err { background: rgba(255, 72, 60, .12); border: 1px solid var(--red); }
[hidden] { display: none !important; }

/* Fußzeile */
footer { border-top: 3px solid var(--accent); background: var(--header); padding: 32px 0; font-size: 15px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
footer a { color: var(--text); }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* Rechtstexte */
.legal { padding: 48px 0; max-width: 760px; }
.legal h2 { font-size: 22px; margin-top: 32px; }
.todo { background: rgba(255, 204, 0, .12); border: 1px solid var(--yellow); border-radius: 8px; padding: 2px 6px; color: var(--yellow); }
.form label.consent { display: flex; gap: 12px; align-items: flex-start; margin: 20px 0 0; font-size: 14.5px; color: var(--text); cursor: pointer; }
.form label.consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--blue); }

/* 3D-Vorschau im Bestellformular: Canvas ersetzt die flache SVG-Vorschau */
.form .pv { position: relative; }
.form .pv canvas { width: 100% !important; height: auto !important; border-radius: 10px; cursor: grab;
  background: radial-gradient(ellipse at 50% 35%, #1e2c4a 0%, #0d1830 70%); }
.form .pv canvas:active { cursor: grabbing; }
.form .pv.is-3d .case-preview { display: none; }
.form .pv.is-3d::after { content: "↻ Ziehen zum Drehen"; position: absolute; right: 8px; bottom: 6px; font-size: 12px;
  color: var(--muted); pointer-events: none; }
