@import url('https://fonts.googleapis.com/css2?family=Anton&family=Barlow+Condensed:wght@500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0a0a0d;
  --primary: #006dff;
  --secondary: #ffffff;
  --accent: #4da3ff;

  --surface: #14141a;
  --surface-2: #1c1c24;
  --border: rgba(255, 255, 255, 0.1);
  --text: #f4f4f6;
  --text-dim: #a7a7b3;
  --success: #2fbf71;
  --danger: #ef4a5c;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font-display: 'Anton', 'Barlow Condensed', sans-serif;
  --font-heading: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

::selection { background: color-mix(in srgb, var(--primary) 60%, transparent); color: #0a0a0d; }

/* ---------- layout shells ---------- */

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 10, 13, 0.72);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: var(--secondary, #fff);
}

.brand .brand-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- index / showcase grid ---------- */

.hero-banner {
  position: relative;
  padding: 72px 0 48px;
  overflow: hidden;
  text-align: center;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 109, 255, 0.22), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(77, 163, 255, 0.16), transparent 45%);
  pointer-events: none;
}

.hero-banner h1 {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(38px, 7vw, 76px);
  letter-spacing: 1px;
  margin: 0 0 12px;
  line-height: 1.02;
  background: linear-gradient(135deg, #fff, #cfcfe0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-banner p {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 17px;
}

.filter-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 32px 0 8px;
}

.filter-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  padding: 9px 18px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover { border-color: rgba(255,255,255,0.3); color: var(--text); }

.filter-chip.active {
  background: var(--secondary, #fff);
  color: #0a0a0d;
  border-color: transparent;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 40px 0 100px;
}

.event-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  opacity: 0;
  transform: translateY(16px);
  animation: card-in 0.5s ease forwards;
}

@keyframes card-in { to { opacity: 1; transform: translateY(0); } }

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--card-accent, var(--primary)) 50%, var(--border));
}

.event-card .card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #050506;
}

.event-card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s ease;
}

.event-card:hover .card-media img { transform: scale(1.05); }

.event-card .card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5,5,6,0.95) 100%);
}

.card-sport-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(10,10,13,0.75);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--card-accent, #fff);
}

.card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-body h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.05;
  margin: 0;
  letter-spacing: 0.2px;
  min-height: 2.1em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 13.5px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 2.9em;
}

.card-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta strong { color: var(--text); font-weight: 600; }

.card-footer {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--card-accent, var(--primary));
}

.card-cta {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  color: #0a0a0d;
  background: var(--card-accent, #fff);
  padding: 8px 16px;
  border-radius: 999px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 60px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* ---------- registration page ---------- */

body[data-theme] {
  background: var(--bg);
}

.demo-banner {
  position: sticky;
  top: 68px;
  z-index: 40;
  background: repeating-linear-gradient(135deg, #7a1de0, #7a1de0 10px, #5c12ad 10px, #5c12ad 20px);
  color: #fff;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  padding: 9px 16px;
}

.reg-hero {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.reg-hero .hero-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: top center;
  filter: saturate(1.05);
  transform: scale(1.02);
}

.reg-hero .hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,6,8,0.35) 0%, rgba(6,6,8,0.55) 40%, var(--bg) 96%),
    linear-gradient(90deg, rgba(6,6,8,0.75), rgba(6,6,8,0.15) 60%);
}

.reg-hero .wrap {
  position: relative;
  padding-top: 60px;
  padding-bottom: 40px;
  width: 100%;
}

.reg-hero .presented-by {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 6px;
}

.reg-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5.4vw, 58px);
  line-height: 1.02;
  margin: 0 0 14px;
  max-width: 780px;
  color: var(--secondary, #fff);
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.reg-hero .hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-fact-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(10,10,13,0.55);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.hero-fact-pill svg { width: 15px; height: 15px; color: var(--primary); flex-shrink: 0; }

.reg-body {
  padding: 44px 0 120px;
}

.reg-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .reg-layout { grid-template-columns: 1fr; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 26px 30px;
  margin-bottom: 22px;
}

.panel h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 24px;
  margin: 0 0 4px;
  letter-spacing: 0.2px;
}

.panel .panel-hint {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 20px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* .field's own `display: flex` has the same specificity as the browser's
   built-in `[hidden] { display: none }` rule and, being an author rule,
   would win the cascade and defeat it — division-conditional fields rely on
   the `hidden` attribute actually hiding them, so make that explicit. */
.field[hidden] {
  display: none;
}

.field.span-2 { grid-column: span 2; }
@media (max-width: 540px) { .field.span-2 { grid-column: span 1; } }

.field label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.field .req { color: var(--danger); margin-left: 2px; }

.field .help {
  font-size: 12px;
  color: var(--text-dim);
}

input, select, textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea { resize: vertical; min-height: 84px; font-family: var(--font-body); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--danger); }

