/* Bachfischet Aarau – Styles (ohne Build-Schritt, ohne externe Schriften) */

:root {
  --night: #1a1226;
  --night-2: #2b1836;
  --ember: #ffb454;
  --red: #e31e24;
  --red-dark: #b3141a;
  --ink: #1f1a24;
  --muted: #62596b;
  --line: #e6dfd6;
  --paper: #faf7f2;
  --card: #ffffff;
  --done: #9a91a0;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(31 26 36 / 6%), 0 8px 24px rgb(31 26 36 / 8%);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

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

h1,
h2,
h3,
p,
ul,
ol,
blockquote {
  margin: 0;
}

a {
  color: var(--red-dark);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap {
  width: min(1180px, 100% - 2rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: #fff;
  color: var(--ink);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus {
  top: 1rem;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(26 18 38 / 88%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  border-bottom: 1px solid rgb(255 255 255 / 8%);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}
.brand strong {
  color: var(--ember);
}
.topnav {
  display: flex;
  gap: 1.4rem;
}
.topnav a {
  color: rgb(255 255 255 / 80%);
  text-decoration: none;
  font-size: 0.95rem;
}
.topnav a:hover {
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(160deg, var(--night) 0%, var(--night-2) 60%, #4a1a2c 100%);
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(5rem, 10vw, 7.5rem);
  text-align: center;
}
.hero__glow {
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 90%;
  background: radial-gradient(closest-side, rgb(255 140 40 / 45%), rgb(227 30 36 / 15%) 55%, transparent 75%);
  filter: blur(10px);
  animation: flicker 5s ease-in-out infinite alternate;
}
@keyframes flicker {
  from {
    opacity: 0.75;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.06);
  }
}
.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}
.badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgb(255 180 84 / 50%);
  border-radius: 999px;
  color: var(--ember);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2.6rem, 9vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.accent {
  color: var(--ember);
}
.hero__lead {
  max-width: 40rem;
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  color: rgb(255 255 255 / 82%);
}
.hero__date {
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 10%);
  border: 1px solid rgb(255 255 255 / 16%);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  min-height: 44px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.btn:active {
  transform: scale(0.98);
}
.btn--primary {
  background: var(--red);
  color: #fff;
}
.btn--primary:hover {
  background: var(--red-dark);
}
.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgb(255 255 255 / 40%);
}
.btn--ghost:hover {
  background: rgb(255 255 255 / 10%);
}
.btn--outline {
  background: transparent;
  color: var(--red-dark);
  border-color: var(--red);
  width: 100%;
}
.btn--outline:hover {
  background: rgb(227 30 36 / 6%);
}

/* ---------- Live-Status ---------- */
.status {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  align-items: center;
  margin-top: -3.2rem;
  padding: 1.2rem 1.4rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.status__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--night);
  color: var(--ember);
}
.status__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.status[data-state="live"] .status__eyebrow {
  color: var(--red-dark);
}
.status[data-state="live"] .status__eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse-dot 1.6s ease-out infinite;
}
@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgb(227 30 36 / 60%);
  }
  100% {
    box-shadow: 0 0 0 10px rgb(227 30 36 / 0%);
  }
}
.status__title {
  font-size: clamp(1.25rem, 3.4vw, 1.7rem);
  line-height: 1.25;
}
.status__sub {
  color: var(--muted);
  grid-column: 2;
}
.status__progress {
  grid-column: 1 / -1;
  height: 8px;
  margin-top: 0.6rem;
  border-radius: 999px;
  background: #efe8df;
  overflow: hidden;
}
.status__progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ember), var(--red));
  transition: width 0.6s ease;
}
.sim-note {
  margin-top: 0.6rem;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  background: #fff4d6;
  color: #6a4b00;
  font-size: 0.9rem;
}

/* ---------- Sections ---------- */
:where(section:not(.hero)) {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}
.section-head {
  margin-bottom: 1.4rem;
}
.section-head h2,
.tradition h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.section-head p {
  margin-top: 0.4rem;
  color: var(--muted);
}

/* ---------- Karte & Zeitplan ---------- */
.route__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 1.2rem;
  align-items: start;
}
.mapbox {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #ece7e0;
}
#map {
  height: clamp(420px, 72vh, 720px);
  width: 100%;
}
.map-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  text-align: center;
  background: #ece7e0;
  padding: 1rem;
}
.map-fallback[hidden] {
  display: none;
}
.legend {
  position: absolute;
  left: 10px;
  bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.9rem;
  padding: 0.45rem 0.75rem;
  list-style: none;
  font-size: 0.78rem;
  background: rgb(255 255 255 / 92%);
  border-radius: 10px;
  box-shadow: 0 1px 6px rgb(0 0 0 / 15%);
  pointer-events: none;
}
.legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px currentColor;
  background: currentColor;
}
.dot--start {
  color: #1f9d55;
}
.dot--stop {
  color: var(--red);
}
.dot--end {
  color: var(--night);
}
.dot--live {
  color: var(--ember);
}

