/* ============================================================
   HPS – Homburger Parkhaus- und Stadtbusgesellschaft mbH
   Design tokens & base styles
   ============================================================ */

:root {
  /* Brand */
  --petrol:      #003A42;
  --petrol-600:  #0A4A53;
  --petrol-400:  #2C6B73;
  --mint:        #4FB7A8;
  --mint-600:    #2A7A6D;   /* WCAG AA: 5.12:1 auf Weiß (vorher #3C9C8E, 3.31:1) */
  --mint-100:    #DDF0EC;
  --yellow:      #F2B705;
  --yellow-600:  #D9A300;

  /* Signal / CTA accent (umschaltbar via Leiste) — Standard: Koralle */
  --accent:      #C94F2E;   /* WCAG AA: 4.52:1 mit weißem Text (vorher #E0603F, 3.55:1) */
  --accent-600:  #C84E30;
  --accent-ink:  #FFFFFF;

  /* Surfaces */
  --bg:          #FFFFFF;
  --bg-mint:     #E4F2EF;
  --bg-grey:     #F2F4F4;
  --line:        #E2E8E7;
  --line-dark:   rgba(255,255,255,.16);

  /* Text */
  --text:        #1A1A1A;
  --text-2:      #555555;
  --text-on-dark:#FFFFFF;
  --text-on-dark-2: rgba(255,255,255,.72);

  /* Status */
  --free:        #2E9E5B;
  --few:         #E08A00;
  --full:        #D24A3A;

  /* Form */
  --radius-sm:   10px;
  --radius:      14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --shadow-sm:   0 1px 2px rgba(0,40,46,.06), 0 1px 3px rgba(0,40,46,.05);
  --shadow:      0 6px 20px rgba(0,40,46,.08), 0 2px 6px rgba(0,40,46,.05);
  --shadow-lg:   0 18px 50px rgba(0,40,46,.16), 0 6px 16px rgba(0,40,46,.08);
  --ring:        0 0 0 3px rgba(79,183,168,.5);

  --maxw: 1200px;
  --font: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

h1,h2,h3,h4 { color: var(--petrol); line-height: 1.1; margin: 0; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

/* Accessible focus — visible on light & dark */
:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 2px;
  border-radius: 6px;
}
.on-dark :focus-visible { outline-color: var(--accent); }

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

.skip-link {
  position: absolute; left: 16px; top: -60px;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 8px; font-weight: 600;
  z-index: 1000; transition: top .15s;
}
.skip-link:focus { top: 16px; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; width: 100%; }
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mint-600);
}
.eyebrow::before { content:""; width: 22px; height: 2px; background: var(--mint); border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 16px; line-height: 1;
  padding: 15px 24px; border-radius: 12px; border: 2px solid transparent;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s;
  min-height: 48px; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--petrol); color: #fff; }
.btn-primary:hover { background: var(--petrol-600); }
.btn-mint { background: var(--mint); color: #03332e; }
.btn-mint:hover { background: var(--mint-600); color:#fff; }
.btn-yellow { background: var(--accent); color: var(--accent-ink); }
.btn-yellow:hover { background: var(--accent-600); }
.btn-ghost { background: transparent; color: var(--petrol); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--mint); background: var(--bg-mint); }
.btn-ghost-dark { background: rgba(255,255,255,.08); color:#fff; border-color: rgba(255,255,255,.28); }
.btn-ghost-dark:hover { background: rgba(255,255,255,.16); }
.btn-block { width: 100%; }
.btn-lg { padding: 18px 28px; font-size: 17px; min-height: 56px; }

/* ---------- Status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.pill-free { background: rgba(46,158,91,.12); color: #1d7544; }
.pill-free .dot { background: var(--free); }
.pill-few  { background: rgba(224,138,0,.14);  color: #9a5f00; }
.pill-few .dot { background: var(--few); }
.pill-full { background: rgba(210,74,58,.12);   color: #a8341f; }
.pill-full .dot { background: var(--full); }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: box-shadow .18s, transform .18s, border-color .18s;
}
.card-link:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--mint); }

/* ---------- Chips ---------- */
.chip {
  display:inline-flex; align-items:center; gap:7px;
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--bg-grey); color: var(--text); border: 1.5px solid transparent;
  transition: background .14s, border-color .14s, color .14s;
}
.chip:hover { border-color: var(--mint); }
.chip[aria-pressed="true"], .chip.active { background: var(--petrol); color:#fff; }

/* line-number badge */
.line-badge {
  display:inline-flex; align-items:center; justify-content:center;
  min-width: 44px; height: 30px; padding: 0 9px; border-radius: 8px;
  background: var(--petrol); color:#fff; font-weight: 700; font-size: 15px; letter-spacing: .01em;
}

/* utility */
.muted { color: var(--text-2); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.grid { display: grid; gap: 20px; }

/* scrollbar tidy for monitors */
.thin-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.thin-scroll::-webkit-scrollbar-thumb { background: rgba(0,58,66,.18); border-radius: 8px; }

@container site (max-width: 640px){
  .section { padding: 48px 0; }
  .wrap { padding: 0 18px; }
}

@media (prefers-reduced-motion: reduce){
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
