/* Section styles: form (#prijava): waitlist preview form (never sends anything).
   Unlayered, so it overrides css/base.css. Every selector is scoped under [data-section="form"].
   The gold-smoke loop sits in a viewport-tall sticky layer behind the section (so the video is never stretched
   over a tall phone section), under a shade that keeps the display type readable; all reading text is on plates. */

[data-section="form"] {
  --sg-gold-line: rgba(201, 165, 90, .34);
  display: grid; align-items: center; min-height: max(100svh, 640px);
}
@media (orientation: landscape) and (max-height: 560px) { [data-section="form"] { min-height: 100svh; } }

/* ---------------------------------------------------------------- background: loop, shade, glow */
[data-section="form"] .signup__bg { overflow: clip; }
[data-section="form"] .signup__sticky {
  position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; isolation: isolate;
}
[data-section="form"] .signup__loop { position: absolute; inset: 0; transform-origin: 50% 60%; }
[data-section="form"] .signup__loop .loop__poster,
[data-section="form"] .signup__loop > .loop__video { object-position: 50% 55%; }
[data-section="form"] .signup__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 50%, rgba(5, 5, 5, .5) 0%, rgba(5, 5, 5, .72) 60%, rgba(5, 5, 5, .9) 100%),
    linear-gradient(180deg, rgba(5, 5, 5, .5) 0%, rgba(5, 5, 5, 0) 40%);
}
@media (min-width: 1024px) and (orientation: landscape) {
  [data-section="form"] .signup__shade {
    background:
      linear-gradient(90deg, rgba(5, 5, 5, .9) 0%, rgba(5, 5, 5, .74) 30%, rgba(5, 5, 5, .42) 58%, rgba(5, 5, 5, .55) 100%),
      linear-gradient(180deg, rgba(5, 5, 5, .45) 0%, rgba(5, 5, 5, 0) 30%, rgba(5, 5, 5, 0) 70%, rgba(5, 5, 5, .55) 100%);
  }
}
/* pointer/tap heat on the smoke: a warm light pool, screen-blended (colour-dodge bands into a visible ring in some engines) */
[data-section="form"] .signup__glow {
  position: absolute; left: 0; top: 0; width: 70vmax; height: 70vmax; margin: -35vmax 0 0 -35vmax;
  background: radial-gradient(closest-side, rgba(255, 178, 92, .42) 0%, rgba(214, 140, 60, .2) 38%, rgba(201, 130, 60, .06) 68%, rgba(201, 130, 60, 0) 100%);
  mix-blend-mode: screen; pointer-events: none; opacity: 0;
  transform: translate3d(var(--gx, 50vw), var(--gy, 50vh), 0);
  transition: opacity 1.2s var(--ease-out);
  will-change: transform;
}
[data-section="form"].is-warm .signup__glow { opacity: 1; }
/* section edges melt into the neighbours */
[data-section="form"] .signup__bg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, var(--void) 0, rgba(5, 5, 5, 0) clamp(80px, 14vh, 180px)),
    linear-gradient(0deg, var(--void) 0, rgba(5, 5, 5, 0) clamp(60px, 10vh, 140px));
}

/* ---------------------------------------------------------------- layout + heading */
[data-section="form"] .signup__layout { align-items: center; }
@media (min-width: 1024px) {
  [data-section="form"] .signup__layout { grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); }
}
[data-section="form"] .signup__head { margin-bottom: 0; }
[data-section="form"] .signup__title { text-shadow: 0 2px 40px rgba(0, 0, 0, .55); }
[data-section="form"] .signup__gold { color: var(--gold); }
[data-section="form"] .signup__line { margin-top: clamp(4px, 1vw, 12px); border-color: var(--line-2); }

/* ---------------------------------------------------------------- the form plate */
[data-section="form"] .signup__form {
  position: relative; display: grid; gap: 18px;
  padding: clamp(22px, 3vw, 44px);
  background: rgba(11, 11, 12, .95);
  border: 1px solid var(--sg-gold-line);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .95), 0 0 90px -30px rgba(201, 165, 90, .28);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  [data-section="form"] .signup__form { background: rgba(11, 11, 12, .9); -webkit-backdrop-filter: blur(18px) saturate(1.15); backdrop-filter: blur(18px) saturate(1.15); }
}
[data-section="form"] .signup__corners { position: absolute; inset: -1px; pointer-events: none; }
[data-section="form"] .signup__corners > i { position: absolute; width: 18px; height: 18px; border: 0 solid var(--gold); }
[data-section="form"] .signup__corners > i:nth-child(1) { left: 0; top: 0; border-left-width: 2px; border-top-width: 2px; }
[data-section="form"] .signup__corners > i:nth-child(2) { right: 0; top: 0; border-right-width: 2px; border-top-width: 2px; }
[data-section="form"] .signup__corners > i:nth-child(3) { left: 0; bottom: 0; border-left-width: 2px; border-bottom-width: 2px; }
[data-section="form"] .signup__corners > i:nth-child(4) { right: 0; bottom: 0; border-right-width: 2px; border-bottom-width: 2px; }

