/* ====================================================================
   Ausflüge und Touren: /ausfluege/ und der Teaser auf der Startseite.
   Keine neuen Farben: alles aus den Tokens in at.css (Anthrazit, Gelb,
   Grund, Linien). Bewegung nur mit transform und opacity, ausser der
   Strichzeichnung der kleinen Routenlinie (wie die Strasse der Startseite).
   ==================================================================== */
:root {
  --tour-dunkel-text: color-mix(in oklab, var(--paper) 80%, var(--anthrazit));
  --tour-dunkel-linie: color-mix(in oklab, var(--paper) 16%, var(--anthrazit));
  --tour-reveal: cubic-bezier(0.22, 0.7, 0.3, 1);
}

/* ------------------------------------------------ Kopf der Seite */
.tour-held { padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(2.5rem, 5vw, 4rem); }
.tour-dachzeile { margin: 0 0 0.7rem; font-size: 0.95rem; font-weight: 600; color: var(--ink-3); }
.tour-held h1 { font-size: clamp(2rem, 1.25rem + 2.5vw, 3.15rem); letter-spacing: -0.035em; line-height: 1.06; max-width: 24em; }
.tour-held__gitter { display: grid; gap: 1.75rem; margin-top: clamp(1.25rem, 2.5vw, 2rem); align-items: start; }
.tour-held__gitter > * { min-width: 0; }
@media (min-width: 900px) { .tour-held__gitter { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: clamp(2rem, 4vw, 3.5rem); } }
.tour-antwort { margin: 0; padding-left: 1rem; border-left: 3px solid var(--gelb); max-width: 46ch; font-size: clamp(1.05rem, 1rem + 0.3vw, 1.18rem); line-height: 1.6; color: var(--ink-2); }
.tour-held .ctas { margin-top: 1.6rem; }
.tour-held__tel { margin: 1.1rem 0 0; font-size: 0.92rem; color: var(--ink-3); }
.tour-held__tel a { font-weight: 600; color: var(--ink); white-space: nowrap; }
.tour-held__medien { min-width: 0; }
.bild.tour-held__bild { aspect-ratio: 16 / 11; border-radius: 24px; box-shadow: var(--schatten-weich); }
@media (max-width: 899px) { .bild.tour-held__bild { aspect-ratio: 16 / 10; border-radius: 20px; } }

/* ------------------------------------------------ Abschnittskoepfe */
.tour-kopf { max-width: 46rem; margin-bottom: var(--raum-titel); }
.tour-kopf p { margin: 0.7rem 0 0; color: var(--ink-2); max-width: 60ch; }

