/* =========================================================
   RAG² — CI/Design-Tokens
   ---------------------------------------------------------
   Weiss und ruhig wie Apple. Das Salbei-Türkis von Ragettli Creation
   kommt bewusst nur an zwei Stellen vor: die Hochzahl im Logo und die
   Bestell-Knöpfe. Alles andere ist Schwarz, Grau, Weiss.
   Eine Markenfarbe ändern = eine Zeile hier oben.
   Schrift: System-Stack (SF Pro auf Apple-Geräten) — kein Font-Download.
   ========================================================= */
:root {
  /* Farben */
  --ink: #1d1d1f;            /* Text, fast schwarz */
  --ink-soft: #6e6e73;       /* Nebentext */
  --bg: #ffffff;
  --bg-alt: #f5f5f7;         /* Wechselflächen, Produktkacheln */
  --line: #e2e2e7;
  --accent: #89b8ae;         /* Ragettli-Türkis: nur Logo-Hochzahl und Knöpfe */
  --accent-hover: #74a89d;


  /* Typo */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Mass */
  --max: 1040px;
  --max-narrow: 680px;
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Logo ----------
   Wie das Tab-Symbol: dunkle Kachel, R weiss, Hochzahl türkis.
   Daneben die Wortmarke, deren Hochzahl ebenfalls türkis ist. */
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; flex: none; }
.wordmark { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; line-height: 1; }
/* Die Hochzahl der Wortmarke: echtes ² sieht je nach Font mager aus,
   darum eigenes Element, überall identisch gesetzt — in Türkis. */
.sup2 { font-size: 0.62em; vertical-align: 0.5em; letter-spacing: 0; color: var(--accent); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 22px;
  height: 58px; padding-top: 4px; display: flex; align-items: center; justify-content: space-between;
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--ink-soft); font-size: 14px; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.btn-nav {
  background: var(--accent); color: #fff !important; border-radius: 980px;
  padding: 7px 16px; font-size: 14px; font-weight: 600;
}
.btn-nav:hover { background: var(--accent-hover); text-decoration: none; }
@media (max-width: 640px) { .nav-links a:not(.btn-nav) { display: none; } }

/* ---------- Abschnitte ---------- */
section { padding: 88px 22px; }
.inner { max-width: var(--max); margin: 0 auto; }
.inner-narrow { max-width: var(--max-narrow); margin: 0 auto; }
.alt { background: var(--bg-alt); }

.eyebrow {
  color: var(--ink-soft); font-weight: 600; font-size: 14px;
  letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 12px;
}
h1, h2 { letter-spacing: -0.025em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(44px, 7.4vw, 84px); font-weight: 700; }
h2 { font-size: clamp(32px, 4.8vw, 50px); font-weight: 700; }
h3 { font-size: 21px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; }
.lede {
  font-size: clamp(19px, 2.4vw, 24px); color: var(--ink-soft);
  line-height: 1.4; margin: 14px 0 0; font-weight: 400;
}

/* ---------- Hero ----------
   Kompakt: Titel, Text, Preis, Knopf und der Anfang des Bildes passen
   zusammen auf einen Laptop-Bildschirm. */
