/* ==========================================================================
   99FIRE-FILMS AWARD 2027 · VHS (Hauptseite)
   Klassen nach BEM. Zustände von außen (JS) auf <body>:
   page--exclusive (Einspieler läuft).

   Farbkonzept 2027, Schwarz und Glut:
   Band #0b0806 · Asche #f2e6d8 · Rauch #8c7f74 · Kohle #8a1a06
   Glut #ff4d00 · Flamme #ff8a00 · Funke #ffc93c
   ========================================================================== */

@font-face {
  font-family: "VT323";
  src: url("/fonts/vt323.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Anton";
  src: url("/fonts/anton.woff2") format("woff2");
  font-display: swap;
}
/* Archivo Black, Breite 125 (Expanded), OFL */
@font-face {
  font-family: "Archivo Expanded";
  src: url("/fonts/archivo-expanded-black.woff2") format("woff2");
  font-display: swap;
}
/* VCR OSD Mono (Riciery Leal, laut Autor auch kommerziell frei), Lizenzhinweis in brand/font/.
   Auf die Versalhöhe von VT323 skaliert; fehlende Zeichen wie ▶ ● „ § kommen aus VT323. */
@font-face {
  font-family: "VCR OSD Mono";
  src: url("/fonts/vcr-osd-mono.woff2") format("woff2");
  font-display: swap;
  size-adjust: 77%;
  ascent-override: 104%;
  descent-override: 26%;
}

:root {
  --band: #0b0806;
  --ash: #f2e6d8;
  --smoke: #8c7f74;
  --cinder: #8a1a06;
  --ember: #ff4d00;
  --flame: #ff8a00;
  --spark: #ffc93c;
  --osd: "VCR OSD Mono", "VT323", ui-monospace, Menlo, monospace;
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --chroma: -1.5px 0 rgba(255, 40, 60, .55), 1.5px 0 rgba(0, 210, 255, .45);
  /* Headline: Archivo Wide, auf die Breite von Anton skaliert, weich und mit Farbversatz */
  --head-font: "Archivo Expanded", var(--display);
  --head-scale: .51;
  --head-blur: 1.5px;
  --head-shift: .06em;
}

/* Basis --------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--ash); background: var(--band); }
html { overflow-x: hidden; }
a { color: inherit; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* page ------------------------------------------------------------------------ */
.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font: 24px/1.05 var(--osd);
  text-transform: uppercase;
  text-shadow: var(--chroma);
  overflow-x: clip;
}
.page :is(input, select, textarea, button) { text-transform: inherit; }
/* Zeilen, Vignette, leichtes Pumpen der Helligkeit */
.page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, .28) 2px 4px),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .7) 100%);
  animation: breathe 3.2s ease-in-out infinite;
}
.page--exclusive { cursor: pointer; }

/* tape: das abgespielte Bild ------------------------------------------------------ */
.tape {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  filter: blur(.7px) saturate(1.2) contrast(1.05);
}

/* osd: Einblendungen des Rekorders ------------------------------------------------ */
.osd {
  position: fixed;
  inset: max(16px, env(safe-area-inset-top)) 18px auto;
  z-index: 16;
  display: flex;
  justify-content: space-between;
  font: clamp(24px, 6.4vw, 34px)/1 var(--osd);
  letter-spacing: .04em;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .6), var(--chroma);
  pointer-events: none;
}
.osd__mode--blink { animation: blink 1s steps(1) infinite; }
.osd__msg {
  position: fixed;
  left: 0;
  right: 0;
  top: 50%;
  text-align: center;
  animation: blink 1.2s steps(1) infinite;
}

