/* Black Track web studio (web.blacktrackgroup.com):"Render pass" design system.
   Tokens, reset, type, buttons, header, footer and forms. Section styles live in sections.css. */

:root {
  --graphite: #10110f;
  --raised: #191b19; /* charcoal */
  --raised-2: #1f221e;
  --line: #2a2d29;
  --line-strong: #4a4d48;
  --ivory: #f4f0e8;
  --muted: #b7b9b2; /* 10:1 on graphite */
  --lime: #c9f755;
  --lime-press: #b5e03f;
  /* Red marks "recording" and accents in shapes only; #e5484d is ~3.7:1 on charcoal, so text uses --red-text */
  --red: #e5484d;
  --red-text: #ff9b9e;
  --clay: #8e8a82;

  --font-display: "Archivo", "Arial Black", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --wide: 118%; /* Archivo width axis for display type */

  --text-hero: clamp(2.6rem, 1.2rem + 5.6vw, 6.25rem);
  --text-h2: clamp(1.9rem, 1.3rem + 2.6vw, 3.5rem);
  --text-h3: 1.3rem;

  --container: 1320px;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.75rem);
  --space-section: clamp(4.5rem, 3rem + 6vw, 9rem);

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 160ms;
  --slow: 700ms;
}

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

/* Large monitors, ultrawides and TVs: scale the whole page so it reads at a distance instead of sitting in a
   narrow column. Steps need width AND height, so short super-wide screens don't over-scale. Viewport-height
   units elsewhere divide by --page-zoom. */
:root { --page-zoom: 1; }
@media (min-width: 2000px) and (min-height: 1100px) { :root { --page-zoom: 1.25; } }
@media (min-width: 2600px) and (min-height: 1400px) { :root { --page-zoom: 1.5; } }
@media (min-width: 3400px) and (min-height: 1900px) { :root { --page-zoom: 2; } }
html { zoom: var(--page-zoom); }

/* Scroll anchoring is off: scroll-driven transforms (hero layers, sticky 3D corridor) made the browser
   "correct" the scroll position every frame, which ran the page away. Nothing is inserted above the reader. */
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; -webkit-text-size-adjust: 100%; background: var(--graphite); overflow-anchor: none; }
body { overflow-anchor: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--graphite);
  color: var(--ivory);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-stretch: var(--wide); font-weight: 750; line-height: 1.02; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
p a, li a { color: var(--ivory); text-decoration-color: var(--lime); }
p a:hover, li a:hover { color: var(--lime); }
b, strong { font-weight: 600; }

:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--lime); color: var(--graphite); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .75rem 1rem; background: var(--lime); color: var(--graphite); font-weight: 600; border-radius: var(--radius-sm); }
.skip-link:focus { top: 1rem; }

