/* site/assets/css/site.css
 *
 * The whole site's styling. No framework and no build step.
 *
 * Direction: the club's own logo. Its red phoenix and yellow sun give the two
 * colours, its heavy slanted wordmark gives the headline type (Archivo, set
 * wide, heavy and italic). The sun disc is the one bold element, used behind
 * the photo on the home page and on each video page. Everything else stays
 * quiet: white page, dark text, plain lists.
 */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-italic-latin-ext.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --red: #d2202a;          /* the phoenix */
  --sun: #ffc20e;          /* the sun disc */
  --ink: #1d1d1b;
  --muted: #5e5b57;
  --paper: #ffffff;
  --line: #e6e3df;
  --link: var(--red);
  --on-red: #ffffff;

  --gap: clamp(1rem, 4vw, 2.5rem);
  --measure: 38rem;
  --radius: 0.75rem;

  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f1ee;
    --muted: #b3aea8;
    --paper: #171615;
    --line: #34312e;
    --link: #ff6b66;       /* the logo red is too dark to read on black */
  }
}

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

html { -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; }   /* the full-bleed hero is 100vw, which includes any scrollbar */

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
}

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

a { color: var(--link); text-underline-offset: 0.15em; }

:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 2px; }

.wrap { width: min(68rem, 100% - 2 * var(--gap)); margin-inline: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---- Type ------------------------------------------------------------- */

h1, h2, h3 { line-height: 1.1; text-wrap: balance; margin: 0; }

/* The logo's wordmark: wide, heavy, slanted, red. */
.display, h1 {
  font-style: italic;
  font-weight: 850;
  font-stretch: 118%;
  color: var(--red);
  letter-spacing: -0.01em;
}
@media (prefers-color-scheme: dark) { .display, h1 { color: var(--link); } }

h1 { font-size: clamp(2.1rem, 6.5vw, 3.6rem); }
.display { font-size: clamp(2.6rem, 9vw, 5.4rem); line-height: 0.98; }

h2 { font-size: clamp(1.5rem, 3.6vw, 2rem); font-weight: 800; font-stretch: 110%; }
h3 { font-size: 1.25rem; font-weight: 700; }

p { margin: 0; max-width: var(--measure); text-wrap: pretty; }
.lead { font-size: clamp(1.125rem, 2.4vw, 1.375rem); line-height: 1.45; }
.muted { color: var(--muted); }

.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-lg { display: flex; flex-direction: column; gap: clamp(1.5rem, 4vw, 2.5rem); }

/* ---- Header and footer ------------------------------------------------ */

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem 1.5rem; flex-wrap: wrap;
  padding-block: 1rem;
}
.site-header__logo img { height: 2.75rem; width: auto; }
@media (min-width: 48rem) { .site-header__logo img { height: 3.5rem; } }
.nav { display: flex; gap: 0.25rem 1.25rem; flex-wrap: wrap; }
.nav a {
  color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 600;
  padding-block: 0.5rem;
}
.nav a:hover { color: var(--link); }
.nav a[aria-current="page"] { color: var(--link); text-decoration: underline; text-decoration-thickness: 2px; }

main { padding-block: clamp(1.5rem, 5vw, 3.5rem); }

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem 2.5rem;
  color: var(--muted);
}
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer a { color: inherit; }

/* ---- Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--red); color: var(--on-red);
  font: inherit; font-size: 1.0625rem; font-weight: 700;
  text-decoration: none; border: 0; cursor: pointer;
}
.btn:hover { background: color-mix(in srgb, var(--red), black 14%); }
.btn--quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn--quiet:hover { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
/* Not a button: shown in place of "buy" until the live Stripe account exists. */
.btn--off,
.btn--off:hover { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); cursor: default; }

/* ---- The sun disc ----------------------------------------------------- */
/* A yellow circle with a round photo set slightly off centre, the way the
   phoenix rises out of the sun in the logo. */

.sun {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 30rem);
  border-radius: 50%;
  background: var(--sun);
  justify-self: center;
}
.sun img {
  position: absolute;
  inset: 9% 9% 2% 6%;
  width: 85%; height: 89%;
  object-fit: cover;
  border-radius: 50%;
}

