/* LGP After School portal — "Rally" night-game look.
   Deep purple-black atmosphere, hot gold accents, Outfit italic display + DM Sans body
   (the sanctioned web pairing — Koba is print/social only). Parent pages run dark
   (body.theatre); the staff tool stays light and utilitarian. */

:root {
  --night: #0d0025;
  --night-2: #16003c;
  --night-3: #1f0055;
  --purple: #440099;
  --purple-hot: #5b18c9;
  --gold: #FEDD00;
  --gold-light: #EFE909;
  --ink: #221F1F;
  --paper: #ffffff;
  --lilac: #898BBE;        /* brand light purple — labels/accents on dark (TV convention) */
  --lilac-light: #c6c2dd;  /* lightened for body-size text on the night background */
  --lilac-dim: #837daa;
  --line-dark: rgba(255, 255, 255, .09);
  --line-light: #e7e4ef;
  --muted: #6f6b78;
  --ok: #1d8a4a;
  --ok-wash: #e9f7ef;
  --err: #c0392b;
  --radius: 18px;
  --shadow-card: 0 20px 50px -18px rgba(13, 0, 37, .45);
  --glow-gold: 0 6px 24px rgba(254, 221, 0, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: #faf9fc; color: var(--ink);
  font-family: 'DM Sans', system-ui, sans-serif; font-size: 16px; line-height: 1.55;
}

/* ---- The night theatre (parent-facing pages) ---- */
body.theatre {
  background:
    radial-gradient(900px 500px at 85% -5%, rgba(91, 24, 201, .38), transparent 60%),
    radial-gradient(700px 420px at -10% 30%, rgba(68, 0, 153, .30), transparent 60%),
    var(--night);
  color: #fff;
}
/* faint grain so the dark field never looks flat */
body.theatre::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .05;
  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='.6'/%3E%3C/svg%3E");
}
body.theatre > * { position: relative; z-index: 1; }
/* the lift-above-grain rule must NOT flatten fixed overlays back to relative */
body.theatre > .modal-back { position: fixed; z-index: 100; }
body.theatre > .cart-bar { position: fixed; z-index: 50; }

h1, h2, h3, .display { font-family: 'Outfit', system-ui, sans-serif; }
h1 { font-weight: 800; font-style: italic; line-height: 1.02; margin: 0 0 10px; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; font-weight: 800; font-style: italic; margin: 0 0 12px; letter-spacing: .01em; }
h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 8px; }
p { margin: 0 0 12px; }
a { color: var(--purple); }
/* :not(.btn) — buttons carry their own text colors; without the guard this rule wins
   specificity and turns a.btn-gold's dark label gold-on-gold (invisible). */
.theatre a:not(.btn) { color: var(--gold); }

.wrap { max-width: 820px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
.site-header { background: transparent; padding: 18px 0; }
.site-header .wrap, .site-header .wrap-wide { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: 'Outfit', sans-serif; font-weight: 800; font-style: italic; font-size: 1.02rem;
  letter-spacing: .4px; color: #fff; text-decoration: none; white-space: nowrap;
}
.brand b { color: var(--gold); }
.brand img { width: 44px; height: 44px; display: block; }
@media (max-width: 480px) { .brand img { width: 36px; height: 36px; } .brand { font-size: .92rem; } }
body:not(.theatre) .site-header { background: var(--night); }
.gold-bar { height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-light) 60%, transparent); }
body.theatre .gold-bar { background: linear-gradient(90deg, var(--gold) 0%, rgba(254,221,0,.25) 45%, transparent 80%); }

/* ---- Panels ---- */
.panel {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line-light); border-radius: var(--radius);
  padding: 24px; margin: 18px 0;
}
.theatre .panel { border: 0; box-shadow: var(--shadow-card); }
.panel-tight { padding: 14px 18px; }
/* dark glass panel — for content that should stay part of the night */
.panel-glass {
  background: rgba(255, 255, 255, .045); color: #fff;
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: 24px; margin: 18px 0; backdrop-filter: blur(6px);
}

/* ---- Buttons ---- */
.btn {
  display: inline-block; border: 0; border-radius: 12px; cursor: pointer;
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1rem;
  padding: 14px 26px; text-decoration: none; text-align: center;
  transition: transform .15s ease, box-shadow .2s ease, background .15s ease, filter .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: var(--glow-gold); }
