/* Ground Control: the public front page (website/templates/website/home.html).
   A separate sheet from app.css because the page shares nothing with the portal
   but its colours and typeface. The brand values below mirror app.css :root;
   change them in both places. Sizing is rem at 1rem = 10px, as in the portal.
   Layout uses logical properties throughout so the Arabic page mirrors itself.
   Breakpoints are em (16px each at the default text size), so a visitor with
   larger text gets the narrower layout, as page zoom does. */

/* Changa, served from this site: one variable file per script, weights 200-800. */
@font-face {
  font-family: 'Changa';
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/changa-arabic.ea6b078a5b9e.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E,
    U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Changa';
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/changa-latin-ext.eb542b63345c.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: 'Changa';
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/changa-latin.8a057d93216a.woff2") format("woff2");
  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;
}

:root {
  color-scheme: dark;

  --bg: #0a0907;
  --bg-rgb: 10 9 7; /* --bg as channels, for see-through layers */
  --bg-1: #131210;
  --bg-2: #1b1a17;
  --bg-3: #2d2a25;
  --ink: #f6f1e8;
  --ink-1: #b8b1a4;
  --ink-2: #9c9588;
  --brand: #d77030;
  --brand-bright: #ff8542;
  --brand-hover: #ff9c63;
  --on-brand: #0a0907;
  --line: rgba(255, 245, 225, 0.12);
  --line-bright: rgba(255, 245, 225, 0.24);
  --good: #6edb98;
  --bad: #e87d72;
  /* Jiu-jitsu belt colours, for the scroll progress bar only. */
  --belt-blue: #2f6fd0;
  --belt-purple: #8a5bd6;
  --belt-brown: #a5673a;
  --belt-black: #000;
  --belt-red: #d0202e;

  --font: 'Changa', ui-sans-serif, system-ui, sans-serif;
  --gut: clamp(2rem, 6vw, 9.6rem);
  --section: clamp(6.4rem, 10vw, 12rem);
  /* Side padding of every section: the gutter, growing on wide screens so the
     page stays one centred column of at most 112rem. */
  --inset: max(var(--gut), calc((100% - 112rem) / 2));

  --dur-fast: 120ms;
  --dur: 240ms;
  --dur-rise: 900ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  font-size: 62.5%;
  scroll-padding-top: 8.8rem;
  scrollbar-color: var(--bg-3) var(--bg);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.7rem;
  line-height: 1.5;
  overflow-x: hidden;
  caret-color: var(--brand-bright);
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.25em; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--brand-bright); color: var(--on-brand); }

:focus-visible {
  outline: 3px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: 0.4rem;
}

.skip {
  position: fixed;
  inset-block-start: 1.2rem;
  inset-inline-start: 1.2rem;
  z-index: 30;
  padding: 1.2rem 1.8rem;
  border-radius: 0.8rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 800;
  transform: translateY(-300%);
}
.skip:focus { transform: none; }

/* For assistive technology only. */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.arrow { flex: none; transition: transform var(--dur) var(--ease-out); }
[dir="rtl"] .arrow { transform: scaleX(-1); }

/* ─── Belt: scroll progress in jiu-jitsu belt colours ───
   The bar is one strip of the five belts in order, uncovered as the page is
   read, so the colours already passed stay on screen and the black belt at the
   end (with its red bar) never leaves an empty-looking track. */
.belt {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 25;
  height: 0.5rem;
  background: var(--bg-3);
}
.belt-fill {
  display: block;
  height: 100%;
  background: linear-gradient(
    to right,
    var(--ink) 0 20%,
    var(--belt-blue) 20% 40%,
    var(--belt-purple) 40% 60%,
    var(--belt-brown) 60% 80%,
    var(--belt-black) 80% 93%,
    var(--belt-red) 93% 97%,
    var(--belt-black) 97%
  );
  clip-path: inset(0 calc((1 - var(--p, 0)) * 100%) 0 0);
}
[dir="rtl"] .belt-fill { transform: scaleX(-1); }
/* A light tip at the reading position: the black belt is close to the track's
   colour, and the tip keeps the bar visibly moving through it. */