.hero { text-align: center; padding-top: 44px; padding-bottom: 0; }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); }
.hero .lede { max-width: 760px; margin: 12px auto 0; font-size: clamp(18px, 2.1vw, 21px); }
.hero-meta { margin: 14px 0 0; color: var(--ink); font-size: 17px; font-weight: 600; }
.hero-meta span { color: var(--ink-soft); font-weight: 400; }
.hero-cta { display: flex; gap: 14px; justify-content: center; margin: 20px 0 0; flex-wrap: wrap; }
.btn {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 600;
  border-radius: 980px; padding: 13px 28px; font-size: 17px; border: 0; cursor: pointer;
  font-family: var(--font); transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-ghost { display: inline-block; padding: 13px 10px; font-size: 17px; font-weight: 500; }

/* Das Produktbild: helle Kachel, fährt beim Laden sanft heran; beim Scrollen
   bleibt es leicht zurück (script.js setzt transform auf dem img). */
.hero-photo { margin: 32px auto 0; max-width: 880px; animation: photo-in 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-photo.tile { min-height: 0; padding: 24px 24px 0; border-radius: var(--radius); background: var(--bg-alt); overflow: hidden; }
.hero-photo img { max-height: 400px; width: auto; max-width: 100%; transition: opacity 0.22s ease; will-change: transform; }
@keyframes photo-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.caption { color: var(--ink-soft); font-size: 13px; margin: 12px 0 0; text-align: center; }

/* ---------- Varianten: ein Tisch, drei Nutzungen ---------- */
.variants { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
@media (max-width: 760px) { .variants { grid-template-columns: 1fr; } }
.variant { border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); }
.variant img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 0.6s ease; }
.variant:hover img { transform: scale(1.025); }
.variant figcaption { padding: 16px 18px 18px; }
.variant figcaption strong { display: block; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.variant figcaption span { color: var(--ink-soft); font-size: 15px; }

/* ---------- Darum-Karten ---------- */
.features { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); margin-top: 44px; }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } }
.card {
  background: var(--bg); border-radius: var(--radius);
  padding: 30px 28px 0; overflow: hidden; display: flex; flex-direction: column;
}
.card p { color: var(--ink-soft); margin: 0; font-size: 16px; }
.card .big { color: var(--ink); font-size: 24px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; margin: 0 0 10px; }
.tile {
  display: flex; align-items: center; justify-content: center; flex: 1;
  padding: 22px; min-height: 220px; margin-top: 18px;
}
.tile img { max-height: 250px; width: auto; max-width: 100%; transition: opacity 0.22s ease; }
.tile img.fading { opacity: 0; }