.btn-purple { background: var(--purple); color: #fff; }
.btn-purple:hover { background: var(--purple-hot); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(68, 0, 153, .35); }
.btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.35); padding: 12px 24px; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.panel .btn-ghost { color: var(--purple); border-color: var(--purple); }
.panel .btn-ghost:hover { background: #f4effd; }
.btn-line { background: #fff; color: var(--ink); border: 1.5px solid var(--line-light); font-weight: 600; padding: 9px 15px; font-size: .9rem; }
.btn-line:hover { border-color: var(--purple); color: var(--purple); }
.theatre .btn-line { background: rgba(255,255,255,.08); color: #fff; border-color: var(--line-dark); }
.theatre .btn-line:hover { border-color: var(--gold); color: var(--gold); }
.panel .btn-line { background: #fff; color: var(--ink); border-color: var(--line-light); }
.panel .btn-line:hover { border-color: var(--purple); color: var(--purple); }
.btn-sm { padding: 9px 15px; font-size: .9rem; border-radius: 10px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-block { display: block; width: 100%; }

/* ---- Forms ---- */
.field { margin: 0 0 15px; }
.field label { display: block; font-family: 'Outfit', sans-serif; font-weight: 600; font-size: .88rem; margin-bottom: 6px; letter-spacing: .01em; }
.field .hint { font-family: 'DM Sans', sans-serif; font-weight: 400; color: var(--muted); font-size: .8rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date],
input[type=number], select, textarea {
  width: 100%; padding: 13px 14px; border: 2px solid #e2e0e9; border-radius: 12px;
  font: inherit; font-size: 16px; background: #fff; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(68, 0, 153, .12);
}
textarea { min-height: 76px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }

.msg { border-radius: 12px; padding: 12px 16px; margin: 12px 0; font-size: .95rem; animation: fadeUp .3s ease-out; }
.msg-err { background: #fdeeec; color: var(--err); border: 1px solid #f5c9c2; }
.msg-ok { background: var(--ok-wash); color: var(--ok); border: 1px solid #bfe8cf; }
.msg-info { background: #f2effa; color: var(--purple); border: 1px solid #ddd6f0; }

/* ---- Badges ---- */
.badge { display: inline-block; border-radius: 999px; font-family: 'Outfit', sans-serif; font-size: .76rem; font-weight: 700; letter-spacing: .03em; padding: 4px 12px; vertical-align: middle; }
.badge-member { background: var(--gold); color: var(--ink); box-shadow: 0 2px 10px rgba(254,221,0,.35); }
.badge-non { background: rgba(255,255,255,.12); color: var(--lilac); }
.panel .badge-non, body:not(.theatre) .badge-non { background: #eceaf3; color: var(--muted); }
.badge-paid { background: var(--ok-wash); color: var(--ok); }
.badge-pending { background: #fff7d6; color: #8a7500; }
.badge-full { background: #fdeeec; color: var(--err); }

/* ---- Kid tabs ---- */
.kid-tabs { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.kid-tab {
  border: 2px solid #e2e0e9; background: #fff; color: var(--ink); border-radius: 999px; padding: 9px 18px;
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: .92rem; cursor: pointer;
  transition: all .15s ease;
}
.kid-tab:hover { border-color: var(--purple); }
.kid-tab.on { border-color: var(--purple); background: var(--purple); color: #fff; box-shadow: 0 4px 14px rgba(68,0,153,.3); }

/* ---- Week picker ---- */
.weeks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 11px; }
.week-cell {
  position: relative; border: 2px solid #e9e6f2; border-radius: 14px; padding: 12px 13px; background: #fff;
  cursor: pointer; text-align: left; font: inherit; color: var(--ink);
  transition: border-color .12s ease, transform .12s ease, box-shadow .15s ease, background .12s ease;
}
.week-cell:not([disabled]):hover { border-color: var(--purple); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(68,0,153,.12); }
.week-cell .wk-label { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: .95rem; }
.week-cell .wk-sub { font-size: .77rem; color: var(--muted); margin-top: 3px; }
.week-cell.sel { border-color: var(--gold); background: var(--gold); }
.week-cell.sel .wk-sub { color: rgba(34,31,31,.65); }
.week-cell.sel::after {
  content: '✓'; position: absolute; top: 8px; right: 10px;
  font-weight: 800; font-size: .9rem; color: var(--ink);
}
.week-cell.paid { border-color: #bfe8cf; background: #f3fbf6; cursor: default; }
.week-cell.paid::after {
  content: '✓'; position: absolute; top: 8px; right: 10px;
  font-weight: 800; font-size: .9rem; color: var(--ok);
}
.week-cell.off { opacity: .45; cursor: not-allowed; background: repeating-linear-gradient(-45deg, #fff 0 8px, #f6f4fa 8px 16px); }

/* ---- Cart bar: the ticket stub ---- */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--gold); color: var(--ink); padding: 13px 18px;
  box-shadow: 0 -12px 40px rgba(13, 0, 37, .5);
  transform: translateY(110%); transition: transform .22s cubic-bezier(.3, .9, .3, 1.1);
}
.cart-bar.show { transform: none; }
.cart-inner { max-width: 820px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.cart-sum { font-size: .95rem; font-weight: 600; }
.cart-sum b { font-family: 'Outfit', sans-serif; font-style: italic; font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; }
.cart-fee { font-size: .77rem; opacity: .75; font-weight: 500; }
.cart-bar .btn-gold { background: var(--ink); color: var(--gold); }
.cart-bar .btn-gold:hover { background: #000; box-shadow: 0 6px 20px rgba(13,0,37,.4); }

/* ---- Tables (staff) ---- */
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; font-family: 'Outfit', sans-serif; font-size: .77rem; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 9px 10px; border-bottom: 2px solid var(--line-light); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line-light); vertical-align: top; }
.tbl tr:hover td { background: #faf8ff; }
.scroll-x { overflow-x: auto; }

/* ---- Modal ---- */
.modal-back {
  position: fixed; inset: 0; background: rgba(13, 0, 37, .72); backdrop-filter: blur(3px);
  z-index: 100; display: none; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 26px 14px;
}
.modal-back.show { display: flex; }
.modal { background: #fff; color: var(--ink); border-radius: var(--radius); max-width: 660px; width: 100%; padding: 26px; animation: fadeUp .25s ease-out; box-shadow: var(--shadow-card); }
.waiver-box { border: 1px solid var(--line-light); border-radius: 12px; background: #faf9fc; padding: 15px; max-height: 220px; overflow-y: auto; font-size: .82rem; white-space: pre-wrap; margin-bottom: 12px; }

/* ---- Landing hero ---- */
.hero { position: relative; overflow: hidden; padding: 30px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 10px; align-items: end; }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-copy { padding: 26px 0 54px; }
.eyebrow {
  display: inline-block; color: var(--gold); font-family: 'Outfit', sans-serif; font-weight: 700;
  font-style: italic; text-transform: uppercase; letter-spacing: 2.5px; font-size: .8rem; margin-bottom: 16px;
}
.eyebrow::after { content: ''; display: inline-block; width: 42px; height: 2px; background: var(--gold); margin-left: 12px; vertical-align: middle; opacity: .7; }
.hero h1 { font-size: clamp(2.6rem, 7.5vw, 4.4rem); text-transform: uppercase; }
.hero h1 .l1, .hero h1 .l2, .hero h1 .l3 { display: block; }
.hero h1 .l3 { color: var(--gold); }
.hero-sub { color: var(--lilac-light); max-width: 480px; font-size: 1.05rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 20px 0 26px; color: #ddd8ef; font-size: .92rem; }
.hero-facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts svg { width: 16px; height: 16px; stroke: var(--gold); flex: 0 0 auto; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual { position: relative; min-height: 300px; }
.hero-kid {
  position: relative; z-index: 2; width: 118%; height: auto; max-width: none; margin-left: -9%;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .55));
  animation: floaty 7s ease-in-out infinite;
}
@media (max-width: 760px) { .hero-kid { width: 100%; margin-left: 0; } }
.starburst {
  /* lower-right: the cutout's paddle + ball own the top-right corner — never cover them */
  position: absolute; z-index: 3; bottom: 10%; right: 0;
  width: 118px; height: 118px; display: flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--ink); text-align: center;
  font-family: 'Outfit', sans-serif; font-weight: 800; font-style: italic; font-size: .86rem; line-height: 1.15;
  clip-path: polygon(50% 0%, 59% 12%, 73% 5%, 76% 20%, 91% 18%, 88% 33%, 100% 40%, 91% 51%, 100% 62%, 87% 68%, 91% 83%, 76% 82%, 72% 96%, 59% 89%, 50% 100%, 41% 89%, 28% 96%, 24% 82%, 9% 83%, 13% 68%, 0% 62%, 9% 51%, 0% 40%, 12% 33%, 9% 18%, 24% 20%, 27% 5%, 41% 12%);
  transform: rotate(9deg);
  animation: pulse-rotate 5s ease-in-out infinite;
}
/* faint court baseline under the hero */
.hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(254, 221, 0, .5) 30%, rgba(254, 221, 0, .5) 70%, transparent);
}

/* ---- Price cards ---- */
.price-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 26px 0 8px; }
@media (max-width: 560px) { .price-cards { grid-template-columns: 1fr; } }
.price-card {
  position: relative; border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: 22px; background: rgba(255, 255, 255, .045); color: #fff; backdrop-filter: blur(6px);
}
.price-card.hot { border: 2px solid var(--gold); box-shadow: 0 0 0 1px rgba(254,221,0,.2), 0 14px 40px -14px rgba(254, 221, 0, .28); }
.price-card h3 { color: var(--lilac); text-transform: uppercase; letter-spacing: 1.4px; font-size: .8rem; font-weight: 700; }
.price-card .amt { font-family: 'Outfit', sans-serif; font-style: italic; font-weight: 800; font-size: 2.5rem; letter-spacing: -.02em; }
.price-card.hot .amt { color: var(--gold); }
.price-card .amt span { font-size: .95rem; font-weight: 600; font-style: normal; color: var(--lilac); }
.price-card p { color: var(--lilac-light); }

/* ---- Steps ---- */
.steps { counter-reset: s; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: s; display: flex; gap: 14px; margin-bottom: 15px; align-items: baseline; color: #ddd8ef; }
.steps li::before {
  content: counter(s); flex: 0 0 28px; height: 28px; border-radius: 50%;
  background: var(--gold); color: var(--ink); font-family: 'Outfit', sans-serif; font-weight: 800; font-style: italic;
  display: inline-flex; align-items: center; justify-content: center; font-size: .92rem;
}

/* ---- Section headers on dark ---- */
.sec-title { font-size: 1.5rem; text-transform: uppercase; letter-spacing: .02em; }
.sec-title .tick { color: var(--gold); }

/* ---- Auth card ---- */
.auth-tabs { display: flex; gap: 9px; margin-bottom: 18px; }
.auth-tab {
  border: 2px solid #e2e0e9; background: #fff; color: var(--ink); border-radius: 999px; padding: 9px 20px;
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: .92rem; cursor: pointer; transition: all .15s ease;
}
.auth-tab.on { border-color: var(--purple); background: var(--purple); color: #fff; }

/* ---- Greeting band (account) ---- */
.greet { padding: 26px 0 6px; }
.greet h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); text-transform: uppercase; }
.greet .sub { color: var(--lilac-light); font-size: .95rem; max-width: 560px; }

.footer { color: var(--lilac-dim); font-size: .84rem; text-align: center; padding: 34px 16px 46px; }
.theatre .footer a { color: var(--lilac); }

/* ---- Motion ---- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse-rotate { 0%, 100% { transform: rotate(9deg) scale(1); } 50% { transform: rotate(12deg) scale(1.05); } }
.rise { opacity: 0; animation: fadeUp .6s cubic-bezier(.2, .7, .3, 1) forwards; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .14s; } .d3 { animation-delay: .23s; }
.d4 { animation-delay: .32s; } .d5 { animation-delay: .43s; } .d6 { animation-delay: .55s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise { opacity: 1; }
}

/* ---- Utilities ---- */
.hidden { display: none !important; }
.right { text-align: right; }
.muted { color: var(--muted); }
.theatre .muted { color: var(--lilac-light); }
.panel .muted, .modal .muted { color: var(--muted); }
.small { font-size: .84rem; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
