@import url('/css/fonts-bebas.css');
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Archivo:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ── Keyboard focus — branded orange ring across interactive elements.
   :focus-visible so only keyboard navigation shows it; inputs keep their
   own border-color focus treatment. Platform-wide for consistency. ── */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
[role="link"]:focus-visible,
[role="tab"]:focus-visible {
  outline: 2px solid var(--primary, #58A0D8);
  outline-offset: 2px;
}

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

:root {
  /* Aligned with the kinetic design system used everywhere else.
     Teal palette retired — primary + accent both resolve to the
     EntryLane orange so registration pages stop looking like a different
     product than the marketing site / admin / awards screens. */
  --primary: #58A0D8;
  /* Ink on accent fills — matches the admin console's --on-accent. */
  --on-primary: #0D0D12;
  /* Accent as text on light surfaces — the admin console's --accent-ink. */
  --primary-ink: #1F6BA5;
  /* Deep orange for orange TEXT on light surfaces — #58A0D8 is only 2.71:1
     on white; #3F86C2 clears WCAG AA (≥4.5:1) for body/data text in sun. */
  --primary-deep: #3F86C2;
  --primary-dim: rgba(88, 160, 216, 0.15);
  --primary-border: rgba(88, 160, 216, 0.30);
  --bg: #0a0a18;
  --bg-card: rgba(16, 16, 36, 0.85);
  --text-primary: #ffffff;
  --text-secondary: #9090a8;
  --accent: #58A0D8;
  --error: #BA1A1A;
  --success: #10B981;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Archivo', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  /* Flex column pins the footer to the bottom of the viewport on
     short pages so no white gap shows below it. */
  display: flex;
  flex-direction: column;
}
body > .kfooter { margin-top: auto; }

/* ─── BACKGROUND ─────────────────────────────────────── */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(88, 160, 216, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 160, 216, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

.glow-orb {
  position: fixed;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(88, 160, 216, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
  animation: orbPulse 6s ease-in-out infinite;
}

@keyframes orbPulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

/* ─── HEADER / LOGO ──────────────────────────────────── */
.site-header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--sp-48) var(--sp-32) var(--sp-24);
  background: linear-gradient(to bottom, rgba(88, 160, 216,0.08) 0%, transparent 100%);
  border-bottom: 1px solid var(--primary-border);
}

/* Sign-in entry point in the upper-right corner. /admin already
   role-detects on submit (judges get redirected to /judge), so this
   one link covers both staff use cases. */
/* Ghost button per the admin spec: Archivo 600 sentence case, derived
   accent ink (raw #58A0D8 is 2.7:1 on the light surface). */
.site-signin {
  position: absolute;
  top: 1.1rem;
  right: 1.25rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--primary-ink, #1F6BA5);
  text-decoration: none;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--primary-border);
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  background: transparent;
}
.site-signin:hover {
  background: var(--primary-dim);
  border-color: var(--primary);
}
@media (max-width: 640px) {
  .site-signin { top: 0.75rem; right: 0.75rem; padding: 0.35rem 0.7rem; font-size: 0.7rem; }
}

.logo-wrap {
  display: inline-block;
}

.site-logo {
  max-width: min(680px, 90vw);
  width: 100%;
  height: auto;
  display: block;
  /* blend away any non-transparent PNG background on dark backdrop */
  mix-blend-mode: screen;
}

/* ─── COUNTDOWN ──────────────────────────────────────── */
.countdown-section {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.75rem 1rem;
}

.countdown-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--primary-deep);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.countdown-grid {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  justify-content: center;
  max-width: 100%;
}

.countdown-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid #E4E4E7;
  border-radius: 0;
  padding: 0.6rem 0.75rem;
  min-width: 0;
  flex: 1 1 auto;
  box-shadow: 0 6px 0 rgba(0,0,0,0.07);
}

.countdown-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--primary-deep);
  line-height: 1;
  letter-spacing: -0.02em;
}

