/* Generation Iron: base design system.
   Poster brutalism: hard edges, radius 0, 2px and 3px ink rules,
   duotone photos, stamps, marquee strips. No em or en dashes in
   this file, including comments. */

/* 1. Tokens (spec section 2) */

:root {
  --paper: #F2EFE9;   /* light sections background */
  --ink: #101010;     /* text on paper, dark sections background */
  --yellow: #FFC20E;  /* brand yellow: fills, highlights, big type on ink */
  --white: #FFFFFF;
  --rule: 2px solid var(--ink);
  --rule-thick: 3px solid var(--ink);

  --font-display: "Anton", "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Arial, sans-serif;

  --nav-h: 64px;
  --container: 1240px;
  --pad: clamp(16px, 4vw, 28px);
  --step: 120ms; /* hard step for hover inversions, no soft transition */
}

@media (max-width: 720px) {
  :root { --nav-h: 56px; }
}

/* 2. Minimal reset */

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

/* Radius 0 everywhere: buttons, cards, images, inputs. The single
   exception is the review avatar circle, defined in its component. */
* {
  border-radius: 0;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  padding-top: var(--nav-h);
  overflow-x: clip;
}

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

iframe {
  border: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

/* Anchor targets clear the fixed nav */
[id] {
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

/* 3. Layout primitives */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* 4. Typography (spec section 3) */

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(3rem, 11vw, 8.5rem); }
h2 { font-size: clamp(2.2rem, 6vw, 4rem); }

/* Prices and stat numerals: Anton, tabular */
.num {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Label: Inter 800 uppercase 12px, letter spacing .14em */
.label {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* On paper, yellow never carries small text: it sits BEHIND ink text
   as a highlight bar. */
.label--bar {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  padding: 0.3em 0.6em;
}

/* Heading highlight: a yellow bar sits BEHIND the h2 text. JS wipes
   the bar in on scroll (scaleX 0 to 1, origin left). Without JS the
   bar and the text are simply visible: nothing here hides content. */

.h2hl {
  position: relative;
  display: inline-block;
  padding: 0.06em 0.14em;
}

.h2hl__bar {
  position: absolute;
  inset: 0;
  background: var(--yellow);
  transform-origin: left center;
}

.h2hl__text {
  position: relative;
  color: var(--ink);
}

/* 5. Buttons: hard rectangles, hover inverts with a 120ms step */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  border: var(--rule-thick);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  transition:
    background-color var(--step) step-end,
    color var(--step) step-end,
    border-color var(--step) step-end;
}

/* Yellow fill, ink text */
.btn--yellow {
  background: var(--yellow);
  border-color: var(--ink);
  color: var(--ink);
}

.btn--yellow:hover {
  background: var(--ink);
  color: var(--yellow);
  border-color: var(--yellow);
}

/* Paper outline, for ink sections */
.btn--paper {
  border-color: var(--paper);
  color: var(--paper);
}

.btn--paper:hover {
  background: var(--paper);
  color: var(--ink);
}

/* Ink outline, for paper sections (ghost) */
.btn--ink {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--ink:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Idle life (motion spec section 4): the yellow fill button does a
   1 degree rotate wiggle twice every 6 seconds, then rests. Gated to
   no preference so reduced motion users never see it. */

@media (prefers-reduced-motion: no-preference) {
  .btn--yellow {
    animation: gi-nudge 6s ease-in-out infinite;
  }

  @keyframes gi-nudge {
    0%, 84%, 100% { transform: rotate(0deg); }
    86% { transform: rotate(1deg); }
    88% { transform: rotate(-1deg); }
    90% { transform: rotate(1deg); }
    92% { transform: rotate(-1deg); }
    96% { transform: rotate(0deg); }
  }
}

/* 6. Stamp utility: rotated blocks with thick borders */

.stamp {
  display: inline-block;
  border: var(--rule-thick);
  padding: 0.5rem 1rem;
  transform: rotate(-2deg);
}

.stamp--white {
  background: var(--white);
  color: var(--ink);
  border-color: var(--ink);
}

/* 7. Marquee strip: full bleed, ink bg, yellow Anton uppercase.
   The strip clips its own overflow so it can never cause horizontal
   page scroll. CSS keyframes loop, about 40s, pause on hover. */

.marquee {
  overflow: hidden;
  background: var(--ink);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__seg {
  display: block;
  white-space: nowrap;
  padding: 0.55em 0.6em 0.55em 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--yellow);
  font-size: clamp(1.1rem, 2.6vw, 1.8rem);
  line-height: 1;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* 8. Duotone photo frame: grayscale photo, yellow multiply overlay,
   3px ink border. Unifies any future real photos. */

.duotone {
  position: relative;
  border: var(--rule-thick);
  overflow: hidden;
  background: var(--ink);
}

.duotone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15) brightness(0.95);
}

/* Designed svg placeholders keep their brand colors: the photo filter
   is for photos only. js marks a swapped img with data-fallback-done. */
.duotone img[data-fallback-done="1"] {
  filter: none;
}

.duotone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--yellow);
  mix-blend-mode: multiply;
  opacity: 0.22;
  pointer-events: none;
}

