/* ================================================================
   SILVER ARROWS — Style System
   ================================================================ */

/* --- Design Tokens --- */
:root {
  /* Design System — Kinetic Monolith surfaces */
  --black: #131313;          /* surface base */
  --surface-low: #1b1b1b;    /* surface-container-low */
  --surface: #1f1f1f;        /* surface-container */
  --surface-high: #2a2a2a;   /* surface-container-high */
  --surface-highest: #353535;/* surface-container-highest */
  --dark: #0e0e0e;           /* surface-container-lowest — deep focus */
  --mid: #474747;            /* outline-variant */
  --silver: #c2c7c8;         /* on-surface-secondary */
  --muted: #919191;          /* outline */
  --faint: #474747;          /* ghost border */
  --white: #e2e2e2;          /* on-surface */
  --white-pure: #ffffff;     /* primary */
  --white-dim: #d4d4d4;      /* primary-container — silver gradient end */

  --font-display: 'Agrandir Grand', 'Arial Black', sans-serif;
  --font-body: 'Agrandir', 'Inter', sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --nav-height: 72px;
  --section-pad-x: clamp(1.5rem, 5vw, 6rem);
  --section-pad-y: clamp(5rem, 12vh, 10rem);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); font-weight: 400; color: var(--silver); background: var(--black); overflow-x: hidden; line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* --- Utility --- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ================================================================
   NAVIGATION
   ================================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: background 0.4s var(--ease-out), backdrop-filter 0.4s var(--ease-out);
}
.nav--scrolled {
  background: rgba(19, 19, 19, 0.80);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(71, 71, 71, 0.15); /* ghost border — felt not seen */
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--section-pad-x);
  max-width: 1600px;
  margin: 0 auto;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1001;
}
.nav__logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}
.nav__menu {
  display: flex;
  align-items: center;
  gap: 3rem;
}
.nav__links {
  display: flex;
  gap: 2rem;
}
.nav__link {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--muted);
  transition: color var(--transition-interactive);
  text-transform: uppercase;
}
.nav__link:hover, .nav__link:focus-visible { color: var(--white); }
.nav__cta {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--white);
  border: 1px solid var(--white);
  padding: 10px 24px;
  text-transform: uppercase;
  transition: background var(--transition-interactive), color var(--transition-interactive);
}
.nav__cta:hover {
  background: var(--white);
  color: var(--black);
}

/* Hamburger */
.nav__toggle-input { display: none; }
.nav__hamburger { display: none; }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--nav-height) var(--section-pad-x) 4rem;
  background: var(--black);
  overflow: hidden;
}
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero__headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4rem, 9.5vw, 9rem);
  line-height: 0.88;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  padding-top: 0.15em; /* prevent ascender clipping from tight line-height */
}
.hero__line {
  display: block;
}
.hero__word {
  display: inline-block;
  will-change: clip-path;
}
.hero__sub {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(0.875rem, 1.5vw, 1.125rem);
  color: var(--silver);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.hero__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero__mark-wrap {
  position: absolute;
  right: -8%;
  top: 50%;
  transform: translateY(-48%);
  width: 72vh;
  height: 72vh;
  z-index: 1;
  pointer-events: none;
}
.hero__mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.28;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 4px; /* Precision Radius — machined edge */
  transition: background 220ms linear, color 220ms linear, border-color 220ms linear;
  cursor: pointer;
}
.btn--solid {
  background: var(--white-pure);
  color: #1a1c1c;
  border: 1px solid var(--white-pure);
}
.btn--solid:hover {
  /* Silver gradient on hover — mimics Silver Arrow metallic finish */
  background: linear-gradient(135deg, var(--white-pure) 0%, var(--white-dim) 100%);
  border-color: var(--white-dim);
  color: #1a1c1c;
}
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(145, 145, 145, 0.2); /* ghost border */
}
.btn--outline:hover {
  background: linear-gradient(135deg, var(--white-pure) 0%, var(--white-dim) 100%);
  color: #1a1c1c;
  border-color: var(--white-dim);
}

/* ================================================================
   SECTIONS — Common
   ================================================================ */
.section {
  padding: var(--section-pad-y) var(--section-pad-x);
  max-width: 1600px;
  margin: 0 auto;
}
.section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}
.section__label,
.section__counter {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.25em;
  color: var(--muted);
  text-transform: uppercase;
}
.section__headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 6rem);
  color: var(--white);
  text-transform: uppercase;
  line-height: 0.95;
  padding-top: 0.1em; /* prevent ascender clipping from tight line-height */
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

/* ================================================================
   APPROACH
   ================================================================ */
.approach__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px; /* tonal gap instead of borders */
  background: var(--dark); /* gap colour creates the separator */
  border-radius: 4px;
  overflow: hidden;
}
.approach__card {
  padding: clamp(2rem, 3.5vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
  background: var(--surface-high);
  transition: background 220ms linear;
}
.approach__card:hover {
  background: var(--surface-highest);
}
.approach__card:first-child {
  border-radius: 4px 0 0 4px;
}
.approach__card:last-child {
  border-radius: 0 4px 4px 0;
}
.approach__card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}
.approach__card-body {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--silver);
  line-height: 1.7;
}

/* ================================================================
   FOUNDER
   ================================================================ */
