/* Endorphin Boxing. Flat black frame; the logo and the photos carry the colour. Rules: ../../endorphin/BUILD-RULES.md
   Design kit pass 21 Oct (impeccable craft floor + taste-skill house rules): surfaces split by tone steps, no hairlines;
   six type sizes; themed browser surfaces; one hero moment plus quiet section entrances. */
:root {
  color-scheme: dark;
  --bg: #0b0b0b;
  --panel: #141414;    /* one tone step up: strips, boxes, footer */
  --raise: #1d1d1d;    /* two steps up: chips, filter buttons */
  --line: #262626;     /* real tables and form fields only */
  --text: #f2f2f0;
  --muted: #a9a6a1;
  --red: #e40303;      /* sampled from his logo; large type and selected states only */
  --red-btn: #c80000;  /* white text passes 6:1 on this */
  --pink: #f10a6e;     /* Queens only */
  --pink-text: #ff3d8f; /* Queens at small sizes: 5.1:1 on chips, brand pink is 4.0:1 */
  --wrap: 1180px;
  /* type: six sizes */
  --fs-sm: .9375rem;
  --fs-body: 1.0625rem;
  --fs-lead: 1.25rem;
  --fs-h3: 1.5rem;
  --fs-h2: clamp(2.25rem, 4.4vw, 3.25rem);
  --fs-h1: clamp(3rem, 7vw, 5.75rem);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #3a3a3a var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-body)/1.6 "Barlow", system-ui, sans-serif;
  caret-color: var(--red);
  accent-color: var(--red-btn);
}
::selection { background: var(--red-btn); color: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
p { margin: 0 0 1em; max-width: 68ch; }
h1, h2, h3 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0 0 .5em;
}
h1 { font-size: var(--fs-h1); line-height: .94; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); }
h3, h2.sm { font-size: var(--fs-h3); letter-spacing: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.role { color: var(--muted); margin: -.3em 0 .9em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; color: #000; padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* top bar + header */
.topbar { background: var(--panel); font-size: var(--fs-sm); color: var(--muted); }
.topbar .wrap { display: flex; gap: 24px; justify-content: space-between; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.topbar a { text-decoration: none; }
.topbar a:hover { color: var(--text); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 16px; padding-bottom: 16px; }
.logo img { width: 190px; height: auto; }
nav.main ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
nav.main a {
  text-decoration: none;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: var(--fs-lead);
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
nav.main a:hover { border-color: #555; }
nav.main a[aria-current="page"] { border-color: var(--red); }
details.menu { display: none; }

/* buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: var(--fs-lead);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 13px 24px;
  border-radius: 3px;
  background: var(--red-btn);
  color: #fff;
  border: 0;
  cursor: pointer;
}
.btn:hover { background: #a80000; }
.btn:active { transform: scale(.97); }
.textlink { font-weight: 500; }
.textlink:hover { color: #fff; text-decoration-thickness: 2px; }

/* hero: split, left aligned, real photo */
.hero .wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; padding-top: 48px; padding-bottom: 88px; }
.hero h1 { margin-bottom: .4em; }
.hero p.lead { font-size: var(--fs-lead); color: #dcd9d4; max-width: 44ch; }
.hero .actions { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-top: 30px; }
.hero figure { margin: 0; overflow: hidden; border-radius: 2px; }
.hero figure img { width: 100%; height: min(76vh, 720px); object-fit: cover; }
.hero .facts { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 6px; color: var(--muted); font-size: var(--fs-sm); }
.hero .facts b { color: var(--text); font-weight: 500; }

/* today strip */
.today { background: var(--panel); }
.today .wrap { display: flex; gap: 28px; align-items: baseline; padding-top: 24px; padding-bottom: 24px; flex-wrap: wrap; }
.today h2 { font-size: var(--fs-h3); margin: 0; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip { background: var(--raise); border-radius: 999px; padding: 5px 14px; font-size: var(--fs-sm); white-space: nowrap; }
.chip time { color: var(--muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
.chip.queens { color: var(--pink-text); }
.chip.invite { background: none; color: var(--muted); }

/* sections: separated by space and tone steps, never lines. Rhythm varies on purpose. */
section { padding: 72px 0; }
section.roomy { padding: 112px 0; }
section.tight { padding: 48px 0; }
section.tone { background: var(--panel); }
.head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 36px; }
.head h2 { margin: 0; }

/* class rows */
.classes { display: grid; gap: 44px; }
.class-row { display: grid; grid-template-columns: 240px 1fr 240px; gap: 32px; align-items: start; }
.class-row img { width: 240px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.class-row h3 { margin-bottom: .25em; }
.class-row .who { color: var(--muted); margin: 0 0 .5em; }
.class-row .when { font-size: var(--fs-sm); color: var(--muted); padding-top: 4px; font-variant-numeric: tabular-nums; }
.class-row .when b { color: var(--text); font-weight: 500; display: block; margin-bottom: 2px; }
.class-row.queens h3 { color: var(--pink); }

/* coach intro and class detail */
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.split img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 2px; }
.who-line { color: var(--muted); margin: -.3em 0 1.1em; }
blockquote { margin: 0; }

/* fight team record */
.record-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: center; }
.record-grid h2 { margin: 0; }
.record { display: grid; gap: 14px; list-style: none; padding: 0; margin: 0; }
.record li { color: var(--muted); font-size: var(--fs-lead); }
.record b { font: 700 var(--fs-h2)/1 "Barlow Condensed", sans-serif; color: var(--text); margin-right: 12px; font-variant-numeric: tabular-nums; display: inline-block; min-width: 1.6em; }

/* testimonials */
.quotes { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; }
.quote p { font-size: var(--fs-lead); line-height: 1.5; }
.quote cite { font-style: normal; font-weight: 500; color: var(--muted); }

/* tables (real tables keep their lines) */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 var(--fs-sm) "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
td.price, th.price { text-align: right; white-space: nowrap; }
.tablewrap { overflow-x: auto; }
.notes { list-style: none; padding: 0; margin: 18px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 32px; }

/* timetable: calm, low-noise, no grid lines. Red only marks today. */
.nextclass { margin: 0 0 18px; color: var(--muted); }
.nextclass b { font-weight: 500; color: var(--text); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 40px; }
.filters button, .daytabs button {
  font: 500 var(--fs-sm) "Barlow", sans-serif; letter-spacing: 0;
  background: var(--panel); color: var(--muted); border: 0; border-radius: 999px; padding: 7px 15px; cursor: pointer;
}
.filters button:hover, .daytabs button:hover { color: var(--text); background: var(--raise); }
.filters button:active, .daytabs button:active { transform: scale(.96); }
.filters button[aria-pressed="true"], .daytabs button[aria-selected="true"] { color: #fff; background: #2e2e2e; }
.daytabs { display: none; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.sched { display: grid; grid-template-columns: 84px repeat(6, minmax(0, 1fr)); column-gap: 6px; }
.sched .dayhead { padding: 12px 16px; font: 600 var(--fs-body) "Barlow Condensed", sans-serif; letter-spacing: .02em; text-transform: uppercase; color: var(--text); }
.sched .dayhead.is-today { background: var(--panel); border-radius: 3px 3px 0 0; }
.sched .dayhead.is-today::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-right: 8px; vertical-align: middle; }
.sched .dayhead.is-today::after { content: "today"; margin-left: 8px; font: 500 var(--fs-sm) "Barlow", sans-serif; text-transform: none; color: var(--muted); }
.sched .band { padding: 20px 0 0; color: var(--muted); font: 500 var(--fs-sm) "Barlow", sans-serif; }
.sched .cell { padding: 20px 16px 28px; }
.sched .cell.is-today { background: var(--panel); }
.sched ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.sched li { font-size: var(--fs-sm); line-height: 1.4; transition: opacity .2s ease; }
.sched li time { display: block; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.sched li a { text-decoration: none; color: #e4e1dc; font-weight: 500; }
.sched li a:hover { color: #fff; text-decoration: underline; }
.sched li.queens a { color: var(--pink-text); }
.sched li.invite a { color: var(--muted); }
.sched li.dim { opacity: .18; }
.openbox { display: flex; flex-wrap: wrap; gap: 14px 56px; margin-top: 44px; padding: 26px 28px; background: var(--panel); border-radius: 3px; align-items: baseline; }
.openbox h2 { font-size: var(--fs-h3); margin: 0; }
.openbox p { margin: 0; color: var(--muted); }
.openbox b { display: block; color: var(--text); font-weight: 500; }

/* coaches */
.coaches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 64px 56px; }
.coach { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: start; }
.coach img { width: 180px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 2px; }
.coach ul { margin: .4em 0 0; padding-left: 1.1em; color: #d8d5d0; font-size: var(--fs-sm); }

/* lists */
ul.plain { padding-left: 1.1em; }
ul.plain li { margin-bottom: .35em; }
ol.rules { padding-left: 1.4em; columns: 2; column-gap: 48px; }
ol.rules li { margin-bottom: .5em; break-inside: avoid; }

/* location */
.loc { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.loc img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; }

/* contact form (placeholder) */
form.contact { display: grid; gap: 14px; max-width: 560px; }
form.contact label { display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
form.contact input, form.contact select, form.contact textarea {
  font: inherit; color: var(--text); background: var(--panel); border: 1px solid #3a3a3a; border-radius: 3px; padding: 11px 12px;
  transition: border-color .2s ease;
}
form.contact input:hover, form.contact textarea:hover { border-color: #555; }
form.contact input:focus-visible, form.contact textarea:focus-visible { outline: 2px solid #fff; outline-offset: 1px; border-color: transparent; }
form.contact textarea { min-height: 130px; resize: vertical; }
form.contact .sent { display: none; background: var(--panel); border-radius: 3px; padding: 14px 16px; margin: 0; }
form.contact.is-sent .sent { display: block; }
.contacts { display: grid; gap: 24px; }
.contacts h2.sm { font-size: var(--fs-lead); margin-bottom: .2em; }
.contacts p { margin: 0; }

/* sponsors */
.sponsor-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.sponsor-list li { background: var(--panel); border-radius: 3px; padding: 16px 18px; font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: var(--fs-lead); text-transform: uppercase; letter-spacing: .02em; }

/* page heading */
.pagehead { padding: 64px 0 8px; }
.pagehead p { color: #dcd9d4; font-size: var(--fs-lead); }
.pagehead .btn { margin-top: 10px; }

/* footer: a tone step down the page, no rule and no bottom bar */
footer.site { background: var(--panel); padding: 56px 0 48px; color: var(--muted); font-size: var(--fs-sm); }
footer.site .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
footer.site h3 { font-size: var(--fs-lead); color: var(--text); margin-bottom: .6em; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
footer.site a { text-decoration: none; }
footer.site a:hover { color: var(--text); }

@media (max-width: 900px) {
  nav.main { display: none; }
  details.menu { display: block; position: relative; }
  details.menu summary {
    list-style: none; cursor: pointer; font: 700 var(--fs-lead) "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .05em;
    background: var(--raise); border-radius: 3px; padding: 8px 16px;
  }
  details.menu summary::-webkit-details-marker { display: none; }
  details.menu ul { list-style: none; margin: 0; padding: 10px 0; position: absolute; right: 0; top: 52px; background: var(--raise); border-radius: 3px; min-width: 220px; z-index: 5; }
  details.menu a { display: block; padding: 11px 18px; text-decoration: none; font: 600 var(--fs-lead) "Barlow Condensed", sans-serif; text-transform: uppercase; }
  details.menu a[aria-current="page"] { text-decoration: underline 2px var(--red); text-underline-offset: 6px; }
  .logo img { width: 150px; }
  .hero .wrap, .split, .quotes, .grid2, .loc, .record-grid { grid-template-columns: 1fr; gap: 32px; }
  .grid2 { gap: 64px; }
  .hero .wrap { padding-top: 24px; padding-bottom: 56px; }
  .hero figure { order: -1; }
  .hero figure img { height: auto; aspect-ratio: 16 / 10; }
  .class-row { grid-template-columns: 1fr; gap: 12px; }
  .class-row img { width: 100%; aspect-ratio: 16 / 9; }
  .coaches { grid-template-columns: 1fr; }
  .daytabs { display: flex; }
  .sched { grid-template-columns: 1fr; }
  .sched .corner, .sched .dayhead, .sched .band { display: none; }
  .sched .cell, .sched .cell.is-today { display: none; padding: 0 0 24px; background: none; }
  .sched .cell.is-shown:not(.empty) { display: block; }
  .sched .cell::before { content: attr(data-band); display: block; margin-bottom: 12px; color: var(--muted); font: 500 var(--fs-sm) "Barlow", sans-serif; }
  .sched .cell.is-shown { animation: fade .3s ease both; }
  ol.rules { columns: 1; }
  th, td { padding: 10px 6px; font-size: var(--fs-sm); }
  td .muted { display: block; }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
  section { padding: 56px 0; }
  section.roomy { padding: 72px 0; }
  .pagehead { padding: 40px 0 0; }
}
@media (max-width: 520px) {
  .coach { grid-template-columns: 1fr; }
  .coach img { width: 100%; max-width: 320px; }
  footer.site .cols { grid-template-columns: 1fr; }
  .topbar .hide-sm { display: none; }
}

/* motion. The hero is the one authored moment: the photo opens, the words rise. Below the fold each section's parts
   rise once as they enter (site.js adds .pre only to off-screen parts, so nothing stays hidden without script).
   All of it is off when the visitor asks for reduced motion. */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes unveil { from { clip-path: inset(0 0 100% 0); transform: scale(1.08); } to { clip-path: inset(0); transform: none; } }
.hero .wrap > div > *, .pagehead .wrap > * { animation: rise .8s var(--ease-out) both; }
.pagehead .wrap > :nth-child(2) { animation-delay: .07s; }
.hero .wrap > div > :nth-child(2) { animation-delay: .07s; }
.hero .wrap > div > :nth-child(3) { animation-delay: .14s; }
.hero .wrap > div > :nth-child(4) { animation-delay: .21s; }
.hero figure img { animation: unveil 1.2s var(--ease-out) both; }
.pre { opacity: 0; transform: translateY(22px); }
.in { transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
form.contact.is-sent .sent { animation: rise .4s var(--ease-out) both; }
.btn { transition: background-color .2s ease, transform .12s ease; }
.filters button, .daytabs button { transition: background-color .2s ease, color .2s ease, transform .12s ease; }
nav.main a, .textlink { transition: border-color .2s ease, color .2s ease, text-decoration-thickness .2s ease; }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .hero .wrap > div > *, .pagehead .wrap > *, .hero figure img, .sched .cell.is-shown, form.contact.is-sent .sent { animation: none; }
  .btn, .filters button, .daytabs button, nav.main a, .textlink, .sched li, .in { transition: none; }
  .btn:active, .filters button:active, .daytabs button:active { transform: none; }
}

/* touch targets: 44px on phones and tablets */
@media (max-width: 900px) {
  .topbar .wrap { padding-top: 0; padding-bottom: 0; }
  .topbar a { display: inline-block; padding: 13px 0; }
  details.menu summary { min-height: 44px; display: flex; align-items: center; }
  .filters button, .daytabs button { min-height: 44px; }
  .class-row .textlink, .head .textlink, .actions .textlink { display: inline-block; padding: 12px 0; margin: -12px 0; }
}
@media (max-width: 900px) {
  .topbar .wrap { align-items: center; }
}
/* tablet: class rows keep the photo beside the text instead of a full-width stack */
@media (min-width: 521px) and (max-width: 900px) {
  .class-row { grid-template-columns: 200px 1fr; column-gap: 24px; }
  .class-row img { width: 200px; aspect-ratio: 4 / 3; grid-row: span 2; }
  .class-row .when { grid-column: 2; }
}

/* top bar social icons */
.tb-links { display: flex; align-items: center; gap: 6px; }
.tb-links a.ico { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); transition: color .2s ease, background-color .2s ease; }
.tb-links a.ico:hover { color: var(--text); background: var(--raise); }
.tb-links a.ico:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.tb-links a[href^="tel"] { margin-right: 10px; }
@media (max-width: 900px) {
  .topbar a.ico { padding: 0; width: 44px; height: 44px; }
  .topbar a[href^="tel"] { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
}

/* timetable: class detail panel */
.classpanel { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; background: var(--panel); border-radius: 3px; padding: 22px 24px; margin: 8px 0 22px; }
.classpanel[hidden] { display: none; }
.classpanel .who { color: var(--muted); margin: 0 0 .6em; }
.classpanel .links { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; margin-bottom: 0; }
.classpanel .clear { background: none; border: 0; color: var(--muted); font: inherit; font-size: var(--fs-sm); cursor: pointer; padding: 10px 0; text-decoration: underline; text-underline-offset: 3px; }
.classpanel .clear:hover { color: var(--text); }
.classpanel .times { margin: 0 0 .8em; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.classpanel .times li { padding: 3px 0; color: var(--muted); }
.classpanel .times b { color: var(--text); font-weight: 500; margin-right: 6px; }
.classpanel .nextof { margin: 0; }
.classpanel.queens h2 { color: var(--pink); }
.classpanel.is-in { animation: rise .35s var(--ease-out) both; }
.sched.has-sel li:not(.dim) { background: var(--raise); border-radius: 3px; }
.sched li a { cursor: pointer; }
@media (max-width: 700px) { .classpanel { grid-template-columns: 1fr; gap: 18px; padding: 18px; } }
@media (prefers-reduced-motion: reduce) { .classpanel.is-in { animation: none; } }

ul.jump.plain { display: grid; gap: 4px; margin: 0 0 1.2em; padding-left: 0; list-style: none; font: 600 var(--fs-lead) "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .03em; }
.jump a { display: inline-block; padding: 8px 0; }
