/* Site-wide "black glass" skin: a smooth dark glass backdrop, frosted panels, glass header/footer and glass inputs
   (buttons keep the original style.css look). Load it on every page AFTER style.css (and home.css / groups.css). Sign-up-only extras live in
   glass.css. No external assets: the backdrop is pure CSS gradients.
   Text contrast: panels stay dark enough that --ink-2 and --muted keep WCAG AA on top of them. */
:root {
  /* translucent surfaces: every panel that used the solid tokens now lets the obsidian show through */
  --surface: rgba(19, 20, 24, .72);
  --raise: rgba(38, 40, 46, .66);
  --g-fill: rgba(255, 255, 255, .055);
  --g-line: rgba(255, 255, 255, .13);
  --g-field: rgba(6, 7, 9, .55);
  --g-field-line: rgba(255, 255, 255, .34); /* >= 3:1 against panels (WCAG 1.4.11) */
  --g-blur: blur(22px) saturate(140%);
  --g-radius: 22px;
  --g-spring: cubic-bezier(.34, 1.4, .5, 1);
  --g-shadow: 0 1px 0 rgba(255, 255, 255, .16) inset, 0 24px 60px -24px rgba(0, 0, 0, .9), 0 10px 24px -14px rgba(0, 0, 0, .75);
  --g-panel: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015) 40%, rgba(255, 255, 255, .03)), rgba(16, 17, 21, .62);
}
body { background: #050506; }

/* ---- backdrop: smooth black glass (soft gradients only, no lines), fixed behind everything ---- */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(255, 106, 26, .11), transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 85%, rgba(255, 255, 255, .04), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 35%, rgba(0, 0, 0, .8) 100%),
    linear-gradient(rgba(3, 3, 4, .45), rgba(3, 3, 4, .45)),
    radial-gradient(ellipse 70% 55% at 18% 22%, rgba(255, 255, 255, .035), transparent 70%),
    radial-gradient(ellipse 60% 50% at 82% 60%, rgba(255, 255, 255, .03), transparent 70%),
    linear-gradient(160deg, #111216 0%, #0a0b0d 45%, #0d0e11 70%, #070708 100%),
    #050506;
}
body::after {
  content: ""; position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .03) 46%, rgba(255, 255, 255, .06) 50%, transparent 58%);
}