.field-error {
  font-size: 12.5px;
  color: var(--danger);
  display: none;
}

.field.has-error .field-error { display: block; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='%23a7a7b3' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox-row input[type="checkbox"] {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.checkbox-row label { font-size: 14px; color: var(--text); font-weight: 500; }

/* registrant repeater */

.registrant-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 20px 22px;
  margin-bottom: 16px;
  background: var(--surface-2);
  position: relative;
}

.registrant-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.registrant-card-head h3 {
  font-family: var(--font-heading);
  font-size: 19px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.registrant-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #0a0a0d;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-body);
}

.remove-registrant {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: all 0.15s ease;
}

.remove-registrant:hover { border-color: var(--danger); color: var(--danger); }

.addon-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

.roster-list { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }

.roster-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 14px 16px 16px;
}

.roster-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.roster-player-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-dim);
}

.addon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.addon-row .addon-label { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.addon-row .addon-price { font-weight: 700; color: var(--primary); font-size: 14px; }

.add-registrant-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1.5px dashed color-mix(in srgb, var(--primary) 55%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.add-registrant-btn:hover { background: color-mix(in srgb, var(--primary) 16%, transparent); }

.discount-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: color-mix(in srgb, var(--success) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--success) 40%, transparent);
  color: #6be3a2;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 18px;
}
.discount-banner svg { width: 18px; height: 18px; flex-shrink: 0; }

.waiver-box {
  max-height: 180px;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* coupon row */

.coupon-row {
  display: flex;
  gap: 10px;
}

.coupon-row input { flex: 1; }

.btn {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  padding: 12px 20px;
  transition: transform 0.12s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) { border-color: rgba(255,255,255,0.35); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, var(--secondary)));
  color: #0a0a0d;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--primary) 35%, transparent);
}

.btn-primary:hover:not(:disabled) { box-shadow: 0 14px 36px color-mix(in srgb, var(--primary) 50%, transparent); }

.btn-block { width: 100%; }

/* summary sidebar */

.summary-panel {
  position: sticky;
  top: 88px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.summary-panel h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin: 0 0 16px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-dim);
  padding: 7px 0;
}

.summary-line strong { color: var(--text); font-weight: 600; }
.summary-line.discount strong { color: var(--success); }

.summary-divider { border-top: 1px solid var(--border); margin: 10px 0; }

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 10px;
}

.summary-total .label { font-family: var(--font-heading); font-size: 17px; font-weight: 700; }
.summary-total .amount {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--primary);
}

.summary-empty { color: var(--text-dim); font-size: 13.5px; }

.spots-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  border-radius: 999px;
  padding: 5px 11px;
  margin-top: 14px;
}

/* payment step */

#payment-step { display: none; }
#stripe-payment-element { margin: 16px 0; }

.pay-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 18px 0;
}
.pay-divider::before, .pay-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

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

.status-msg {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 14px;
  display: none;
}

.status-msg.show { display: block; }
.status-msg.error { background: color-mix(in srgb, var(--danger) 16%, transparent); color: #ff8a97; border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.status-msg.info { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); }

/* success screen */

#success-screen { display: none; text-align: center; padding: 80px 0 120px; }

.success-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--success) 20%, transparent);
  display: grid;
  place-items: center;
  animation: pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop-in { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.success-icon svg { width: 40px; height: 40px; color: var(--success); }

#success-screen h1 {
  font-family: var(--font-display);
  font-size: 38px;
  margin: 0 0 10px;
}

#success-screen p { color: var(--text-dim); max-width: 480px; margin: 0 auto 6px; }

.success-id {
  display: inline-block;
  margin-top: 18px;
  font-family: monospace;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-dim);
}

/* spinner */

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(10,10,13,0.3);
  border-top-color: #0a0a0d;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}

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

.loading-skel {
  padding: 100px 0;
  text-align: center;
  color: var(--text-dim);
}

.error-screen {
  padding: 100px 0;
  text-align: center;
}

.error-screen h1 { font-family: var(--font-heading); font-size: 28px; }
.error-screen p { color: var(--text-dim); }
.error-screen a { color: var(--primary); font-weight: 600; }

/* Square (Web Payments SDK) */
#square-card { margin: 16px 0; min-height: 90px; }
#square-google-pay { min-height: 0; }
#square-google-pay:not(:empty) { margin-bottom: 10px; }
.square-apple-pay {
  display: block;
  width: 100%;
  height: 48px;
  margin-bottom: 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  -webkit-appearance: -apple-pay-button;
  -apple-pay-button-type: pay;
  -apple-pay-button-style: white;
}