.belt::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: calc(var(--p, 0) * 100%);
  width: 0.3rem;
  margin-inline-start: -0.3rem;
  background: var(--ink);
}

/* ─── Top bar ─── */
.top {
  position: fixed;
  inset-block-start: 0.5rem;
  inset-inline: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 2.4rem;
  padding: 1.2rem var(--inset);
  transition: padding var(--dur) var(--ease-out);
}
/* Once the page has scrolled, a dark blur stands behind the bar and fades out
   below it: no edge, no rule. */
.top::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block: -0.5rem -3.2rem;
  z-index: -1;
  background: linear-gradient(to bottom, rgb(var(--bg-rgb) / 0.94) 0, rgb(var(--bg-rgb) / 0.86) 60%, rgb(var(--bg-rgb) / 0) 100%);
  -webkit-backdrop-filter: blur(1.4rem);
  backdrop-filter: blur(1.4rem);
  -webkit-mask-image: linear-gradient(to bottom, var(--bg) 60%, transparent);
  mask-image: linear-gradient(to bottom, var(--bg) 60%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) linear;
}
/* Without the script the bar cannot turn solid, so it stays at the top of the page. */
html:not(.js) .top { position: absolute; }
.top.is-solid { padding-block: 0.6rem; }
.top.is-solid::after { opacity: 1; }

.brand {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}
.brand img {
  width: 5.6rem;
  height: 5.6rem;
  transition: width var(--dur) var(--ease-out), height var(--dur) var(--ease-out);
}
.top.is-solid .brand img { width: 4.4rem; height: 4.4rem; }
.brand span { display: none; }

.top-nav { display: none; margin-inline-start: auto; gap: 3.2rem; }
.top-nav a {
  position: relative;
  padding-block: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}
.top-nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0.2rem;
  height: 2px;
  background: var(--brand-bright);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--dur) var(--ease-out);
}
[dir="rtl"] .top-nav a::after { transform-origin: 100% 50%; }
.top-nav a:hover::after, .top-nav a:focus-visible::after { transform: scaleX(1); }

.lang {
  margin-inline-start: auto;
  padding: 0.6rem 1.6rem;
  border: 2px solid var(--line-bright);
  border-radius: 99rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--dur-fast) linear, background-color var(--dur-fast) linear;
}
.lang:hover { border-color: var(--ink); }

@media (min-width: 40em) {
  .brand span { display: inline; }
}
@media (min-width: 53.75em) {
  .top-nav { display: flex; }
  .lang { margin-inline-start: 0; }
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  min-height: 5.6rem;
  padding: 1.2rem 2.4rem;
  border: 2px solid transparent;
  border-radius: 0.8rem;
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) linear, border-color var(--dur-fast) linear,
    transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn-solid { background: var(--brand-bright); color: var(--on-brand); }
.btn-solid:hover { background: var(--brand-hover); }
.btn-line { border-color: var(--line-bright); background: rgb(var(--bg-rgb) / 0.4); }
.btn-line:hover { border-color: var(--ink); }
.btn-wide { width: 100%; }
.btn:hover .arrow { transform: translateX(0.4rem); }
[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(0.4rem); }

/* ─── Hero: the building, the motto, tonight's classes ─── */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
.hero-photo {
  position: relative;
  display: block;
  height: 64svh;
  min-height: 36rem;
  overflow: hidden;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 38% 47%;
  transform: translateY(calc(var(--drift, 0) * 1px));
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(var(--bg-rgb) / 0.72) 0, rgb(var(--bg-rgb) / 0.52) 8rem, rgb(var(--bg-rgb) / 0) 15rem),
    linear-gradient(to top, var(--bg) 0, rgb(var(--bg-rgb) / 0.92) 12%, rgb(var(--bg-rgb) / 0.74) 26%, rgb(var(--bg-rgb) / 0.46) 42%, rgb(var(--bg-rgb) / 0.2) 58%, rgb(var(--bg-rgb) / 0.05) 70%, rgb(var(--bg-rgb) / 0) 80%);
}
/* The motto starts over the lower part of the photo, where it has gone dark. */
.hero-body {
  position: relative;
  margin-block: calc(-14svh - 6.4rem) 4.8rem;
  padding-inline: var(--inset);
}