/* ---- header, nav, footer ---- */
.site-header { background: rgba(8, 9, 11, .55); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); border-bottom-color: var(--g-line); }
/* the phone menu sits inside the blurred header (a nested blur can't see the page), so it stays near-solid */
@media (max-width: 1180px) { .nav { background: rgba(14, 15, 18, .97); border-bottom-color: var(--g-line); } }
.site-footer { background: linear-gradient(180deg, rgba(14, 15, 18, .72), rgba(5, 5, 6, .9)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.section.alt { background: rgba(255, 255, 255, .02); border-block-color: rgba(255, 255, 255, .07); }
.page-head { background: radial-gradient(ellipse 55% 130% at 0% 0%, rgba(255, 106, 26, .14), transparent 62%); }
.page-head h1 { color: #fff; text-shadow: 0 2px 30px rgba(0, 0, 0, .6); }

/* ---- frosted panels ---- */
.card, .event-card, .table-wrap, fieldset, .full-rules, .race-card, .legal, .podium .step {
  background: var(--g-panel); border: 1px solid var(--g-line); box-shadow: var(--g-shadow);
  -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur);
}
.card, .event-card, .race-card, .full-rules, .legal { border-radius: var(--g-radius); }
.card.raise { background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)), rgba(30, 32, 37, .62); }
.tile.hero-tile { background: linear-gradient(160deg, rgba(255, 106, 26, .16), rgba(19, 20, 24, .72) 60%); }
/* smaller repeated items: translucent (no blur, which would be costly on long lists) */
.tile, .award-card, .ticket, .rules li, .steps > li, .guide-steps > li, .tabs, .admin-tabs button {
  border-color: var(--g-line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
}
.tile, .award-card, .ticket { border-radius: 16px; }
/* long-form legal pages read as one comfortable glass sheet */
.legal { padding: clamp(1.25rem, 4vw, 2.5rem); }
.legal p, .legal li { color: #b9bab4; }
/* tables: header rows that stay put get a near-solid glass so rows scrolling under them stay readable */
thead th { background: rgba(26, 27, 32, .94); }
th { background: rgba(22, 23, 27, .9); }
tbody tr:hover { background: rgba(255, 255, 255, .03); }
.map { background: #15161a; } /* Leaflet tiles cover it; keep it solid while they load */
.dropzone { -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); border-color: rgba(255, 255, 255, .3); border-radius: var(--g-radius); }

/* ---- fields: dark translucent glass ---- */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]), select, textarea {
  background-color: var(--g-field); border: 1px solid var(--g-field-line); border-radius: 14px; color: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5);
}
select option { background: #16171b; color: #fff; }
input:not([type="checkbox"]):not([type="radio"]):hover, select:hover, textarea:hover { border-color: rgba(255, 255, 255, .5); }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus {
  outline: none; border-color: var(--orange); background-color: rgba(10, 8, 7, .72);
  box-shadow: 0 0 0 3px rgba(255, 106, 26, .32), 0 0 22px 2px rgba(255, 106, 26, .33), inset 0 1px 2px rgba(0, 0, 0, .5);
}
input[readonly]:not([type="checkbox"]):not([type="radio"]) { background-color: rgba(255, 255, 255, .03); color: #c3c4be; }
input::placeholder, textarea::placeholder { color: #8c8e93; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--out-ink); box-shadow: 0 0 0 3px rgba(176, 74, 91, .3), 0 0 18px rgba(176, 74, 91, .35); }
.field label { color: #c3c4be; }
.hint { color: #9a9ca1; }

/* choice tiles */
.choice .box { border: 1px solid var(--g-field-line); border-radius: 16px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.choice:hover .box { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .06); }
.choice input:checked + .box {
  border-color: var(--orange); background: linear-gradient(180deg, rgba(255, 106, 26, .16), rgba(255, 106, 26, .05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 0 0 1px rgba(255, 106, 26, .4), 0 10px 30px -10px rgba(255, 106, 26, .55);
}

/* checkboxes in .check rows: rounded glass, glowing green when ticked */
.check input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin: .1rem 0 0; flex: none; cursor: pointer;
  border-radius: 7px; border: 1.5px solid rgba(255, 255, 255, .45); background: rgba(0, 0, 0, .35) center / 16px no-repeat;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5);
  transition: background-color var(--t-fast), border-color var(--t-fast), box-shadow var(--t);
}
.check input[type="checkbox"]:checked {
  border-color: #9be0b6; background-color: #5fd68e;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c0d0f' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  box-shadow: 0 0 0 3px rgba(95, 214, 142, .25), 0 0 22px 4px rgba(95, 214, 142, .6), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.check input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }
.check input[type="checkbox"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* buttons keep the original style.css look (David, 2026-11-23) */

/* ---- notes, alerts, dialogs ---- */
.alert, .privacy-note, .demo-banner { border-radius: 14px; }
.privacy-note { background: rgba(116, 196, 147, .07); border-color: rgba(116, 196, 147, .28); }
dialog {
  border: 1px solid var(--g-line); border-radius: var(--g-radius); color: var(--ink);
  background: linear-gradient(180deg, rgba(40, 42, 48, .86), rgba(18, 19, 22, .92));
  -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); box-shadow: var(--g-shadow);
}
dialog::backdrop { background: rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-head, .modal-foot { border-color: rgba(255, 255, 255, .1); }
.legal-box { background: rgba(0, 0, 0, .35); border-color: rgba(255, 255, 255, .14); border-radius: 14px; }
@media (max-width: 600px) { dialog[open] { border-radius: 0; background: #15161a; } }

/* ---- entrance: panels spring up softly ---- */
@media (prefers-reduced-motion: no-preference) {
  main .card, main .event-card, main .legal, main .race-card { animation: g-in .8s var(--g-spring) backwards; }
  body::after { animation: g-sheen 14s ease-in-out infinite alternate; }
  @keyframes g-in { from { opacity: 0; transform: translateY(22px) scale(.98); } }
  @keyframes g-sheen { from { transform: translateX(-12%); } to { transform: translateX(12%); } }
}

/* ---- no backdrop-filter, or less transparency asked for: solid dark panels ---- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --surface: #141519; --raise: #1d1f24; }
  .card, .event-card, .table-wrap, fieldset, .full-rules, .race-card, .legal, .podium .step, dialog { background: #16171b; }
  .site-header { background: #0c0d0f; }
  .site-footer { background: #0e0f12; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --surface: #141519; --raise: #1d1f24; }
  .card, .event-card, .table-wrap, fieldset, .full-rules, .race-card, .legal, .podium .step, dialog, .site-header, .site-footer {
    background: #16171b; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}

/* ================= home page ================= */
body[data-page="home"] { background: #050506; }
body[data-page="home"] .section.alt { background: transparent; }

/* "No finish line. No ceiling.": the day-by-day table becomes one clean glass card */
body[data-page="home"] #climb .table-wrap {
  overflow-y: hidden; border: 1px solid var(--g-line); border-radius: var(--g-radius);
  background: var(--g-panel); box-shadow: var(--g-shadow);
}
body[data-page="home"] #climb table { table-layout: fixed; }
body[data-page="home"] #climb th, body[data-page="home"] #climb td { padding: 1.05rem 1.4rem; vertical-align: middle; border-bottom-color: rgba(255, 255, 255, .07); }
body[data-page="home"] #climb th { background: rgba(255, 255, 255, .035); color: #a3a5aa; }
body[data-page="home"] #climb th:nth-child(1), body[data-page="home"] #climb td:nth-child(1) { width: 16%; }
body[data-page="home"] #climb th:nth-child(2), body[data-page="home"] #climb td:nth-child(2),
body[data-page="home"] #climb th:nth-child(3), body[data-page="home"] #climb td:nth-child(3) { width: 21%; }
body[data-page="home"] #climb td:last-child { min-width: 0; white-space: normal; padding-left: 2rem; }
body[data-page="home"] #climb th:last-child { padding-left: 2rem; }
body[data-page="home"] #climb tbody tr:last-child td { border-bottom: 0; }
body[data-page="home"] #climb tbody tr:hover { background: rgba(255, 255, 255, .03); }
/* phones: each day becomes a tidy glass row: day + both distances on one line, the feeling under them */
@media (max-width: 720px) {
  body[data-page="home"] #climb table, body[data-page="home"] #climb tbody { display: block; }
  body[data-page="home"] #climb thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body[data-page="home"] #climb tbody tr {
    display: grid; grid-template-columns: 1fr 1.25fr; gap: .35rem 1rem; align-items: start;
    padding: .95rem 1.1rem; border-bottom: 1px solid rgba(255, 255, 255, .07);
  }
  body[data-page="home"] #climb tbody tr:last-child { border-bottom: 0; }
  body[data-page="home"] #climb td { display: block; width: auto !important; padding: 0; border: 0; text-align: left; white-space: normal; }
  body[data-page="home"] #climb td:first-child { grid-column: 1 / -1; font-size: 1rem; }
  body[data-page="home"] #climb td:nth-child(2), body[data-page="home"] #climb td:nth-child(3) { white-space: nowrap; font-size: .88rem; }
  body[data-page="home"] #climb td:nth-child(2)::before, body[data-page="home"] #climb td:nth-child(3)::before {
    display: block; font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9a9ca1; margin-bottom: .1rem;
  }
  body[data-page="home"] #climb td:nth-child(2)::before { content: "That day"; }
  body[data-page="home"] #climb td:nth-child(3)::before { content: "Total"; }
  body[data-page="home"] #climb td:last-child { grid-column: 1 / -1; padding: .15rem 0 0; font-size: .9rem; color: var(--ink-2); }
}

/* "Win it all": podium and award cards as frosted, rounded glass with even alignment */
body[data-page="home"] #prizes .podium { gap: 1rem; align-items: end; }
body[data-page="home"] #prizes .podium .step {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem; text-align: center;
  min-height: 150px; padding: 1.6rem 1.2rem; border: 1px solid var(--g-line); border-radius: var(--g-radius);
  background: var(--g-panel); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur);
}
body[data-page="home"] #prizes .podium .step.first { min-height: 190px; }
body[data-page="home"] #prizes .podium .step p { margin: 0; line-height: 1.45; }
body[data-page="home"] #prizes .podium .step.first { box-shadow: inset 0 2px 0 var(--gold), 0 0 0 1px rgba(226, 190, 69, .18), 0 24px 60px -24px rgba(0, 0, 0, .9), 0 18px 50px -30px rgba(226, 190, 69, .45); }
body[data-page="home"] #prizes .podium .step.second { box-shadow: inset 0 2px 0 var(--silver), 0 24px 60px -24px rgba(0, 0, 0, .9); }
body[data-page="home"] #prizes .podium .step.third { box-shadow: inset 0 2px 0 var(--bronze), 0 24px 60px -24px rgba(0, 0, 0, .9); }
body[data-page="home"] #prizes .grid.g3 { gap: 1rem; align-items: stretch; }
body[data-page="home"] #prizes .grid.g3 .card {
  padding: 1.6rem 1.5rem; border: 1px solid var(--g-line); border-radius: var(--g-radius);
  background: var(--g-panel); box-shadow: var(--g-shadow); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur);
}
body[data-page="home"] #prizes .grid.g3 .card h3 { margin: .9rem 0 .5rem; }
body[data-page="home"] #prizes .grid.g3 .card p { margin: 0; }
@media (max-width: 640px) {
  body[data-page="home"] #prizes .podium .step, body[data-page="home"] #prizes .podium .step.first { min-height: 0; padding: 1.3rem 1rem; }
}
/* award cards line up under the podium columns */
@media (min-width: 641px) { body[data-page="home"] #prizes .grid.g3 { grid-template-columns: 1fr 1.15fr 1fr; } }
