/* =========================================================
   NASCHBOX ANSBACH — Design Tokens
   ========================================================= */
:root {
  /* Farben */
  --ink: #12141a;
  --ink-soft: #191c24;
  --panel: #1c2028;
  --panel-light: #262b36;
  --line: #323847;
  --coral: #ff6b4d;
  --coral-dark: #e05539;
  --mint: #3ddc97;
  --mint-dark: #2bb87c;
  --cream: #fbf7f0;
  --cream-dim: #cfd0d6;

  /* Typografie */
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;

  /* Sonstiges */
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 20px 45px rgba(0, 0, 0, 0.35);
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0 0 0.5em;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
  color: var(--cream-dim);
  max-width: 62ch;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 96px 0;
}

.eyebrow-free-heading {
  font-size: clamp(1.9rem, 3vw + 1rem, 2.9rem);
}

/* Sichtbarer Fokus */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 3px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--coral);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--coral-dark);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--cream);
}

.btn-ghost:hover {
  border-color: var(--mint);
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 20, 26, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(18, 20, 26, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--cream);
}

.logo-mark {
  width: 34px;
  height: 34px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--cream-dim);
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--mint);
}

.nav-cta {
  margin-left: 6px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  width: 40px;
  height: 40px;
  cursor: pointer;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  padding: 64px 0 40px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 32px;
}

.maintenance-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mint);
  margin-bottom: 22px;
}

.maintenance-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw + 1rem, 3.6rem);
  color: var(--cream);
  max-width: 14ch;
}

.hero h1 .accent {
  color: var(--coral);
}

.hero .lede {
  font-size: 1.15rem;
  max-width: 44ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 22px;
}

.hero-note {
  font-size: 0.9rem;
  color: var(--cream-dim);
  border-left: 3px solid var(--mint);
  padding-left: 12px;
  max-width: 42ch;
}

/* --- Illustration --- */
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-art svg {
  width: 100%;
  max-width: 380px;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45));
}

.machine-display-glow {
  animation: glow 2.6s ease-in-out infinite;
  transform-origin: center;
}

@keyframes glow {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
}

.machine-led {
  animation: blink 1.4s steps(1) infinite;
}

.machine-led.delay {
  animation-delay: 0.7s;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.25;
  }
}

.machine-wobble {
  animation: wobble 5s ease-in-out infinite;
  transform-origin: bottom center;
}

@keyframes wobble {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(0.6deg);
  }
}

.machine-sparkle {
  animation: sparkle 3.2s ease-in-out infinite;
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 0;
    transform: translateY(0) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translateY(-6px) scale(1);
  }
}

.hero-tool-badge {
  animation: swing 2.4s ease-in-out infinite;
  transform-origin: top center;
}

@keyframes swing {
  0%,
  100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(4deg);
  }
}

/* =========================================================
   Reveal-on-scroll
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Content-Sections (Was sind / Warum praktisch)
   ========================================================= */
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.split.reverse .split-art {
  order: 2;
}

.section-kicker {
  color: var(--mint);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.split h2 {
  font-size: clamp(1.7rem, 2.4vw + 1rem, 2.3rem);
  color: var(--cream);
}

.split-art svg {
  width: 100%;
  max-width: 320px;
}

/* --- Shelf (horizontales Regal statt generischem Card-Grid) --- */
.shelf {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 8px 4px 20px;
  margin-top: 28px;
  scroll-snap-type: x proximity;
}

.shelf::-webkit-scrollbar {
  height: 8px;
}

.shelf::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}

.shelf-item {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}

.shelf-item .shelf-emoji {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 10px;
}

.shelf-item h4 {
  font-size: 1rem;
  color: var(--cream);
  margin-bottom: 6px;
}

.shelf-item p {
  font-size: 0.9rem;
  margin: 0;
}

/* =========================================================
   Verzeichnis / Karte
   ========================================================= */
.directory {
  background: var(--ink-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.directory-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--cream-dim);
  padding: 9px 18px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.filter-btn.is-active,
.filter-btn:hover {
  border-color: var(--mint);
  color: var(--cream);
}

.directory-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

#automaten-map {
  width: 100%;
  height: 460px;
  background: var(--panel);
}

.automat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 6px;
}

.automat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.automat-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.automat-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: none;
  letter-spacing: 0.02em;
}

.automat-badge--eigen {
  background: rgba(61, 220, 151, 0.15);
  color: var(--mint);
  border: 1px solid var(--mint-dark);
}

.automat-badge--extern {
  background: rgba(255, 107, 77, 0.14);
  color: var(--coral);
  border: 1px solid var(--coral-dark);
}

.automat-availability {
  font-size: 0.78rem;
  color: var(--cream-dim);
}

.automat-card__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 4px;
  color: var(--cream);
}

.automat-card__address,
.automat-card__type {
  font-size: 0.88rem;
  margin: 0 0 4px;
  color: var(--cream-dim);
}

.automat-card__desc {
  font-size: 0.85rem;
  margin: 6px 0;
}

.automat-card__meta {
  font-size: 0.72rem;
  color: #8a8f9c;
  margin: 6px 0 0;
}

.automat-empty {
  list-style: none;
  color: var(--cream-dim);
  padding: 20px;
  text-align: center;
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}

.map-popup h4 {
  margin: 6px 0 2px;
  font-size: 1rem;
}

.map-popup p {
  margin: 2px 0;
  font-size: 0.85rem;
  color: #333;
}

.map-popup__note {
  font-style: italic;
  color: #7a4a3a !important;
}

/* =========================================================
   Standorte (Platzhalter-Bereich)
   ========================================================= */
.standorte-placeholder {
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  background: var(--panel);
}

.standorte-placeholder h3 {
  color: var(--cream);
}

/* =========================================================
   CTA
   ========================================================= */
.cta-section {
  text-align: center;
}

.cta-box {
  background: linear-gradient(135deg, var(--panel), var(--panel-light));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 56px 32px;
}

.cta-box h2 {
  margin-bottom: 12px;
}

.cta-box p {
  margin: 0 auto 24px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 28px;
  font-size: 0.88rem;
  color: var(--cream-dim);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-col h5 {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: 0.95rem;
  margin: 0 0 12px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  text-decoration: none;
  color: var(--cream-dim);
}

.footer-col a:hover {
  color: var(--mint);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .hero-inner,
  .split,
  .split.reverse .split-art {
    grid-template-columns: 1fr;
  }

  .split-art {
    order: -1 !important;
  }

  .directory-layout {
    grid-template-columns: 1fr;
  }

  #automaten-map {
    height: 340px;
  }
}

@media (max-width: 720px) {
  section {
    padding: 64px 0;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink-soft);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 16px;
    display: none;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .nav-cta {
    margin-left: 0;
  }
}
