/* ============================================================
   GTG RACING — base tokens
   ============================================================ */
:root{
  --black: #060606;
  --near-black: #0d0d0d;
  --card: #111111;
  --off-white: #f2f1ec;
  --grey: #949490;
  --line: rgba(242,241,236,0.14);
  --line-strong: rgba(242,241,236,0.28);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(.22,.61,.36,1);
  --dur: 900ms;
}

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

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

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}

body{
  margin: 0;
  background: var(--black);
  color: var(--off-white);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img{ max-width: 100%; display: block; }

a{ color: inherit; text-decoration: none; }

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

/* subtle global film grain */
body::after{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("../images/grain.svg");
  background-size: 240px 240px;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--off-white);
  color: var(--black);
  padding: 12px 18px;
  z-index: 1000;
}
.skip-link:focus{
  left: 16px;
  top: 16px;
}

/* ============================================================
   Utility
   ============================================================ */
.label{
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey);
  font-weight: 500;
}

.cta{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--off-white);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.4s var(--ease), gap 0.4s var(--ease), opacity 0.4s var(--ease);
}
.cta:hover, .cta:focus-visible{
  border-color: var(--off-white);
  gap: 16px;
}
.cta .arrow{
  transition: transform 0.4s var(--ease);
}
.cta:hover .arrow{
  transform: translateX(2px);
}

/* ============================================================
   Reveal animations
   ============================================================ */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

.reveal-bg{
  transform: scale(1.08);
  filter: brightness(0.7);
  transition: transform 2.2s var(--ease), filter 2.2s var(--ease);
}
.reveal-bg.is-visible{
  transform: scale(1);
  filter: brightness(1);
}

@media (prefers-reduced-motion: reduce){
  .reveal, .reveal-bg{
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ============================================================
   Header / wordmark
   ============================================================ */
.wordmark{
  position: fixed;
  top: 0;
  left: 0;
  z-index: 500;
  padding: 20px 20px;
  display: flex;
  align-items: center;
}
.wordmark img{
  width: 34px;
  height: 34px;
  display: block;
}

/* ============================================================
   Full-bleed background sections
   ============================================================ */
.hero, .panel{
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.bg{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}
.bg::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,6,6,0.15) 0%, rgba(6,6,6,0.55) 55%, rgba(6,6,6,0.92) 100%);
}

/* ============================================================
   HERO
   ============================================================ */
.hero-content{
  position: relative;
  z-index: 2;
  padding: 0 24px 14vh;
  max-width: 780px;
}

.h-hero{
  font-size: clamp(2.6rem, 9vw, 5.6rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}

.hero-copy{
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  color: var(--off-white);
  opacity: 0.85;
  line-height: 1.6;
  margin: 0 0 40px;
  font-weight: 300;
}

.sound-toggle{
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 3;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  font-weight: 500;
  color: var(--grey);
  padding: 8px 6px;
  transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
}
.sound-toggle:hover,
.sound-toggle:focus-visible{
  color: var(--off-white);
}
.sound-toggle:focus-visible{
  outline: 1px solid var(--line-strong);
  outline-offset: 3px;
}
.sound-dot{
  display: inline-block;
  margin-left: 2px;
  font-size: 0.8em;
}
.sound-toggle[aria-pressed="true"]{
  color: var(--off-white);
}

@media (max-width: 480px){
  .sound-toggle{ top: 16px; right: 16px; }
}

.scroll-cue{
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scroll-cue span{
  display: block;
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, var(--off-white), transparent);
  animation: cue-pulse 2.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce){
  .scroll-cue span{ animation: none; }
}
@keyframes cue-pulse{
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 0.85; transform: translateY(6px); }
}

/* ============================================================
   PANELS (Machine / Racing)
   ============================================================ */
.panel-content{
  position: relative;
  z-index: 2;
  padding: 0 24px 14vh;
  max-width: 620px;
}

.panel .label{
  display: block;
  margin-bottom: 22px;
}

.h-section{
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}