/* ---------- Farbwahl ---------- */
.colors { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 820px) { .colors { grid-template-columns: 1fr; } }
.colors .tile { background: var(--bg-alt); border-radius: var(--radius); min-height: 420px; padding: 36px; margin: 0; }
.colors .tile img { max-height: 520px; }
.swatches { display: flex; gap: 16px; margin: 28px 0 10px; }
.swatch {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  border: 2px solid rgba(0, 0, 0, 0.12);
  outline: 2px solid transparent; outline-offset: 4px;
  transition: outline-color 0.15s ease, transform 0.15s ease;
  padding: 0;
}
.swatch:hover { transform: scale(1.06); }
.swatch[aria-pressed="true"] { outline-color: var(--ink); }
.swatch-fichte { background: linear-gradient(135deg, #e4c99a, #cfa96f); }
.swatch-buche { background: linear-gradient(135deg, #c99a67, #a9743f); }
.swatch-dunkel { background: linear-gradient(135deg, #5a3a26, #3a2416); }
.color-name { color: var(--ink); font-size: 17px; font-weight: 500; margin: 0; min-height: 1.5em; }
.color-name::before { content: "Beine: "; color: var(--ink-soft); font-weight: 400; }

/* ---------- Bestellen (mit den Massen) ---------- */
.order-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; margin-top: 40px; }
@media (max-width: 860px) { .order-grid { grid-template-columns: 1fr; gap: 40px; } }
.price { font-size: clamp(44px, 6vw, 64px); font-weight: 700; letter-spacing: -0.03em; margin: 0; line-height: 1; }
.price-note { color: var(--ink-soft); margin: 10px 0 0; }
.order-points { list-style: none; padding: 0; margin: 26px 0 0; }
.order-points li { padding: 9px 0 9px 30px; position: relative; }
.order-points li::before {
  content: ""; position: absolute; left: 0; top: 15px; width: 15px; height: 8px;
  border-left: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink);
  transform: rotate(-45deg);
}
.specs { margin: 36px 0 0; }
.specs h3 { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 6px; }
.specs dl { margin: 0; }
.specs .row {
  display: grid; grid-template-columns: 130px 1fr; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.specs dt { color: var(--ink-soft); }
.specs dd { margin: 0; font-weight: 500; }

form .field { margin: 0 0 16px; }
label { display: block; font-size: 14px; font-weight: 500; margin: 0 0 6px; }
.optional { color: var(--ink-soft); font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
select, textarea {
  width: 100%; font-family: var(--font); font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid #d2d2d7; border-radius: 12px;
  padding: 12px 14px; -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29, 29, 31, 0.12);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

.choice { display: flex; gap: 10px; flex-wrap: wrap; }
.choice label {
  display: flex; align-items: center; gap: 8px; margin: 0;
  border: 1px solid #d2d2d7; border-radius: 12px; padding: 11px 14px;
  font-size: 15px; font-weight: 400; cursor: pointer; flex: 1 1 auto; min-width: 110px;
}
.choice input { accent-color: var(--ink); margin: 0; }
.choice label:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
form .btn { width: 100%; margin-top: 6px; }

/* Zusatzoptionen mit Aufpreis */
.options .opt {
  display: flex; gap: 12px; align-items: flex-start; margin: 0 0 10px;
  border: 1px solid #d2d2d7; border-radius: 12px; padding: 12px 14px; cursor: pointer;
  font-size: 15px; font-weight: 400; line-height: 1.4;
}
.options .opt input { margin: 4px 0 0; accent-color: var(--ink); flex: none; }
.options .opt:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.options .opt em { display: block; font-style: normal; color: var(--ink-soft); margin-top: 2px; }
.options .sub { margin: -2px 0 14px; padding: 0 2px; }
input[type="file"] {
  width: 100%; font-family: var(--font); font-size: 14px; color: var(--ink-soft);
  border: 1px dashed #c8c8cd; border-radius: 12px; padding: 12px 14px; background: var(--bg);
}
input[type="file"]::file-selector-button {
  font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--ink);
  background: var(--bg-alt); border: 0; border-radius: 980px; padding: 7px 14px; margin-right: 12px; cursor: pointer;
}
[hidden] { display: none !important; }

/* Live-Total */
.total { background: var(--bg-alt); border-radius: 12px; padding: 12px 16px; margin: 4px 0 18px; font-size: 15px; }
.total .line, .total .total-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; color: var(--ink-soft); }
.total .line span:last-child, .total .total-row span:last-child { white-space: nowrap; }
.total .total-row { border-top: 1px solid #d2d2d7; margin-top: 6px; padding-top: 9px; font-weight: 600; color: var(--ink); font-size: 18px; }

/* Honeypot: für Menschen unsichtbar, Bots füllen es trotzdem aus. */
.hp { position: absolute; left: -9999px; top: -9999px; }

.form-status { margin: 14px 0 0; font-size: 15px; color: var(--ink-soft); }
.form-status.ok { color: var(--ink); font-weight: 500; }
.form-status.err { color: #b3261e; }

/* ---------- FAQ ---------- */
.faq { max-width: var(--max-narrow); margin: 36px auto 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 18px 4px; font-weight: 500; font-size: 17px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-soft); font-size: 22px; font-weight: 300; }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 4px 20px; color: var(--ink-soft); }
.faq .a p { margin: 0 0 8px; }

/* ---------- Footer ---------- */
footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 44px 22px; }
.footer-inner {
  max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 18px;
  justify-content: space-between; align-items: center; color: var(--ink-soft); font-size: 13px;
}
.footer-inner a { color: var(--ink-soft); }

/* ---------- Die Fahrt ----------
   Dünne Strecke am oberen Rand, die sich mit dem Scrollen füllt; das Velo
   (Türkis, wie der Bestell-Knopf) fährt an der Spitze mit. --p setzt script.js. */
.ride { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none;
  background: linear-gradient(to right, var(--accent) calc(var(--p, 0) * 100%), transparent 0); }
.rider { position: absolute; top: 0; width: 24px; height: 15px; left: calc(var(--p, 0) * (100% - 28px)); color: var(--accent);
  transition: left 0.08s linear, transform 0.3s ease; }
.rider .wheel { transform-origin: center; animation: spin 0.9s linear infinite; animation-play-state: paused; }
.ride.moving .rider .wheel { animation-play-state: running; }
.rider.finish { transform: scale(1.25) rotate(-8deg); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ride { display: none; } }

/* ---------- Einblend-Animation (gestaffelt, einmalig) ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
