/* ============================================================
   utry.me × Open Beatz 2026 — Festival-Anmeldestrecke
   Design: Festival-Sunset in der utry.me-Sprache.
   Nunito 800/900 · #FF7700 · warmes Ink #231E1A · Pill-Buttons.
   Budget: kein Framework, keine Fotos — Himmel & Skyline sind CSS/SVG.
   ============================================================ */

/* Self-hosted Variable Fonts — same-origin, ein Handshake weniger auf Festival-Netz */
@font-face {
  font-family: Nunito;
  src: url("fonts/nunito-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC;
}

@font-face {
  font-family: Caveat;
  src: url("fonts/caveat-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC;
}

:root {
  --ink: #231e1a;
  --ink-soft: #4a4038;
  --orange: #ff7700;
  --orange-deep: #e05f00;
  --magenta: #e23b8e;
  --violet: #7b5bd6;
  --gold: #ffc24b;
  --cream: #fff6ec;
  --cream-dim: #f3e5d5;
  --night: #191d3a;
  --night-deep: #12152c;
  --sky-top: #232752;
  --day: var(--orange);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: Nunito, system-ui, -apple-system, sans-serif;
  color: var(--cream);
  background: var(--night-deep);
  min-height: 100svh;
  overflow-x: hidden;
}

/* ---------- Der Himmel ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 55% at 50% 108%, rgba(255, 119, 0, .92) 0%, rgba(255, 119, 0, 0) 62%),
    radial-gradient(150% 70% at 50% 118%, rgba(226, 59, 142, .75) 0%, rgba(226, 59, 142, 0) 70%),
    linear-gradient(180deg, var(--sky-top) 0%, #3d3470 34%, #83418f 58%, #c8437f 74%, #ef6a3d 88%, #ff8c1a 100%);
}

/* Körnung, damit der Verlauf nicht steril wirkt */
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
}

.stars {
  position: fixed;
  inset: 0 0 45% 0;
  z-index: -1;
  pointer-events: none;
}

.stars i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  opacity: .7;
  animation: twinkle 3.2s ease-in-out infinite;
}

.stars i:nth-child(2n)  { animation-delay: .9s; width: 2px; height: 2px; }
.stars i:nth-child(3n)  { animation-delay: 1.7s; }
.stars i:nth-child(5n)  { animation-delay: 2.4s; width: 4px; height: 4px; opacity: .5; }

@keyframes twinkle {
  0%, 100% { opacity: .15; transform: scale(.8); }
  50%      { opacity: .85; transform: scale(1.15); }
}

/* Heißluftballon schwebt quer über den Himmel */
.balloon {
  position: fixed;
  top: 9%;
  left: 8%;
  width: clamp(34px, 6vw, 54px);
  z-index: -1;
  animation: floaty 9s ease-in-out infinite;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .25));
}

.balloon--2 {
  left: auto;
  right: 12%;
  top: 16%;
  width: clamp(22px, 4vw, 36px);
  animation-duration: 12s;
  animation-delay: 1.5s;
  opacity: .8;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-16px) rotate(2.5deg); }
}

/* Skyline klebt am unteren Rand */
.skyline {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: -1;
  width: 100%;
  pointer-events: none;
}

.skyline svg { display: block; width: 100%; height: auto; }

/* ---------- Layout ---------- */

.wrap {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 20px 130px;
}

.topbar {
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(28px, 7vh, 64px);
}

.logo {
  font-weight: 900;
  font-size: 21px;
  letter-spacing: .4px;
  color: #fff;
  text-decoration: none;
  line-height: 1;
}

.logo b { color: var(--orange); }

.logo small {
  display: block;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 2.6px;
  color: rgba(255, 255, 255, .75);
  margin-top: 3px;
  white-space: nowrap;
}

.event-chip {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  padding: 7px 13px;
  backdrop-filter: blur(3px);
  white-space: nowrap;
}

