/*
 * samoOrder — Design-System (base.css)
 * Welt der Shishabar: Nachtblau, Champagner-Gold, Rauch.
 * Kein Cyber/Neon, kein Cream-Terracotta-Template.
 */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/space-grotesk-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-700.woff2') format('woff2');
}

:root {
  /* Farben */
  --bg: #0C1220;
  --flaeche: #131B2E;
  --flaeche-2: #1B2540;
  --linie: #263252;
  --text: #EDF1F9;
  --text-2: #93A0BC;
  --akzent: #D9A83F;
  --akzent-hell: #F0C75E;
  --gut: #6FBF8B;
  --warn: #E4B04A;
  --fehler: #D65A52;
  --radius: 14px;
  --radius-klein: 10px;
  --radius-gross: 20px;

  /* Typografie */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Motion */
  --dauer: 180ms;
  --ease: ease-out;

  /* Abstände */
  --raum-1: 4px;
  --raum-2: 8px;
  --raum-3: 12px;
  --raum-4: 16px;
  --raum-5: 24px;
  --raum-6: 32px;
  --raum-7: 48px;

  /* Schatten */
  --schatten-karte: 0 2px 10px rgba(0, 0, 0, 0.28);
  --schatten-sheet: 0 -8px 30px rgba(0, 0, 0, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  :root { --dauer: 0.01ms; }
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
/* iOS: kein grauer Tap-Highlight-Kasten auf antippbaren Elementen (global) */
html { -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
/* iOS zoomt beim Fokussieren in Felder mit font-size < 16px hinein — 16px ist die Untergrenze */
input, textarea, select { font: inherit; color: inherit; font-size: max(16px, 1em); }

/* [hidden] muss IMMER gewinnen — sonst überschreiben Klassen mit eigenem
   display (z. B. .banner{display:flex}) das Ausblenden per gleicher Spezifität. */
[hidden] { display: none !important; }

::selection { background: var(--akzent); color: #0C1220; }

/* Sichtbarer Fokus-Ring überall */
:focus-visible {
  outline: 2px solid var(--akzent-hell);
  outline-offset: 2px;
  border-radius: var(--radius-klein);
}

/* Zahlen/Preise: tabellarisch */
.zahl, .preis {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Typografie-Hilfsklassen ──────────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.display-bold { font-weight: 700; }
.text-2 { color: var(--text-2); }
.text-akzent { color: var(--akzent-hell); }

/* ── Wortmarke (Logo-Ersatz, siehe marketing/samoorder/visitenkarte-samoorder.html) ──
   „samo“ in Textfarbe + „Order“ in Gold + kleiner Gold-Punkt. Kein Icon. Skaliert
   über font-size des umgebenden Elements (em-basiert), daher überall einsetzbar
   (Kopfzeilen wie auf gedruckten QR-Karten). */
.wm { position: relative; display: inline-flex; align-items: baseline; font-family: var(--font-display); font-weight: 700; line-height: 1; white-space: nowrap; }
.wm-samo { color: var(--text); font-size: 0.8em; letter-spacing: -0.01em; }
.wm-order { color: var(--akzent-hell); letter-spacing: -0.01em; }
.wm-dot { position: absolute; top: 0.05em; right: -0.34em; width: 0.17em; height: 0.17em; border-radius: 25%; background: var(--akzent-hell); }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--raum-2);
  min-height: 44px;
  padding: 0 var(--raum-5);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--flaeche-2);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dauer) var(--ease), transform var(--dauer) var(--ease), box-shadow var(--dauer) var(--ease), opacity var(--dauer) var(--ease);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover { background: #202C4C; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primär {
  background: var(--akzent);
  color: #0C1220;
  border-color: var(--akzent);
}
.btn-primär:hover { background: var(--akzent-hell); }

.btn-geist {
  background: transparent;
  border-color: var(--linie);
  color: var(--text);
}
.btn-geist:hover { background: var(--flaeche); }

.btn-klein {
  min-height: 36px;
  padding: 0 var(--raum-3);
  font-size: 14px;
  border-radius: var(--radius-klein);
}

/* ── Karten / Flächen ─────────────────────────────────────────────────── */
.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  box-shadow: var(--schatten-karte);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--flaeche-2);
  border: 1px solid var(--linie);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Banner / Hinweise ────────────────────────────────────────────────── */
.banner {
  display: flex;
  align-items: flex-start;
  gap: var(--raum-3);
  padding: var(--raum-4);
  border-radius: var(--radius);
  border: 1px solid var(--linie);
  background: var(--flaeche-2);
  color: var(--text);
  font-size: 14px;
}
.banner-warn { border-color: rgb(124, 107, 78); border-color: color-mix(in srgb, var(--warn) 45%, var(--linie)); }
.banner-warn svg { color: var(--warn); flex-shrink: 0; }
.banner-fehler { border-color: rgb(117, 68, 82); border-color: color-mix(in srgb, var(--fehler) 45%, var(--linie)); }
.banner-fehler svg { color: var(--fehler); flex-shrink: 0; }

/* ── Toast ────────────────────────────────────────────────────────────── */
.toast-stapel {
  position: fixed;
  left: 50%;
  bottom: calc(var(--raum-5) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: var(--raum-2);
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--raum-3);
  padding: var(--raum-3) var(--raum-4);
  border-radius: var(--radius);
  background: #1D2335;
  border: 1px solid var(--linie);
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  animation: toast-ein var(--dauer) var(--ease);
}
.toast-fehler { border-color: rgb(135, 72, 82); border-color: color-mix(in srgb, var(--fehler) 55%, var(--linie)); }
.toast button {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--linie);
  border-radius: var(--radius-klein);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--akzent-hell);
  cursor: pointer;
  min-height: 32px;
}
@keyframes toast-ein {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
}

/* ── Footer (überall) ─────────────────────────────────────────────────── */
.marken-footer {
  padding: var(--raum-6) var(--raum-4);
  text-align: center;
  color: var(--text-2);
  font-size: 12.5px;
}
.marken-footer a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.marken-footer a:hover { color: var(--text); }

/* ── Scrollbar (dezent, dunkel) ───────────────────────────────────────── */
* { scrollbar-color: var(--linie) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--linie); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