.panel-copy{
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  font-weight: 300;
  opacity: 0.85;
  line-height: 1.65;
  margin: 0;
  max-width: 46ch;
}

/* Stats reserve area (Racing) */
.stats{
  display: flex;
  list-style: none;
  margin: 56px 0 0 0;
  padding: 32px 0 0 0;
  gap: clamp(28px, 6vw, 64px);
  border-top: 1px solid var(--line);
}
.stat{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-value{
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 300;
  color: var(--grey);
}
.stat-label{
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
  opacity: 0.7;
}
.stats-note{
  display: block;
  margin-top: 18px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--grey);
  opacity: 0.6;
  font-style: normal;
}

/* ============================================================
   ACCESS
   ============================================================ */
.access{
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--black);
  padding: 14vh 24px;
}
.access .bg::after{
  background: rgba(6,6,6,0.74);
}
.access-content{
  position: relative;
  z-index: 2;
  max-width: 720px;
}
.h-access{
  font-size: clamp(2.2rem, 7vw, 4.2rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}
.access-copy{
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  font-weight: 300;
  opacity: 0.75;
  line-height: 1.6;
  margin: 0 0 44px;
}
.access .cta{
  display: inline-flex;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer{
  background: var(--black);
  border-top: 1px solid var(--line);
  padding: 40px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.footer-top{
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-mark{
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  font-weight: 600;
}
.footer-links{
  display: flex;
  gap: 28px;
}
.footer-links a{
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--off-white);
  opacity: 0.8;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: opacity 0.3s var(--ease), border-color 0.3s var(--ease);
}
.footer-links a:hover{
  opacity: 1;
  border-color: var(--line-strong);
}
.footer-bottom{
  font-size: 0.68rem;
  color: var(--grey);
  opacity: 0.6;
  letter-spacing: 0.06em;
}

@media (min-width: 640px){
  .footer{
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .footer-links{
    order: 2;
  }
  .footer-bottom{
    order: 3;
  }
}

/* ============================================================
   MODAL
   ============================================================ */
.modal{
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.modal.is-open{
  visibility: visible;
  opacity: 1;
}
.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(6,6,6,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-card{
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  background: var(--near-black);
  border: 1px solid var(--line);
  padding: 40px 32px;
  transform: translateY(14px);
  transition: transform 0.4s var(--ease);
}
.modal.is-open .modal-card{
  transform: translateY(0);
}
.modal-close{
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--grey);
  padding: 6px;
  transition: color 0.3s var(--ease);
}
.modal-close:hover{ color: var(--off-white); }

.modal-title{
  font-size: 1.4rem;
  font-weight: 500;
  margin: 10px 0 26px;
  letter-spacing: -0.01em;
}

.field{
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label{
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}
.field input, .field textarea{
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  color: var(--off-white);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 8px 2px;
  resize: none;
  transition: border-color 0.3s var(--ease);
}
.field input:focus, .field textarea:focus{
  outline: none;
  border-color: var(--off-white);
}

.submit-btn{
  margin-top: 8px;
  background: none;
  width: auto;
}

.modal-note{
  margin: 16px 0 0;
  font-size: 0.7rem;
  color: var(--grey);
  opacity: 0.7;
  line-height: 1.5;
}

.modal-success .modal-title{
  margin-top: 0;
}

.visually-hidden{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Small screens polish
   ============================================================ */
@media (max-width: 480px){
  .wordmark{ padding: 16px 18px; }
  .wordmark img{ width: 28px; height: 28px; }
  .hero-content, .panel-content{ padding-bottom: 12vh; }
  .h-hero{ font-size: clamp(2.3rem, 11vw, 3.2rem); }
  .stats{ gap: 22px; }
  .modal-card{ padding: 32px 22px; }
}

/* Larger desktop breathing room */
@media (min-width: 1200px){
  .hero-content{ max-width: 860px; padding-left: 64px; }
  .panel-content{ max-width: 660px; padding-left: 64px; }
}