/* From tablet-landscape up the whole building stands at the far side, full
   height, and the motto runs across from the near side onto its dark edge. */
@media (min-width: 62.5em) {
  .hero-photo {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: min(100svh, 66%);
    height: auto;
    min-height: 0;
  }
  .hero-photo img { object-position: 50% 50%; }
  .hero-photo::after {
    background:
      linear-gradient(to right, var(--bg) 0, rgb(var(--bg-rgb) / 0.92) 30%, rgb(var(--bg-rgb) / 0.3) 62%, rgb(var(--bg-rgb) / 0) 100%),
      linear-gradient(to top, var(--bg) 0, rgb(var(--bg-rgb) / 0) 22%),
      linear-gradient(to bottom, rgb(var(--bg-rgb) / 0.75) 0, rgb(var(--bg-rgb) / 0) 14rem);
  }
  [dir="rtl"] .hero-photo::after {
    background:
      linear-gradient(to left, var(--bg) 0, rgb(var(--bg-rgb) / 0.92) 30%, rgb(var(--bg-rgb) / 0.3) 62%, rgb(var(--bg-rgb) / 0) 100%),
      linear-gradient(to top, var(--bg) 0, rgb(var(--bg-rgb) / 0) 22%),
      linear-gradient(to bottom, rgb(var(--bg-rgb) / 0.75) 0, rgb(var(--bg-rgb) / 0) 14rem);
  }
  .hero-body { margin-block: clamp(10.4rem, 12svh, 13rem) 4.8rem; }
  .hero-sub, .actions { max-width: 40%; }
}

.motto {
  font-size: clamp(4.2rem, 7.4vw, 8.4rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}
.motto-line { display: block; overflow: hidden; padding-block: 0.06em; }
.motto-line > span { display: block; }
.motto-line.is-rise { color: var(--brand-bright); }
[lang="ar"] .motto { line-height: 1.3; letter-spacing: 0; }
[lang="ar"] .motto-line { padding-block: 0.12em; margin-block: -0.12em; }

.hero-sub {
  max-width: 46ch;
  text-wrap: balance;
  margin-block-start: 2.4rem;
  font-size: clamp(1.8rem, 1.6vw, 2.2rem);
  color: var(--ink-1);
}
.actions { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-block-start: 3.2rem; }

.today {
  position: relative;
  display: grid;
  gap: 1.6rem 4rem;
  align-items: center;
  margin-block-start: auto;
  padding: 2.4rem var(--inset);
  border-block-start: 1px solid var(--line-bright);
}
.today-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-bright);
}
[lang="ar"] .today-title { letter-spacing: 0; font-size: 1.7rem; }
.today-list { display: flex; flex-wrap: wrap; gap: 1.2rem 3.6rem; }
.today-item { display: flex; align-items: baseline; gap: 1rem; }
.today-time { font-weight: 800; font-variant-numeric: tabular-nums; }
.today-name { color: var(--ink-1); }
.today-state {
  padding: 0.1rem 0.9rem;
  border: 1px solid currentColor;
  border-radius: 99rem;
  font-size: 1.3rem;
  font-weight: 700;
}
.today-item.is-done { opacity: 0.7; }
.today-item.is-now .today-state {
  border-color: var(--brand-bright);
  background: var(--brand-bright);
  color: var(--on-brand);
}
.today-item.is-now .today-name, .today-item.is-next .today-name { color: var(--ink); }
.today-note { color: var(--ink-1); }
.today-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  /* A taller tap area that does not make the strip taller. */
  margin-block: -1rem;
  padding-block: 1rem;
}
.today-link:hover .arrow { transform: translateX(0.4rem); }
[dir="rtl"] .today-link:hover .arrow { transform: scaleX(-1) translateX(0.4rem); }

