/* ==========================================================================
   hch-tippspiel.de – Stylesheet (Mobile First)
   CI hey contact heroes: Magenta #a3177f · Teal #1d9d9c · Orange #f49a19
   Schriften lokal: Futura Round (Headlines), Aspekta (Fließtext)
   ========================================================================== */

@font-face { font-family: 'Futura Round'; src: url('/assets/fonts/FuturaRound-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Futura Round'; src: url('/assets/fonts/FuturaRound-Demi.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Futura Round'; src: url('/assets/fonts/FuturaRound-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aspekta'; src: url('/assets/fonts/AspektaVF.woff2') format('woff2-variations'), url('/assets/fonts/AspektaVF.woff2') format('woff2'); font-weight: 100 1000; font-style: normal; font-display: swap; }

:root {
  --magenta: #a3177f;
  --magenta-dark: #7d0f60;
  --teal: #1d9d9c;
  --teal-dark: #157b7a;
  --orange: #f49a19;
  --orange-dark: #d47f05;
  --ink: #1f1a2e;
  --ink-soft: #4a4560;
  --muted: #6f6a84;
  --line: #e6e1ee;
  --bg: #fbf8fc;
  --card: #ffffff;
  --error: #c8102e;
  --success: #168a5a;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 12px 40px rgba(60, 20, 70, 0.10);
  --font-head: 'Futura Round', 'Futura', 'Avenir Next', 'Segoe UI', sans-serif;
  --font-body: 'Aspekta', 'Inter', 'Segoe UI', system-ui, sans-serif;
  --wheel-size: min(88vw, 520px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 60vw at -10% 10%, rgba(29, 157, 156, 0.16), transparent 60%),
    radial-gradient(55vw 55vw at 110% 20%, rgba(163, 23, 127, 0.14), transparent 60%),
    radial-gradient(50vw 50vw at 50% 110%, rgba(244, 154, 25, 0.16), transparent 60%);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--magenta); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--magenta-dark); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 720px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip-link:focus { top: 8px; }

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

/* ------------------------------------------------------------------ Header */
.site-header { background: rgba(255,255,255,0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; padding-top: 8px; padding-bottom: 8px; }
.site-logo img { width: 150px; height: auto; }
.site-header__tag { font-family: var(--font-head); font-weight: 600; font-size: 0.85rem; color: var(--teal-dark); background: rgba(29,157,156,0.12); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }

/* -------------------------------------------------------------------- Hero */
.hero { padding: 36px 0 8px; text-align: center; }
.hero__title {
  font-size: clamp(2.1rem, 7.5vw, 4.2rem);
  background: linear-gradient(95deg, var(--magenta) 0%, #c9268f 45%, var(--orange) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-block; padding: 0 4px 6px;
}
.hero__subtitle { font-size: clamp(1.05rem, 2.6vw, 1.35rem); color: var(--ink-soft); max-width: 640px; margin: 0 auto; font-weight: 450; }

/* -------------------------------------------------------------------- Rad */
.game { padding: 12px 0 28px; }
.game__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.game__hero { display: none; position: absolute; bottom: 60px; width: 220px; pointer-events: none; filter: drop-shadow(0 16px 24px rgba(40,10,50,0.18)); }
.game__hero--left { left: -10px; }
.game__hero--right { right: -10px; }

.wheel-stage { display: flex; flex-direction: column; align-items: center; width: 100%; }
.wheel-wrap { position: relative; width: var(--wheel-size); height: var(--wheel-size); margin: 22px auto 10px; }
.wheel {
  width: 100%; height: 100%; border-radius: 50%;
  transform: rotate(0deg); will-change: transform;
  box-shadow: 0 0 0 10px #fff, 0 0 0 13px rgba(163,23,127,0.18), 0 26px 60px rgba(60,20,70,0.28);
  cursor: pointer;
}
.wheel__svg { width: 100%; height: 100%; display: block; border-radius: 50%; }
.wheel__label { font-family: var(--font-head); font-weight: 700; font-size: 9px; fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,0.18); stroke-width: 0.6px; }
.wheel__label--blank { font-weight: 600; fill: rgba(255,255,255,0.92); }
.wheel__label--long { font-size: 7.6px; }
.wheel__dot { fill: #fff; opacity: 0.9; }
.wheel.is-spinning .wheel__dot { animation: dots 0.5s steps(2) infinite; }
@keyframes dots { 50% { opacity: 0.35; } }
.wheel__seg { transition: filter 0.3s; }
.wheel.is-done .wheel__seg:not(.is-winner) { filter: saturate(0.55) brightness(0.72); }
.wheel.is-done .wheel__seg.is-winner { filter: brightness(1.08); }
.wheel.is-done .wheel__label:not(.is-winner) { opacity: 0.55; }

.wheel-pointer {
  position: absolute; left: 50%; top: -8px; transform: translateX(-50%); z-index: 5;
  width: 0; height: 0;
  border-left: 18px solid transparent; border-right: 18px solid transparent;
  border-top: 36px solid var(--orange);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25));
}
.wheel-pointer::after {
  content: ''; position: absolute; left: -12px; top: -46px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--orange); box-shadow: inset 0 0 0 4px #fff;
}

.wheel-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6;
  width: 30%; height: 30%; min-width: 96px; min-height: 96px; border-radius: 50%;
  border: 6px solid #fff; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #c72a9c, var(--magenta) 55%, var(--magenta-dark));
  color: #fff; font-family: var(--font-head); font-weight: 700; font-size: clamp(0.9rem, 3.2vw, 1.25rem);
  text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.1;
  box-shadow: 0 10px 30px rgba(163,23,127,0.45), inset 0 -4px 0 rgba(0,0,0,0.15);
  transition: transform 0.15s, box-shadow 0.2s; padding: 6px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.wheel-center:not(:disabled):hover { transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 14px 36px rgba(163,23,127,0.55), inset 0 -4px 0 rgba(0,0,0,0.15); }
.wheel-center:not(:disabled):active { transform: translate(-50%, -50%) scale(0.97); }
.wheel-center:not(:disabled):not(.is-locked) { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 10px 30px rgba(163,23,127,0.45), 0 0 0 0 rgba(163,23,127,0.35), inset 0 -4px 0 rgba(0,0,0,0.15);} 50% { box-shadow: 0 10px 30px rgba(163,23,127,0.45), 0 0 0 18px rgba(163,23,127,0), inset 0 -4px 0 rgba(0,0,0,0.15);} }
.wheel-center.is-spinning { cursor: wait; }
.wheel-center:disabled { cursor: default; }
.wheel-center.is-locked { background: radial-gradient(circle at 35% 30%, #2bb3b2, var(--teal) 55%, var(--teal-dark)); box-shadow: 0 10px 30px rgba(29,157,156,0.45), inset 0 -4px 0 rgba(0,0,0,0.15); text-transform: none; font-size: clamp(0.85rem, 3vw, 1.15rem); }
.wheel-center__label { display: block; }

.wheel-help { margin: 10px 0 4px; text-align: center; color: var(--muted); font-size: 0.92rem; }
.wheel-note { margin: 0; text-align: center; color: var(--ink-soft); font-size: 0.95rem; max-width: 560px; }
.fineprint { margin: 6px 0 0; text-align: center; color: var(--ink-soft); font-size: 0.78rem; line-height: 1.45; max-width: 560px; opacity: 0.85; }
.fineprint sup { font-size: 0.7em; }
.fineprint--card { margin: 14px auto 0; padding-top: 12px; border-top: 1px solid var(--line); }
.shipping-note { margin: 18px auto 0; max-width: 620px; background: rgba(244,154,25,0.14); border: 1px solid rgba(244,154,25,0.55); border-radius: var(--radius-sm); padding: 14px 18px; text-align: center; color: var(--ink); }
.shipping-note__title { display: block; font-family: var(--font-head); font-weight: 700; color: #b86a00; margin-bottom: 4px; }
.shipping-note p { margin: 0; font-size: 0.95rem; line-height: 1.5; color: var(--ink-soft); }
.result__shipping { margin: 14px 0 0; padding: 12px 16px; background: rgba(244,154,25,0.14); border-radius: var(--radius-sm); color: var(--ink); font-size: 0.95rem; line-height: 1.5; }
.result__shipping[hidden] { display: none; }
.result__shipping--voucher { background: rgba(194,24,91,0.10); }
.success__shipping { margin: 0 0 14px; padding: 12px 16px; background: rgba(244,154,25,0.14); border-radius: var(--radius-sm); color: var(--ink); font-size: 0.95rem; line-height: 1.5; }
.success__shipping[hidden] { display: none; }
.form__optional { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.form__hint--address { margin-top: -6px; margin-bottom: 18px; }

/* ------------------------------------------------------------------- Cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 20px; border: 1px solid rgba(255,255,255,0.7); }
.card--center { text-align: center; font-size: 1.15rem; }
.card__title { font-size: clamp(1.5rem, 4.5vw, 2rem); color: var(--magenta); }
.card__intro { color: var(--ink-soft); margin-bottom: 1.4em; }

.is-visible { animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px);} to { opacity: 1; transform: none;} }

.result { padding: 8px 0 20px; scroll-margin-top: 84px; }
.card--result { text-align: center; padding: 30px 20px; border-top: 8px solid var(--teal); }
.card--result-prize { border-top-color: var(--orange); background: linear-gradient(180deg, #fff8ec, #fff 45%); }
.card--result-voucher { border-top-color: #c2185b; background: linear-gradient(180deg, #fdeef4, #fff 45%); }
.card--result-consolation { border-top-color: var(--magenta); background: linear-gradient(180deg, #fdf0f9, #fff 45%); }
.card--result-blank { border-top-color: var(--teal); background: linear-gradient(180deg, #edf8f8, #fff 45%); }
.result__headline { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.4rem, 5vw, 2.2rem); line-height: 1.2; color: var(--ink); margin-bottom: 0.7em; }
.result__raffle { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.1rem, 3.5vw, 1.45rem); color: var(--magenta); background: rgba(163,23,127,0.08); border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 1em; }
.result__next { color: var(--ink-soft); margin: 0; }

/* ---------------------------------------------------------------- Formular */
.participate { padding: 4px 0 28px; scroll-margin-top: 84px; }
.form__group { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.form__row { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
.form__label { display: block; font-family: var(--font-head); font-weight: 600; font-size: 0.98rem; margin-bottom: 6px; color: var(--ink); }
.req { color: var(--magenta); }
.form__input {
  width: 100%; min-height: 54px; font: inherit; font-size: 16px; /* 16px verhindert iOS-Auto-Zoom */
  padding: 12px 16px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s; -webkit-appearance: none; appearance: none;
}
.form__input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(29,157,156,0.18); }
.has-error .form__input { border-color: var(--error); }
.form__error { color: var(--error); font-size: 0.9rem; margin: 6px 0 0; min-height: 0; font-weight: 500; }
.form__error:empty { display: none; }
.form__error--global { margin: 0 0 14px; font-size: 1rem; }
.form__hint { color: var(--muted); font-size: 0.88rem; margin: 6px 0 18px; }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segmented__item { position: relative; display: block; }
.segmented__item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented__item span {
  display: flex; align-items: center; justify-content: center; min-height: 54px; border: 2px solid var(--line); border-radius: var(--radius-sm);
  font-weight: 600; cursor: pointer; background: #fff; transition: all 0.15s; user-select: none;
}
.segmented__item input:checked + span { border-color: var(--magenta); background: rgba(163,23,127,0.08); color: var(--magenta); }
.segmented__item input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.has-error .segmented__item span { border-color: var(--error); }

.form__group--check { margin-bottom: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 12px 14px; border-radius: var(--radius-sm); border: 2px solid var(--line); background: #fff; font-size: 0.95rem; line-height: 1.45; }
.check:has(input:checked) { border-color: var(--teal); background: rgba(29,157,156,0.06); }
.check input { flex: 0 0 auto; width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--magenta); cursor: pointer; }
.has-error .check { border-color: var(--error); }
.hp { position: absolute !important; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* ----------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 28px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.03em; text-transform: uppercase; text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  position: relative;
}
.btn--primary { background: linear-gradient(95deg, var(--magenta), #c72a9c); color: #fff; box-shadow: 0 10px 26px rgba(163,23,127,0.35); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(163,23,127,0.45); color: #fff; }
.btn--primary:active { transform: translateY(0); }
.btn--big { width: 100%; font-size: 1.12rem; }
.btn--ghost { background: #fff; color: var(--teal-dark); border: 2px solid var(--teal); }
.btn--ghost:hover { background: rgba(29,157,156,0.08); color: var(--teal-dark); }
.btn:disabled { opacity: 0.7; cursor: wait; transform: none; }
.btn__spinner { display: none; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ Erfolg */
.success { padding: 4px 0 30px; scroll-margin-top: 84px; }
.card--success { text-align: center; border-top: 8px solid var(--success); }
.success__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--success); color: #fff; font-size: 2.2rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; box-shadow: 0 10px 24px rgba(22,138,90,0.35); }
.success__text { font-size: 1.15rem; color: var(--ink-soft); }
.success__result { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; color: var(--orange-dark); }
.success__result:empty { display: none; }
.success__raffle { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; color: var(--magenta); background: rgba(163,23,127,0.08); border-radius: var(--radius-sm); padding: 14px 16px; }
.success__id { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }
.closed { padding: 10px 0 30px; }

/* ---------------------------------------------------------------- Konfetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.confetti i { position: absolute; top: -20px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: 0.6; } }

/* ------------------------------------------------------------------ Footer */
.site-footer { background: var(--ink); color: #d9d4e6; margin-top: 30px; padding: 40px 0 28px; }
.site-footer a { color: #fff; }
.site-footer__inner { display: grid; gap: 22px; }
.site-footer__brand img { width: 150px; margin-bottom: 14px; }
.site-footer__brand p { margin: 0; line-height: 1.7; font-size: 0.95rem; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 10px 22px; font-family: var(--font-head); font-weight: 600; }
.site-footer__copy { font-size: 0.85rem; color: #9b95b0; margin: 0; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 18px; }

/* ------------------------------------------------------------ Rechtsseiten */
.legal { padding: 30px 0 20px; }
.legal .card { padding: 28px 22px; }
.legal h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); color: var(--magenta); }
.legal h2 { font-size: 1.35rem; margin-top: 1.6em; color: var(--ink); }
.legal h3 { font-size: 1.1rem; margin-top: 1.3em; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 1.2em; }
.legal .todo { background: #fff4d6; border: 2px dashed var(--orange); border-radius: var(--radius-sm); padding: 12px 16px; color: #7a4b00; font-weight: 600; }
.legal .back { display: inline-block; margin-top: 20px; }
address { font-style: normal; }

/* ---------------------------------------------------------------- Tablets */
@media (min-width: 640px) {
  .site-logo img { width: 190px; }
  .site-header__tag { font-size: 0.95rem; }
  .form__row { grid-template-columns: 1fr 1fr; }
  .form__row--address { grid-template-columns: 1fr 2fr; }
  .card { padding: 34px 32px; }
  .card--result { padding: 36px 32px; }
  .btn--big { width: auto; min-width: 320px; }
  .site-footer__inner { grid-template-columns: 1fr auto; align-items: start; }
  .site-footer__copy { grid-column: 1 / -1; }
  :root { --wheel-size: min(70vw, 560px); }
}

/* ---------------------------------------------------------------- Desktop */
@media (min-width: 1024px) {
  body { font-size: 18px; }
  .hero { padding-top: 54px; }
  .game__hero { display: block; }
  :root { --wheel-size: 560px; }
  .game__hero { width: 200px; bottom: 90px; }
  .game__hero--left { left: auto; right: calc(50% + var(--wheel-size) / 2 + 30px); }
  .game__hero--right { right: auto; left: calc(50% + var(--wheel-size) / 2 + 30px); }
}
@media (min-width: 1300px) {
  .game__hero { width: 260px; }
}
/* Große Messe-Touchscreens */
@media (min-width: 1600px) and (min-height: 1000px) {
  :root { --wheel-size: 680px; }
  .game__hero { width: 340px; }
  body { font-size: 20px; }
}
/* Sehr kleine Smartphones (Landscape/Quer) */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --wheel-size: min(70vh, 420px); }
  .hero { padding-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wheel-center { animation: none !important; }
  .is-visible { animation: none; }
  .wheel.is-spinning .wheel__dot { animation: none; }
}