main {
  width: 100%;
  max-width: 480px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- Typo ---------- */

.eyebrow {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

h1 {
  font-weight: 900;
  font-size: clamp(44px, 12vw, 62px);
  line-height: .98;
  letter-spacing: -1px;
  color: #fff;
  text-shadow: 0 2px 24px rgba(25, 20, 60, .35);
}

h1 .alt { color: var(--gold); }

.sub {
  margin-top: 16px;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.5;
  color: rgba(255, 250, 243, .92);
  max-width: 42ch;
}

.sub b { font-weight: 900; color: #fff; }

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

form { margin-top: 30px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

input[type="email"] {
  width: 100%;
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  background: var(--cream);
  border: 3px solid transparent;
  border-radius: 999px;
  padding: 17px 24px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 10px 30px rgba(18, 15, 45, .35);
}

input[type="email"]::placeholder { color: #a4917d; font-weight: 700; }

input[type="email"]:focus {
  border-color: var(--gold);
  box-shadow: 0 10px 34px rgba(255, 170, 40, .3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  text-decoration: none;
  font: inherit;
  font-weight: 900;
  font-size: 17.5px;
  color: #fff;
  background: var(--orange);
  border: none;
  border-radius: 999px;
  padding: 18px 26px;
  cursor: pointer;
  transition: transform .12s, background .15s, box-shadow .15s;
  box-shadow: 0 12px 30px rgba(224, 95, 0, .45);
  -webkit-tap-highlight-color: transparent;
}

.btn:hover  { background: var(--orange-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.99); }

.btn[disabled] { opacity: .65; cursor: wait; transform: none; }

.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(4px); }

.btn--ghost {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, .5);
  box-shadow: none;
  font-size: 15px;
  padding: 13px 22px;
  width: auto;
}

.btn--ghost:hover { background: rgba(255, 255, 255, .1); }

.consent {
  margin-top: 18px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.55;
  color: rgba(255, 248, 238, .8);
}

.consent a { color: var(--gold); font-weight: 800; }

.form-error {
  display: none;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 800;
  color: #ffd9c2;
  background: rgba(160, 40, 30, .55);
  border-radius: 14px;
  padding: 10px 16px;
}

.form-error.show { display: block; }

/* Handschrift-Annotation (utry.me-Detail) */
.scribble {
  position: relative;
  margin-top: 26px;
  font-family: Caveat, "Comic Sans MS", cursive;
  font-size: 21px;
  font-weight: 600;
  color: var(--gold);
  transform: rotate(-2deg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.scribble svg { flex: none; }

/* ---------- „Check dein Postfach"-State ---------- */

.mailwait { text-align: center; display: none; }

.mailwait.show { display: block; animation: rise .5s cubic-bezier(.2, .9, .3, 1.2) both; }

.envelope {
  width: 92px;
  margin: 0 auto 22px;
  animation: bob 2.6s ease-in-out infinite;
  filter: drop-shadow(0 14px 24px rgba(20, 16, 50, .45));
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

.mailwait h2 {
  font-size: clamp(34px, 9vw, 44px);
  font-weight: 900;
  line-height: 1.02;
  color: #fff;
}

.mailwait .sub { margin-inline: auto; }

.mailwait .hint {
  margin-top: 26px;
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(255, 248, 238, .75);
}

.mailwait .hint button {
  font: inherit;
  font-weight: 900;
  color: var(--gold);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 10px 8px;          /* Daumen-Tap-Target */
  margin: -6px -4px;
  -webkit-tap-highlight-color: transparent;
}

.mailwait .hint button[disabled] { opacity: .5; text-decoration: none; cursor: default; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Load-Reveal, gestaffelt */
.reveal { animation: rise .55s cubic-bezier(.2, .9, .3, 1.15) both; }
.reveal:nth-child(2) { animation-delay: .08s; }
.reveal:nth-child(3) { animation-delay: .16s; }
.reveal:nth-child(4) { animation-delay: .24s; }
.reveal:nth-child(5) { animation-delay: .32s; }

/* ---------- Festival-Pass (Bestätigungsseite) ---------- */

.pass {
  width: 100%;
  max-width: 430px;
  margin-inline: auto;
  background: var(--cream);
  color: var(--ink);
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(14, 10, 40, .55);
  overflow: hidden;
  animation: stamp .55s cubic-bezier(.2, 1.1, .3, 1.1) both;
}

@keyframes stamp {
  from { opacity: 0; transform: scale(.92) translateY(26px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.pass-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 22px;
  background: var(--ink);
  color: var(--cream);
}

.pass-head .brand { font-weight: 900; font-size: 15px; letter-spacing: .3px; }
.pass-head .brand b { color: var(--orange); }
.pass-head .x { color: rgba(255, 246, 236, .55); font-weight: 800; margin: 0 7px; }

.day-chip {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 1.8px;
  color: #fff;
  background: var(--day);
  border-radius: 999px;
  padding: 6px 13px;
  text-transform: uppercase;
}

.pass-body { padding: 30px 26px 24px; text-align: center; }

.check-ring {
  width: 104px;
  height: 104px;
  margin: 0 auto 4px;
  position: relative;
}

.check-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--day);
  opacity: 0;
  animation: pulse 2.2s ease-out .9s infinite;
}

@keyframes pulse {
  0%   { opacity: .7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.45); }
}

.check-ring svg { width: 100%; height: 100%; display: block; }

.check-ring .disc { fill: var(--day); }

.check-ring .tick {
  fill: none;
  stroke: #fff;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 78;
  stroke-dashoffset: 78;
  animation: draw .55s cubic-bezier(.4, 0, .2, 1) .35s forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

.pass-title {
  font-size: clamp(30px, 8vw, 36px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.5px;
  margin-top: 14px;
  color: var(--ink);
  text-shadow: none;
}

.pass-sub {
  margin-top: 9px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.45;
}

.claim-row {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
  border: 2.5px dashed var(--cream-dim);
  border-radius: 18px;
  padding: 14px 18px;
}

.claim-row .qty {
  font-size: 30px;
  font-weight: 900;
  color: var(--day);
  line-height: 1;
}

.claim-row .what {
  text-align: left;
  font-weight: 900;
  font-size: 16px;
  line-height: 1.2;
}

.claim-row .what small {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 3px;
}

/* ---------- Los-Ticket (Losbude) ---------- */

.los-ticket {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #fff;
  border: 2.5px dashed var(--cream-dim);
  border-radius: 18px;
  padding: 16px 18px;
}

.los-letter {
  width: 74px;
  height: 74px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 900;
  color: #fff;
  background: var(--ink-soft);
  transition: transform .15s, background .2s;
}

.los-letter.final { animation: los-pop .45s cubic-bezier(.2, 1.4, .4, 1.1); }

@keyframes los-pop {
  0% { transform: scale(.7) rotate(-6deg); }
  60% { transform: scale(1.12) rotate(2deg); }
  100% { transform: scale(1); }
}

.los-ticket[data-cat="A"] .los-letter { background: var(--orange); }
.los-ticket[data-cat="B"] .los-letter { background: var(--magenta); }
.los-ticket[data-cat="C"] .los-letter { background: var(--violet); }
.los-ticket[data-cat="D"] .los-letter {
  background: linear-gradient(135deg, var(--gold), #ff9d2e);
  box-shadow: 0 0 26px rgba(255, 194, 75, .75);
}

.los-info { text-align: left; }
.los-info b { display: block; font-size: 21px; font-weight: 900; color: var(--ink); }
.los-info small {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Live-Uhr — tickt, damit ein Screenshot sofort auffällt */
.liveline {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 800;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.livedot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #21c063;
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink { 50% { opacity: .25; } }

.liveline time { font-variant-numeric: tabular-nums; font-weight: 900; color: var(--ink); }

.staff-note {
  margin-top: 16px;
  font-size: clamp(10px, 3.1vw, 12px);
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* Perforation zwischen Pass und App-Teil */
.tear {
  position: relative;
  height: 30px;
  background:
    radial-gradient(circle at 0 50%, var(--night-deep) 11px, transparent 11.5px) left center / 22px 100% no-repeat,
    radial-gradient(circle at 100% 50%, var(--night-deep) 11px, transparent 11.5px) right center / 22px 100% no-repeat,
    var(--cream);
}

.tear::after {
  content: "";
  position: absolute;
  left: 26px; right: 26px; top: 50%;
  border-top: 2.5px dashed #d9c6b0;
}

/* ---------- App-Rampe ---------- */

.app-part { background: var(--cream); padding: 22px 26px 30px; }

.app-part .kicker {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--day);
  text-align: center;
}

.app-part h3 {
  text-align: center;
  font-size: 23px;
  font-weight: 900;
  line-height: 1.15;
  margin-top: 8px;
  color: var(--ink);
}

.app-part .why {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-top: 8px;
}

.code-box {
  margin-top: 18px;
  background: var(--ink);
  border-radius: 20px;
  padding: 18px 20px 16px;
  text-align: center;
  color: var(--cream);
}

.code-box .lbl {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: rgba(255, 246, 236, .6);
}

.code-digits {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.code-digits b {
  font-size: clamp(22px, 7.2vw, 30px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .09);
  border: 1.5px solid rgba(255, 255, 255, .16);
  border-radius: 11px;
  flex: 1 1 0;
  min-width: 0;
  max-width: 44px;
  padding: 7px 0 8px;
  line-height: 1;
}

.code-digits b:nth-child(4) { margin-left: 10px; }

.code-box .ttl {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 246, 236, .65);
}

.stores {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stores.single { grid-template-columns: 1fr; }
.stores.single .store-btn { padding: 15px 10px; font-size: 16px; }

.store-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  border-radius: 999px;
  padding: 13px 10px;
  font-weight: 900;
  font-size: 14.5px;
  transition: transform .12s, background .15s;
}

.store-btn:hover { transform: translateY(-1px); background: #38302a; }
.store-btn svg { flex: none; }

/* Magic-Login: App öffnen + sofort angemeldet (utryme://festival-login) */
.magic-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  background: linear-gradient(135deg, #ff7700, #ffb703);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 15px 12px;
  font-weight: 900;
  font-size: 15.5px;
  box-shadow: 0 6px 18px rgba(255, 119, 0, .35);
  transition: transform .12s, box-shadow .15s;
}

.magic-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(255, 119, 0, .45); }

.magic-hint {
  margin-top: 9px;
  font-size: 12.5px;
  color: var(--ink-soft, #746a62);
  text-align: center;
  line-height: 1.5;
}

.app-part .perk-note {
  margin-top: 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.55;
  background: #fff;
  border: 2.5px dashed var(--cream-dim);
  border-radius: 16px;
  padding: 12px 16px;
  text-align: center;
}

.app-part .later {
  margin-top: 14px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ---------- Fehler-Karte (Token abgelaufen) ---------- */

.err-card {
  max-width: 430px;
  margin-inline: auto;
  text-align: center;
  background: rgba(20, 16, 50, .55);
  border: 1.5px solid rgba(255, 255, 255, .18);
  border-radius: 26px;
  padding: 40px 28px;
  backdrop-filter: blur(6px);
}

.err-card h2 { font-size: 30px; font-weight: 900; color: #fff; }
.err-card p  { margin: 12px 0 24px; font-weight: 600; color: rgba(255, 248, 238, .85); line-height: 1.5; }

/* ---------- Footer ---------- */

.foot {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 22px;
  font-size: 12px;
  font-weight: 700;
}

.foot a { color: rgba(255, 255, 255, .75); text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }

/* ---------- Desktop-Feinheiten ---------- */

@media (min-width: 720px) {
  .wrap { padding-bottom: 190px; }
  h1 { font-size: 68px; }
}

/* Kleine/alte Handys (iPhone SE 667, Androids 640): kompakter, Button bleibt über dem Fold */
@media (max-height: 700px) {
  .wrap { padding-top: 16px; padding-bottom: 84px; }
  .topbar { margin-bottom: 16px; }
  .eyebrow { margin-bottom: 8px; }
  h1 { font-size: clamp(36px, 10.5vw, 52px); }
  .sub { margin-top: 10px; font-size: 15px; }
  form { margin-top: 18px; }
  input[type="email"] { padding: 14px 22px; }
  .btn { padding: 15px 24px; }
  .consent { margin-top: 12px; font-size: 11.5px; }
  .scribble { margin-top: 12px; font-size: 19px; }
  .foot { margin-top: 22px; }
}

/* Sehr schmale Geräte */
@media (max-width: 359px) {
  .code-digits { gap: 5px; }
  .code-digits b:nth-child(4) { margin-left: 6px; }
  .claim-row { gap: 9px; padding: 12px 12px; }
  .pass-body { padding: 26px 18px 22px; }
  .app-part { padding: 20px 18px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