/* 9. Review card (spec 5.8): Yandex native anatomy inside this
   site's frame system. 2px ink border, radius 0, paper bg. */

.review-card {
  background: var(--paper);
  border: var(--rule);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.review-card__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* The avatar circle is Yandex native anatomy per spec 5.8:
   the only non zero radius on the site. */
.avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
}

.avatar--a { background: #8FA9DC; }
.avatar--b { background: #A08CC8; }
.avatar--c { background: #86B08A; }

.review-card__name {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
}

.review-card__source {
  font-size: 12px;
  opacity: 0.6;
  line-height: 1.3;
}

/* The thin ink stroke keeps the Yandex yellow readable on paper cards.
   The stars are decorative: the aria label carries the rating. */
.stars {
  display: inline-flex;
  gap: 2px;
  color: #FFCC00;
  -webkit-text-stroke: 1px rgba(16, 16, 16, 0.55);
  font-size: 1.05rem;
  line-height: 1;
}

.review-card__text {
  font-size: 0.95rem;
  line-height: 1.55;
}

/* 10. Nav (spec 5.1): fixed, solid ink, 2px yellow bottom border */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--ink);
  border-bottom: 2px solid var(--yellow);
}

.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  height: 100%;
}

.nav__lockup {
  justify-self: start;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-decoration: none;
}

.nav__brand {
  font-family: var(--font-display);
  color: var(--yellow);
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav__band {
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  line-height: 1;
  padding: 2px 3px 2px 6px;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  gap: 1.4rem;
}

.nav__links a {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  transition: color var(--step) step-end;
}

.nav__links a:hover {
  color: var(--yellow);
}

.nav__phone {
  justify-self: end;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: color var(--step) step-end;
}

.nav__phone:hover {
  color: var(--yellow);
}

@media (max-width: 899px) {
  .nav__inner {
    display: flex;
    justify-content: space-between;
  }
  .nav__links { display: none; }
}

/* 11. Focus visible (spec section 8): 2px ink outline on paper,
   2px yellow outline on ink surfaces, offset 2px. */

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.nav :focus-visible,
.sec--ink :focus-visible,
.footer :focus-visible,
.marquee :focus-visible,
.slideshow :focus-visible {
  outline-color: var(--yellow);
}

/* Trainer cards carry a dark photo with a bottom ink scrim in every
   state, so the focus ring inside them is yellow to stay visible. */
.trainer :focus-visible {
  outline-color: var(--yellow);
}

/* 12. Reduced motion: everything static and visible, marquee stopped,
   no transitions. Count up final values are handled in js. */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
  }
  html { scroll-behavior: auto; }
  .marquee__track {
    animation: none !important;
    transform: none !important;
  }
}