[data-section="form"] .signup__fields { display: grid; gap: 22px; }
[data-section="form"] .signup__fields[hidden] { display: none !important; }

/* ---------------------------------------------------------------- segmented control (real radios) */
[data-section="form"] .signup__seg { min-width: 0; margin: 0; padding: 0; border: 0; }
[data-section="form"] .seg__legend { padding: 0; }
/* enhanced: one track, a sliding pill (form.js) behind the checked label */
[data-section="form"] .seg.is-enhanced .seg__opts {
  position: relative; gap: 4px; padding: 4px;
  background: var(--void); border: 1px solid var(--line-2); border-radius: var(--radius);
}
[data-section="form"] .seg.is-enhanced .seg__opt > span {
  position: relative; z-index: 1; background: transparent; border-color: transparent; color: #d4cec4;
  transition: color .35s var(--ease-out), background-color .25s;
}
[data-section="form"] .seg.is-enhanced .seg__opt > input:checked + span { background: transparent; color: var(--white); }
[data-section="form"] .seg.is-enhanced .seg__opt > input:focus-visible + span { outline-offset: -4px; }
[data-section="form"] .seg__pill {
  position: absolute; left: 0; top: 0; z-index: 0; width: 0; height: 0; border-radius: 2px; pointer-events: none;
  background: linear-gradient(180deg, #e3302a 0%, var(--blood) 55%, #b81616 100%);
  box-shadow: 0 10px 28px -10px rgba(217, 28, 28, .85), inset 0 1px 0 rgba(255, 255, 255, .22);
}
[data-section="form"] .seg__pill::after {
  content: ""; position: absolute; inset: -4px; border-radius: 4px; border: 1px solid var(--gold); opacity: 0;
}
[data-section="form"] .seg__pill.is-flash::after { animation: sg-flash 1.1s var(--ease-out) 1; }
@keyframes sg-flash { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.08, 1.3); } }
@media (hover: hover) and (pointer: fine) {
  [data-section="form"] .seg.is-enhanced .seg__opt > input:not(:checked) + span:hover { color: var(--white); background: rgba(237, 232, 223, .05); }
}
[data-section="form"] .seg.is-enhanced .seg__opt > input:not(:checked):active + span { background: rgba(237, 232, 223, .07); }

/* ---------------------------------------------------------------- email */
[data-section="form"] .signup__input { position: relative; }
[data-section="form"] .signup__input > .field__input { padding-right: 52px; transition: border-color .3s; }
[data-section="form"] .signup__underline {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, var(--gold), var(--blood-hot));
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--ease-out);
}
[data-section="form"] .signup__input > .field__input:focus + .signup__underline { transform: scaleX(1); }
[data-section="form"] .signup__input > .field__input[aria-invalid="true"] + .signup__underline { transform: scaleX(1); background: var(--blood-hot); }
[data-section="form"] .signup__ok {
  position: absolute; right: 16px; top: 50%; display: grid; place-items: center; width: 24px; height: 24px; margin-top: -12px;
  border-radius: var(--radius); background: var(--gold); color: var(--void); pointer-events: none;
  opacity: 0; transform: scale(.4); transition: opacity .3s var(--ease-out), transform .45s var(--ease-out);
}
[data-section="form"] .signup__ok svg { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
[data-section="form"] .signup__field.is-valid .signup__ok { opacity: 1; transform: none; }
[data-section="form"] .field__error { display: flex; gap: 8px; align-items: flex-start; margin: 0; color: #ff8a80; font-size: 15px; line-height: 1.45; }
[data-section="form"] .field__error:not(:empty)::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: .45em; background: var(--blood-hot); }
[data-section="form"] .field__error:empty { display: none; }

/* ---------------------------------------------------------------- opt-in checkbox (native input kept, drawn box) */
[data-section="form"] .signup__optin { display: grid; gap: 4px; }
[data-section="form"] .signup__check { position: relative; align-items: center; gap: 14px; min-height: 48px; padding: 6px 0; font-size: 16px; }
[data-section="form"] .signup__check > input {
  position: absolute; left: -10px; top: 50%; z-index: 1; width: 44px; height: 44px; margin: -22px 0 0; flex: none; opacity: 0; cursor: pointer;
}
[data-section="form"] .signup__box {
  flex: 0 0 24px; display: grid; place-items: center; width: 24px; height: 24px;
  border: 1.5px solid rgba(237, 232, 223, .55); border-radius: var(--radius); background: var(--void); color: var(--white);
  transition: background-color .25s, border-color .25s, transform .25s var(--ease-out);
}
[data-section="form"] .signup__box svg { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
[data-section="form"] .signup__box path { stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .35s var(--ease-out) .05s; }
[data-section="form"] .signup__check > input:checked + .signup__box { background: var(--blood); border-color: var(--blood); }
[data-section="form"] .signup__check > input:checked + .signup__box path { stroke-dashoffset: 0; }
[data-section="form"] .signup__check > input:focus-visible + .signup__box { outline: 2px solid var(--bone); outline-offset: 3px; }
[data-section="form"] .signup__check > input[aria-invalid="true"] + .signup__box { border-color: var(--blood-hot); }
[data-section="form"] .signup__check:active .signup__box { transform: scale(.9); }
@media (hover: hover) and (pointer: fine) {
  [data-section="form"] .signup__check:hover .signup__box { border-color: var(--bone); }
}

/* ---------------------------------------------------------------- submit: a light sweep across on hover / press */
[data-section="form"] .signup__submit { position: relative; overflow: hidden; isolation: isolate; min-height: 56px; }
[data-section="form"] .signup__submit::after {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 0; width: 45%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .22) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-120%) skewX(-18deg); pointer-events: none;
}
[data-section="form"] .signup__submit > span[aria-hidden] { transition: transform .4s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  [data-section="form"] .signup__submit:hover::after { transform: translateX(260%) skewX(-18deg); transition: transform .8s var(--ease-out); }
  [data-section="form"] .signup__submit:hover > span[aria-hidden] { transform: translateX(5px); }
}
[data-section="form"] .signup__submit.is-busy::after { transform: translateX(260%) skewX(-18deg); transition: transform .5s var(--ease-in-out); }

