/* ============================================================
   LASTRACE – 6h Challenge
   Retro-Rennplakat: Anthrazit / Creme / Burnt Orange
   ============================================================ */

:root {
  --ink: #26231e;          /* dunkles, warmes Anthrazit (wie Logo-Hintergrund) */
  --ink-deep: #1c1a16;
  --cream: #ede4cf;        /* Creme (Logo-Schrift) */
  --cream-dim: #c9bfa8;
  --orange: #c65a2b;       /* Burnt Orange (Stoppuhr) */
  --orange-bright: #e06a33;
  --line: rgba(237, 228, 207, 0.14);

  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-body: "Barlow", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1.06rem;
  line-height: 1.65;
  overflow-x: hidden;
}

::selection { background: var(--orange); color: var(--cream); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ---------- Filmkorn ---------- */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 999;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.06'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, 1%); }
}

/* ---------- Typo-Grundlagen ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.accent { color: var(--orange-bright); }

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange-bright);
  margin-bottom: 1.1rem;
}
.section-tag.light { color: var(--ink); opacity: 0.75; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.8rem;
  border: 2px solid var(--orange);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: var(--orange);
  color: var(--cream);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}
.btn-primary:hover {
  background: var(--orange-bright);
  border-color: var(--orange-bright);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.35);
}
.btn-primary:active { transform: translate(0, 0); box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35); }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--cream); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 5rem;
  isolation: isolate;
}

.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(rgba(38, 35, 30, 0.88), rgba(38, 35, 30, 0.96) 70%, var(--ink)),
    url("images/web/rennstrecke.jpg") center 40% / cover no-repeat;
  filter: saturate(0.7) contrast(1.05);
}

.hero-inner { max-width: 60rem; }

.hero-logo {
  width: clamp(150px, 22vw, 220px);
  height: auto;
  margin: 0 auto 2.2rem;
  border-radius: 6px;
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.6);
  transform: rotate(-2deg);
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--orange-bright);
  margin-bottom: 1.4rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 8.5vw, 6.5rem);
  margin-bottom: 1.6rem;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--cream-dim);
  max-width: 42rem;
  margin: 0 auto 2.6rem;
}
.hero-sub strong { color: var(--cream); font-weight: 600; }

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Zielflaggen-Kante unten */
.hero-check {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 14px;
  background:
    repeating-conic-gradient(var(--cream) 0% 25%, var(--ink-deep) 0% 50%)
    0 0 / 28px 28px;
  opacity: 0.85;
}

/* Hero-Reveal beim Laden */
.reveal { opacity: 0; transform: translateY(24px); animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.reveal.d1 { animation-delay: 0.15s; }
.reveal.d2 { animation-delay: 0.3s; }
.reveal.d3 { animation-delay: 0.5s; }
.reveal.d4 { animation-delay: 0.7s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   LAUFBAND
   ============================================================ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink-deep);
  padding: 0.85rem 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: scroll-x 28s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
  white-space: nowrap;
}
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ============================================================
   ZAHLEN
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 68rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
  gap: 2rem;
  text-align: center;
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7vw, 5.2rem);
  color: var(--orange-bright);
  line-height: 1;
}
.stat-num sup { font-size: 0.45em; top: -0.9em; }
.stat-label {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

/* ============================================================
   MANIFEST
   ============================================================ */
.manifest {
  border-top: 1px solid var(--line);
  padding: 5.5rem 1.5rem;
  position: relative;
}
/* Mittellinie wie auf der Landstraße */
.manifest::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 0;
  border-left: 3px dashed rgba(237, 228, 207, 0.06);
}
.manifest-inner { max-width: 46rem; margin: 0 auto; position: relative; }
.manifest h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 1.8rem; }
.manifest p { margin-bottom: 1.2rem; color: var(--cream-dim); }
.manifest strong, .manifest em { color: var(--cream); }
.manifest-question {
  margin-top: 2.2rem;
  padding: 1.4rem 1.6rem;
  border-left: 4px solid var(--orange);
  background: rgba(198, 90, 43, 0.08);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--cream) !important;
}

