/* ============================================================
   T-Rax — single-page landing
   Hand-authored CSS. No framework runtime. Zero client deps.
   ============================================================ */

/* ---- Brand font (self-hosted, OFL Assistant) ---- */
@font-face {
  font-family: 'Assistant';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/assistant-400.woff2') format('woff2'),
       url('../fonts/assistant-400.woff') format('woff');
}
@font-face {
  font-family: 'Assistant';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/assistant-700.woff2') format('woff2'),
       url('../fonts/assistant-700.woff') format('woff');
}

/* ---- Tokens ---- */
:root {
  --ink: #0e0f11;
  --ink-2: #16181b;
  --ink-3: #1d2024;
  --paper: #ffffff;
  --paper-2: #f3f2ef;
  --text: #16181b;
  --text-soft: #4a4e54;
  --muted: #8b9097;
  --muted-d: #6a6e73;
  --accent: #e07a2f;
  --accent-2: #f0913f;
  --line-d: rgba(255, 255, 255, 0.12);
  --line-l: rgba(18, 18, 18, 0.12);

  --font: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --maxw: 1240px;
  --gutter: clamp(1.25rem, 4vw, 4rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--text);
  background: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Layout ---- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: 700;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---- Eyebrow / mono label ---- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: '';
  width: 1.6rem;
  height: 1px;
  background: var(--accent);
}

/* ---- Buttons ---- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.7rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bg);
  border-radius: 2px;
  cursor: pointer;
  isolation: isolate;
  transition: transform 0.45s var(--spring), box-shadow 0.45s var(--ease), background 0.3s var(--ease);
  will-change: transform;
}
.btn .btn-arrow { transition: transform 0.45s var(--spring); }
.btn:hover {
  transform: translateY(-2px);
  background: var(--accent-2);
  border-color: var(--accent-2);
  box-shadow: 0 14px 30px -12px rgba(224, 122, 47, 0.6);
}
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  box-shadow: none;
}

.btn--lg { padding: 1.1rem 2.1rem; font-size: 1.02rem; }

/* ---- Header ---- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1rem, 2.4vw, 1.6rem) var(--gutter);
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: rgba(14, 15, 17, 0.82);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom-color: var(--line-d);
  padding-block: clamp(0.7rem, 1.6vw, 1rem);
}
.brand { display: inline-flex; align-items: center; }
.brand img { width: clamp(108px, 13vw, 150px); height: auto; }
.brand:focus-visible { outline-offset: 6px; }

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background: #0a0b0c;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media video,
.hero__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__poster {
  z-index: 0;
  /* poster always present so the hero is never an empty box before video loads */
  background-color: #0a0b0c;
  background-image: image-set(
    url('../img/hero-poster.webp') type('image/webp'),
    url('../img/hero-poster.jpg') type('image/jpeg')
  );
  background-image: -webkit-image-set(
    url('../img/hero-poster.webp') type('image/webp'),
    url('../img/hero-poster.jpg') type('image/jpeg')
  );
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero__media video {
  z-index: 1;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.hero__media video.is-ready { opacity: 1; }

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(10, 11, 12, 0.6) 0%, rgba(10, 11, 12, 0.18) 22%, rgba(10, 11, 12, 0.5) 52%, rgba(10, 11, 12, 0.97) 100%),
    radial-gradient(130% 95% at 8% 105%, rgba(10, 11, 12, 0.78), transparent 58%);
}

.hero__inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(6rem, 12vh, 7.5rem) var(--gutter);
}
.hero__eyebrow { margin-bottom: 1.4rem; }
.hero__eyebrow .eyebrow { color: #fff; }
.hero__eyebrow .eyebrow::before { background: var(--accent-2); }

.hero h1 {
  font-size: clamp(2.9rem, 9vw, 6.6rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  max-width: 16ch;
  text-shadow: 0 2px 30px rgba(8, 9, 10, 0.55);
}
.hero__lede { text-shadow: 0 1px 16px rgba(8, 9, 10, 0.6); }
.hero h1 .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.hero h1 .word > span {
  display: inline-block;
  transform: translateY(110%);
}
.is-animated .hero h1 .word > span {
  animation: word-up 0.9s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes word-up { to { transform: translateY(0); } }

.hero__lede {
  margin-top: 1.6rem;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: rgba(255, 255, 255, 0.86);
  opacity: 0;
}
.is-animated .hero__lede { animation: fade-up 0.8s var(--ease-out) 0.9s forwards; }

.hero__actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  opacity: 0;
}
.is-animated .hero__actions { animation: fade-up 0.8s var(--ease-out) 1.05s forwards; }

.hero__scroll {
  position: absolute;
  z-index: 3;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.hero__scroll .bar {
  width: 1px;
  height: 38px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent);
  animation: scroll-pulse 2.2s var(--ease) infinite;
}
@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; transform-origin: top; }
  50% { transform: scaleY(1); opacity: 1; transform-origin: top; }
}

