/* Grüzepark «Scratch & Win» – handgeschriebenes CSS, kein Build-Schritt.
   Bei jeder Änderung ?v= in resources/views/layouts/app.blade.php erhöhen. */

:root {
  /* Grüzepark-CICD: GP-Grün Light (Flächen), Gelb-Grün (Icons, Störer), GP-Grün (Logo, Akzente) */
  --sage: #4E9676;
  --lime: #CCDA55;
  --dark: #006136;
  --white: #FFFFFF;
  --ink: #1F2A24;
  --muted: #55625B;
  --mist: #F3F6F4;
  --line: #D9E2DC;
  --error: #B3261E;
  /* Systemschriften mit fetten Schnitten vor Roboto: manche Desktop-Installationen haben Roboto nur in Regular. */
  --font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.5; overflow-wrap: anywhere; } /* lange Wörter (Teilnahmebedingungen …) brechen bei grosser Schrift um statt über den Rand */
img, svg { display: block; max-width: 100%; }
a { color: var(--dark); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--dark); outline-offset: 2px; }

/* ---------- Bühne: Hero + Formular ---------- */

.stage { display: grid; grid-template-columns: minmax(0, 1fr); } /* minmax(0, …): Inhalte (z. B. Inputs bei 200 % Text) dürfen die Spalte nicht aufdrücken */

.hero {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  background: var(--sage);
  color: var(--white);
  padding: 1.25rem 1.25rem 2.25rem;
  perspective: 900px;
}
.hero :focus-visible { outline-color: var(--lime); }

.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: max(clamp(70px, 20cqi, 130px), 5.6rem); /* Platz für den Störer oben rechts; wächst mit der Schrift mit */
  max-width: 680px;
  margin: 0 auto;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero__stoerer { position: absolute; top: 0; right: 0; z-index: 2; }
.stoerer {
  display: grid;
  place-items: center;
  width: max(8.6em, min(34cqi, 190px)); /* wächst mit der Schrift, damit der Text bei 200 % im Kreis bleibt */
  aspect-ratio: 1;
  margin: 0;
  padding: 0.9rem;
  border-radius: 50%;
  background: var(--lime);
  color: var(--dark);
  font-weight: 800;
  font-size: clamp(0.82rem, 4.2cqi, 1.2rem);
  line-height: 1.12;
  text-align: center;
}

.hero__gift {
  position: relative;
  z-index: 1;
  width: clamp(96px, 32cqi, 190px);
  margin: 0 0 -0.4rem 26%;
  color: var(--lime);
}

.hero__mark { position: relative; }
.hero__title {
  margin: 0;
  font-weight: 800;
  font-size: min(19cqi, 9.5rem); /* ohne rem-Minimum: bei 200 % Textgrösse sonst breiter als der Bildschirm */
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero__line { display: block; }
.hero__popper {
  position: absolute;
  right: -2%;
  bottom: -10%;
  width: clamp(96px, 34cqi, 210px);
  color: var(--lime);
}

.hero__intro {
  max-width: 30ch;
  margin: 1.5rem 0 0;
  font-size: 1.2rem; /* ≥ 18.66px fett zählt als «grosser Text»: Weiss auf GP-Grün Light (3.5:1) genügt dann WCAG AA */
  font-weight: 700;
  line-height: 1.35;
}


.panel {
  position: relative;
  background: var(--mist);
  padding: 2rem 1.25rem 2.5rem;
}

@media (min-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100svh; }
  .hero { min-height: 100svh; padding: 2.5rem clamp(2rem, 4vw, 4rem); }
  .hero__inner { min-height: calc(100svh - 5rem); justify-content: center; padding-top: 0; }
  .panel { display: flex; align-items: center; justify-content: center; padding: 3rem clamp(2rem, 4vw, 4rem); }
  .panel > * { width: 100%; max-width: 480px; }
}

/* ---------- Formular ---------- */