[data-section="form"] .signup__note { margin: 0; max-width: none; color: var(--mute); }
[data-section="form"] .signup__form.is-preview .signup__note { color: var(--gold); }

/* ---------------------------------------------------------------- preview ticket (built by form.js) */
[data-section="form"] .signup__status:empty { display: none; }
[data-section="form"] .ticket {
  position: relative; display: grid; gap: 0; background: var(--ink-2); border: 1px solid var(--sg-gold-line); border-radius: var(--radius);
}
[data-section="form"] .ticket:focus { outline: none; }
[data-section="form"] .ticket:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; }
[data-section="form"] .ticket__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px clamp(18px, 2.4vw, 28px); }
[data-section="form"] .ticket__head .label { margin: 0; }
[data-section="form"] .ticket__stamp {
  flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius);
  background: var(--gold); color: var(--void);
}
[data-section="form"] .ticket__stamp svg { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
/* perforation with punched holes */
[data-section="form"] .ticket__perf { position: relative; height: 0; border-top: 2px dashed rgba(201, 165, 90, .35); margin-inline: 14px; }
[data-section="form"] .ticket__perf::before, [data-section="form"] .ticket__perf::after {
  content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); border: 1px solid var(--sg-gold-line);
}
[data-section="form"] .ticket__perf::before { left: -26px; clip-path: inset(0 0 0 50%); }
[data-section="form"] .ticket__perf::after { right: -26px; clip-path: inset(0 50% 0 0); }
[data-section="form"] .ticket__rows { display: grid; gap: 16px; margin: 0; padding: 20px clamp(18px, 2.4vw, 28px) 4px; }
[data-section="form"] .ticket__row { display: grid; gap: 4px; min-width: 0; }
[data-section="form"] .ticket__row > dt {
  font-family: var(--f-mono); font-weight: 500; font-size: var(--fs-label); letter-spacing: .12em; text-transform: uppercase; color: var(--mute);
}
[data-section="form"] .ticket__row > dd { margin: 0; min-width: 0; }
[data-section="form"] .ticket__program {
  font-family: var(--f-display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em;
  font-size: clamp(30px, 3.4vw, 46px); line-height: 1.12; color: var(--white);
}
[data-section="form"] .ticket__email { font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--bone); overflow-wrap: anywhere; }
[data-section="form"] .ticket__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px clamp(18px, 2.4vw, 28px) 20px; }
[data-section="form"] .ticket__status { margin: 0; font-size: 15px; line-height: 1.5; color: #d9d4cb; }
[data-section="form"] .ticket__edit { gap: 10px; }

/* touch devices and the low tier: no live blur over the playing video (the plate is near-opaque anyway) */
[data-pointer="coarse"] [data-section="form"] .signup__form,
[data-tier="low"] [data-section="form"] .signup__form { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(11, 11, 12, .95); }