.founder__grid {
  display: grid;
  grid-template-columns: 0.45fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.founder__portrait {
  position: relative;
  aspect-ratio: 3/4;
  max-width: 320px;
  background: var(--surface-low);
  border-radius: 4px;
  overflow: hidden;
}
.founder__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.founder__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
}
.founder__img:not([src=""]) + .founder__placeholder {
  display: none;
}
/* Show placeholder when image fails */
.founder__img.img-error {
  display: none;
}
.founder__img.img-error + .founder__placeholder {
  display: flex;
}
.founder__initials {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 6vw, 5rem);
  color: var(--faint);
  letter-spacing: 0.1em;
}
.founder__content {
  padding-top: clamp(1rem, 3vw, 2rem);
}
.founder__label {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.25em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: clamp(1.5rem, 3vw, 3rem);
}
.founder__quote {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 1.5rem;
  border: none;
  padding: 0;
}
.founder__attribution {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.founder__bio {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--silver);
  line-height: 1.7;
}

/* ================================================================
   RACING
   ================================================================ */
.racing__body {
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 1.2vw, 1rem);
  color: var(--silver);
  line-height: 1.7;
  max-width: 680px;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}
.racing__cards {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.25rem;
}
/* Single full-width car display */
.racing__hero {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: #cccbc4; /* matches studio bg of the AMG render */
}
.racing__car-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.racing__car-info {
  padding: 1.25rem 0 0 1.5rem;
}
.racing__card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 380px;
  border-radius: 4px;
  overflow: hidden;
  cursor: default;
}
.racing__card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.racing__card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,13,18,0.85) 0%, rgba(11,13,18,0.25) 50%, transparent 100%);
}
.racing__card-info {
  position: relative;
  z-index: 2;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.racing__card-label {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.racing__card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  color: var(--white);
  text-transform: uppercase;
}

/* ================================================================
   CONTACT
   ================================================================ */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.contact__block {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.contact__block-label {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--faint);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.contact__address {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  color: var(--white);
  line-height: 1.6;
}
.contact__email {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.1rem, 1.8vw, 1.25rem);
  color: var(--white);
  transition: color var(--transition-interactive);
  border-bottom: 1px solid var(--faint);
  padding-bottom: 4px;
}
.contact__email:hover { color: var(--silver); }

.contact__map {
  position: relative;
  height: 400px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-low);
}
.contact__map-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: grayscale(100%) brightness(0.55);
}
.contact__map-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,13,13,0.5) 0%, transparent 60%);
}
.contact__map-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.contact__pin {
  opacity: 0.7;
}
.contact__map-label {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--white);
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  background: var(--dark); /* surface-container-lowest — deepest layer */
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem var(--section-pad-x);
  max-width: 1600px;
  margin: 0 auto;
}
.footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer__logo-img {
  height: 24px;
  width: auto;
  object-fit: contain;
  opacity: 0.7;
}
.footer__links {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer__link {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--muted);
  transition: color var(--transition-interactive);
}
.footer__link:hover { color: var(--white); }
.footer__sep {
  color: var(--faint);
  font-size: 11px;
}
.footer__copy {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--muted);
}

/* ================================================================
   ANIMATIONS — Initial states set by JS (GSAP)
   Visible by default for no-JS / reduced-motion fallback
   ================================================================ */

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .anim-reveal,
  .anim-fade,
  .hero__word,
  .hero__sub,
  .hero__ctas {
    clip-path: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ================================================================
   MOBILE RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .approach__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .approach__card {
    padding-left: 0;
    padding-right: 0;
  }
  .approach__card + .approach__card {
    border-left: none;
    border-top: 1px solid var(--faint);
  }
  .racing__cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  /* Nav mobile */
  .nav__hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    z-index: 1001;
  }
  .nav__hamburger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--white);
    transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
  }
  .nav__toggle-input:checked ~ .nav__hamburger span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }
  .nav__toggle-input:checked ~ .nav__hamburger span:nth-child(2) {
    opacity: 0;
  }
  .nav__toggle-input:checked ~ .nav__hamburger span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  .nav__menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    background: var(--black);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
    z-index: 1000;
  }
  .nav__toggle-input:checked ~ .nav__menu {
    opacity: 1;
    pointer-events: all;
  }
  .nav__links {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  .nav__link {
    font-size: 14px;
    letter-spacing: 0.2em;
  }

  /* Hero mobile */
  .hero {
    padding-top: calc(var(--nav-height) + 2rem);
  }
  .hero__content {
    max-width: 100%;
  }
  .hero__headline {
    font-size: clamp(3rem, 13vw, 5rem);
  }
  .hero__mark-wrap {
    width: 40vh;
    height: 40vh;
    right: -15%;
    opacity: 0.08;
  }

  /* Sections mobile */
  .section__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .section__headline {
    font-size: clamp(2rem, 9vw, 3.5rem);
  }

  /* Founder mobile */
  .founder__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .founder__portrait {
    max-height: 400px;
  }

  /* Racing mobile */
  .racing__cards {
    grid-template-columns: 1fr;
  }
  .racing__card {
    min-height: 280px;
  }

  /* Contact mobile */
  .contact__grid {
    grid-template-columns: 1fr;
  }
  .contact__map {
    height: 280px;
  }

  /* Footer mobile */
  .footer__inner {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
    padding: 2rem var(--section-pad-x);
  }
}

@media (max-width: 480px) {
  .hero__headline {
    font-size: clamp(2.25rem, 11vw, 3.5rem);
  }
  .hero__sub {
    font-size: 0.875rem;
  }
}