.entry-form__title { margin: 0 0 0.25rem; color: var(--dark); font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.entry-form__hint { margin: 0 0 1.25rem; color: var(--muted); font-size: 0.9rem; }
.form-notice { margin: 0 0 1.25rem; padding: 0.9rem 1rem; border-radius: var(--radius); background: var(--lime); color: var(--dark); font-weight: 700; }
.form-notice:empty { display: none; }

.field-row { display: grid; gap: 0 1rem; }
@media (min-width: 420px) { .field-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

.field { margin: 0 0 1rem; }
.field label { display: block; margin-bottom: 0.3rem; font-size: 0.9rem; font-weight: 700; }
.field input:not([type="checkbox"]),
.field select {
  min-width: 0;
  width: 100%;
  height: 50px;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem; /* ≥16px, sonst zoomt iOS beim Fokus */
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23006136' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 8px;
}
.field--salutation { max-width: 220px; }
.field-row--zip { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.field input:focus-visible,
.field select:focus-visible { outline-offset: 0; border-color: var(--dark); }
.field.has-error input,
.field.has-error select { border-color: var(--error); }
.field__error, .form-error { margin: 0.3rem 0 0; color: var(--error); font-size: 0.875rem; font-weight: 600; }
.field__error:empty, .form-error:empty { display: none; }


.field--check { margin-top: 0.5rem; }
.field .check { display: flex; gap: 0.7rem; align-items: flex-start; margin: 0; font-weight: 400; font-size: 0.9rem; line-height: 1.45; }
.check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--dark); }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-error { margin: 0 0 0.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--dark);
  color: var(--white);
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:hover { background: #007a43; }
.btn:active { transform: scale(0.98); }
.btn--lime { background: var(--lime); color: var(--dark); }
.btn--lime:hover { background: #d8e27a; }
.is-sending .btn { opacity: 0.7; cursor: progress; }

/* ---------- Danke / Geschlossen ---------- */

.card {
  padding: 2.25rem 1.5rem;
  border-radius: 18px;
  background: var(--dark); /* Fliesstext in Weiss braucht 4.5:1 – auf GP-Grün Light wären es nur 3.5:1 */
  color: var(--white);
  text-align: center;
}
.card__burst { font-size: 3.25rem; line-height: 1; }
.card__title {
  margin: 0.75rem 0 1rem;
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  font-weight: 800;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.card--closed .card__title { font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1.1; }
.card p { margin: 0 auto 0.75rem; max-width: 34ch; }
.card .btn { width: auto; margin-top: 1rem; }
.card :focus-visible { outline-color: var(--lime); }
.card__title[tabindex="-1"]:focus { outline: none; } /* nur für Screenreader fokussiert, nicht bedienbar */

.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* ---------- Hauptpreis ---------- */

.prize {
  display: grid;
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}
.prize__image {
  width: 100%;
  height: auto;
  border-radius: 18px;
  background: #e3ece6;
}
.prize__kicker { margin: 0; color: var(--dark); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; }
.prize h2 { margin: 0.25rem 0 0.5rem; color: var(--dark); font-size: clamp(1.5rem, 5vw, 2.2rem); line-height: 1.15; }
.prize p { margin: 0; }
@media (min-width: 900px) {
  .prize { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 3rem; padding: 4rem 2rem; }
}

/* ---------- Fuss ---------- */

.site-footer { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; }
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
}
.site-footer__claim { margin: 0; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.95rem; line-height: 1.35; }
.site-footer__claim a { text-transform: none; letter-spacing: 0; color: var(--ink); text-decoration: none; }

.logo { color: var(--dark); font-weight: 800; font-size: clamp(2rem, 8vw, 3rem); letter-spacing: -0.03em; line-height: 1; text-decoration: none; }

.tenants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  align-items: center;
  justify-content: space-between;
  margin: 1rem 0 1.5rem;
  padding: 0;
  list-style: none;
  font-weight: 800;
  font-size: 0.95rem;
}
.tenant--decathlon { color: #3643BA; font-style: italic; }
.tenant--gino { padding: 0.15rem 0.5rem; background: #222; color: #ddd; font-weight: 400; font-size: 0.75rem; }
.tenant--jysk { padding: 0.1rem 0.4rem; background: #143C8A; color: #fff; }
.tenant--micasa { color: #0E7C7B; font-weight: 600; }
.tenant--obi { color: #B4560B; font-family: Georgia, serif; letter-spacing: 0.1em; }
.tenant--ochsner { color: #E30613; text-transform: uppercase; line-height: 1; font-size: 0.8rem; }

.site-footer__legal { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.875rem; }
.site-footer__legal a { color: var(--muted); }

/* ---------- Rechtsseiten ---------- */

.legal-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--dark);
}
.legal-header .logo { color: var(--white); font-size: 1.75rem; }
.legal-header__back { color: var(--white); font-weight: 700; text-decoration: none; }
.legal-header :focus-visible { outline-color: var(--lime); }
.legal { max-width: 720px; margin: 0 auto; padding: 2.5rem 1.25rem; }
.legal h1 { color: var(--dark); line-height: 1.15; }

/* ---------- Animationen ----------
   WCAG 2.2.2: Alles, was sich von selbst bewegt, kommt nach spätestens 5 s zur Ruhe (keine Endlosschleifen). */

/* Headline knallt beim Laden herein. */
@keyframes slam {
  0% { opacity: 0; transform: scale(2.2); }
  60% { opacity: 1; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}
.hero__line { transform-origin: left center; animation: slam 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero__line:nth-child(2) { animation-delay: 0.12s; }

@keyframes wobble {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}
.icon--gift { transform-origin: 50% 90%; animation: wobble 1.8s ease-in-out 2; }

@keyframes pulse {
  50% { transform: scale(1.07) rotate(-4deg); }
}
.stoerer { animation: pulse 2.4s ease-in-out 2; }

/* Konfetti-Tüte «knallt» alle 4 Sekunden. */
@keyframes pop {
  0%, 78%, 100% { transform: scale(1) rotate(0); }
  84% { transform: scale(1.14) rotate(-8deg); }
  90% { transform: scale(0.96) rotate(3deg); }
}
@keyframes pop-bits {
  0%, 78% { opacity: 0.2; transform: translate(-10px, 10px) scale(0.6); }
  86% { opacity: 1; transform: translate(4px, -4px) scale(1.1); }
  100% { opacity: 1; transform: translate(0, 0) scale(1); }
}
.icon--popper { transform-origin: 15% 85%; animation: pop 4s ease-in-out 1; }
.popper__bits { transform-box: fill-box; transform-origin: 0 100%; animation: pop-bits 4s ease-out 1 both; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.is-shaking { animation: shake 0.4s ease-in-out; }

@keyframes card-in {
  0% { opacity: 0; transform: scale(0.9) translateY(12px); }
  100% { opacity: 1; transform: none; }
}
.card--thanks:not([hidden]) { animation: card-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

/* Scroll-Reveals erst, wenn site.js läuft (setzt .reveal-ready) – ohne JS oder bei Ladefehler bleibt alles sichtbar. */
.reveal-ready .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-ready .reveal.is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal-ready .reveal { opacity: 1; transform: none; }
}