@media (min-width: 62.5em) {
  .today { grid-template-columns: auto 1fr auto; }
  .today-note { grid-column: 2; }
  .today-list + .today-note { grid-column: 2; grid-row: 2; }
}

/* ─── Band: the motto on the gym's orange ─── */
.band {
  overflow: hidden;
  padding-block: 1.4rem;
  background: var(--brand);
  color: var(--on-brand);
}
.band-track {
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 2.8rem;
  width: max-content;
  font-size: clamp(2rem, 2.6vw, 3.2rem);
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}
.band-track i {
  flex: none;
  width: 1rem;
  height: 1rem;
  background: currentColor;
  transform: rotate(45deg);
}

/* ─── Section heads ─── */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2.4rem;
  margin-block-end: 4rem;
}
h2 {
  font-size: clamp(3.6rem, 6vw, 7.2rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}
/* With very large text a single word can be wider than a phone: it breaks rather than spills. */
h2, h3 { max-inline-size: 100%; overflow-wrap: break-word; }
[lang="ar"] h2 { line-height: 1.3; letter-spacing: 0; }
.fine { font-size: 1.4rem; color: var(--ink-2); }

/* ─── Price board ───
   The type below stops growing at the width where the page column stops. */
.board { padding: var(--section) var(--inset) 0; }
.board .section-head { margin-block-end: 2.4rem; }
.board-note {
  padding: 0.4rem 1.4rem;
  border: 1px solid var(--line-bright);
  border-radius: 99rem;
  font-size: 1.5rem;
  color: var(--ink-1);
}
.board-cols, .board-row {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1.3fr 1.4fr;
  gap: 2.4rem;
  align-items: center;
}
.board-cols {
  padding-block-end: 1.2rem;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
[lang="ar"] .board-cols { letter-spacing: 0; font-size: 1.5rem; }
.end { text-align: end; justify-self: end; }
.board-row {
  position: relative;
  isolation: isolate;
  padding-block: clamp(2rem, 2.2vw, 2.8rem);
  border-block-start: 1px solid var(--line-bright);
  transition: background-color var(--dur) linear;
}
.board-row::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline: -2.4rem;
  z-index: -1;
  background: var(--bg-1);
  opacity: 0;
  transition: opacity var(--dur) linear;
}
.board-row:hover::before, .board-row:focus-within::before { opacity: 1; }
.board-name {
  font-size: clamp(3rem, 4.6vw, 5.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
[lang="ar"] .board-name { letter-spacing: 0; line-height: 1.3; }
.board-name a { text-decoration: none; }
/* Keyboard focus rings the whole row, since the link covers it. */
.board-name a:focus-visible { outline: none; }
.board-name a:focus-visible::after {
  inset-inline: -1.4rem;
  outline: 3px solid var(--brand-bright);
  outline-offset: 0;
  border-radius: 0.4rem;
}
/* The plan's link covers its whole row. */
.board-name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.board-len, .board-rate { font-size: clamp(1.7rem, 1.7vw, 2rem); color: var(--ink-1); }
.board-rate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1.2rem; }
.board-rate span { font-variant-numeric: tabular-nums; white-space: nowrap; }
.board-rate b { font-size: 1.5rem; font-weight: 700; color: var(--good); white-space: nowrap; }
.board-price { display: grid; grid-template-columns: 1fr auto; justify-items: end; gap: 0.4rem; }
.board-price .num {
  font-size: clamp(4.4rem, 6.4vw, 8rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  /* While it counts up the number keeps its final width (site.js) and stays
     against the currency. */
  text-align: right;
}
[dir="rtl"] .board-price .num { text-align: left; }
.board-price small {
  grid-row: 1;
  grid-column: 2;
  align-self: end;
  margin-inline-start: 1rem;
  font-size: clamp(1.5rem, 1.6vw, 2.2rem);
  font-weight: 600;
  color: var(--ink-1);
}
.board-price .num { grid-row: 1; grid-column: 1; }
.board-go {
  grid-row: 2;
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  /* One line for an ordinary plan name; a long one wraps instead of widening the price. */
  justify-content: flex-end;
  max-inline-size: 28rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink-1);
  text-align: end;
  transition: color var(--dur-fast) linear;
}
.board-row:hover .board-go, .board-row:focus-within .board-go { color: var(--brand-bright); }
.board-row:hover .arrow, .board-row:focus-within .arrow { transform: translateX(0.4rem); }
[dir="rtl"] .board-row:hover .arrow,
[dir="rtl"] .board-row:focus-within .arrow { transform: scaleX(-1) translateX(0.4rem); }
.board-row.is-best .board-name, .board-row.is-best .num { color: var(--brand-bright); }
.board-empty { padding-block-end: 4.8rem; font-size: 2.2rem; color: var(--ink-1); }

@media (min-width: 53.75em) {
  /* One grid for the whole table, so a long name or price moves every row's
     columns together. */
  .board-table { display: grid; grid-template-columns: 1.5fr 0.8fr 1.3fr 1.4fr; column-gap: 2.4rem; }
  .board-cols, .board-row { grid-column: 1 / -1; grid-template-columns: subgrid; }
  /* The name column grows for a long word, but only this far; past it the word breaks. */
  .board-name { max-inline-size: min(28vw, 42rem); }
}

@media (max-width: 53.74em) {
  .board-cols { display: none; }
  .board-row::before { inset-inline: calc(var(--gut) * -1); }
  .board-row { grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem 1.6rem; align-items: end; }
  .board-name { grid-column: 1 / -1; grid-row: 1; margin-block-end: 0.8rem; font-size: clamp(3.4rem, 9vw, 5.6rem); }
  .board-price { grid-column: 2; grid-row: 2 / span 2; }
  .board-len { grid-column: 1; grid-row: 2; }
  .board-rate { grid-column: 1; grid-row: 3; }
  .board-go { max-inline-size: min(19rem, 58vw); }
  /* Beside a wide price or a long ask line the monthly rate may take two lines. */
  .board-rate span { white-space: normal; }
  .hero-photo img { object-position: 38% 47%; }
}

/* Very narrow screens, or a phone set to much larger text: one column, the price last. */
@media (max-width: 18em) {
  .board-row { grid-template-columns: minmax(0, 1fr); }
  .board-name, .board-len, .board-rate, .board-price { grid-column: 1; grid-row: auto; }
  .board-price {
    grid-template-columns: auto 1fr;
    justify-self: start;
    justify-items: start;
    margin-block-start: 0.8rem;
    text-align: start;
  }
  .board-go { justify-content: flex-start; max-inline-size: none; text-align: start; }
}

/* ─── Ask bar ─── */
.ask-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem 4rem;
  padding: clamp(2.4rem, 3.4vw, 4rem) var(--inset);
  background: var(--brand);
  color: var(--on-brand);
}
.ask-go {
  display: inline-flex;
  align-items: center;
  gap: 1.6rem;
  font-size: clamp(2.8rem, 4.4vw, 5.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: none;
}
[lang="ar"] .ask-go { letter-spacing: 0; line-height: 1.3; }
.ask-go .arrow { width: 0.8em; height: 0.8em; }
.ask-go:hover .arrow { transform: translateX(0.8rem); }
[dir="rtl"] .ask-go:hover .arrow { transform: scaleX(-1) translateX(0.8rem); }
.ask-alt { display: flex; flex-wrap: wrap; gap: 0 2.8rem; font-weight: 700; }
.ask-alt a, .foot-links a { display: inline-block; padding-block: 1rem; }
.ask-bar :focus-visible { outline-color: var(--on-brand); }

/* ─── Timetable ─── */
.classes { padding: var(--section) var(--inset); }
.filters { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.chip {
  min-height: 4.4rem;
  padding: 0.6rem 1.8rem;
  border: 2px solid var(--line-bright);
  border-radius: 99rem;
  background: none;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--dur-fast) linear, border-color var(--dur-fast) linear,
    color var(--dur-fast) linear;
}
.chip:hover { border-color: var(--ink); }
.chip.is-on { border-color: var(--ink); background: var(--ink); color: var(--bg); }

/* A ruled board, like the price list: one day per band, its classes as lines.
   From 1100px the days become seven ruled columns. */
.week { border-block-start: 1px solid var(--line-bright); }
.day {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 0 1.6rem;
  padding-block: 1.4rem;
  border-block-end: 1px solid var(--line-bright);
}
.day-name {
  display: grid;
  align-content: start;
  gap: 0.2rem;
  padding-block: 0.6rem;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}
.day-name em {
  justify-self: start;
  padding: 0 0.8rem;
  border-radius: 99rem;
  background: var(--brand-bright);
  color: var(--on-brand);
  font-style: normal;
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: none;
}
.day.is-today .day-name { color: var(--brand-bright); }
.slot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.2rem 1.6rem;
  align-items: baseline;
  padding-block: 0.6rem;
  transition: opacity var(--dur) linear;
}
.slot + .slot { border-block-start: 1px solid var(--line); }
.slot-name { font-weight: 700; line-height: 1.3; }
.slot-time { color: var(--ink-1); font-variant-numeric: tabular-nums; white-space: nowrap; }
.slot-state {
  display: inline-block;
  margin-inline-start: 0.6rem;
  padding: 0 0.8rem;
  border: 1px solid var(--brand-bright);
  border-radius: 99rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand-bright);
  vertical-align: 0.1em;
}
.slot.is-now .slot-state { background: var(--brand-bright); color: var(--on-brand); }
.slot.is-done { opacity: 0.7; }
.slot.is-done .slot-state { border-color: var(--line-bright); color: var(--ink-1); }
.slot.is-off { opacity: 0.2; }
.day-rest { padding-block: 0.6rem; color: var(--ink-2); }
.classes .fine { margin-block-start: 2rem; }

