/* ==========================================================================
   Intellercise design system — light & airy, mobile-first.
   Company chrome is neutral (ink on white); each product supplies its own
   --accent so product pages feel distinct without a site redesign.
   ========================================================================== */

:root {
  /* Neutral palette */
  --ink: #10130f;          /* primary text */
  --ink-soft: #3f4642;     /* secondary text */
  --muted: #6b736e;        /* captions, meta */
  --line: #e7eae6;         /* hairlines */
  --surface: #ffffff;      /* page background */
  --surface-2: #f5f7f4;    /* alternating sections */
  --surface-3: #eef1ec;    /* cards / media backing */

  /* Company accent stays neutral ink; products override --accent + --accent-ink */
  --accent: var(--ink);
  --accent-ink: var(--ink);
  --on-accent: #ffffff;

  /* Type — system stack for speed + a clean, Apple-like feel */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3:  clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4:  clamp(2.6rem, 1.9rem + 3.4vw, 4.2rem);

  /* Spacing + shape */
  --gutter: clamp(1.25rem, 0.9rem + 1.6vw, 2.5rem);
  --measure: 68ch;
  --maxw: 1080px;
  --radius: 16px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(16,19,15,.04), 0 8px 30px rgba(16,19,15,.06);
}

/* Product accents (.activemo / [data-product="…"]) override the neutral company
   chrome. They are generated in base.njk from src/_data/brand.js — edit the
   brand colors there, not here. --accent is the brand color for fills and
   colored text on light backgrounds; --accent-ink is a darker shade for white
   content ON the accent (buttons, step numbers) and focus rings. */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.4em; font-weight: 700; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: var(--measure); }
a { color: inherit; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3rem, 2rem + 5vw, 6rem); }
.section--tint { background: var(--surface-2); }
.eyebrow {
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 0.75rem;
}
.lede { font-size: var(--step-1); color: var(--ink-soft); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--step-0);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent-ink); color: var(--on-accent); }
.btn--primary:hover { filter: brightness(1.05); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }

/* Focus visibility for keyboard users */
:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.wordmark { font-weight: 700; letter-spacing: -0.02em; }
.site-header .wordmark { text-decoration: none; color: var(--ink); font-size: var(--step-0); }

/* ------------------------------------------------------------------ footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding-block: clamp(2rem, 1.5rem + 1.5vw, 3rem);
}
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; align-items: center; }
.site-footer__nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer__nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: var(--step--1); }
.site-footer__nav a:hover { color: var(--accent); }
.site-footer__legal { color: var(--muted); font-size: var(--step--1); margin: 0; }

/* ------------------------------------------------------------- media strip */
.strip { display: grid; gap: clamp(0.75rem, 0.5rem + 1vw, 1.25rem); }
.strip__row {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.strip__track {
  display: flex;
  gap: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
  width: max-content;
  animation: strip-scroll var(--dur, 60s) linear infinite;
}
.strip:hover .strip__track,
.strip:focus-within .strip__track { animation-play-state: paused; }
.tile {
  display: block;
  flex: 0 0 auto;
  width: clamp(130px, 15vw, 172px);
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface-3);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  text-decoration: none;
  transition: transform .15s ease;
}
.tile:hover { transform: translateY(-3px); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile__cap {
  position: absolute;
  left: 8px; bottom: 8px; right: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: rgba(16,19,15,.55);
  backdrop-filter: blur(4px);
  padding: 4px 8px;
  border-radius: 8px;
  line-height: 1.2;
}
@keyframes strip-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --------------------------------------------------------------- store badge */
.store-badge { display: inline-flex; }
.store-badge img { display: block; height: auto; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .strip__row { overflow-x: auto; }
  .strip__track { animation: none; }
}