.mono { font-family: var(--font-mono); font-size: .75rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.eyebrow { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.25rem; font: 500 .8125rem/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.eyebrow__num { color: var(--graphite); background: var(--lime); padding: .2rem .45rem; border-radius: 2px; letter-spacing: .04em; }
.eyebrow__dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgb(229 72 77 / .18); }
.h2 { font-size: var(--text-h2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.25rem; padding: .85rem 1.5rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color var(--fast), border-color var(--fast), color var(--fast), transform var(--fast) var(--ease);
}
.btn span { transition: transform var(--fast) var(--ease); }
.btn:hover span { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--lime); color: var(--graphite); }
.btn--primary:hover { background: var(--lime-press); }
.btn--ghost { border-color: var(--line-strong); color: var(--ivory); background: transparent; }
.btn--ghost:hover { border-color: var(--ivory); }
.btn--sm { min-height: 2.75rem; padding: .7rem 1.1rem; font-size: .9375rem; }
.link-arrow { color: var(--lime); font-weight: 600; text-decoration: none; }
.link-arrow span { display: inline-block; transition: transform var(--fast) var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

.tag { display: inline-block; padding: .3rem .6rem; border: 1px solid var(--line-strong); border-radius: 2px; font: 500 .6875rem/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tag--live { border-color: var(--lime); color: var(--lime); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgb(16 17 15 / .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: transform 350ms var(--ease); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; }
.brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: .85rem; text-decoration: none; }
.brand__logo { height: 1.75rem; width: auto; }
.brand__unit { padding-left: .85rem; border-left: 1px solid var(--line-strong); font-size: .625rem; color: var(--muted); white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav__cta { white-space: nowrap; }
.site-nav ul { display: flex; gap: .35rem; }
.site-nav ul a { position: relative; display: block; padding: .55rem .7rem; color: var(--muted); font-weight: 500; font-size: .9375rem; text-decoration: none; transition: color var(--fast); }
.site-nav ul a:hover, .site-nav ul a[aria-current="page"] { color: var(--ivory); }
.site-nav ul a[aria-current="page"]::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .2rem; height: 2px; background: var(--lime); }
.nav-toggle { display: none; align-items: center; gap: .6rem; min-height: 2.75rem; padding: 0 .9rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: transparent; color: var(--ivory); font: 500 .875rem/1 var(--font-body); cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before { display: block; width: 16px; height: 2px; background: currentColor; position: relative; transition: transform var(--fast); }
.nav-toggle__bars::before { content: ""; position: absolute; top: 6px; }
.nav-toggle__bars { transform: translateY(-3px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(-6px) rotate(-90deg); }

/* The full menu (7 links + button) needs about 1180px beside the logo; below that it collapses behind the toggle */
@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 1rem; padding: 1rem var(--gutter) 1.5rem; background: var(--graphite); border-bottom: 1px solid var(--line); }
  .js .site-nav { display: none; }
  .js .site-nav.is-open, html:not(.js) .site-nav { display: flex; }
  html:not(.js) .site-nav { position: static; padding: 0 0 1rem; border: 0; }
  html:not(.js) .site-header__inner { flex-wrap: wrap; }
  html:not(.js) .nav-toggle { display: none; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { padding: .85rem .25rem; font-size: 1.125rem; border-bottom: 1px solid var(--line); }
  .site-nav ul a[aria-current="page"]::after { left: .25rem; right: auto; width: 2rem; bottom: -1px; }
}
@media (max-width: 560px) {
  /* Icon-only menu button on phones, so "Web studio" never runs into it. Hidden visually only: the button keeps its accessible name */
  .nav-toggle { padding: 0 .8rem; }
  .nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 400px) {
  .brand { gap: .55rem; }
  .brand__logo { height: 1.35rem; }
  .brand__unit { padding-left: .55rem; }
}
@media (max-width: 340px) {
  .brand__unit { display: none; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) 2rem; background: var(--graphite); }
.site-footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); border-bottom: 1px solid var(--line); }
.site-footer__line { font: 750 clamp(1.6rem, 1rem + 2.6vw, 3rem)/1.05 var(--font-display); font-stretch: var(--wide); letter-spacing: -.025em; max-width: 22ch; }
.site-footer__line a { color: var(--lime); text-decoration: none; }
.site-footer__line a:hover { text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.site-footer__logo { height: 1.6rem; width: auto; margin-bottom: 1rem; }
.site-footer__h { margin-bottom: .9rem; color: var(--muted); font-size: .6875rem; font-stretch: 100%; }
.site-footer__list { display: grid; gap: .55rem; font-size: .9375rem; }
.site-footer__list a { text-decoration: none; color: var(--ivory); }
.site-footer__list a:hover { color: var(--lime); text-decoration: underline; }
.site-footer__legal { margin-top: 3rem; color: var(--muted); font-size: .6875rem; letter-spacing: .08em; }
@media (max-width: 880px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* Forms */
.field { display: grid; gap: .45rem; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.field label { font-weight: 500; font-size: .9375rem; }
.field__opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: .75rem .9rem;
  /* #868983 is 5.4:1 on graphite: field edges must reach 3:1 (WCAG 1.4.11) */
  border: 1px solid #868983; border-radius: var(--radius-sm); background: var(--graphite); color: var(--ivory);
  font: 400 1rem/1.4 var(--font-body); transition: border-color var(--fast), box-shadow var(--fast);
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%); background-position: calc(100% - 1.1rem) 55%, calc(100% - .8rem) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.4rem; }
.field textarea { resize: vertical; min-height: 8rem; }
.field input::placeholder, .field textarea::placeholder { color: #8a8c85; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ivory); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgb(201 247 85 / .25); }
.field [aria-invalid="true"] { border-color: var(--red-text); }
.field__error { color: var(--red-text); font-size: .875rem; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

/* Scroll progress (motion.js) */
.scroll-progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; background: var(--lime); transform-origin: left; transform: scaleX(var(--sp, 0)); pointer-events: none; }
html:not(.motion) .scroll-progress { display: none; }

/* Reveal on scroll (main.js adds .reveal only when motion is allowed) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
