/* ==========================================================================
   Continuum Endurance — design system
   --------------------------------------------------------------------------
   1. Fonts
   2. Tokens      colour, type scale, spacing — change the look here only
   3. Base
   4. Layout      .container, .section, .section__head
   5. Components  header, hero, motto, grid, stat, card, button, booking,
                  quote, footer
   ========================================================================== */

/* 1. Fonts (self-hosted, SIL OFL — see assets/fonts/OFL-Manrope.txt) ------- */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* 2. Tokens ---------------------------------------------------------------- */
:root {
  /* Colour — black/white base + one accent (tan). */
  --color-bg: #ffffff;
  --color-surface: #f8f6f2;       /* warm off-white, tinted toward the tan */
  --color-text: #111111;
  --color-muted: #5b564e;         /* warm grey, 7:1 on white */
  --color-line: #111111;
  --color-line-soft: #dcd6cc;
  --color-accent: #c8a97e;        /* tan */
  --color-accent-ink: #111111;    /* text on the accent */

  /* Type */
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.1875rem;
  --text-xl: clamp(1.5rem, 2.6vw, 2rem);
  --text-2xl: clamp(2rem, 4.5vw, 3rem);
  --text-display: clamp(2.5rem, 8vw, 5.75rem);

  /* Spacing (8px scale) */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-6: 48px;
  --s-8: 64px;
  --space-section: clamp(64px, 9vw, 120px);

  --line: 1px solid var(--color-line);
  --radius: 8px;
  --max-width: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
}

/* 3. Base ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 { font-size: var(--text-display); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); letter-spacing: -0.01em; }
p { margin: 0; max-width: 62ch; }
img { max-width: 100%; display: block; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--color-text); outline-offset: 3px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: var(--gutter); top: 8px; z-index: 20; background: var(--color-bg); padding: 8px 12px; border: var(--line); }

.label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.lead { font-size: var(--text-lg); color: var(--color-muted); }

.stack { display: flex; flex-direction: column; gap: var(--s-2); }

.placeholder { color: var(--color-muted); font-style: italic; }

/* 4. Layout ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--space-section); border-top: var(--line); }
.section--alt { background: var(--color-surface); }

/* Two-column section: label on the left, content on the right */
.section__inner { display: grid; gap: var(--s-4); }
.section__inner > * { min-width: 0; }
@media (min-width: 900px) {
  .section__inner { grid-template-columns: 1fr 3fr; gap: var(--s-6); }
}
.section__head { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-4); }

/* 5. Components ------------------------------------------------------------ */

/* Header — not fixed, no bar. Tabs are separate boxed links. */
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
  padding-block: var(--s-3);
}
.brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  font-size: var(--text-sm);
}
.tabs { display: flex; flex-wrap: wrap; gap: var(--s-1); margin: 0; padding: 0; list-style: none; }
.tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 var(--s-2);
  border: var(--line);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.tabs a:hover { background: var(--color-surface); }
.tabs a[aria-current="page"] { background: var(--color-accent); color: var(--color-accent-ink); font-weight: 600; }

/* Hero */
.hero { padding-block: clamp(48px, 9vw, 120px) var(--s-8); }
.hero__inner { display: flex; flex-direction: column; gap: var(--s-4); }
.hero__text { display: flex; flex-direction: column; gap: var(--s-4); }
.hero .lead { max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
@media (min-width: 860px) {
  .hero__inner { display: grid; grid-template-columns: 7fr 5fr; align-items: center; gap: var(--s-6); }
  .hero__inner > .motto { grid-column: 1 / -1; }
}

/* Motto strip — four equal cells, shared 1px lines */
.motto {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: var(--s-8) 0 0;
  padding: 0;
  list-style: none;
  background: var(--color-line);
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.motto li {
  padding: var(--s-2) var(--s-3);
  background: var(--color-bg);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.motto li:last-child { background: var(--color-accent); color: var(--color-accent-ink); }
@media (max-width: 640px) { .motto { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Grid: rounded outer frame; the 1px gap shows the line colour between cells */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--color-line);
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.grid > * {
  min-width: 0;
  padding: var(--s-4);
  background: var(--color-bg);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--2x2 { grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid--2x2 { grid-template-columns: repeat(2, 1fr); } }
.grid h3 { margin-bottom: var(--s-1); }

/* Stat */
.stat__value {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__label { margin-top: var(--s-2); color: var(--color-muted); font-size: var(--text-sm); }

/* Coach card — the whole card is one link */
.card { display: flex; flex-direction: column; gap: var(--s-1); text-decoration: none; transition: background-color 0.2s ease; }
.card:hover { background: var(--color-surface); }
.photo {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--color-surface);
  display: grid;
  place-items: center;
  color: var(--color-muted);
  font-size: var(--text-sm);
}
.card .photo { aspect-ratio: 4 / 3; margin-bottom: var(--s-2); }
.card__role { color: var(--color-muted); font-size: var(--text-sm); }
.card__cta { margin-top: var(--s-2); font-size: var(--text-sm); font-weight: 600; }
.card__cta::after { content: " \2192"; display: inline-block; transition: transform 0.2s ease; }
.card:hover .card__cta::after { transform: translateX(4px); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--s-3);
  border: var(--line);
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.button:hover { background: var(--color-text); color: var(--color-bg); }
.button--ghost { background: transparent; color: var(--color-text); }
.button--sm { min-height: 40px; padding: 0 var(--s-2); }

/* Booking (Cal.com inline calendar) */
.booking {
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg);
}
.booking iframe {
  display: block;
  width: 100%;
  height: 720px;
  border: 0;
}
.booking__empty {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  padding: var(--s-6) var(--s-4);
  color: var(--color-muted);
}

/* Testimonial */
.quote { margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.quote p { font-size: var(--text-lg); }
.quote footer { color: var(--color-muted); font-size: var(--text-sm); }

/* Coach page hero: photo + bio */
.split { display: grid; gap: var(--s-6); }
.split > * { min-width: 0; }
@media (min-width: 860px) {
  .split { grid-template-columns: 5fr 7fr; align-items: end; }
}
.split h1 { font-size: clamp(2.25rem, 6vw, 4.5rem); }

/* Footer */
.site-footer { border-top: var(--line); padding-block: var(--s-4); font-size: var(--text-sm); color: var(--color-muted); }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* No line directly under the header */
main > .section:first-child { border-top: 0; }
