/* Brand colours live here. Change --hot to re-theme the whole site. */
:root {
  color-scheme: dark;
  --ink: #100f0e;
  --ink-2: #1c1a18;
  --bone: #f2efe9;
  --muted: #aaa49c;
  --line: #3a3632;
  --hot: #ff4b1f;
  --gutter: clamp(16px, 3vw, 40px);
  --header: 64px;
  --display: Anton, "Anton Fallback", Impact, "Arial Narrow", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Keeps text the same width while Anton loads, so the wordmark doesn't jump. */
@font-face {
  font-family: "Anton Fallback";
  src: local("Impact");
  size-adjust: 90%;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--bone); font: 400 1.0625rem/1.55 var(--body); overflow-x: clip; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
h2, h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: 1.05; }
a { color: inherit; }
section[id] { scroll-margin-top: var(--header); }
:focus-visible { outline: 3px solid var(--hot); outline-offset: 3px; }
.hyrox :focus-visible { outline-color: var(--ink); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 30; padding: 10px 16px; background: var(--hot); color: var(--ink); }
.skip:focus { top: 10px; }

/* Buttons and links */
.btn {
  display: inline-block; padding: 16px 28px; border: 0; border-radius: 0; cursor: pointer;
  background: var(--hot); color: var(--ink);
  font: 400 1.25rem/1 var(--display); letter-spacing: .03em; text-transform: uppercase; text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 6px 6px 0 var(--bone); }
.btn-small { padding: 11px 16px; font-size: 1.0625rem; }
.btn-dark { background: var(--ink); color: var(--bone); }
.btn-dark:hover { box-shadow: 6px 6px 0 var(--bone); }
.link { font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 2px; text-decoration-color: var(--hot); }
.link:hover { color: var(--hot); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20; height: var(--header);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: var(--gutter); background: var(--ink); border-bottom: 1px solid var(--line);
}
.logo { font: 400 1.5rem/1 var(--display); text-transform: uppercase; text-decoration: none; letter-spacing: .02em; }
.logo span { color: var(--hot); margin-left: .25em; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 32px); }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; font-size: 1rem; }
.nav a:not(.btn):hover { color: var(--hot); }
.menu-toggle { display: none; padding: 10px 14px; background: none; border: 1px solid var(--line); color: var(--bone); font: 600 .9375rem var(--body); cursor: pointer; }

/* Hero */
.hero { position: relative; padding: clamp(12px, 2vw, 24px) var(--gutter) clamp(32px, 5vw, 56px); overflow: clip; }
.wordmark { margin: 0; font: 400 1em/1 var(--display); text-transform: uppercase; }
.wm { display: block; white-space: nowrap; }
.wm > span {
  display: inline-block;
  transform:
    translate(calc(var(--x) * var(--s, 0) * 1vw), calc(var(--y) * var(--s, 0) * 1vw))
    rotate(calc(var(--r) * var(--s, 0) * 1deg));
  animation: settle .85s cubic-bezier(.2, 1.35, .4, 1) both;
}
@keyframes settle {
  from { translate: calc(var(--x) * 2vw) calc(var(--y) * 2vw); rotate: calc(var(--r) * 2.5deg); }
  to { translate: 0 0; rotate: 0deg; }
}
/* 3.1 = the width of "CHAOTIC" in ems, so the word spans the page between gutters. */
.wm-chaotic, .wm-fit { font-size: min(calc((100vw - 2 * var(--gutter)) / 3.1), 62svh); line-height: 1.12; }
.wm-fit { margin-top: -.18em; color: var(--hot); }

.hero-copy { margin-top: 20px; max-width: 34rem; }
.tagline { font: 400 clamp(2.25rem, 5vw, 3.5rem)/1.05 var(--display); text-transform: uppercase; }
.lede { margin-top: 12px; font-size: 1.1875rem; color: var(--bone); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 24px; }

/* From tablet up, FIT shrinks and sits beside the copy. */
@media (min-width: 760px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 34rem); align-items: end; column-gap: 40px; }
  .wordmark { display: contents; }
  .wm-chaotic { grid-column: 1 / -1; }
  .wm-fit { margin-top: 0; font-size: min(15vw, 26svh); line-height: 1.1; }
  .hero-copy { margin-top: 0; padding-bottom: 8px; }
}

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) var(--gutter) 0; }
.eyebrow { font-size: clamp(1.5rem, 2.4vw, 2rem); color: var(--hot); margin-bottom: clamp(20px, 3vw, 36px); }

