/* Kaos Fitness design system.
   Faithful rebuild of the Wix site: black / off-white sections, #FEA803 accent,
   Bebas Neue condensed display headings, Montserrat body, Azeret Mono accent lines.
   Reference: ../capture/screenshots/ */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: 'Bebas Neue';
  src: url('/fonts/bebas-neue-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Work Sans';
  src: url('/fonts/work-sans-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Azeret Mono';
  src: url('/fonts/azeret-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --black: #000000;
  --ink: #080808;
  --paper: #f0f0f0;
  --white: #ffffff;
  --accent: #fea803;
  --gray: #8f8f8f;

  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-body: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Azeret Mono', monospace;

  --container: 1200px;
  --nav-height: 82px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0 0 0.5em;
  text-transform: uppercase;
}

h1 { font-size: clamp(3rem, 7vw, 6rem); }
h2 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }

p {
  margin: 0 0 1em;
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: 80px;
}

.section--dark {
  background: var(--black);
  color: var(--white);
}

.section--light {
  background: var(--paper);
  color: var(--ink);
}

.section-title {
  text-align: center;
}

/* Orange mono accent line under headings */
/* Accent lines are Montserrat regular on the live site (not monospace) */
.accent-line {
  font-family: var(--font-body);
  color: var(--accent);
  font-size: 1rem;
  text-align: center;
}

/* Two-column media/text rows (training blocks, about sections) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Organic teardrop imagery (exact Wix mask SVGs, extracted from source) */
.img-blob {
  overflow: hidden;
  mask-image: url('/images/blob-mask.svg');
  -webkit-mask-image: url('/images/blob-mask.svg');
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}

.img-blob--flip {
  mask-image: url('/images/blob-mask-flip.svg');
  -webkit-mask-image: url('/images/blob-mask-flip.svg');
}

.img-blob img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 30px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--white);
  color: var(--white);
  background: transparent;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--white);
  color: var(--black);
}

.btn--dark {
  border-color: var(--black);
  color: var(--black);
}

.btn--dark:hover {
  background: var(--black);
  color: var(--white);
}

.btn--solid {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.btn--solid:hover {
  background: transparent;
  color: var(--black);
}

/* ---------- Hero (video background) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh; /* avoids mobile address-bar gap where supported */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
  background: var(--black);
}

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55);
}

/* Home hero: match the live site's darkening. Wix layers the image over a solid
   black underlay at reduced opacity, netting ~22% mean luminance; brightness(0.49)
   on the raw image reproduces that exactly (measured against the live screenshot). */
.hero--home .hero__media {
  filter: brightness(0.44);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 24px;
}

.hero__content h1 {
  font-style: italic;
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

/* Home hero H1 matches the live site: Bebas Neue italic, no tracking, ~112px cap.
   Line-height 1.2 and the negative margin reproduce the live site's line boxes:
   there the tagline box starts ~7px above the H1 box bottom (measured at 1440px,
   H1 112.6px / 135.2px line box, tagline top 490.75 vs H1 bottom 497.74). */
.hero--home .hero__content h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  letter-spacing: normal;
  line-height: 1.2;
  margin-bottom: -0.062em;
}

/* The live site's text block sits ~7.5px above the hero's vertical centre (its
   container carries 15px of trailing slack). Reproduce that with bottom padding. */
.hero--home .hero__content {
  padding-bottom: 39px;
}

/* Tagline is Montserrat semibold on the live site, not monospace */
.hero__tagline {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--accent);
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: uppercase;
  min-height: 1.2em;
  margin-bottom: 0;
}

/* Typewriter caret for the hero tagline */
.hero__tagline .caret {
  display: inline-block;
  width: 1px;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid #c2c2c2;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.form-status {
  margin-top: 16px;
  font-weight: 600;
  display: none;
}

.form-status--ok { color: #1a7f37; display: block; }
.form-status--error { color: #b42318; display: block; }

/* Honeypot: visually removed, still in DOM for bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Scroll reveal ----------
   Reproduces the live Wix entrance motion (fade + gentle rise), measured from the
   original: opacity 0->1, translateY ~24px->0, 1200ms, easeInOutSine, plays once. */
:root {
  --reveal-ease: cubic-bezier(0.445, 0.05, 0.55, 0.95);
  --reveal-dur: 1200ms;
}

/* Hidden state applies ONLY after JS adds `reveal-ready` to <html>, so content
   stays fully visible if JS never runs (crawlers / no-JS). */
html.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  will-change: opacity, transform;
}

/* Subtle grow, for hero/statement blocks that scaled on the live site */
html.reveal-ready .reveal.reveal--grow {
  transform: translateY(24px) scale(0.94);
}

/* Scoped under html.reveal-ready so it out-specifies the hidden-state rule above */
html.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--reveal-dur) var(--reveal-ease),
    transform var(--reveal-dur) var(--reveal-ease);
  transition-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  html.reveal-ready .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .reveal.is-visible {
    transition: none !important;
  }
}