.countdown-unit {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(0.45rem, 1.2vw, 0.55rem);
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 0.3rem;
  white-space: nowrap;
}

.countdown-sep {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--primary-border);
  line-height: 1;
  padding-bottom: 0.9rem;
  flex-shrink: 0;
}

.countdown-date {
  margin-top: 1.25rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* ─── EVENT HERO INFO ────────────────────────────────── */
.event-info {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--sp-32) var(--sp-32) var(--sp-48);
}

.event-info-inner {
  display: inline-block;
}

/* Show name hero: kinetic .h-hero ramp (Archivo Black uppercase, ≤6rem ceiling),
   no glow — stamped, not soft. */
.event-title {
  font-family: 'Archivo Black', 'Archivo', system-ui, sans-serif;
  font-size: clamp(2.4rem, 8vw, 5.5rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.95;
  text-transform: uppercase;
}

/* Accent word on the light surface: Burnt Deep (4.1:1 large text), not the
   raw accent (2.7:1). */
.event-title span { color: var(--primary-deep); }

.event-subtitle {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(0.75rem, 2vw, 0.95rem);
  letter-spacing: 0.3em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 0.75rem;
}

.event-fee {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--primary-deep);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.1em;
}

/* ─── CONTACT BANNER ─────────────────────────────────── */
.contact-banner {
  position: relative;
  z-index: 1;
  margin: 0 1.5rem 2.5rem;
}

.contact-banner-inner {
  max-width: var(--shell-content, 760px);
  margin: 0 auto;
  background: rgba(88, 160, 216, 0.07);
  border: 1px solid var(--primary-border);
  border-radius: 0;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.contact-banner-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: var(--primary-deep);
  white-space: nowrap;
}

.contact-banner-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.contact-link:hover { color: var(--primary-deep); }

.contact-icon {
  font-size: 1rem;
  color: var(--primary-deep);
}

.contact-divider {
  color: var(--primary-border);
  font-size: 1.2rem;
}

/* ─── FORM SECTION ───────────────────────────────────── */
.form-section {
  position: relative;
  z-index: 1;
  padding: 0 var(--sp-24) var(--sp-64);
}

.form-container {
  max-width: var(--shell-content, 760px);
  margin: 0 auto;
}