/* ------------------------------------------------ Ablauf in vier Schritten */
.tour-ablauf { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.tour-ablauf li { position: relative; display: grid; align-content: start; gap: 0.3rem; padding: var(--raum-karte); border-radius: var(--r-card); background: var(--paper); }
.tour-ablauf strong { font-family: var(--f-display); font-size: 1.08rem; letter-spacing: -0.01em; }
.tour-ablauf li > span:last-child { color: var(--ink-2); font-size: 0.96rem; }
.tour-ablauf__nr { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 0.45rem; border-radius: 50%; background: var(--anthrazit); color: var(--gelb); font-family: var(--f-display); font-weight: 700; font-size: 0.95rem; position: relative; z-index: 1; }
@media (max-width: 859px) {
  .tour-ablauf li { grid-template-columns: 36px minmax(0, 1fr); column-gap: 0.95rem; row-gap: 0.15rem; padding: 1rem 1.1rem; }
  .tour-ablauf__nr { grid-row: span 2; margin-bottom: 0; }
}
@media (min-width: 860px) {
  .tour-ablauf { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
  .tour-ablauf li { background: none; padding: 0 1.25rem 0 0; border-radius: 0; }
  .tour-ablauf__nr { margin-bottom: 0.8rem; box-shadow: 0 0 0 6px var(--ground); }
  /* Verbindungslinie durch die Nummern (Mitte der ersten bis Mitte der letzten);
     die gelbe Linie fuellt sich einmal, wenn der Ablauf sichtbar wird */
  .tour-ablauf::before, .tour-ablauf::after { content: ""; position: absolute; top: 17px; left: 18px; right: calc(25% - 0.825rem - 18px); height: 2px; background: var(--line); }
  .tour-ablauf::after { background: var(--gelb); transform-origin: left center; }
}

/* ------------------------------------------------ Tourkarten */
.tour-gitter { display: grid; gap: var(--raum-gitter); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .tour-gitter { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) {
  .tour-gitter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tour-karte--wunsch { grid-column: span 2; }
}
.tour-karte { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 20px; overflow: hidden; background: var(--paper);
  box-shadow: 0 1px 2px rgba(27, 32, 40, 0.05), inset 0 0 0 1px var(--line-soft); scroll-margin-top: 90px;
  transition: box-shadow 220ms var(--feder); }
.tour-karte:hover { box-shadow: var(--schatten-weich), inset 0 0 0 1px var(--line-soft); }
.tour-karte__medien { position: relative; }
.bild.tour-karte__bild { aspect-ratio: 3 / 2; border-radius: 0; border-width: 0 0 1px; }
.bild.tour-karte__bild.hat-bild img { transition: transform 700ms var(--feder); }
/* Solange ein Foto fehlt: Hinweis oben, damit das Badge unten frei bleibt */
.bild.tour-karte__bild[data-bild-fehlt] { place-items: start center; }
.bild.tour-karte__bild[data-bild-fehlt] figcaption { padding-top: 1.1rem; }
.tour-karte:hover .tour-karte__bild img, .tour-karte:focus-within .tour-karte__bild img { transform: scale(1.035); }
.tour-karte__kern { flex: 1; display: flex; flex-direction: column; padding: var(--raum-karte); min-width: 0; }
.tour-karte__dauer { align-self: flex-start; margin: 0; padding: 0.2rem 0.65rem; border-radius: 99px; background: var(--ground); color: var(--ink-2); font-size: 0.875rem; font-weight: 600; }
.tour-karte h3 { margin-top: 0.65rem; font-size: 1.25rem; line-height: 1.2; }
.tour-karte__pitch { margin: 0.5rem 0 0; color: var(--ink-2); font-size: 0.98rem; text-wrap: wrap; }
.tour-karte .haken-liste { margin-top: 0.85rem; gap: 0.4rem; font-size: 0.94rem; }
.tour-karte__weiter { margin: 0.85rem 0 0; font-size: 0.9rem; color: var(--ink-3); font-variant-numeric: tabular-nums; text-wrap: wrap; }
.tour-karte__cta { display: inline-flex; align-items: center; gap: 0.45rem; align-self: flex-start; min-height: 44px; margin-top: auto; padding-top: 0.9rem; font-weight: 600; white-space: nowrap; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--gelb); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.tour-karte__cta svg { flex: none; transition: transform 220ms var(--feder); }
.tour-karte__cta:hover svg { transform: translateX(3px); }

/* Badge auf dem Bild: Linie Brugg -> Ziel, Kilometer, Fahrzeit */
.tour-weg { position: absolute; left: 12px; bottom: 12px; z-index: 1; display: flex; align-items: center; gap: 0.55rem; max-width: calc(100% - 24px);
  padding: 0.4rem 0.8rem 0.4rem 0.45rem; border-radius: 14px; background: color-mix(in oklab, var(--paper) 93%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 1px 2px rgba(27, 32, 40, 0.08), 0 8px 20px -10px rgba(27, 32, 40, 0.3); }
.tour-linie { flex: none; width: 72px; height: 34px; overflow: visible; }
.tour-linie__spur { fill: none; stroke: var(--anthrazit-hell); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 4 5; opacity: 0.8; }
.tour-linie__weg { fill: none; stroke: var(--anthrazit); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.tour-linie__start { fill: var(--gelb); stroke: var(--ink); stroke-width: 1.6; }
.tour-linie__halt { fill: var(--paper); stroke: var(--anthrazit); stroke-width: 1.8; }
.tour-linie__ziel { fill: var(--anthrazit); stroke: var(--paper); stroke-width: 1.8; transform-box: fill-box; transform-origin: center; }
.tour-weg__zahlen { display: grid; margin: 0; line-height: 1.2; min-width: 0; }
.tour-weg__ab { font-size: 0.875rem; font-weight: 600; color: var(--ink-3); }
.tour-weg__zahlen b { font-family: var(--f-display); font-size: 1.12rem; letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tour-weg__zahlen b span { display: inline-block; min-width: 2ch; text-align: right; }
.tour-weg__zeit { font-size: 0.875rem; color: var(--ink-2); white-space: nowrap; }

/* Wunschroute: eine Karte, dunkel, breit */
.tour-karte--wunsch { background: var(--anthrazit); color: #FFFFFF; box-shadow: none; }
.tour-karte--wunsch:hover { box-shadow: var(--schatten-weich); }
.tour-karte--wunsch .tour-karte__kern { padding: clamp(1.4rem, 3vw, 2.2rem); justify-content: center; gap: 1.75rem; }
.tour-wunsch__text { display: flex; flex-direction: column; min-width: 0; }
@media (min-width: 1040px) { .tour-karte--wunsch .tour-karte__kern { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 2.25rem; } }
.tour-wunsch__ziele { min-width: 0; padding: 1.1rem 1.2rem 1rem; border-radius: 16px; border: 1px solid var(--tour-dunkel-linie); }
.tour-wunsch__ziele-titel { margin: 0 0 0.4rem; font-weight: 600; color: #FFFFFF; font-size: 0.95rem; }
.tour-wunsch__ziele ul { list-style: none; margin: 0; padding: 0; }
.tour-wunsch__ziele li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 1rem; padding: 0.6rem 0; border-top: 1px solid var(--tour-dunkel-linie); }
.tour-wunsch__ziele li > span { color: #FFFFFF; font-size: 0.95rem; line-height: 1.35; }
.tour-wunsch__ziele li b { font-family: var(--f-display); color: var(--gelb); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.tour-wunsch__ziele li small { grid-column: 1 / -1; color: var(--tour-dunkel-text); font-size: 0.875rem; }
.tour-wunsch__ziele-notiz { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--tour-dunkel-text); }
.tour-wunsch__zeichen { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--gelb); color: var(--ink); }
.tour-karte--wunsch h3 { margin-top: 1rem; font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.7rem); color: #FFFFFF; }
.tour-karte--wunsch .tour-karte__pitch { color: var(--tour-dunkel-text); max-width: 52ch; }
.tour-wunsch__punkte { list-style: none; margin: 1.1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tour-wunsch__punkte li { padding: 0.35rem 0.8rem; border-radius: 99px; border: 1px solid var(--tour-dunkel-linie); color: var(--tour-dunkel-text); font-size: 0.9rem; }
.tour-karte--wunsch .knopf { align-self: flex-start; margin-top: 1.5rem; }
.tour-karte--wunsch .knopf:focus-visible { outline-color: var(--gelb); }
.tour-hinweis { margin: 1.25rem 0 0; max-width: 72ch; }

/* Kompakte Karte (Startseite): ganze Karte ist der Link zur Tour */
.tour-karte--kompakt .tour-karte__kern { padding-bottom: 1.3rem; }
.tour-karte--kompakt h3 { font-size: 1.15rem; }
.tour-karte__link { color: inherit; text-decoration: none; }
.tour-karte__link::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.tour-karte__link:hover { text-decoration: underline; text-decoration-color: var(--gelb); text-decoration-thickness: 2px; }
.tour-karte--kompakt:focus-within { outline: 3px solid var(--anthrazit); outline-offset: 3px; }
.tour-karte__link:focus-visible { outline: none; }

/* ------------------------------------------------ Teaser auf der Startseite */
.tour-teaser__kopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.75rem; }
.tour-teaser__kopf > div { max-width: 44rem; }
.tour-teaser__kopf p { margin: 0.7rem 0 0; color: var(--ink-2); max-width: 56ch; }
.tour-teaser__link { flex: none; }
/* Tablet: eine Spalte, Bild links und Text rechts; ab 1040 px drei Karten nebeneinander */
@media (min-width: 600px) and (max-width: 1039px) {
  .tour-gitter--teaser { grid-template-columns: minmax(0, 1fr); }
  .tour-gitter--teaser .tour-karte { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .tour-gitter--teaser .tour-karte__medien { min-height: 100%; }
  .tour-gitter--teaser .bild.tour-karte__bild { aspect-ratio: auto; height: 100%; min-height: 15rem; border-width: 0 1px 0 0; }
  .tour-gitter--teaser .tour-karte__kern { justify-content: center; }
}
@media (min-width: 1040px) { .tour-gitter--teaser { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ------------------------------------------------ Inbegriffen / nicht inbegriffen */
.tour-vergleich { display: grid; gap: 1.1rem; }
@media (min-width: 800px) { .tour-vergleich { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 1.4rem; } }
.tour-vergleich > div { border-radius: 20px; padding: clamp(1.3rem, 3vw, 1.8rem); min-width: 0; }
.tour-vergleich__ja { background: var(--paper); box-shadow: 0 1px 2px rgba(27, 32, 40, 0.05); }
.tour-vergleich__nein { border: 1px dashed var(--anthrazit-hell); }
.tour-vergleich h3 { font-size: 1.15rem; }
.tour-vergleich li { font-size: 0.98rem; }
.tour-nein { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
.tour-nein li { position: relative; padding-left: 1.7rem; color: var(--ink-2); }
.tour-nein li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.tour-nein li::after { content: ""; position: absolute; left: 4.5px; top: calc(0.35em + 7.25px); width: 7px; height: 1.5px; background: var(--ink-3); }
.tour-vergleich__notiz { margin: 1.25rem 0 0; padding: 0.75rem 0.95rem; border-radius: 14px; background: var(--gelb-soft); color: var(--ink); font-size: 0.93rem; line-height: 1.5; }

/* ------------------------------------------------ Fuer wen */
.tour-fuer { display: grid; gap: 1.75rem; }
@media (min-width: 900px) { .tour-fuer { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: 3.5rem; align-items: start; } }
.tour-fuer__kopf p { margin: 0.7rem 0 0; color: var(--ink-2); max-width: 40ch; }
.tour-fuer__liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 2rem; }
@media (min-width: 640px) { .tour-fuer__liste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tour-fuer__liste li { display: flex; gap: 0.9rem; align-items: flex-start; padding: 1.15rem 0 1.25rem; border-top: 1px solid var(--line); min-width: 0; }
.tour-fuer__zeichen { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--gelb-soft); color: var(--ink); }
.tour-fuer__liste h3 { font-size: 1.08rem; line-height: 1.25; }
.tour-fuer__liste p { margin: 0.35rem 0 0; color: var(--ink-2); font-size: 0.95rem; }

/* FAQ auf Grund, damit sich die Abschnitte abwechseln */
.tour-seite .faq { background: var(--ground); }

/* ====================================================================
   Bewegung. Nur ohne Wunsch nach reduzierter Bewegung; Startzustaende
   erst mit JavaScript (html.js-geladen), damit ohne Skript alles sichtbar ist.
   ==================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* Kopf: gestaffelt einblenden, Bild einmal langsam von 1.06 auf 1 */
  .tour-auf { animation: tour-auf 560ms var(--tour-reveal) both; animation-delay: calc(var(--i, 0) * 80ms); }
  @keyframes tour-auf { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }
  .tour-held__bild.hat-bild img { animation: tour-ken 1400ms cubic-bezier(0.25, 0.6, 0.3, 1) both; transform-origin: 58% 42%; }
  @keyframes tour-ken { from { transform: scale(1.06); } to { transform: scale(1); } }

  /* Ablauf: Schritte nacheinander, die gelbe Linie fuellt sich */
  .js-geladen .tour-ablauf li { opacity: 0; transform: translate3d(0, 16px, 0); transition: opacity 480ms var(--tour-reveal), transform 480ms var(--tour-reveal); transition-delay: calc(var(--n, 0) * 110ms); }
  .js-geladen .tour-ablauf.ist-sichtbar li { opacity: 1; transform: none; }
  .js-geladen .tour-ablauf::after { transform: scaleX(0); transition: transform 1100ms var(--tour-reveal) 150ms; }
  .js-geladen .tour-ablauf.ist-sichtbar::after { transform: scaleX(1); }

  /* Karten: gestaffelt je Reihe */
  .js-geladen [data-tour-karte] { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity 520ms var(--tour-reveal), transform 520ms var(--tour-reveal), box-shadow 220ms var(--feder); transition-delay: calc(var(--n, 0) * 90ms), calc(var(--n, 0) * 90ms), 0ms; }
  .js-geladen [data-tour-karte].ist-sichtbar { opacity: 1; transform: none; }

  /* Routenlinie: zeichnet sich beim ersten Sichtbarwerden von Brugg zum Ziel, und erneut beim Zeigen/Fokus */
  .js-geladen .tour-linie__weg[style] { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
  .js-geladen .ist-gezeichnet .tour-linie__weg[style] { stroke-dashoffset: 0; transition: stroke-dashoffset 1200ms cubic-bezier(0.45, 0, 0.2, 1) 250ms; }
  .js-geladen .tour-linie__ziel { transform: scale(0); }
  .js-geladen .ist-gezeichnet .tour-linie__ziel { transform: scale(1); transition: transform 360ms var(--feder) 1350ms; }
  .ist-gezeichnet:is(:hover, :focus-within) .tour-linie__weg[style] { animation: tour-zeichnen 1000ms cubic-bezier(0.45, 0, 0.2, 1); }
  .ist-gezeichnet:is(:hover, :focus-within) .tour-linie__ziel { animation: tour-ziel 1000ms var(--feder); }
  @keyframes tour-zeichnen { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
  @keyframes tour-ziel { 0%, 80% { transform: scale(0.4); } 100% { transform: scale(1); } }
}
@media (prefers-reduced-motion: reduce) {
  .tour-karte__bild img, .tour-karte__cta svg { transition: none !important; }
  .tour-karte:hover .tour-karte__bild img, .tour-karte:focus-within .tour-karte__bild img { transform: none; }
}