/* stage ----------------------------------------------------------------------- */
.stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: calc(max(16px, env(safe-area-inset-top)) + 44px) 20px max(16px, env(safe-area-inset-bottom));
  animation: zap-in .4s steps(1, end) both, wobble 7s steps(1) 2s infinite;
}
/* Zap beim Laden wie ein Kanalwechsel: kurz Schnee, dann springt das Bild an */
.page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 21;
  pointer-events: none;
  background: #111 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='3.6' intercept='-1.3'/%3E%3CfeFuncG type='linear' slope='3.6' intercept='-1.3'/%3E%3CfeFuncB type='linear' slope='3.6' intercept='-1.3'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0;
  animation: zap-snow .4s steps(1, end) both;
}
.page--exclusive .stage { visibility: hidden; }

/* cover: wie ein Kassettencover ---------------------------------------------------- */
.cover {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 0 28px;
  text-align: center;
}

.brand { display: block; margin-bottom: 14px; }
.brand__logo {
  display: block;
  width: 80px;
  height: auto;
  font-size: 60px;
  filter: blur(var(--head-blur)) drop-shadow(calc(var(--head-shift) * -1) 0 rgba(255, 40, 60, .6)) drop-shadow(var(--head-shift) 0 rgba(0, 210, 255, .5));
}
.sheet .brand { width: max-content; margin: 0 auto 14px; }

.claim,
.sheet__title {
  margin: .3em 0 .22em;
  font: calc(clamp(60px, 18.5vw, 180px) * var(--head-scale))/.92 var(--head-font);
  text-transform: uppercase;
  letter-spacing: .005em;
  color: #fff;
  text-shadow: calc(var(--head-shift) * -1) 0 2px rgba(255, 40, 60, .55), var(--head-shift) 0 2px rgba(0, 210, 255, .45);
  filter: blur(var(--head-blur));
}
.claim__line { display: block; }
.claim__accent { display: block; font-style: normal; }
.claim__yn { margin: 14px 0 0; font-size: 36px; letter-spacing: .1em; }
.claim__key {
  margin: 0 4px;
  padding: 0 8px;
  font: inherit;
  color: var(--ash);
  text-shadow: inherit;
  background: none;
  border: 2px solid var(--ash);
  border-radius: 0;
  cursor: pointer;
}
.claim__key:hover, .claim__key:focus-visible { color: var(--band); text-shadow: none; background: var(--flame); border-color: var(--flame); outline: 0; }