.timeline-card {
  padding: 1.3rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: sticky;
  top: 72px;
}
.timeline-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1.15rem;
}
.timeline {
  list-style: none;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: var(--line);
}
.timeline li + li {
  margin-top: 2px;
}
.stop {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.4rem;
  font: inherit;
  color: inherit;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}
.stop:hover {
  background: #faf3ea;
}
.stop__num {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  border: 3px solid var(--card);
  box-shadow: 0 0 0 1.5px var(--red);
}
.stop--start .stop__num {
  background: #1f9d55;
  box-shadow: 0 0 0 1.5px #1f9d55;
}
.stop--end .stop__num {
  background: var(--night);
  box-shadow: 0 0 0 1.5px var(--night);
}
.stop__name {
  font-weight: 600;
  line-height: 1.25;
}
.stop__tag {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}
.stop__time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--red-dark);
}
.stop.is-done .stop__name,
.stop.is-done .stop__time {
  color: var(--done);
}
.stop.is-done .stop__num {
  background: var(--done);
  box-shadow: 0 0 0 1.5px var(--done);
}
.stop.is-next {
  background: #fff4e0;
}
.stop.is-next .stop__tag {
  color: #8a5300;
  font-weight: 700;
}

.hint {
  margin: 0.9rem 0 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Karten-Marker ---------- */
.pin {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--red);
  color: #fff;
  font: 700 0.8rem/1 var(--font);
  box-shadow: 0 2px 8px rgb(0 0 0 / 35%);
  cursor: pointer;
}
.pin--start {
  background: #1f9d55;
}
.pin--end {
  background: var(--night);
}
.pin--place {
  background: var(--ember);
  color: var(--night);
}
.lantern {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ember);
  border: 3px solid #fff;
  box-shadow: 0 0 14px 4px rgb(255 160 40 / 80%);
  pointer-events: none;
}
.lantern::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 2px solid var(--ember);
  animation: ring 1.8s ease-out infinite;
}
@keyframes ring {
  from {
    transform: scale(0.6);
    opacity: 0.9;
  }
  to {
    transform: scale(1.5);
    opacity: 0;
  }
}
.maplibregl-popup-content {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-family: var(--font);
}
.popup h4 {
  margin: 0 1rem 0.15rem 0;
  font-size: 1rem;
  color: var(--red-dark);
}
.popup p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Tradition ---------- */
.tradition {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 3rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  color: #fff;
  background: linear-gradient(160deg, var(--night), var(--night-2));
  border-radius: 24px;
}
.tradition blockquote {
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 4px solid var(--ember);
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  font-style: italic;
  color: var(--ember);
}
.tradition__text {
  display: grid;
  gap: 1rem;
  color: rgb(255 255 255 / 85%);
}
.facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}
.facts li {
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: rgb(255 255 255 / 7%);
  border: 1px solid rgb(255 255 255 / 10%);
}
.facts strong {
  display: block;
  font-size: 1.6rem;
  color: var(--ember);
}
.facts span {
  font-size: 0.92rem;
  color: rgb(255 255 255 / 78%);
}

/* ---------- Infos ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.card {
  padding: 1.4rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}
.card p,
.card address {
  color: var(--muted);
  font-style: normal;
}
.link {
  margin-top: 0.7rem;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--red-dark);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom));
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.footer__inner {
  display: grid;
  gap: 0.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .route__grid {
    grid-template-columns: 1fr;
  }
  .timeline-card {
    position: static;
  }
  #map {
    height: 62vh;
    min-height: 380px;
  }
  .tradition {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .topnav {
    gap: 1rem;
  }
  .status {
    grid-template-columns: 1fr;
  }
  .status__icon {
    display: none;
  }
  .status__sub {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Installations-Hinweis (mobil) ---------- */
.install {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(0.75rem + env(safe-area-inset-bottom));
  z-index: 60;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.6rem 0.8rem;
  max-width: 520px;
  margin-inline: auto;
  padding: 0.85rem 2.4rem 0.85rem 0.85rem;
  color: #fff;
  background: var(--night);
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 18px;
  box-shadow: 0 10px 32px rgb(0 0 0 / 40%);
  transform: translateY(150%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s;
}
.install.is-visible {
  transform: none;
  opacity: 1;
}
.install__icon {
  border-radius: 10px;
}
.install__body {
  display: grid;
  gap: 0.1rem;
  font-size: 0.88rem;
  line-height: 1.35;
  color: rgb(255 255 255 / 80%);
}
.install__body strong {
  color: #fff;
  font-size: 0.95rem;
}
.install__body strong + .install__text strong,
.install__text strong {
  color: var(--ember);
}
.install__share {
  display: inline-block;
  vertical-align: -3px;
  color: var(--ember);
}
.install__action[hidden] {
  display: none;
}
.install__action {
  grid-column: 2;
  justify-self: start;
  min-height: 40px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}
.install__close {
  position: absolute;
  top: 0.15rem;
  right: 0.25rem;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
  color: rgb(255 255 255 / 70%);
  background: none;
  border: 0;
  cursor: pointer;
}
