/* UNO Pickleball design tokens and component styles
   Primary navy stays the live site colour #122543.
   Type: Outfit (geometric sans, pairs with the Century Gothic wordmark). */

:root {
  --color-navy: #122543;
  --color-accent: #183a6d;
  --color-brand-blue: #001e83;
  --color-bg: #f1f4f8;
  --color-surface: #ffffff;
  --color-border: #dce4ef;
  --color-border-strong: #8798ae;
  --color-selected-bg: #eaf2ff;
  --color-selected-border: #5375a5;
  --color-text: #122543;
  --color-text-muted: #44566c;
  --color-on-navy: #ffffff;
  --color-on-navy-muted: #dde7f5;
  --color-error: #862123;
  --color-error-bg: #fdecee;
  --color-success: #1b6b45;
  --color-success-bg: #e7f6ee;
  --color-warning: #8a5a00;
  --color-warning-bg: #fff4d6;
  --color-focus: #3975c8;

  --font: "Outfit", system-ui, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.35rem;
  --text-display: clamp(1.85rem, 6.5vw, 2.75rem);
  --leading: 1.55;
  --leading-tight: 1.2;
  --tracking-tight: -0.035em;
  --tracking-wide: 0.14em;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  --radius-sm: 0.5rem;
  --radius-md: 0.65rem;
  --radius-lg: 1rem;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(18, 37, 67, 0.06);
  --shadow-md: 0 4px 16px rgba(18, 37, 67, 0.08);
  --shadow-lg: 0 14px 36px rgba(18, 37, 67, 0.16);

  --measure: 43rem;
  --page: 70rem;
  --tap: 2.75rem;
}

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

html { color-scheme: light; }

body {
  margin: 0;
  font: 400 var(--text-md)/var(--leading) var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); margin: 0; }
h1 { font-size: var(--text-display); font-weight: 800; }
h2 { font-size: var(--text-xl); font-weight: 700; }
h3 { font-size: var(--text-lg); font-weight: 650; }

p { margin: 0; }
a { color: var(--color-accent); }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }

/* ——— Layout ——— */
.wrap {
  width: min(100% - 2rem, var(--page));
  margin-inline: auto;
}
.wrap--narrow { width: min(100% - 2rem, var(--measure)); }

.section {
  padding: var(--space-7) 0;
}
.section + .section { border-top: 1px solid var(--color-border); }

.section__label {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent);
}
.section__lead {
  margin: 0 0 var(--space-5);
  color: var(--color-text-muted);
  max-width: 40rem;
}

.stack { display: grid; gap: var(--space-5); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* ——— Site header ——— */
.site-header {
  background: var(--color-navy);
  color: var(--color-on-navy);
  padding: 1.15rem 0 1.35rem;
}
.site-header__inner {
  width: min(100% - 2rem, var(--page));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.brand__logo {
  width: clamp(5.5rem, 28vw, 7.25rem);
  height: auto;
  flex: none;
}
.brand__meta { min-width: 0; }
.brand__kicker {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-on-navy-muted);
  margin: 0 0 0.2rem;
}
.brand__venue {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--color-on-navy-muted);
  max-width: 16rem;
}
.nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.nav a {
  color: var(--color-on-navy);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-pill);
}
.nav a[aria-current="page"],
.nav a:hover { background: rgba(255, 255, 255, 0.1); }