/* ---- Home ------------------------------------------------------------- */

.hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* The promo as the hero, phone first. Phones: the portrait edit at 4:5 with
   the headline over its lower edge, intro and buttons on white below. Wide
   screens: the landscape cut fills the hero and a dark gradient keeps the text
   readable whatever frame is showing. */
.hero-video {
  --inset: max(var(--gap), (100% - 68rem) / 2);        /* lines text up with .wrap */
  position: relative;
  width: 100vw; margin-inline: calc(50% - 50vw);       /* break out of .wrap */
  margin-top: calc(-1 * clamp(1.5rem, 5vw, 3.5rem));   /* sit flush under the header */
  display: grid;
  grid-template-areas: "media" "more";
}
.hero-video__media {
  grid-area: media;
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block;
  background: #000 url("/assets/img/promo-poster-portrait.jpg") center / cover;
}
.hero-video__title {
  grid-area: media; align-self: end; position: relative;
  padding: 6rem var(--inset) 1.25rem;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.75), rgb(0 0 0 / 0));
}
.hero-video__title .display { color: #fff; }
.hero-video__more { grid-area: more; padding: 1.5rem var(--inset) 0; display: flex; flex-direction: column; gap: 1.5rem; }
.hero-video__toggle {
  position: absolute; right: 0.75rem; top: 0.75rem; z-index: 2;
  min-height: 2.75rem; padding: 0.5rem 1rem;
  border: 0; border-radius: 999px;
  background: rgb(0 0 0 / 0.55); color: #fff;
  font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
}
.hero-video__toggle:hover { background: rgb(0 0 0 / 0.75); }

@media (min-width: 48rem) {
  /* The hero's height comes from the viewport, not the video: absolute
     positioning stops the video's own shape from stretching the hero and
     pushing the buttons below the fold. */
  .hero-video {
    min-height: calc(100svh - 5.5rem); max-height: 52rem;
    grid-template-areas: "." "title" "more";
    grid-template-rows: 1fr auto auto;
  }
  .hero-video__media {
    position: absolute; inset: 0; height: 100%; aspect-ratio: auto;
    background-image: url("/assets/img/promo-poster.jpg");
  }
  .hero-video::after {                                   /* the scrim */
    content: ""; position: absolute; inset: 0; pointer-events: none;   /* above the video, below the text */
    background:
      linear-gradient(90deg, rgb(0 0 0 / 0.78) 0%, rgb(0 0 0 / 0.45) 45%, rgb(0 0 0 / 0) 75%),
      linear-gradient(0deg, rgb(0 0 0 / 0.55) 0%, rgb(0 0 0 / 0) 45%);
  }
  .hero-video__title { grid-area: title; background: none; padding: 0 var(--inset) 1.5rem; z-index: 1; }
  .hero-video__title .display { max-width: 11ch; }
  .hero-video__more { position: relative; z-index: 1; padding: 0 var(--inset) 3rem; color: #fff; }
  .hero-video__more .lead { color: #fff; }
  .hero-video__more .btn--quiet { color: #fff; box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.7); }
  .hero-video__more .btn--quiet:hover { box-shadow: inset 0 0 0 2px #fff; }
  .hero-video__toggle { top: auto; bottom: 1.25rem; right: 1.25rem; }
}

.message { display: grid; gap: var(--gap); align-items: center; }
@media (min-width: 52rem) { .message { grid-template-columns: 0.8fr 1.2fr; } }

.section { padding-top: clamp(3rem, 9vw, 6rem); }
.section__head { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }

.about { display: grid; gap: var(--gap); align-items: start; }
@media (min-width: 52rem) { .about { grid-template-columns: 1fr 1fr; } }
.about img { border-radius: var(--radius); }

/* ---- Video list ------------------------------------------------------- */
/* A plain list, one row per video. On a phone the thumbnail sits beside the
   text, so seven videos fit in a couple of scrolls. */

.videos { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.video-row {
  display: grid; align-items: center;
  grid-template-columns: 5.5rem 1fr;
  grid-template-rows: auto auto;
  gap: 0.25rem 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.video-row img { grid-row: span 2; width: 5.5rem; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.video-row h3 a { color: var(--ink); text-decoration: none; }
.video-row h3 a::after { content: ""; position: absolute; inset: 0; }   /* whole row is the link */
.video-row:hover h3 a { color: var(--link); }
.video-row__meta { color: var(--muted); font-size: 1rem; margin-top: 0.25rem; }
.video-row__price { font-weight: 700; color: var(--ink); white-space: nowrap; }
@media (min-width: 40rem) {
  .video-row { grid-template-columns: 7rem 1fr auto; grid-template-rows: auto; gap: 1.5rem; }
  .video-row img { grid-row: auto; width: 7rem; }
}
@media (max-width: 39.99rem) {
  .video-row > div { align-self: end; }
  .video-row__price { align-self: start; }
}

/* ---- One video -------------------------------------------------------- */

.product { display: grid; gap: var(--gap); align-items: start; }
.product .sun { width: min(80%, 22rem); }
@media (min-width: 52rem) {
  .product { grid-template-columns: 0.9fr 1.1fr; }
  .product .sun { width: 100%; position: sticky; top: 2rem; }
}
.back { font-size: 1rem; font-weight: 600; text-decoration: none; display: inline-block; margin-bottom: 1rem; }
.buy {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem;
  padding-block: 1.25rem;
  border-block: 1px solid var(--line);
}
.buy__price { font-size: 1.75rem; font-weight: 850; font-stretch: 112%; }
.steps { margin: 0; padding-left: 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; max-width: var(--measure); }
.steps li::marker { font-weight: 800; color: var(--link); }

.player { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; border-radius: var(--radius); }   /* cover: the old posters are not quite 16:9 */

/* ---- Training and coaches --------------------------------------------- */

.coaches { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(2rem, 5vw, 3rem); }
.coach { display: grid; gap: 1rem 1.5rem; grid-template-columns: 6rem 1fr; align-items: start; }
.coach img { width: 6rem; aspect-ratio: 352 / 460; object-fit: cover; border-radius: var(--radius); }
@media (min-width: 40rem) {
  .coach { grid-template-columns: 9rem 1fr; }
  .coach img { width: 9rem; }
}
.coach__phone { font-weight: 600; }
.sessions { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.session { max-width: var(--measure); }
.session__place { font-weight: 700; }

/* ---- Contact ---------------------------------------------------------- */

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.5rem; margin: 0; max-width: var(--measure); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 30rem) {
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 0.75rem; }
}

/* ---- Lost link form --------------------------------------------------- */

.recover { display: flex; gap: 0.75rem; flex-wrap: wrap; max-width: var(--measure); }
.recover input {
  flex: 1 1 16rem; min-height: 3rem; padding: 0.75rem 1rem;
  font: inherit; font-size: 1.0625rem;
  color: var(--ink); background: var(--paper);
  border: 2px solid var(--line); border-radius: 999px;
}
.recover input:focus-visible { border-color: var(--ink); outline-offset: 2px; }

/* ---- Long legal text -------------------------------------------------- */

.legal { max-width: var(--measure); }
.legal h2 { font-size: 1.375rem; margin-top: 2.25rem; margin-bottom: 0.75rem; }
.legal h3 { font-size: 1.125rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.legal p, .legal li { margin-bottom: 0.75rem; }
.legal ul, .legal ol { padding-left: 1.4rem; }
.legal table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.legal td, .legal th { border: 1px solid var(--line); padding: 0.5rem; vertical-align: top; }

/* ---- Watch page (served by the Worker) -------------------------------- */

.watch__main { width: min(64rem, 100% - 2 * var(--gap)); margin: var(--gap) auto; display: flex; flex-direction: column; gap: 1rem; }
.watch__video { width: 100%; height: auto; background: #000; border-radius: var(--radius); }
.watch__note { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