/* ============================================================
   ABLAUF
   ============================================================ */
.steps {
  border-top: 1px solid var(--line);
  padding: 5.5rem 1.5rem 3rem;
  max-width: 72rem;
  margin: 0 auto;
}
.steps-head { text-align: center; margin-bottom: 4.5rem; }
.steps-head h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }

.steps-list { list-style: none; }

.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: center;
  margin-bottom: 5.5rem;
}
.step:nth-child(even) .step-photo { order: 2; }

.step-photo {
  position: relative;
  background: var(--cream);
  padding: 10px 10px 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.step-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tilt-l { transform: rotate(-1.6deg); }
.tilt-r { transform: rotate(1.6deg); }
.step:hover .step-photo { transform: rotate(0deg) scale(1.015); }

.step-num {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 6vw, 5rem);
  color: transparent;
  -webkit-text-stroke: 2px var(--orange);
  line-height: 1;
  display: block;
  margin-bottom: 0.4rem;
}
.step-text h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 0.9rem; }
.step-text p { color: var(--cream-dim); max-width: 30rem; }

/* ============================================================
   ANMELDUNG
   ============================================================ */
.signup {
  padding: 5rem 1.5rem 6rem;
}
.signup-card {
  max-width: 46rem;
  margin: 0 auto;
  background: var(--cream);
  color: var(--ink);
  padding: clamp(2.2rem, 5vw, 3.8rem);
  position: relative;
  box-shadow: 10px 10px 0 var(--orange), 0 25px 60px rgba(0, 0, 0, 0.5);
}
/* Zielflaggen-Band oben auf der Karte */
.signup-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 12px;
  background: repeating-conic-gradient(var(--ink) 0% 25%, var(--cream) 0% 50%) 0 0 / 24px 24px;
}
.signup-card h2 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 1.4rem;
  color: var(--ink);
}
.signup-copy { color: #4c463c; margin-bottom: 1.8rem; }

.signup-perks {
  list-style: none;
  margin-bottom: 2.2rem;
}
.signup-perks li {
  padding-left: 2rem;
  position: relative;
  margin-bottom: 0.65rem;
  font-weight: 500;
}
.signup-perks li::before {
  content: "✔";
  position: absolute; left: 0;
  color: var(--orange);
  font-weight: 700;
}

#signup-form {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
#signup-form input {
  flex: 1 1 16rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  padding: 0.95rem 1.1rem;
  border: 2px solid var(--ink);
  background: #fffdf6;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#signup-form input:focus {
  border-color: var(--orange);
  box-shadow: 3px 3px 0 rgba(198, 90, 43, 0.35);
}
#signup-form input.error { border-color: #b3261e; }

.form-note {
  margin-top: 1.1rem;
  font-size: 0.9rem;
  color: #6b6355;
}
.form-note.success { color: #2e6b34; font-weight: 600; }
.form-note.fail { color: #b3261e; font-weight: 600; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 3rem 1.5rem 3.5rem;
  background: var(--ink-deep);
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.footer-brand span { color: var(--orange-bright); }
.footer-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cream-dim);
  margin-top: 0.4rem;
}
.footer-small { margin-top: 1.6rem; font-size: 0.8rem; color: #7d7460; }
.footer-small a { color: inherit; }

/* ============================================================
   Scroll-Animationen
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

.nofx .grain, .nofx .marquee-track { animation: none; }
.nofx .hero { min-height: 0; padding: 5rem 1.5rem 6rem; }
.nofx .reveal, .nofx .fade-up { opacity: 1; transform: none; animation: none; transition: none; }
.nofx { scroll-behavior: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  .marquee-track { animation: none; }
  .reveal, .fade-up { opacity: 1; transform: none; animation: none; transition: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); padding: 3.5rem 1.5rem; }
  .step { grid-template-columns: 1fr; gap: 1.8rem; margin-bottom: 4rem; }
  .step:nth-child(even) .step-photo { order: 0; }
  .signup-card { box-shadow: 6px 6px 0 var(--orange), 0 25px 60px rgba(0, 0, 0, 0.5); }
}
