/* vatersohn-rallye.de – eine Datei für alle Seiten, alle Pfade relativ.
   Kein Inline-Style im HTML, damit die Content-Security-Policy "style-src 'self'" gilt. */
:root {
  --sand: #F4ECE1;
  --sand-light: #FBF6EE;
  --sand-dark: #E6D9C6;
  --line: #E3D3BB;
  --ink: #1E1A16;
  --muted: #5B5047;
  --accent: #B5481D;
  --accent-dark: #8F3813;
  --accent-light: #F0A27A; /* nur auf dunklem Grund */
  --dune: #D9A066;
  --dark: #231C16;
  --night: #17110D;
  --radius: 18px;
  --shadow: 0 8px 28px rgba(35, 28, 22, .10);
  --shadow-hover: 0 16px 38px rgba(35, 28, 22, .18);
  /* Dünenkanten als Maske: oben (Dunkel steigt auf) und unten (Sand steigt auf) */
  --wave-top: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 64' preserveAspectRatio='none'%3E%3Cpath d='M0 64V34C170 0 330 0 520 28S900 62 1200 14V64Z'/%3E%3C/svg%3E");
  --wave-bottom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 64' preserveAspectRatio='none'%3E%3Cpath d='M0 64V40C240 70 460 60 660 30S1010 0 1200 38V64Z'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .38 0 0 0 0 .22 0 0 0 .10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sand) var(--grain);
  color: var(--ink);
  font: 18px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
h1, h2, h3 { font-weight: 800; line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: 0; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: #fff; }

.container { width: 100%; max-width: 72rem; margin: 0 auto; padding-inline: 1.25rem; }
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.35rem; margin-top: 2rem; }
.prose h1 + p, .prose h1 + h2 { margin-top: 1.25rem; }
.lead { font-size: 1.2rem; max-width: 60ch; }
.section { padding-block: 88px; position: relative; }
.section-tight { padding-block: 72px 40px; }
.section-flush { padding-top: 0; }
.mt { margin-top: 1.5rem; }
.mt-lg { margin-top: 2rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; color: var(--accent); font-weight: 700; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .6rem; }
.eyebrow::before { content: ""; width: 1.8rem; height: 3px; border-radius: 3px; background: currentColor; }
.on-dark .eyebrow, .hero .eyebrow { color: var(--accent-light); }
.skip { position: absolute; left: -999px; top: 0; background: #fff; color: var(--ink); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* Zwei-Spalten-Raster für den Desktop */
.split { display: grid; gap: 2rem 4rem; align-items: center; }
@media (min-width: 56rem) {
  .split { grid-template-columns: 1fr 1fr; }
  .split-wide { grid-template-columns: 5fr 7fr; }
  .split-top { align-items: start; }
}

/* Navigation */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--dark); color: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .3); }
.nav-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; min-height: 4rem; }
.logo { display: inline-flex; align-items: center; gap: .7rem; color: #fff; font-weight: 800; font-size: 1.1rem; text-decoration: none; padding: .5rem 0; }
.logo svg { width: 2.5rem; height: 2.5rem; flex: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); transition: transform .25s ease; }
.logo em { font-style: normal; font-weight: 600; color: var(--accent-light); }
.logo:hover svg { transform: rotate(-6deg) scale(1.06); }
.logo:hover { color: var(--accent-light); }
.nav-toggle { display: none; background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .6); border-radius: 10px; padding: .4rem .9rem; font: inherit; font-weight: 600; cursor: pointer; }
.nav-toggle:hover { border-color: #fff; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; width: 100%; }
.nav-links a { display: block; color: #fff; text-decoration: none; padding: .55rem 0; font-weight: 600; border-bottom: 3px solid transparent; }
.nav-links a:hover { color: var(--accent-light); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--accent-light); }
.js .nav-toggle { display: block; }
.js .nav-links { display: none; flex-direction: column; padding-bottom: 1rem; gap: 0; }
.js .nav-links.open { display: flex; }
@media (min-width: 48rem) {
  .nav-links, .js .nav-links { display: flex; flex-direction: row; width: auto; padding: 0; gap: 0 1.75rem; }
  .js .nav-toggle { display: none; }
}

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: var(--accent); color: #fff; border: 2px solid var(--accent);
  padding: .8rem 1.5rem; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none; text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.button svg { width: 1.2rem; height: 1.2rem; flex: none; }
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, .25); }
.on-dark .button, .hero .button { border-color: #fff; }
.button-ghost { background: transparent; color: #fff; border-color: #fff; }
.button-ghost:hover { background: #fff; color: var(--dark); border-color: #fff; }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* Hero */
.hero {
  position: relative; color: #fff; padding-block: 80px 130px; overflow: hidden;
  background:
    radial-gradient(circle at 80% 30%, rgba(240, 162, 122, .32), transparent 45%),
    linear-gradient(135deg, var(--dark) 0%, #3A2218 45%, #8F3813 82%, var(--accent) 125%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(244, 236, 225, .035) 0 2px, transparent 2px 26px);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 64px; background: var(--sand);
  -webkit-mask: var(--wave-bottom) center / 100% 100% no-repeat; mask: var(--wave-bottom) center / 100% 100% no-repeat;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; gap: 2rem 3rem; align-items: center; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
.hero h1 { font-size: clamp(2.3rem, 7vw, 4.2rem); font-weight: 800; letter-spacing: -.025em; max-width: 16ch; }
.hero p { font-size: 1.2rem; max-width: 38rem; color: #F4ECE1; }
.hero-art { display: block; width: 100%; max-width: 34rem; height: auto; margin-inline: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }
.page-hero { padding-block: 64px 110px; }
.page-hero h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); max-width: 20ch; }

/* Countdown */
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: 0; padding: 0; list-style: none; }
.tile { background: var(--dark); color: #fff; border-radius: var(--radius); padding: 1.1rem .25rem; text-align: center; box-shadow: var(--shadow); border-bottom: 4px solid var(--accent); }
.tile strong { display: block; font-size: clamp(1.7rem, 8vw, 3.4rem); line-height: 1.05; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.tile span { display: block; font-size: clamp(.75rem, 2.8vw, 1rem); color: var(--accent-light); font-weight: 600; }
@media (min-width: 40rem) { .countdown { gap: 1rem; } .tile { padding-block: 1.6rem; } }

/* Karten */
.grid { display: grid; gap: 1.5rem; margin-top: 2rem; }
@media (min-width: 40rem) { .grid-3, .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--sand-light); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem;
  transition: transform .2s ease, box-shadow .2s ease; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card h3 { margin-bottom: .5rem; }
.card > :last-child { margin-bottom: 0; }
.card .meta { margin-bottom: .5rem; }
.card-link { text-decoration: none; color: inherit; }
.card-link h3 { color: var(--ink); }
.card-link:hover h3 { color: var(--accent); }
.card-icon { display: inline-flex; width: 3rem; height: 3rem; align-items: center; justify-content: center; border-radius: 14px; background: var(--dark); color: var(--accent-light); margin-bottom: 1rem; }
.card-icon svg { width: 1.6rem; height: 1.6rem; }
.more { margin-top: auto; padding-top: .75rem; color: var(--accent); font-weight: 700; }
.meta { color: var(--muted); font-size: .95rem; }
.on-dark .meta { color: #D8CBBB; }

/* Dunkle Abschnitte mit Dünenkante */
.on-dark { position: relative; background: var(--dark) var(--grain); color: #F4ECE1; }
.on-dark::before, .on-dark::after { content: ""; position: absolute; left: 0; right: 0; height: 64px; pointer-events: none; }
.on-dark::before { top: -63px; background: var(--dark); -webkit-mask: var(--wave-top) center / 100% 100% no-repeat; mask: var(--wave-top) center / 100% 100% no-repeat; }
.on-dark::after { bottom: -1px; background: var(--sand); -webkit-mask: var(--wave-bottom) center / 100% 100% no-repeat; mask: var(--wave-bottom) center / 100% 100% no-repeat; }
.on-dark.last::after { display: none; }
.on-dark h2, .on-dark h3 { color: #fff; }
.on-dark a:not(.button) { color: var(--accent-light); }
.on-dark a:not(.button):hover { color: #fff; }
.on-dark .card { background: #2C231C; border-color: #3B2F25; border-top-color: var(--accent-light); color: #F4ECE1; }
.cta { display: grid; gap: 1.5rem 3rem; align-items: center; }
@media (min-width: 56rem) { .cta { grid-template-columns: 1.6fr 1fr; } .cta .button-row { justify-content: flex-end; margin-top: 0; } }

/* Zeitleiste */
.timeline { list-style: none; margin: 0; padding: 0 0 0 2rem; border-left: 3px dashed var(--dune); max-width: 36rem; }
.timeline li { position: relative; padding: 0 0 1.75rem 1rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-2rem - 10px + 1.5px); top: .35rem; width: 18px; height: 18px;
  border-radius: 50%; background: var(--accent); border: 3px solid var(--sand);
}
.timeline time, .timeline .when { display: block; font-weight: 700; color: var(--accent); }
.timeline p { margin: 0; }

/* Link-Karten (YouTube, Instagram) */
.link-cards { display: grid; gap: 1rem; }
.link-card { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border-radius: var(--radius); background: #2C231C; border: 1px solid #3B2F25; text-decoration: none; color: #fff; transition: transform .2s ease, border-color .2s ease; }
.on-dark a.link-card:not(.button) { color: #fff; }
.link-card:hover { transform: translateY(-3px); border-color: var(--accent-light); }
.link-card svg { width: 2rem; height: 2rem; flex: none; color: var(--accent-light); }
.link-card strong { display: block; font-size: 1.1rem; }
.link-card span { display: block; font-size: .95rem; color: #D8CBBB; }

/* Foto-Platzhalter */
.photo {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 16rem; padding: 1rem;
  background: repeating-linear-gradient(45deg, var(--sand-dark), var(--sand-dark) 14px, #EBDFCD 14px, #EBDFCD 28px);
  border: 2px dashed #9B8A74; border-radius: var(--radius); color: var(--muted); font-weight: 600;
}

/* Sponsoring */
.facts { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin: 2rem 0; }
.fact { background: var(--sand-light); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.fact strong { display: block; font-size: 2.3rem; line-height: 1.1; color: var(--accent); }
.checks { padding-left: 1.2rem; }
.checks li { margin-bottom: .5rem; }
.two-lists { display: grid; gap: 1rem 3rem; }
@media (min-width: 48rem) { .two-lists { grid-template-columns: 1fr 1fr; } }
.packages { display: grid; gap: 1.5rem; margin-top: 2rem; }
@media (min-width: 40rem) { .packages { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72rem) { .packages { grid-template-columns: repeat(4, 1fr); } }
.package h3 { font-size: 1.3rem; }
.price { font-size: 1.9rem; font-weight: 800; color: var(--accent); line-height: 1.15; margin-bottom: .25rem; }
.price small { display: block; font-size: .95rem; font-weight: 600; color: var(--muted); }
.package ul { padding-left: 1.2rem; margin: 1rem 0 0; }
.package li { margin-bottom: .4rem; }
.package-main { background: var(--dark); color: #F4ECE1; box-shadow: 0 0 0 4px var(--accent), var(--shadow); border-color: var(--dark); }
.package-main h3 { color: #fff; }
.package-main .price { color: var(--accent-light); }
.package-main .price small { color: #D8CBBB; }
@media (min-width: 72rem) { .package-main { transform: translateY(-12px); } .package-main:hover { transform: translateY(-16px); } }
.note { margin-top: 1.5rem; color: var(--muted); }
.on-dark .note { color: #D8CBBB; }

.bar { display: flex; height: 3rem; border-radius: 999px; overflow: hidden; margin: 2rem 0 1.25rem; box-shadow: var(--shadow); background: #fff; }
.bar span { display: block; min-width: 4px; }
.bar .c1 { flex-grow: 3200; } .bar .c2 { flex-grow: 2200; box-shadow: inset 0 0 0 2px var(--sand); } .bar .c3 { flex-grow: 3280; } .bar .c4 { flex-grow: 1000; }
.c1 { background: #B5481D; } .c2 { background: #231C16; } .c3 { background: #D9A066; } .c4 { background: #7A6A58; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.legend li { display: flex; gap: .75rem; align-items: baseline; }
.legend i { flex: none; width: 1rem; height: 1rem; border-radius: 4px; transform: translateY(2px); }
.legend .c2 { box-shadow: inset 0 0 0 2px var(--sand); }
.legend b { white-space: nowrap; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; background: var(--sand-light); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.steps li::before { content: counter(step); display: inline-flex; width: 2.2rem; height: 2.2rem; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: .75rem; }
.steps h3 { margin-bottom: .25rem; }
.steps p { margin: 0; }
.contact-card { max-width: 40rem; }
.contact-card .button { align-self: flex-start; }

/* Route */
.route-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.route-facts li { background: var(--dark); color: #fff; border-radius: var(--radius); padding: 1rem .5rem; text-align: center; border-bottom: 4px solid var(--accent); }
.route-facts strong { display: block; font-size: clamp(1.4rem, 5vw, 2.2rem); line-height: 1.1; font-weight: 800; }
.route-facts span { display: block; font-size: .9rem; color: var(--accent-light); font-weight: 600; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.rules li { display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; align-items: start; }
.rules .card-icon { margin: 0; }
.rules p { margin: 0; }
.rules strong { display: block; }
.country { display: flex; align-items: center; gap: .75rem; margin: 2rem 0 .75rem; font-size: 1.3rem; }
.country:first-child { margin-top: 0; }
.country::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.chip { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--accent); border-radius: 999px; padding: .15rem .7rem; }
.chip-es { background: #8F3813; } .chip-ma { background: #B5481D; } .chip-mr { background: #7A5A2E; } .chip-sn { background: #3F5B3A; }
.days { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.days li { display: grid; grid-template-columns: 6.2rem 1fr; gap: .25rem 1rem; align-items: baseline; padding: .85rem 1.1rem; background: var(--sand-light); border: 1px solid var(--line); border-radius: 14px; }
.days time { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.days strong { display: block; line-height: 1.3; }
.days small { display: block; color: var(--muted); font-size: .95rem; line-height: 1.4; }
.days .rest { background: var(--dark); color: #F4ECE1; border-color: var(--dark); }
.days .rest time { color: var(--accent-light); }
.days .rest small { color: #D8CBBB; }
.days .goal { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.sticky-card { align-self: start; }
@media (min-width: 56rem) { .sticky-card { position: sticky; top: 6rem; } }

/* Blog */
.post-header { padding-top: 56px; }
.post-header h1 { max-width: 20ch; }
.post-body { padding-bottom: 80px; }
.post-body p { margin-bottom: 1.2em; }
.back { display: inline-block; font-weight: 700; margin-bottom: 1.5rem; }
.card-title { font-size: 1.4rem; }
.legal { padding-bottom: 80px; }
.todo { background: #FFE7A3; color: var(--ink); padding: 0 .3em; border-radius: 4px; }

/* Footer */
.site-footer { position: relative; background: var(--dark) var(--grain); color: #D8CBBB; padding-block: 56px; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -63px; height: 64px; background: var(--dark); pointer-events: none; -webkit-mask: var(--wave-top) center / 100% 100% no-repeat; mask: var(--wave-top) center / 100% 100% no-repeat; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--accent-light); }
.footer-inner { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 48rem) { .footer-inner { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-weight: 600; }
.site-footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .card, .link-card { transition: none; }
  .button:hover, .card:hover, .link-card:hover, .package-main, .package-main:hover { transform: none; }
}
@media (max-width: 30rem) {
  .section { padding-block: 72px; }
  .days li { grid-template-columns: 1fr; }
  .rules li { grid-template-columns: 1fr; }
}
