/* PowerSpot – Landingpage
   Gestaltungsidee: Das Schild über der Steckdose. Gelb auf Graphit wie die
   Wegweiser im Terminal, eine gut lesbare Schrift für müde Augen bei
   schlechtem Licht, große Ziffern für die Restzeit wie auf der Abflugtafel. */

@font-face {
  font-family: "Atkinson Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --graphite: #262b31;   /* Schildgrund */
  --graphite-2: #353b43;
  --sign: #ffc93c;       /* Wegweiser-Gelb */
  --concrete: #eef0ee;   /* Terminalboden */
  --ink: #1b1f23;
  --muted: #5f6770;
  --line: #cfd4d2;
  --live: #1f9d57;       /* Strom an */
  --alert: #c8402f;
  --radius-s: 6px;
  --radius-m: 12px;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-4: clamp(3.25rem, 17vw, 5.5rem);
  --space: clamp(1.1rem, 4vw, 1.6rem);
  font-family: "Atkinson Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--concrete);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; font-size: var(--step-0); line-height: 1.5; }
h1, h2 { line-height: 1.15; margin: 0 0 .5rem; font-weight: 750; letter-spacing: -.01em; }
h1 { font-size: var(--step-2); }
h2 { font-size: var(--step-1); }
p { margin: 0 0 1rem; max-width: 34em; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 9; background: var(--sign); padding: .5rem 1rem; }
:focus-visible { outline: 3px solid var(--sign); outline-offset: 3px; }
.main :focus-visible { outline-color: var(--ink); }

/* ---------- Das Schild ---------- */
.plate {
  background: var(--graphite);
  color: #fff;
  padding: max(env(safe-area-inset-top), 1rem) var(--space) 1.25rem;
  border-bottom: 6px solid var(--sign);
}
.plate__inner, .plate__board, .main, .foot { width: 100%; max-width: 34rem; margin-inline: auto; }
.plate__inner { display: flex; align-items: center; gap: 1rem; }
.plate__icon { width: 3.25rem; height: 3.25rem; flex: none; color: var(--sign); }
.plate__kicker { margin: 0; color: #c9ced3; font-size: var(--step--1); }
.plate__code {
  margin: 0;
  font-size: clamp(2.2rem, 11vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: .02em;
  color: var(--sign);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.plate[data-state="mine"] .plate__icon { color: var(--live); }

.plate__board { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--graphite-2); }
.board__time {
  margin: 0;
  font-size: var(--step-4);
  font-weight: 700;
  line-height: .95;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.board__sub { margin: .4rem 0 .8rem; color: #c9ced3; }
.board__bar { height: 6px; background: var(--graphite-2); border-radius: 3px; overflow: hidden; }
.board__bar span { display: block; height: 100%; width: 100%; background: var(--sign); transform-origin: left; transition: transform 1s linear; }
.plate[data-warn="1"] .board__bar span { background: #ff8a5c; }

/* ---------- Inhalt ---------- */
.main { flex: 1; padding: 1.6rem var(--space) 2rem; }
.view[hidden] { display: none; }
.lead { color: var(--muted); }
.muted { color: var(--muted); }

.packages { border: 0; padding: 0; margin: 1.25rem 0 .5rem; display: grid; gap: .6rem; }
.pkg {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .9rem;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius-m);
  cursor: pointer;
  min-height: 4.25rem;
}
.pkg input { position: absolute; opacity: 0; pointer-events: none; }
.pkg__dot { width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; }
.pkg__time { font-size: var(--step-1); font-weight: 700; font-variant-numeric: tabular-nums; }
.pkg__save { display: block; font-size: var(--step--1); color: var(--live); font-weight: 600; }
.pkg__price { font-size: var(--step-1); font-weight: 750; font-variant-numeric: tabular-nums; }
.pkg:has(input:checked) { border-color: var(--graphite); box-shadow: inset 6px 0 0 var(--sign); }
.pkg:has(input:checked) .pkg__dot { border-color: var(--graphite); background: radial-gradient(circle, var(--graphite) 0 45%, transparent 50%); }
.pkg:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }

.price-note { font-size: var(--step--1); color: var(--muted); }

.pay { margin-top: 1.5rem; }
#paypalButtons { min-height: 3rem; }
.fineprint { font-size: var(--step--1); color: var(--muted); margin-top: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.1rem; padding: .7rem 1.3rem;
  font: inherit; font-weight: 700; text-decoration: none;
  color: var(--ink); background: #fff;
  border: 2px solid var(--graphite); border-radius: var(--radius-s);
  cursor: pointer;
}
.btn--primary { background: var(--graphite); color: #fff; }
.btn--primary:hover { background: #111418; }
.btn--wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { display: inline-block; margin-top: 1rem; background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0; }

.hint { color: var(--alert); font-weight: 600; min-height: 1.5em; margin: .6rem 0 0; }
.warn { background: #fff4d6; border-left: 6px solid var(--sign); padding: .8rem 1rem; border-radius: var(--radius-s); }

.enter label { display: block; font-weight: 700; margin: 1.25rem 0 .4rem; }
.enter__row { display: flex; gap: .6rem; }
.enter input {
  flex: 1; min-width: 0; min-height: 3.1rem; padding: .6rem .9rem;
  font: inherit; font-size: var(--step-1); font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border: 2px solid var(--graphite); border-radius: var(--radius-s); background: #fff;
}

/* ---------- Bonus ---------- */
.bonus { border: 0; padding: 0; border-radius: var(--radius-m); width: min(32rem, calc(100% - 2rem)); }
.bonus::backdrop { background: rgb(20 23 27 / .7); }
.bonus__inner { padding: 1.4rem; }
.bonus__media { aspect-ratio: 16 / 9; background: var(--graphite); color: #c9ced3; border-radius: var(--radius-s); display: grid; place-items: center; text-align: center; padding: 1rem; overflow: hidden; }
.bonus__media video { width: 100%; height: 100%; object-fit: cover; }
.bonus__count { margin: .8rem 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Fuß ---------- */
.foot { padding: 1rem var(--space) max(env(safe-area-inset-bottom), 1.25rem); font-size: var(--step--1); color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.testmode { margin-top: .75rem; color: var(--alert); }

@media (prefers-reduced-motion: reduce) {
  .board__bar span { transition: none; }
}

/* Korrekturen */
[hidden] { display: none !important; }
.hint:empty { min-height: 0; margin: 0; }
#paypalButtons:empty { min-height: 0; }