/* Services */
.services { border-top: 1px solid var(--line); }
.service {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px clamp(24px, 5vw, 80px); align-items: start;
  padding-block: clamp(24px, 3.5vw, 44px); border-bottom: 1px solid var(--line);
}
.service h3 { font-size: clamp(3rem, 7.8vw, 7.5rem); line-height: 1; transform-origin: left bottom; transition: transform .2s, color .2s; }
.service:hover h3 { color: var(--hot); transform: rotate(-1.5deg) translateX(6px); }
.service-body { display: grid; gap: 12px; justify-items: start; padding-top: 6px; }
.for { color: var(--muted); }
.for b { color: var(--bone); font-weight: 600; }

/* Hyrox */
.hyrox { margin-top: clamp(64px, 9vw, 120px); padding: clamp(48px, 7vw, 96px) var(--gutter); background: var(--hot); color: var(--ink); }
.hyrox-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px clamp(24px, 5vw, 80px); align-items: end; }
.hyrox-head h2 { font-size: clamp(3.5rem, 9vw, 8.5rem); line-height: 1; }
.hyrox-head p { font-size: 1.1875rem; font-weight: 500; }

.race { counter-reset: station; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(32px, 5vw, 64px); border-top: 2px solid var(--ink); border-left: 2px solid var(--ink); }
.race li { counter-increment: station; display: flex; flex-direction: column; min-height: 188px; padding: 16px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.race li::before { content: counter(station, decimal-leading-zero); font: 400 1.125rem/1 var(--display); }
.race span { margin-top: 12px; font-size: .9375rem; font-weight: 600; }
.race b { margin-top: auto; padding-top: 16px; font: 400 clamp(1.5rem, 2.6vw, 2.25rem)/1.05 var(--display); text-transform: uppercase; }
.race i { margin-top: 4px; font-style: normal; font-size: .9375rem; font-weight: 500; }
.race li:hover { background: var(--ink); color: var(--bone); }

.hyrox-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; margin-top: 32px; }
.hyrox-foot ul { display: flex; flex-wrap: wrap; gap: 8px 32px; font: 400 clamp(1.25rem, 2vw, 1.625rem)/1.2 var(--display); text-transform: uppercase; }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(24px, 4vw, 56px); }
.steps li { counter-increment: step; border-top: 1px solid var(--line); padding-top: 16px; }
.steps li::before { content: counter(step); display: block; font: 400 clamp(4rem, 8vw, 6.5rem)/1 var(--display); color: var(--hot); }
.steps h3 { margin-top: 12px; font-size: clamp(1.75rem, 2.8vw, 2.25rem); }
.steps p { margin-top: 8px; color: var(--muted); }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 24px; padding-block: 20px; cursor: pointer; list-style: none; font-size: 1.25rem; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--hot); font: 400 1.75rem/1 var(--display); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--hot); }
.faq p { max-width: 44rem; padding-bottom: 24px; color: var(--muted); }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px clamp(24px, 6vw, 96px); margin-top: clamp(64px, 9vw, 120px); padding: clamp(48px, 7vw, 96px) var(--gutter); background: var(--ink-2); }
.contact h2 { font-size: clamp(3.5rem, 9vw, 8.5rem); line-height: 1; }
.contact-info > p { margin-top: 16px; font-size: 1.1875rem; }
.contact dl { display: grid; gap: 14px; margin-top: 32px; }
.contact dt { font: 400 1.125rem/1.2 var(--display); text-transform: uppercase; color: var(--hot); }
.todo { color: var(--muted); font-style: italic; }

.form { display: grid; gap: 20px; align-content: start; }
.form label { display: block; font-weight: 600; font-size: 1rem; }
.optional { color: var(--muted); font-weight: 400; }
.form input, .form select, .form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 0;
  background: var(--ink); color: var(--bone); font: 400 1.0625rem/1.4 var(--body);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--hot); outline-offset: 0; border-color: var(--hot); }
.form textarea { resize: vertical; }
.form .btn { justify-self: start; }
.status { min-height: 1.5em; color: var(--muted); }

/* Footer */
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px var(--gutter); color: var(--muted); font-size: .9375rem; }
.site-footer .logo { color: var(--bone); font-size: 1.25rem; }

/* Tablet and phone */
@media (max-width: 759px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute; inset: var(--header) 0 auto 0; display: none;
    flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 12px var(--gutter) 20px; background: var(--ink); border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding-block: 10px; font-size: 1.125rem; }
  .nav .btn { margin-top: 8px; }

  .service, .hyrox-head, .contact { grid-template-columns: minmax(0, 1fr); }
  .race { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .race li { min-height: 164px; padding: 12px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .wm > span { transform: none; }
}