/* Form message (errors / success) */
.form-message {
  border-radius: 0;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.form-message.error {
  color: #BA1A1A;
  background: #FFDAD6;
  border: 1px solid #BA1A1A;
}

.form-message.success {
  background: rgba(88, 160, 216, 0.1);
  border: 1px solid var(--primary-border);
  color: var(--primary);
}

.hidden { display: none !important; }

/* Wordmark (ENTRY + LANE spans): Archivo Black. */
.kw-entry, .kw-lane { font-family: 'Bebas Neue', 'Archivo Black', 'Archivo', sans-serif; }
.kw-lane { color: #58A0D8 !important; } /* brand blue, never the show accent */
.kw-lane::after { content: "."; }   /* ENTRYLANE. — blue period */

/* ─── FIELDSET / FORM GROUPS ─────────────────────────── */
/* Same card vocabulary as every other surface: hairline border, solid
   3px accent top rail (no gradient), stamped rest shadow. */
.form-group {
  border: 1px solid #E4E4E7;
  border-top: 3px solid var(--primary);
  border-radius: 0;
  padding: 2rem;
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  position: relative;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

/* Section legend: Archivo label voice with a mono step numeral as the anchor. */
.group-legend {
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.5rem;
  margin-bottom: 1.5rem;
}

.group-number {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-deep);
  background: var(--primary-dim);
  border: 1px solid var(--primary-border);
  border-radius: 0;
  padding: 0.2rem 0.5rem;
  letter-spacing: 0.05em;
}

/* ─── FIELD GRID ─────────────────────────────────────── */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field--full { grid-column: 1 / -1; }
.field--sm { max-width: 100%; }
/* Two-column form aesthetic: col-left items keep the default left
   anchor; col-right items flip their label text + field-error to the
   right edge so the form reads symmetrically across the divide. The
   input itself stays left-to-right for readability while typing. */
.field--col-left  { grid-column: 1; align-items: stretch; }
.field--col-right { grid-column: 2; align-items: stretch; }
.field--col-right > label,
.field--col-right > .field-error { text-align: right; }
@media (max-width: 760px) {
  /* Single-column layout on mobile — drop the right-edge alignment
     so the form reads naturally top-to-bottom. */
  .field--col-left,
  .field--col-right { grid-column: 1; }
  .field--col-right > label,
  .field--col-right > .field-error { text-align: left; }
}

/* Field labels: the platform's mini label (Archivo 700, 0.78rem, ink). */
label {
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.req { color: var(--primary-deep); }
.optional { color: var(--text-secondary); font-size: 0.75rem; font-weight: 400; text-transform: none; letter-spacing: 0; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select {
  background: rgba(10, 10, 24, 0.8);
  border: 1px solid rgba(88, 160, 216, 0.2);
  border-radius: 0;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: 'Archivo', system-ui, sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  -webkit-appearance: none;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(88, 160, 216, 0.12);
}

input.invalid, select.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(186, 26, 26, 0.16);
}

/* Legible placeholder — was rgba(144,144,168,0.5) ≈ 2.5:1, unreadable in
   sunlight. Solid muted ink at ~5:1, the brand's outdoor-legibility bar. */
input::placeholder { color: #66667a; opacity: 1; }

select option { background: #0f0f1e; color: #fff; }

.field-error {
  font-size: 0.75rem;
  color: var(--error);
  min-height: 1rem;
  display: block;
}

/* ─── VALIDATE BUTTON ────────────────────────────────── */
.validate-wrap {
  text-align: center;
  margin-top: 1.5rem;
}

/* Controls-not-headlines: same face as the admin console's .btn-save. */
.btn-validate {
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  background: var(--primary);
  color: var(--on-primary, #0D0D12);
  border: none;
  border-radius: 0;
  padding: 1rem 2.5rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
  max-width: 360px;
}

.btn-validate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0,0,0,0.07);
}

.btn-validate:active { transform: translateY(0); }

.validate-hint {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

/* ─── PAYMENT SECTION ────────────────────────────────── */
.payment-section {
  background: var(--bg-card);
  border: 1px solid var(--primary-border);
  border-radius: 0;
  padding: 2rem;
  margin-top: 1.5rem;
  text-align: center;
  animation: fadeSlideUp 0.5s ease forwards;
}

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

.payment-divider {
  margin-bottom: 1.25rem;
}

.payment-divider-text {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--primary-deep);
  text-transform: uppercase;
}

.payment-amount {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.payment-amount strong {
  color: var(--primary-deep);
  font-size: 1.4rem;
}

.payment-buttons {
  max-width: 380px;
  margin: 0 auto 1.25rem;
}

.payment-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
  margin: 0 auto 1.25rem;
}

.pay-method {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0.75rem 1rem;
  font-family: 'Archivo', system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--primary);
  color: var(--on-primary, #0D0D12);
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
}

.pay-method:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0,0,0,0.07);
}

.pay-method:active:not(:disabled) { transform: translateY(0); }

.pay-method:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pay-method--apple {
  background: #000;
  color: #fff;
}
.pay-method--apple:hover:not(:disabled) {
  box-shadow: 0 6px 0 rgba(0,0,0,0.07);
}

.pay-method--google {
  background: #fff;
  color: #202124;
}
.pay-method--google:hover:not(:disabled) {
  box-shadow: 0 6px 0 rgba(0,0,0,0.07);
}

.pay-method-label {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pay-method-sub {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  opacity: 0.75;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

/* Dev-only button, same dashed-accent treatment as the admin's
   .btn-test-payment (no off-palette hexes). */
.pay-method--test {
  background: var(--primary-dim);
  color: var(--primary-ink, #1F6BA5);
  flex-direction: column;
  min-height: 64px;
  border: 2px dashed var(--primary);
  margin-top: 0.25rem;
}

.pay-method--test:hover:not(:disabled) {
  box-shadow: 0 6px 0 rgba(0,0,0,0.07);
}

.pay-method-slot {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.pay-method-slot-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  text-transform: uppercase;
  text-align: center;
}

.paypal-slot {
  min-height: 45px;
}

/* ─── Judged / Non-Judged radio group ─────────────── */
.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.radio-option {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--primary-border);
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-option:hover {
  border-color: var(--primary);
  background: rgba(88, 160, 216, 0.04);
}

.radio-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(88, 160, 216, 0.1);
  box-shadow: 0 0 0 1px var(--primary);
}

.radio-option.invalid,
.radio-option input.invalid + .radio-label {
  border-color: var(--error);
}

.radio-label {
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.radio-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

@media (max-width: 640px) {
  .radio-group { grid-template-columns: 1fr; }
}

/* ─── Single opt-in checkbox (Women's Ride) ──────────
   Same bordered, square, accent-on-select card as .radio-option, so one
   standalone tick-box doesn't read as a different kind of control than the
   choices above it. The native box is replaced by .check-box (drawn square,
   like everything else) and the whole row is the label, so the tap target is
   the full card rather than a 16px glyph. */
.check-option {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-height: 48px;
  padding: 1rem;
  border: 1px solid var(--primary-border);
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}

.check-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-option:hover {
  border-color: var(--primary);
  background: rgba(88, 160, 216, 0.04);
}

.check-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(88, 160, 216, 0.1);
  box-shadow: 0 0 0 1px var(--primary);
}

/* Keyboard focus lands on the visually-hidden input, so the ring has to be
   drawn on the card it controls. */
.check-option:has(input:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.check-box {
  flex: 0 0 auto;
  width: 1.3rem;
  height: 1.3rem;
  margin-top: 0.1rem;
  border: 1px solid var(--primary-border);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.check-option:has(input:checked) .check-box {
  border-color: var(--primary);
  background: var(--primary);
}

/* The tick: two borders on a rotated box — no icon font, no inline SVG. */
.check-option:has(input:checked) .check-box::after {
  content: '';
  position: absolute;
  left: 0.38rem;
  top: 0.14rem;
  width: 0.34rem;
  height: 0.62rem;
  border: solid var(--on-accent, #0C0C0E);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.check-label {
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.check-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.4;
  /* The card is a <label>, so it inherits the global label rule's uppercase.
     This line is a sentence, and DESIGN.md keeps caps for headings, short
     labels and badges — a tracked all-caps sentence is also the harder read
     in the sunlight this form gets used in. */
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

/* ─── Vehicle photo upload ─────────────────────────── */
.photo-upload {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.photo-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: 0.7rem 1.25rem;
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--primary-ink, #1F6BA5);
  background: transparent;
  border: 1px solid var(--primary-border);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.photo-upload-btn:hover {
  background: rgba(88, 160, 216, 0.08);
  border-color: var(--primary);
}

.photo-upload-btn.uploading {
  opacity: 0.7;
  cursor: wait;
}

.photo-preview {
  position: relative;
  display: inline-block;
  max-width: 240px;
  border: 1px solid var(--primary-border);
  border-radius: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.photo-preview img {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}

.photo-remove {
  position: absolute;
  top: 0;
  right: 0;
  /* Visual disc stays 28px (content box) but a 10px transparent border grows
     the real hit area to 48px for thumbs at the gate. background-clip keeps
     the dark circle painted only on the 28px padding box, not the border. */
  box-sizing: content-box;
  width: 28px;
  height: 28px;
  border: 10px solid transparent;
  background-clip: padding-box;
  border-radius: 0; /* square per the kinetic shape language (circles are avatars only) */
  background-color: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.photo-remove:hover { background: var(--error); }

/* ─── Form status hint ─────────────────────────────── */
.form-status {
  margin: 1rem auto;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 165, 0, 0.08);
  border: 1px solid rgba(255, 165, 0, 0.3);
  border-radius: 0;
  color: #ffb03a;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-align: center;
  max-width: 540px;
}

/* ─── Public registration detail page (/reg.html) ─── */
.reg-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-32) var(--sp-16);
  position: relative;
  z-index: 1;
}

.reg-card {
  background: var(--bg-card);
  border: 1px solid #E4E4E7;
  border-radius: 0;
  padding: var(--sp-32);
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 6px 0 rgba(0,0,0,0.07);
}

.reg-eyebrow {
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--primary-deep);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.reg-name {
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.reg-vehicle {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 1.1rem;
  color: var(--primary-deep);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.reg-club {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-style: italic;
}

.reg-badge {
  display: inline-block;
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 0.55rem 1.25rem;
  border-radius: 0;
  text-transform: uppercase;
  margin-top: 0.75rem;
}

.reg-badge--judged {
  background: var(--primary);
  color: var(--bg);
}

.reg-badge--non {
  background: rgba(144, 144, 168, 0.2);
  color: var(--text-secondary);
  border: 1px solid var(--text-secondary);
}

.reg-loading, .reg-error {
  color: var(--text-secondary);
  padding: 2rem 0;
}

.reg-error { color: var(--error); }

.reg-download-btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.85rem 1.75rem;
  background: var(--primary);
  color: var(--on-primary, #0D0D12);
  text-decoration: none;
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  border-radius: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.reg-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0,0,0,0.07);
}

.reg-download-btn:active { transform: translateY(0); }

.reg-back {
  display: inline-block;
  margin-top: 2rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.reg-back:hover { color: var(--primary-deep); }

#paypal-button-container {
  min-height: 45px;
}

.payment-note {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
  opacity: 0.7;
}

/* ─── FOOTER ─────────────────────────────────────────── */
/* Shared kinetic-style footer used across admin, judge, participant
   registration, and admin-login. */
.kfooter {
  background: #15151a;
  color: #fff;
  padding: 1.6rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column; gap: 1rem;
}
@media (min-width: 761px) {
  .kfooter { flex-direction: row; justify-content: space-between; align-items: center; }
}
.kfooter-logo {
  font-family: 'Archivo', system-ui, sans-serif; font-weight: 400;
  font-size: 1.4rem; letter-spacing: 0.04em;
  color: #fff; text-transform: uppercase;
}
.kfooter-logo .kw-entry { color: #fff; }
.kfooter-logo .kw-lane  { color: #58A0D8; margin-left: 0.05em; }
.kfooter-tagline {
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 0.72rem; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  margin: 0.4rem 0 0;
  text-transform: uppercase;
}
.kfooter a { color: rgba(255,255,255,0.85); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.kfooter a:hover { color: #58A0D8; }
.kfooter-nav {
  display: flex; flex-wrap: wrap; gap: 1.6rem; align-items: center;
}
.kfooter-nav a {
  font-family: 'Archivo', system-ui, sans-serif; font-weight: 500;
  font-size: 0.74rem; letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ─── LOADING SPINNER ────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(88, 160, 216,0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── REDUCED MOTION ─────────────────────────────────────
   Honor prefers-reduced-motion: stop the infinite hero-orb pulse and the
   loader spin, and snap the payment panel to its visible end-state so the
   content never animates in (and never stays stuck invisible). */
@media (prefers-reduced-motion: reduce) {
  .glow-orb { animation: none; }
  .spinner { animation: none; }
  .payment-section { animation: none; opacity: 1; transform: none; }
  .btn-validate:hover,
  .pay-method:hover:not(:disabled),
  .reg-download-btn:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 640px) {
  .field-grid { grid-template-columns: 1fr; }
  .field--full { grid-column: 1; }
  .countdown-block { min-width: 70px; padding: 0.75rem 1rem; }
  .form-group { padding: 1.5rem 1rem; }
  .payment-section { padding: 1.5rem 1rem; }
}

@media (max-width: 480px) {
  .countdown-sep { display: none; }
}

/* ─── MAPBOX ADDRESS AUTOCOMPLETE ──────────────────── */
.address-wrap { position: relative; }

.address-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: rgba(18, 18, 30, 0.98);
  border: 1px solid rgba(88, 160, 216, 0.35);
  border-radius: 0;
  z-index: var(--z-menu);
  overflow: hidden;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18);
}

.suggestion-item {
  display: block;
  width: 100%;
  padding: 0.65rem 0.9rem;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-primary, #1a1c1d);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.suggestion-item:last-child { border-bottom: none; }

.suggestion-item:hover,
.suggestion-item:focus,
.suggestion-item.active {
  background: rgba(88, 160, 216, 0.08);
  outline: none;
}

.suggestion-primary {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
}

.suggestion-secondary {
  display: block;
  font-size: 0.78rem;
  color: #9090a8;
  margin-top: 2px;
}

.field-hint {
  display: block;
  font-size: 0.75rem;
  color: #7080a0;
  margin-top: 0.35rem;
  font-style: italic;
}

/* ─── PAYMENT SECTION — Stripe/PayPal split ──────────── */
.payment-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: #7080a0;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.payment-or::before,
.payment-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

#paypal-button-container {
  min-height: 48px;
}

.payment-note-sm {
  font-size: 0.72rem;
  margin-top: 0.35rem;
}

/* ─── COUNTDOWN — tighter mobile scaling ──────────────── */
@media (max-width: 640px) {
  .countdown-grid {
    flex-wrap: nowrap;
    gap: 0.35rem;
  }
  .countdown-block {
    min-width: 0;
    flex: 1 1 0;
    padding: 0.6rem 0.4rem;
  }
  .countdown-num { font-size: 1.4rem; }
  .countdown-unit { font-size: 0.6rem; }
  .countdown-sep { display: none; }
}

@media (max-width: 480px) {
  .countdown-num { font-size: 1.15rem; }
  .countdown-block { padding: 0.5rem 0.3rem; }
}

/* ─── Returning-entrant autofill banner ──────────────────────────────────
   Offered under the phone field when a previous show's car is found. Square
   corners, accent left rule, cream-on-carbon — the kinetic note treatment,
   not a rounded consumer toast. */
.autofill-banner {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  margin: 0.25rem 0 1rem;
  padding: 0.75rem 0.9rem;
  background: var(--surface-low, #F3F3F4);
  border: 1px solid var(--border, #E4E4E7);
  border-left: 3px solid var(--accent, #58A0D8);
}
.autofill-text {
  flex: 1 1 14rem;
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 0.92rem; line-height: 1.4;
  color: var(--on-surface, #1A1C1D);
}
.autofill-use {
  flex: 0 0 auto; min-height: 40px; padding: 0.5rem 1.1rem;
  background: var(--accent, #58A0D8); color: #0D0D12;
  border: 0; border-radius: 0; cursor: pointer;
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 600; font-size: 0.92rem; letter-spacing: 0.01em;
  transition: filter 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.autofill-use:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--primary-deep, #3F86C2);
}
.autofill-use:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--primary-deep, #3F86C2); }
.autofill-dismiss {
  flex: 0 0 auto;
  min-width: 40px; min-height: 40px;
  background: transparent; border: 0; border-radius: 0; cursor: pointer;
  font-size: 1.4rem; line-height: 1;
  color: var(--on-surface-muted, #5F5E5F);
}
.autofill-dismiss:hover { color: var(--on-surface, #1A1C1D); }

@media (prefers-reduced-motion: reduce) {
  .autofill-use { transition: filter 0.12s ease; }
  .autofill-use:hover, .autofill-use:active { transform: none; box-shadow: none; }
}