/* ——— Colour tokens ——— */
.swatch-groups { display: grid; gap: var(--space-6); }
.swatch-group h3 { margin-bottom: var(--space-3); font-size: var(--text-md); letter-spacing: 0; }
.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: var(--space-3);
}
.swatch {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.swatch__chip {
  height: 5.25rem;
  display: flex;
  align-items: flex-end;
  padding: 0.55rem 0.7rem;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.swatch__chip.is-dark { color: #fff; }
.swatch__chip.is-light {
  color: var(--color-text);
  box-shadow: inset 0 0 0 1px rgba(18, 37, 67, 0.06);
}
.swatch__meta { padding: 0.65rem 0.7rem 0.8rem; }
.swatch__name { font-weight: 600; font-size: var(--text-sm); }
.swatch__use { display: block; color: var(--color-text-muted); font-size: var(--text-xs); margin-top: 0.1rem; }

/* ——— Typography ——— */
.type-spec { display: grid; gap: var(--space-5); }
.type-row {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.type-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-bottom: 0.55rem;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.type-display { font-size: var(--text-display); font-weight: 800; letter-spacing: var(--tracking-tight); line-height: var(--leading-tight); }
.type-h2 { font-size: var(--text-xl); font-weight: 700; letter-spacing: var(--tracking-tight); }
.type-body { font-size: var(--text-md); font-weight: 400; line-height: var(--leading); max-width: 38rem; }
.type-small { font-size: var(--text-sm); color: var(--color-text-muted); }
.type-label { font-size: var(--text-md); font-weight: 600; }
.type-overline {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent);
}

/* ——— Scale ——— */
.scale-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 800px) {
  .scale-grid { grid-template-columns: 1.2fr 1fr 1fr; align-items: start; }
}
.scale-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.scale-card h3 { margin-bottom: var(--space-4); font-size: var(--text-md); letter-spacing: 0; }
.space-row {
  display: grid;
  grid-template-columns: 3.25rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}
.space-bar {
  height: 0.65rem;
  background: var(--color-accent);
  border-radius: 2px;
}
.space-row span:last-child { color: var(--color-text-muted); font-size: var(--text-xs); }
.radius-row, .shadow-row { display: grid; gap: 0.85rem; }
.radius-demo, .shadow-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.5rem;
  background: var(--color-selected-bg);
  border: 1px solid var(--color-border);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
}
.shadow-demo { background: var(--color-surface); border: 0; }

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: var(--tap);
  padding: 0.45rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: 600 var(--text-md)/1.2 var(--font);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn--primary { background: var(--color-accent); color: #fff; }
.btn--primary:hover { background: var(--color-navy); }
.btn--secondary {
  background: #fff;
  color: var(--color-accent);
  border-color: var(--color-border-strong);
}
.btn--secondary:hover { background: var(--color-bg); }
.btn--ghost {
  background: transparent;
  color: var(--color-accent);
  border-color: transparent;
}
.btn--ghost:hover { background: var(--color-selected-bg); }
.btn:disabled,
.btn--disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* ——— Forms ——— */
.form-grid {
  display: grid;
  gap: 0 1.25rem;
}
@media (min-width: 720px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: 1 / -1; }
}
.field { display: block; margin-bottom: 0.95rem; }
.field__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.field__hint { display: block; font-size: var(--text-sm); color: var(--color-text-muted); margin-top: -0.15rem; margin-bottom: 0.35rem; }
.input, .select, .file, select.input {
  width: 100%;
  min-height: var(--tap);
  font: inherit;
  color: inherit;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
}
.select, select.input {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path fill='%23122543' d='M4.2 6.2 8 10l3.8-3.8 1.2 1.2L8 12.4 3 7.4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  padding-right: 2.2rem;
}
.input:focus, .select:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(24, 58, 109, 0.15); outline: none; }
.input--error { border-color: var(--color-error); background: var(--color-error-bg); }
.field__error { color: var(--color-error); font-size: var(--text-sm); font-weight: 600; margin: 0.3rem 0 0; }

.check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-weight: 600;
}
.check input[type="checkbox"] {
  margin: 0.2rem 0 0;
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--color-accent);
  flex: none;
}

.file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 7.5rem;
  padding: 1.1rem;
  border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  text-align: center;
  cursor: pointer;
}
.file-drop input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.file-drop strong { font-weight: 650; }
.file-drop small { color: var(--color-text-muted); }

.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: var(--shadow-sm);
}