/* ---- Spec band ---- */
.spec {
  background: var(--ink);
  color: #fff;
  padding-block: clamp(3.5rem, 8vw, 6rem);
  border-bottom: 1px solid var(--line-d);
}
.spec__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(2.2rem, 5vw, 3.4rem);
}
.spec__head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  text-transform: uppercase;
  max-width: 18ch;
}
.spec__head p { color: var(--muted); max-width: 36ch; }

.spec__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-d);
  border: 1px solid var(--line-d);
}
@media (max-width: 760px) {
  .spec__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .spec__grid { grid-template-columns: 1fr; }
}
.spec__item {
  background: var(--ink);
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: background 0.4s var(--ease);
}
.spec__item:hover { background: var(--ink-2); }
.spec__num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--accent-2);
}
.spec__item h3 {
  font-size: 1.18rem;
  letter-spacing: 0;
  line-height: 1.2;
}
.spec__item p { font-size: 0.95rem; color: var(--muted); line-height: 1.55; }

/* ---- About (editorial, light) ---- */
.about {
  background: var(--paper-2);
  color: var(--text);
  padding-block: clamp(4rem, 10vw, 8rem);
}
.about__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}
.about__body .eyebrow { color: var(--accent); }
.about__body h2 {
  margin-top: 1.3rem;
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.about__lede {
  margin-top: 1.5rem;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  color: var(--text);
  font-weight: 700;
  max-width: 40ch;
  line-height: 1.4;
}
.about__copy { margin-top: 1.4rem; display: grid; gap: 1.05rem; }
.about__copy p { color: var(--text-soft); max-width: 56ch; }
.about__signoff {
  margin-top: 1.8rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-d);
}
.about__signoff::before {
  content: '';
  width: 2.2rem;
  height: 1px;
  background: var(--accent);
}

/* Layered editorial image */
.about__media {
  position: relative;
  align-self: stretch;
  min-height: 420px;
}
.about__media .frame {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.45);
  aspect-ratio: 3 / 4;
  will-change: transform;
}
.about__media .frame img { width: 100%; height: 100%; object-fit: cover; }
.about__media .inset {
  position: absolute;
  right: -1.5rem;
  bottom: -1.5rem;
  width: 54%;
  border-radius: 3px;
  overflow: hidden;
  border: 5px solid var(--paper-2);
  box-shadow: 0 24px 48px -22px rgba(0, 0, 0, 0.5);
  aspect-ratio: 16 / 10;
}
.about__media .inset img { width: 100%; height: 100%; object-fit: cover; }
.about__media .tag {
  position: absolute;
  left: -0.75rem;
  top: 1.6rem;
  z-index: 2;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border-left: 3px solid var(--accent);
}

/* ---- CTA band ---- */
.cta-band {
  position: relative;
  color: #fff;
  text-align: center;
  padding-block: clamp(4rem, 11vw, 8rem);
  overflow: hidden;
  background: #0a0b0c;
}
.cta-band__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}
.cta-band__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 11, 12, 0.82), rgba(10, 11, 12, 0.62));
}
.cta-band__inner { position: relative; z-index: 2; }
.cta-band h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  text-transform: uppercase;
  max-width: 20ch;
  margin-inline: auto;
}
.cta-band p {
  margin-top: 1.1rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 50ch;
  margin-inline: auto;
}
.cta-band .btn { margin-top: 2rem; }

/* ---- Footer ---- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  padding-block: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line-d);
}
.footer__top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.footer__brand img { width: 150px; }
.footer__brand p { margin-top: 1.1rem; color: var(--muted); max-width: 34ch; font-size: 0.95rem; }
.footer__col h3 {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1.1rem;
}
.footer__col address {
  font-style: normal;
  display: grid;
  gap: 0.55rem;
  font-size: 0.96rem;
}
.footer__col a { transition: color 0.25s var(--ease); }
.footer__col a:hover { color: #fff; }
.footer__hours { display: grid; gap: 0.4rem; font-size: 0.96rem; color: var(--muted); }
.footer__hours b { color: rgba(255, 255, 255, 0.86); font-weight: 700; }

.footer__bottom {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-d);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted-d);
}
.footer__bottom .made {
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.footer__bottom .made b { color: var(--accent-2); font-weight: 400; }

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
/* No-JS / unsupported fallback: content fully visible */
html:not(.js) .reveal { opacity: 1; transform: none; }

/* ---- Keyframes ---- */
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 3rem; }
  .about__media { min-height: 0; max-width: 460px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer__top { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .about__media .inset { right: 0; width: 58%; }
}

/* ---- Reduced motion: strip all motion, keep everything visible ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero h1 .word > span { transform: none; }
  .hero__lede, .hero__actions { opacity: 1; }
  .hero__media video { opacity: 1; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero__scroll .bar { animation: none; }
}