/* Phones: the day stands above its classes, so a class and its time keep one line. */
@media (max-width: 29.99em) {
  .day { grid-template-columns: minmax(0, 1fr); }
  .day-name { grid-auto-flow: column; justify-content: start; align-items: center; gap: 1rem; }
}

@media (min-width: 68.75em) {
  .week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-block-end: 1px solid var(--line-bright);
  }
  .day {
    display: block;
    padding: 0 1.4rem 1.2rem;
    border-block-end: 0;
    border-inline-start: 1px solid var(--line-bright);
  }
  .day:first-child { padding-inline-start: 0; border-inline-start: 0; }
  .day:last-child { padding-inline-end: 0; }
  .day-name {
    grid-auto-flow: column;
    justify-content: space-between;
    align-items: center;
    padding-block: 1.4rem;
    border-block-end: 1px solid var(--line-bright);
  }
  .slot { grid-template-columns: minmax(0, 1fr); padding-block: 1.2rem; }
  .slot-time { font-size: 1.5rem; }
  .day-rest { padding-block: 1.2rem; }
}

/* ─── Instagram ─── */
.mat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3.2rem; padding: 0 var(--inset) var(--section); }
.mat-head { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 1.6rem; }
.coach { color: var(--ink-1); }
.coach a { color: var(--ink); font-weight: 700; }
.posts {
  display: flex;
  gap: 1.2rem;
  margin-inline: calc(var(--gut) * -1);
  /* Room for a focused tile's ring; nothing here scrolls up or down. */
  padding: 0.8rem var(--gut);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gut);
  scrollbar-width: thin;
}
.post { flex: none; scroll-snap-align: start; }
.post a { display: grid; gap: 1.2rem; text-decoration: none; }
.post-img {
  display: block;
  height: 36rem;
  overflow: hidden;
  border-radius: 1.2rem;
  background: var(--bg-2);
}
.post img {
  width: auto;
  max-width: none;
  height: 100%;
  transition: transform 700ms var(--ease-out);
}
.post a:hover img, .post a:focus-visible img { transform: scale(1.05); }
.post-cap { display: grid; gap: 0.2rem; }
.post-cap b { font-weight: 800; line-height: 1.25; }
.post-cap small {
  font-size: 1.4rem;
  color: var(--ink-1);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color var(--dur-fast) linear, text-decoration-color var(--dur-fast) linear;
}
.post a:hover small, .post a:focus-visible small { color: var(--brand-bright); text-decoration-color: currentColor; }