/* ——— Badges ——— */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 1.5rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}
.badge--beginner { background: var(--color-brand-blue); color: #fff; }
.badge--slots { background: var(--color-success-bg); color: var(--color-success); }
.badge--full { background: #eceff3; color: var(--color-text-muted); }
.badge--pending { background: var(--color-warning-bg); color: var(--color-warning); }
.badge--verified { background: var(--color-success-bg); color: var(--color-success); }
.badge--saints { background: var(--color-selected-bg); color: var(--color-accent); }

/* ——— Session cards ——— */
.session-list { display: grid; gap: 0.65rem; }
.session {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem 0.85rem;
  align-items: start;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  cursor: pointer;
}
.session:has(:checked) {
  background: var(--color-selected-bg);
  border-color: var(--color-selected-border);
}
.session--full {
  opacity: 0.72;
  cursor: default;
  background: #f7f9fb;
}
.session input[type="checkbox"] {
  margin: 0.3rem 0 0;
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--color-accent);
}
.session--full input { visibility: hidden; }
.session__when { font-weight: 650; margin: 0 0 0.2rem; }
.session__meta { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.session__slots { display: block; margin-top: 0.3rem; font-size: var(--text-sm); color: var(--color-text-muted); }
.session__price {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: right;
  line-height: 1.2;
  white-space: nowrap;
}
.session__price small {
  display: block;
  font-weight: 500;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ——— Booking composition + summary bar ——— */
.booking-frame {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  max-width: var(--measure);
}
.booking-frame__body { padding: 1.15rem 1rem 1rem; }
.booking-frame__title { margin-bottom: 0.85rem; }
.summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -8px 24px rgba(18, 37, 67, 0.06);
}
.summary-bar__copy { min-width: 0; }
.summary-bar__kicker { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.summary-bar__total { margin: 0; font-size: 1.2rem; font-weight: 750; letter-spacing: var(--tracking-tight); font-variant-numeric: tabular-nums; }
.summary-bar .btn { margin-left: auto; }

.summary-bar__players {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.summary-bar__players.is-disabled { opacity: 0.55; }
.summary-bar__players-label {
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg);
  overflow: hidden;
  flex: 0 0 auto;
}
.stepper__btn {
  width: 2.15rem;
  height: 2.15rem;
  min-width: 2.15rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.stepper__btn:disabled { opacity: 0.4; cursor: default; }
.stepper__btn:not(:disabled):active { background: var(--color-border); }
.stepper__value {
  min-width: 1.35rem;
  text-align: center;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
}

@media (max-width: 520px) {
  .summary-bar:not(.summary-bar--sticky) .btn { width: 100%; margin-left: 0; }
}

/* ——— Admin table ——— */
.table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}
.admin-table th {
  text-align: left;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 600;
  padding: 0.45rem 0.7rem 0.6rem;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.admin-table td {
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table__session { font-weight: 650; white-space: nowrap; }
.admin-table__sub { display: block; font-weight: 400; color: var(--color-text-muted); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.admin-table .btn { min-height: 2.25rem; padding: 0.3rem 0.75rem; font-size: var(--text-sm); }

@media (max-width: 700px) {
  .admin-table, .admin-table thead, .admin-table tbody, .admin-table th, .admin-table td, .admin-table tr {
    display: block;
  }
  .admin-table thead { display: none; }
  .admin-table tr {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
  }
  .admin-table tr:last-child { border-bottom: 0; }
  .admin-table td {
    display: grid;
    grid-template-columns: 8.75rem 1fr;
    gap: 0.45rem 0.65rem;
    padding: 0.28rem 0;
    border: 0;
    align-items: start;
  }
  .admin-table td::before {
    content: attr(data-label);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding-top: 0.2rem;
  }
  .admin-table td > * { grid-column: 2; min-width: 0; }
}

/* ——— Directions ——— */
.directions {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 800px) {
  .directions { grid-template-columns: 22rem minmax(0, 1fr); align-items: start; }
}
.directions__media { display: grid; gap: 0.75rem; align-content: start; }
.directions__watch { margin: 0; color: var(--color-text-muted); }
.directions__copy { display: flex; flex-direction: column; min-width: 0; }
.directions__links { margin-top: auto; }
.video-card {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  min-height: 14rem;
}
.video-card img {
  width: 100%;
  height: 18rem;
  object-fit: cover;
  object-position: 55% 40%;
}
.video-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 37, 67, 0.15) 20%, rgba(18, 37, 67, 0.78) 100%);
}
.video-card__play {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background: #fff;
  color: var(--color-navy);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
}
.video-card__play svg { margin-left: 0.15rem; }
.video-card__caption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
}
.video-card__caption strong { display: block; font-size: 1.05rem; }
.video-card__caption span { font-size: var(--text-sm); color: var(--color-on-navy-muted); }
.directions__copy p { margin: 0 0 0.75rem; }
.directions__note {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.directions__links { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ——— Intro + lockups ——— */
.intro { padding: var(--space-6) 0 var(--space-5); }
.intro h1 { margin: 0 0 0.45rem; }
.intro p { color: var(--color-text-muted); max-width: 38rem; }

.lockups { display: grid; gap: var(--space-3); }
@media (min-width: 640px) { .lockups { grid-template-columns: 1fr 1fr; } }
.lockup {
  display: grid;
  place-items: center;
  min-height: 10rem;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--color-border);
}
.lockup--navy { background: var(--color-navy); }
.lockup--light { background: var(--color-surface); }
.lockup img { width: min(14rem, 70%); height: auto; }

.page-end { height: 2rem; }

/* ——— FAQ ——— */
.faq-group { margin: 0 0 1.75rem; }
.faq-group h2 { margin: 0 0 0.65rem; }
.faq-list {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-item + .faq-item { border-top: 1px solid var(--color-border); }
.faq-item { padding: 0 1rem; }
.faq-item summary {
  cursor: pointer;
  font-weight: 650;
  padding: 0.9rem 1.8rem 0.9rem 0;
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ""; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 0.15rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transform: translateY(-70%) rotate(45deg);
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-item p {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}
.faq-item a { font-weight: 600; }