/* signup -------------------------------------------------------------------------- */
.signup { width: 100%; max-width: 560px; margin-top: 22px; }
.signup__lead { margin: 0 0 14px; font-size: 28px; }
.signup__form {
  display: flex;
  align-items: stretch;
  background: rgba(6, 4, 3, .72);
  border: 2px solid var(--ash);
}
.signup__form:focus-within { border-color: var(--flame); }
.signup__input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  font: 28px/1 var(--osd);
  color: var(--ash);
  text-shadow: var(--chroma);
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
}
.signup__input::placeholder { color: var(--smoke); }
.signup__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.signup__submit {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  font: 28px/1 var(--osd);
  text-transform: uppercase;
  color: var(--band);
  background: var(--flame);
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
.signup__submit:hover, .signup__submit:focus-visible { background: var(--spark); outline: 0; }
.signup__submit:disabled { cursor: wait; }
.signup__rec { color: #d40000; animation: blink 1s steps(1) infinite; }
.signup__form--busy .signup__submit-label { animation: blink .4s steps(1) infinite; }
@media (max-width: 440px) {
  .signup__form { flex-wrap: wrap; }
  .signup__submit { flex-basis: 100%; min-height: 50px; }
}
.signup__error { margin: 10px 0 0; padding: 4px 10px; color: var(--ash); background: var(--cinder); }
.signup__fine { margin: 12px auto 0; max-width: 470px; font-size: 19px; color: rgba(242, 230, 216, .82); text-shadow: 0 0 6px #000, var(--chroma); }
.signup__link { color: var(--ash); }

/* done ---------------------------------------------------------------------------- */
.done { text-align: left; }
.done__text { margin: 0; }
.done__email { font-weight: 400; color: var(--spark); overflow-wrap: anywhere; }
.done__hint { margin: 12px 0 0; font-size: 20px; color: var(--smoke); }
.done__again { padding: 0; font: inherit; color: var(--ash); text-decoration: underline; background: none; border: 0; cursor: pointer; }
.done__outbox { display: inline-block; margin-top: 12px; padding: 2px 10px; color: #000; text-shadow: none; text-decoration: none; background: #ff2bd6; }

/* sheet: Unterseiten -------------------------------------------------------------- */
.sheet { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 12px 0 32px; }
.sheet__title { margin: .5em 0 .7em; font-size: calc(clamp(54px, 15vw, 120px) * var(--head-scale)); text-align: center; }

/* legal --------------------------------------------------------------------------- */

/* heading: Zwischenüberschrift über einem Kasten ---------------------------------- */
.heading {
  margin: 1em 0 .7em;
  font: calc(64px * var(--head-scale))/.95 var(--head-font);
  text-align: center;
  text-transform: uppercase;
  color: #fff;
  text-shadow: calc(var(--head-shift) * -1) 0 2px rgba(255, 40, 60, .55), var(--head-shift) 0 2px rgba(0, 210, 255, .45);
  filter: blur(.8px);
}
.heading__line { display: block; }
.heading__accent { font-style: normal; color: var(--flame); white-space: nowrap; }
.legal__heading { margin: 0 0 6px; font: 26px/1 var(--osd); letter-spacing: .08em; text-transform: uppercase; color: var(--flame); }
.legal__text { margin: 0 0 22px; font-size: 23px; line-height: 1.12; }
.legal__link { color: var(--spark); }

/* panel: Teilnehmerbereich -------------------------------------------------------- */
.panel { margin-bottom: 34px; }
.panel__text { margin: 0 0 16px; font-size: 23px; line-height: 1.12; }
.panel__text--blink { margin: 0; animation: blink 1s steps(1) infinite; }
.panel__note { margin: 16px 0 0; font-size: 20px; line-height: 1.12; color: rgba(242, 230, 216, .72); }

.idcard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  color: var(--band);
  text-shadow: none;
  background: var(--flame);
}
.idcard__label { display: block; margin-bottom: 6px; font-size: 18px; letter-spacing: .12em; text-transform: uppercase; }
.idcard__code { display: block; font: 30px/1 var(--head-font); letter-spacing: .02em; }
.idcard__copy { padding: 6px 14px; font: 24px/1 var(--osd); text-transform: uppercase; color: var(--ash); background: var(--band); border: 0; border-radius: 0; cursor: pointer; }
.idcard__copy:hover, .idcard__copy:focus-visible { background: var(--cinder); outline: 0; }

.profile__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .profile__fields { grid-template-columns: 1fr; } }
.profile__status { margin: 12px 0 0; color: var(--spark); }

.field--full { grid-column: 1 / -1; }
.field__label { display: block; margin-bottom: 4px; font-size: 20px; color: rgba(242, 230, 216, .78); }
.field__control {
  width: 100%;
  padding: 8px 12px;
  font: 24px/1 var(--osd);
  color: var(--ash);
  text-shadow: var(--chroma);
  background: rgba(0, 0, 0, .5);
  border: 2px solid var(--smoke);
  border-radius: 0;
  outline: 0;
  appearance: none;
}
.field__control:focus { border-color: var(--flame); }
.field__control--select {
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ash) 50%), linear-gradient(-45deg, transparent 50%, var(--ash) 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
.field__control option { color: #000; text-shadow: none; }

.check { display: flex; align-items: center; gap: 10px; margin: 18px 0; font-size: 22px; cursor: pointer; }
.check__box { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--flame); }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font: 28px/1 var(--osd);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--band);
  text-shadow: none;
  background: var(--flame);
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
.cta:hover, .cta:focus-visible { background: var(--spark); outline: 0; }
.cta:disabled { cursor: wait; }
.cta__rec { color: #d40000; animation: blink 1s steps(1) infinite; }
.panel .cta { margin-bottom: 0; }

/* admin: Auswertung, nur mit Admin-Schlüssel ------------------------------------- */
.admin { position: relative; z-index: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px 40px; font-size: 20px; }
.admin__head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-bottom: 22px; }
.admin__logo { width: 48px; }
.admin__title { margin: 0; font: calc(64px * var(--head-scale))/1 var(--head-font); color: #fff; filter: blur(.6px); }
.admin__tools { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.admin__look { margin-right: 14px; }
.admin__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.admin__chip { padding: 6px 12px; font: 18px/1 var(--osd); text-transform: uppercase; color: var(--ash); text-shadow: inherit; background: #241a14; border: 0; border-radius: 0; cursor: pointer; }
.admin__chip:hover, .admin__chip:focus-visible { color: var(--band); text-shadow: none; background: var(--spark); outline: 0; }
.admin__chip[aria-pressed="true"] { color: var(--band); text-shadow: none; background: var(--flame); }

.admin__login { width: 100%; max-width: 420px; margin: auto; }
/* Vor dem Login: Logo mittig oben, Formular in der Bildschirmmitte */
.admin:has(> .admin__login:not([hidden])) { flex: 1; display: flex; flex-direction: column; }
.admin:has(> .admin__login:not([hidden])) .admin__head { justify-content: center; }
.admin__login .field__control { margin-bottom: 4px; }
.admin__error { margin: 14px 0 0; padding: 4px 10px; background: var(--cinder); }

.admin__range { margin: 0 0 12px; font-size: 18px; color: rgba(242, 230, 216, .72); }
.admin__kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 22px 20px; margin-bottom: 40px; }
.admin__kpi { display: flex; flex-direction: column; gap: 6px; }
.admin__kpi-label { font-size: 16px; letter-spacing: .1em; color: var(--flame); }
.admin__kpi-value { font: 34px/1 var(--head-font); color: #fff; }
.admin__kpi-note { font-size: 15px; color: rgba(242, 230, 216, .72); }

.admin__block { margin-bottom: 44px; }
.admin__heading { margin: 0 0 14px; font: 24px/1 var(--osd); letter-spacing: .08em; color: var(--flame); }
.admin__pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 26px; }

.admin__legend { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 16px; }
.admin__dot { display: inline-block; width: 12px; height: 12px; margin-left: 8px; }
.admin__dot:first-child { margin-left: 0; }
.admin__dot--visitors, .admin__bar--visitors { background: var(--ash); fill: rgba(242, 230, 216, .8); }
.admin__dot--signups, .admin__bar--signups { background: var(--flame); fill: var(--flame); }
.admin__svg { display: block; width: 100%; height: 160px; }
.admin__axis { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 14px; color: rgba(242, 230, 216, .72); }

.admin__scroll { overflow-x: auto; }
.admin__table { width: 100%; border-collapse: collapse; font-size: 17px; }
.admin__table th { padding: 6px 10px 8px 0; font-weight: 400; text-align: left; color: var(--flame); white-space: nowrap; border-bottom: 1px solid rgba(242, 230, 216, .25); }
.admin__table td { padding: 8px 10px 8px 0; vertical-align: top; border-bottom: 1px solid rgba(242, 230, 216, .1); }
.admin__num { text-align: right; white-space: nowrap; }
.admin__raw { overflow-wrap: anywhere; }
.admin__nowrap { white-space: nowrap; }
.admin__muted { font-style: normal; color: rgba(242, 230, 216, .55); }
.admin__empty { color: rgba(242, 230, 216, .55); }
.admin__warn { color: var(--band); background: var(--ember); padding: 0 4px; }
.admin__status { padding: 1px 6px; font-size: 15px; white-space: nowrap; text-shadow: none; }
.admin__status--ok { color: var(--band); background: var(--flame); }
.admin__status--open { color: var(--ash); background: #3a2a20; }

.admin__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.admin__search { flex: 1 1 220px; width: auto; }
.admin__count { margin: 0 0 8px; font-size: 16px; color: rgba(242, 230, 216, .72); }

.admin__builder { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.admin__link { margin: 14px 0; padding: 10px 12px; font-size: 17px; background: rgba(0, 0, 0, .5); overflow-wrap: anywhere; }
.admin__link code { font: inherit; }

/* Klar-Modus: ruhige Systemschrift zum Zahlenlesen, ohne Bandeffekte */
.look-clear .page {
  --osd: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --chroma: 0 0 transparent;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}
.look-clear .page::after { display: none; }
.look-clear .page * { text-transform: none; letter-spacing: normal; }
.look-clear .admin { font-size: 15px; }
.look-clear .admin__title,
.look-clear .admin__logo { font-size: 26px; filter: none; }
.look-clear .admin__chip { padding: 7px 12px; font-size: 14px; border-radius: 4px; }
.look-clear .admin__range,
.look-clear .admin__count,
.look-clear .admin__legend { font-size: 13px; }
.look-clear .admin__kpi-label { font-size: 13px; font-weight: 600; }
.look-clear .admin__kpi-value { font: 700 30px/1.1 var(--osd); }
.look-clear .admin__kpi-note,
.look-clear .admin__axis { font-size: 12px; }
.look-clear .admin__heading { font-size: 18px; font-weight: 700; }
.look-clear .admin__table { font-size: 14px; }
.look-clear .admin__table :is(th, td) { padding: 7px 10px; }
.look-clear .admin__table th { font-weight: 600; border-bottom-color: rgba(242, 230, 216, .15); }
.look-clear .admin__table td { border-bottom: 0; }
.look-clear .admin__table tbody tr:nth-child(even) td { background: rgba(242, 230, 216, .04); }
.look-clear .admin__status { font-size: 12px; border-radius: 3px; }
.look-clear .admin__link { font-size: 13px; border-radius: 4px; }
.look-clear .field__label { font-size: 13px; }
.look-clear .field__control { font-size: 15px; border-width: 1px; border-radius: 4px; }
.look-clear .check { font-size: 14px; }
.look-clear .cta { font-size: 15px; font-weight: 600; border-radius: 4px; }

/* foot ---------------------------------------------------------------------------- */
.foot { display: flex; justify-content: center; gap: 26px; font-size: 22px; text-shadow: 0 0 6px #000, var(--chroma); }
.foot__link { color: var(--ash); text-decoration: none; }
/* Am Handy links untereinander, rechts bleibt Platz für die Chat-Blase */
@media (max-width: 600px) { .foot { flex-direction: column; align-items: flex-start; gap: 6px; } }
.foot__link:hover, .foot__link:focus-visible { color: var(--band); text-shadow: none; background: var(--flame); outline: 0; }

/* Animationen ----------------------------------------------------------------------- */
@keyframes blink { 50% { opacity: 0; } }
@keyframes breathe { 50% { opacity: .82; } }
@keyframes zap-in {
  0%, 44% { opacity: 0; }
  45% { opacity: 1; transform: translateX(-4px); filter: brightness(1.7) contrast(1.3); }
  58% { transform: translateX(3px); filter: brightness(1.3); }
  70% { transform: none; filter: brightness(1.1); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes zap-snow {
  0% { opacity: 1; background-position: 0 0; }
  9% { background-position: -61px 37px; }
  18% { background-position: 83px -19px; }
  27% { background-position: -27px 91px; }
  36% { background-position: 47px 13px; }
  45% { opacity: .55; background-position: -97px -53px; }
  58% { opacity: .2; background-position: 19px 71px; }
  70%, 100% { opacity: 0; }
}
@keyframes wobble {
  0%, 100% { transform: none; }
  61% { transform: translateX(-3px); }
  62% { transform: translateX(2px); }
  63% { transform: none; }
  88% { transform: translateY(1px); }
  89% { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