@media (min-width: 62.5em) {
  /* The heading stands beside a justified row: each tile's share of the width
     is its photo's aspect ratio, so every photo keeps its own shape at the
     same height. */
  .mat { grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 6.4rem; align-items: end; }
  /* One long word in a narrow column: sized to fit it. */
  .mat h2 { font-size: clamp(3.6rem, 4.4vw, 5.2rem); }
  .posts { margin-inline: 0; padding: 0; overflow: visible; }
  .post { min-width: 0; }
  .post-1 { flex: 750 1 0; }
  .post-2 { flex: 913 1 0; }
  .post-3 { flex: 564 1 0; }
  .post-img { height: auto; }
  .post-1 .post-img { aspect-ratio: 640 / 853; }
  .post-2 .post-img { aspect-ratio: 800 / 876; }
  .post-3 .post-img { aspect-ratio: 361 / 640; }
  .post img { width: 100%; object-fit: cover; }
}

/* ─── Join: the ways to reach the gym, or (GYM_JOIN_FORM) the steps and the request form ─── */
.join {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5.6rem;
  padding: var(--section) var(--inset);
  background: var(--bg-1);
}
.join-intro { max-width: 30ch; margin-block-start: 1.6rem; font-size: clamp(1.8rem, 1.6vw, 2.2rem); color: var(--ink-1); }
.ways { border-block-end: 1px solid var(--line-bright); }
.way {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.2rem 2rem;
  padding-block: 2rem;
  border-block-start: 1px solid var(--line-bright);
  text-decoration: none;
  transition: color var(--dur-fast) linear;
}
.way b {
  font-size: clamp(2.6rem, 3vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
[lang="ar"] .way b { letter-spacing: 0; line-height: 1.4; }
.way small { grid-column: 1; font-size: 1.6rem; color: var(--ink-1); }
.way .arrow { grid-column: 2; grid-row: 1 / span 2; width: 2.8rem; height: 2.8rem; }
.way:hover, .way:focus-visible { color: var(--brand-bright); }
.way:hover .arrow { transform: translateX(0.4rem); }
[dir="rtl"] .way:hover .arrow { transform: scaleX(-1) translateX(0.4rem); }

.step-list { display: grid; gap: 3.2rem; margin-block-start: 4rem; }
.step { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.step-n {
  font-size: 5.6rem;
  font-weight: 800;
  line-height: 0.85;
  color: var(--brand-bright);
  font-variant-numeric: tabular-nums;
}
.step h3 { font-size: 2.4rem; font-weight: 800; line-height: 1.2; }
.step p { max-width: 44ch; margin-block-start: 0.4rem; color: var(--ink-1); }

.form-panel {
  align-self: start;
  padding: clamp(2.4rem, 3vw, 4rem);
  border: 1px solid var(--line-bright);
  border-radius: 1.6rem;
  background: var(--bg);
}
.form-panel h2 { font-size: clamp(3.2rem, 3.6vw, 4.8rem); }
.form-intro { margin-block-start: 1.2rem; color: var(--ink-1); }
.join-form { display: grid; gap: 2rem; margin-block-start: 2.8rem; }
.f { display: grid; gap: 0.6rem; }
.f label { font-size: 1.5rem; font-weight: 700; }
.f label span { font-weight: 400; color: var(--ink-2); }
.f input, .f select, .f textarea {
  width: 100%;
  min-height: 5.2rem;
  padding: 1.2rem 1.4rem;
  border: 2px solid var(--ink-2);
  border-radius: 0.8rem;
  background: var(--bg-1);
  transition: border-color var(--dur-fast) linear;
}
.f textarea { min-height: 9.6rem; resize: vertical; }
.f input:hover, .f select:hover, .f textarea:hover { border-color: var(--ink); }
.f input:focus-visible, .f select:focus-visible, .f textarea:focus-visible { border-color: var(--brand-bright); }
/* A field with an error keeps its colour when focused; the focus ring shows around it. */
.f [aria-invalid="true"], .f [aria-invalid="true"]:focus-visible { border-color: var(--bad); }
.f input[dir="ltr"] { text-align: start; }
.f-hint { font-size: 1.4rem; color: var(--ink-2); }
.f-err { font-size: 1.5rem; font-weight: 600; color: var(--bad); }
.f-trap { position: absolute; inset-inline-start: -999rem; width: 1px; height: 1px; overflow: hidden; }
.form-alert {
  margin-block-start: 2rem;
  padding: 1.2rem 1.6rem;
  border: 1px solid var(--bad);
  border-radius: 0.8rem;
  font-weight: 600;
  color: var(--bad);
}
.sent { display: grid; gap: 0.6rem; margin-block-start: 2.4rem; }
.sent strong { font-size: 2.4rem; font-weight: 800; line-height: 1.2; color: var(--good); }
.sent p { color: var(--ink-1); }

@media (min-width: 62.5em) {
  .join { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: clamp(4rem, 5vw, 8rem); }
}

/* ─── Footer ─── */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 3.2rem 6.4rem;
  padding: 5.6rem var(--inset) 6.4rem;
}
.foot-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem; }
.foot-brand img { width: 9.6rem; height: 9.6rem; }
.foot-brand div { display: grid; flex: 1 1 14rem; gap: 0.2rem; }
.foot-brand strong { font-size: 2rem; font-weight: 800; line-height: 1.25; }
.foot-brand span { color: var(--ink-1); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 2.8rem; font-weight: 600; }

/* ─── Motion ───
   Content is visible without any of this. Things rise from the ground once:
   the motto on load, each section's rows as they come into view. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .motto-line > span { animation: rise var(--dur-rise) var(--ease-out) backwards; }
  .motto-line.is-rise > span { animation-delay: 140ms; }
  .hero-sub, .actions, .today { animation: settle 700ms var(--ease-out) 420ms backwards; }
  .actions { animation-delay: 520ms; }
  .today { animation-delay: 640ms; }
  .hero-photo img { animation: push 16s var(--ease-out) backwards; }

  .band-track { animation: band 48s linear infinite; }
  .band:hover .band-track { animation-play-state: paused; }

  /* Rows are visible until they scroll into view, then play their arrival, so
     nothing depends on the script having run. */
  .js [data-rise].is-in {
    animation: arrive var(--dur-rise) var(--ease-out) backwards;
    animation-delay: calc(var(--i, 0) * 70ms);
  }

  /* Three beats, then still: nothing on the page blinks for long. */
  .today-item.is-now .today-state, .slot.is-now .slot-state { animation: pulse 1.6s ease-in-out 3; }
}

@keyframes rise { from { transform: translateY(110%); } }
@keyframes settle { from { transform: translateY(2rem); } }
@keyframes arrive { from { opacity: 0; transform: translateY(2.8rem); } }
@keyframes push { from { transform: scale(1.08); } }
@keyframes band { to { transform: translateX(-50%); } }
@keyframes pulse { 50% { opacity: 0.55; } }
