:root {
  --black: #0a0a0b;
  --ink: #151517;
  --paper: #f1f1ee;
  --white: #fff;
  --red: #d80b12;
  --muted: #a5a5a8;
  --line: rgba(255,255,255,.15);
  --wrap: 1240px;
  --header-h: 74px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; background: var(--black); color: var(--white); font-family: Inter, "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
.wrap { width: min(calc(100% - 40px), var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 1000; padding: 12px 16px; background: var(--red); color: #fff; text-decoration: none; }
.skip-link:focus { top: 16px; }

.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: rgba(245,245,242,.96); color: var(--ink); border-bottom: 1px solid rgba(0,0,0,.14); backdrop-filter: blur(14px); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: block; width: 154px; line-height: 0; }
.brand img { width: 100%; height: auto; }
.main-nav { display: flex; align-items: center; gap: clamp(18px, 2.1vw, 34px); }
.main-nav a { position: relative; padding-block: 8px; font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: 3px; width: 100%; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: right; transition: transform .25s ease; }
.main-nav a:hover::after, .main-nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.menu-button { display: none; width: 46px; height: 46px; padding: 12px 9px; background: transparent; border: 0; cursor: pointer; }
.menu-button > span:not(.sr-only) { display: block; width: 28px; height: 2px; margin: 5px 0; background: var(--ink); transition: transform .2s, opacity .2s; }

.hero { position: relative; min-height: min(820px, calc(100svh - var(--header-h))); overflow: hidden; isolation: isolate; }
.hero-media, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media { z-index: -3; overflow: hidden; transform: scale(1.01); }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-pos, 55% center); opacity: 0; transition: opacity 1.25s ease; }
.hero-media img.active { opacity: 1; }
.hero-shade { z-index: -2; background: linear-gradient(90deg, rgba(0,0,0,.91) 0%, rgba(0,0,0,.61) 43%, rgba(0,0,0,.08) 76%), linear-gradient(0deg, rgba(0,0,0,.68) 0%, transparent 45%); }
.hero::after { content: ""; position: absolute; z-index: -1; left: 0; bottom: 0; width: 36%; height: 8px; background: var(--red); }
.hero-content { min-height: inherit; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-block: 90px; }
.eyebrow, .kicker { margin: 0 0 20px; color: var(--red); font-size: .78rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.hero h1, .section h2, .contact-section h2 { margin: 0; font-family: Impact, "Arial Narrow", "Helvetica Neue", sans-serif; font-weight: 900; letter-spacing: -.035em; line-height: .9; text-transform: uppercase; }
.hero h1 { max-width: 850px; font-size: clamp(4.3rem, 9.4vw, 8.7rem); }
.hero h1 span { color: transparent; -webkit-text-stroke: 2px #fff; text-stroke: 2px #fff; }
.hero-lead { max-width: 650px; margin: 30px 0 0; color: rgba(255,255,255,.88); font-size: clamp(1.05rem, 1.8vw, 1.35rem); line-height: 1.45; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border: 1px solid rgba(255,255,255,.36); font-weight: 900; letter-spacing: .045em; text-decoration: none; text-transform: uppercase; transition: background .2s, border-color .2s, transform .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--red); border-color: var(--red); }
.button-primary:hover { background: #f01820; }
.button-quiet:hover { background: #fff; border-color: #fff; color: var(--ink); }
.hero-index { position: absolute; right: clamp(20px, 4vw, 64px); bottom: 28px; display: flex; min-width: 128px; flex-direction: column; align-items: stretch; gap: 9px; color: #fff; font-weight: 900; line-height: 1; text-align: center; }
.hero-index b { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.82); font-family: Impact, sans-serif; font-size: clamp(3.8rem, 5.5vw, 5.6rem); line-height: .82; letter-spacing: .01em; }
.hero-index em { font-family: Impact, "Arial Narrow", sans-serif; font-size: clamp(1.45rem, 2vw, 2.1rem); font-style: normal; letter-spacing: .09em; line-height: .9; }

.section { padding: clamp(78px, 9vw, 132px) 0; }
.section-heading h2, .section-topline h2 { font-size: clamp(3.3rem, 7vw, 6.5rem); }
.team-section { background: var(--paper); color: var(--ink); }
.team-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(320px, 1.08fr); gap: clamp(40px, 8vw, 130px); align-items: start; }
.team-copy { max-width: 680px; }
.team-copy p { margin: 0 0 22px; color: #555559; font-size: 1.05rem; }
.team-copy .lead { color: var(--ink); font-size: clamp(1.22rem, 2vw, 1.6rem); line-height: 1.45; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(58px, 8vw, 100px); border-top: 1px solid rgba(0,0,0,.18); }
.stats div { min-height: 145px; padding: 25px 24px 10px 0; border-right: 1px solid rgba(0,0,0,.18); }
.stats div:last-child { border-right: 0; padding-left: 24px; }
.stats div:not(:first-child) { padding-left: 24px; }
.stats strong { display: block; color: var(--red); font-family: Impact, "Arial Narrow", sans-serif; font-size: clamp(2.8rem, 4.6vw, 5rem); line-height: 1; }
.stats span { display: block; margin-top: 9px; font-size: .86rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

.section-dark { background: var(--black); }
.section-topline { display: grid; grid-template-columns: 1fr minmax(280px, 420px); gap: 50px; align-items: end; margin-bottom: 48px; }
.section-topline > p { margin: 0 0 7px; color: var(--muted); font-size: 1.06rem; }
.section-topline-dark > p { color: #66666c; }
.driver-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.driver-card { min-width: 0; display: grid; grid-template-columns: 1fr; gap: 0; padding: 18px; border: 1px solid #29292d; background: linear-gradient(145deg, #151517 0%, #0d0d0f 72%); box-shadow: 0 22px 50px rgba(0,0,0,.28); }
.portrait { position: relative; min-height: 0; aspect-ratio: 3 / 4; overflow: hidden; border: 7px solid #1d1d20; outline: 1px solid #414147; background: #1a1a1d; box-shadow: 10px 10px 0 rgba(216,11,18,.62), 0 24px 38px rgba(0,0,0,.38); }
.portrait::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.2); pointer-events: none; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; filter: saturate(.8) contrast(1.03); transition: transform .55s ease, filter .4s; }
.portrait-center img { object-position: center 20%; }
.portrait-left img { object-position: 42% center; }
.driver-card:hover .portrait img { transform: scale(1.025); filter: saturate(1) contrast(1.03); }
.race-number { position: absolute; left: 14px; bottom: -2px; color: #fff; font-family: Impact, "Arial Narrow", sans-serif; font-size: clamp(4.3rem, 6vw, 6.5rem); font-style: italic; line-height: .9; text-shadow: 4px 4px 0 var(--red); }
.race-number-small { font-size: clamp(3.6rem, 5vw, 5.5rem); }
.driver-content { display: flex; min-width: 0; flex-direction: column; padding: 32px 10px 12px; }
.driver-class, .car-pilot { margin: 0 0 12px; color: var(--red); font-size: .75rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.driver-class { min-height: 2.5em; }
.driver-content h3 { min-height: 2em; margin: 0 0 22px; font-family: Impact, "Arial Narrow", sans-serif; font-size: clamp(2.35rem, 3.3vw, 3.45rem); line-height: .94; letter-spacing: -.01em; text-transform: uppercase; }
.driver-content h3 span { display: block; }
.driver-content p { margin: 0 0 16px; color: #acacb0; font-size: .95rem; }
.driver-content .achievement { color: #fff; font-weight: 700; }

.cars-section { background: var(--paper); color: var(--ink); }
.car-list { border-top: 1px solid rgba(0,0,0,.18); }
.car-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: clamp(30px, 5vw, 72px); align-items: start; min-height: 0; padding: clamp(42px, 5vw, 68px) 0; border-bottom: 1px solid rgba(0,0,0,.18); }
.car-card-reverse { grid-template-columns: minmax(360px, .85fr) minmax(0, 1.15fr); }
.car-card-reverse .car-media { order: 2; }
.car-media { position: relative; width: 100%; min-height: 0; aspect-ratio: 3 / 2; align-self: start; overflow: hidden; border: 1px solid rgba(0,0,0,.18); background: #d8d8d4; box-shadow: 0 18px 42px rgba(0,0,0,.12); }
.car-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease, transform .6s ease; }
.car-media img.active { opacity: 1; }
.car-media-alt img { transform: scaleX(-1); }
.car-card:hover .car-media img { transform: scale(1.025); }
.car-card:hover .car-media-alt img { transform: scaleX(-1) scale(1.025); }
.car-copy { min-width: 0; padding: 0; align-self: start; }
.car-copy h3 { margin: 0 0 28px; font-family: Impact, "Arial Narrow", sans-serif; font-size: clamp(2.6rem, 4.5vw, 4.9rem); line-height: .95; text-transform: uppercase; }
.car-copy h3 span { display: block; color: #77777c; font-size: .55em; }
.car-copy dl { margin: 0; border-top: 1px solid rgba(0,0,0,.18); }
.car-copy dl div { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,.13); }
.car-copy dt { color: #707075; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.car-copy dd { margin: 0; font-weight: 700; }
.car-note { margin: 26px 0 0; color: #55555a; font-size: .94rem; }

.gallery-section { background: #111113; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; transition: opacity .35s ease, transform .35s ease; }
.gallery-grid.is-changing { opacity: .08; transform: translateY(5px); pointer-events: none; }
.gallery-item { position: relative; min-width: 0; aspect-ratio: 3 / 2; padding: 0; overflow: hidden; border: 0; background: #050506; cursor: zoom-in; }
.gallery-item[hidden] { display: none; }
.gallery-item::after { content: "+"; position: absolute; right: 12px; bottom: 12px; display: grid; width: 36px; height: 36px; place-items: center; background: rgba(0,0,0,.72); border: 1px solid rgba(255,255,255,.5); border-radius: 50%; color: #fff; font-size: 1.35rem; opacity: 0; transform: scale(.8); transition: opacity .2s, transform .2s; }
.gallery-item:hover::after, .gallery-item:focus-visible::after { opacity: 1; transform: scale(1); }
.gallery-item img { width: 100%; height: 100%; object-fit: contain; transition: transform .55s ease, filter .4s; }
.gallery-item:hover img { transform: scale(1.035); filter: contrast(1.05); }
.gallery-more { display: block; min-height: 52px; margin: 28px auto 0; padding: 12px 24px; border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; font-weight: 900; letter-spacing: .045em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.gallery-more:hover, .gallery-more:focus-visible { border-color: #fff; background: #fff; color: var(--ink); }

.partners-section { background: #e7e7e3; color: var(--ink); }
.partners-section .section-heading { margin-bottom: 44px; }
.partner-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.partner { min-height: 178px; display: flex; align-items: center; justify-content: center; padding: 24px; background: #fff; border: 1px solid rgba(0,0,0,.12); text-decoration: none; transition: transform .2s, box-shadow .2s; }
a.partner:hover { z-index: 1; transform: translateY(-3px); box-shadow: 0 14px 36px rgba(0,0,0,.14); }
.partner img { width: 100%; max-width: 235px; max-height: 92px; object-fit: contain; }
.partner-yokohama img { max-width: 280px; max-height: 74px; }
.partner-riskinvest img { max-width: 190px; max-height: 122px; }
.partner-contact img { max-width: 285px; max-height: 136px; }
.partner-dark { background: #0b0b0c; border-color: #242427; }

.contact-section { padding: clamp(84px, 10vw, 150px) 0; background: var(--red); color: #fff; }
.contact-section .kicker { color: #fff; opacity: .72; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .86fr); gap: 70px; align-items: start; }
.contact-section h2 { font-size: clamp(4.5rem, 9vw, 9rem); }
.contact-links { border-top: 1px solid rgba(255,255,255,.45); }
.contact-links a { display: block; position: relative; padding: 19px 48px 19px 0; border-bottom: 1px solid rgba(255,255,255,.45); text-decoration: none; }
.contact-links a::after { content: "↗"; position: absolute; right: 0; top: 50%; font-size: 1.6rem; transform: translateY(-50%); }
.contact-links span { display: block; opacity: .72; font-size: .76rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.contact-links strong { display: block; margin-top: 3px; font-size: clamp(1rem, 2vw, 1.25rem); overflow-wrap: anywhere; }
.site-footer { padding: 26px 0; background: #050506; color: #96969a; font-size: .84rem; }
.site-footer .wrap { display: flex; justify-content: space-between; }
.site-footer a { text-decoration: none; }

.lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0,0,0,.94); color: #fff; }
.lightbox[open] { display: grid; grid-template-columns: 70px 1fr 70px; place-items: center; }
.lightbox::backdrop { background: rgba(0,0,0,.92); }
.lightbox img { grid-column: 2; max-width: 100%; max-height: 92dvh; object-fit: contain; }
.lightbox-close, .lightbox-arrow { z-index: 2; border: 0; color: #fff; background: transparent; cursor: pointer; }
.lightbox-close { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 18px; width: 50px; height: 50px; font-size: 2.4rem; line-height: 1; }
.lightbox-arrow { width: 58px; height: 72px; font-size: 3rem; }

@media (max-width: 1040px) {
  .main-nav { gap: 16px; }
  .main-nav a { font-size: .72rem; }
  .driver-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .driver-card { grid-template-columns: 1fr; padding: 20px; }
  .portrait { aspect-ratio: 3 / 4; min-height: 0; }
  .driver-content { padding: 30px 8px 14px; }
  .car-card, .car-card-reverse { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .wrap { width: min(calc(100% - 28px), var(--wrap)); }
  .site-header { height: var(--header-h); }
  .brand { width: 126px; }
  .menu-button { display: block; }
  .menu-button[aria-expanded="true"] > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-button[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }
  .menu-button[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .main-nav { position: fixed; top: var(--header-h); left: 0; width: 100%; height: calc(100dvh - var(--header-h)); display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 20px 22px max(30px, env(safe-area-inset-bottom)); background: var(--paper); transform: translateX(100%); visibility: hidden; transition: transform .28s ease, visibility .28s; }
  .main-nav.open { transform: translateX(0); visibility: visible; }
  .main-nav a { padding: 14px 4px; border-bottom: 1px solid rgba(0,0,0,.14); font-family: Impact, "Arial Narrow", sans-serif; font-size: clamp(2rem, 9vw, 3.4rem); letter-spacing: .01em; }
  .main-nav a::after { display: none; }

  .hero { min-height: 0; background: var(--black); }
  .hero-media { inset: 0 0 auto; height: 42svh; min-height: 285px; transform: none; }
  .hero-media img { object-position: var(--hero-pos, 58% center); }
  .hero-shade { inset: 0 0 auto; height: 42svh; min-height: 285px; background: linear-gradient(0deg, rgba(10,10,11,.72) 0%, rgba(10,10,11,.03) 52%); }
  .hero-content { min-height: 0; justify-content: flex-start; padding-top: calc(max(42svh, 285px) + 34px); padding-bottom: 70px; }
  .eyebrow { margin-bottom: 14px; font-size: .66rem; }
  .hero h1 { font-size: clamp(3.7rem, 19vw, 6.2rem); }
  .hero h1 span { -webkit-text-stroke-width: 1px; }
  .hero-lead { margin-top: 22px; font-size: 1rem; }
  .hero-actions { width: 100%; margin-top: 26px; }
  .button { flex: 1 1 100%; }
  .hero-index { top: calc(max(42svh, 285px) - 84px); right: 14px; bottom: auto; }
  .hero-index b { font-size: 3rem; }
  .hero-index em { font-size: 1.15rem; }
  .section { padding: 72px 0; }
  .section-heading h2, .section-topline h2 { font-size: clamp(3.2rem, 16vw, 5rem); }
  .team-grid, .section-topline, .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div, .stats div:not(:first-child), .stats div:last-child { min-height: 118px; padding: 20px 12px 14px 0; border-right: 0; border-bottom: 1px solid rgba(0,0,0,.18); }
  .stats div:nth-child(even) { padding-left: 16px; border-left: 1px solid rgba(0,0,0,.18); }
  .driver-grid { grid-template-columns: 1fr; }
  .driver-card { grid-template-columns: 1fr; gap: 0; padding: 18px; }
  .portrait { min-height: 0; aspect-ratio: 3 / 4; }
  .driver-content { padding: 28px 6px 12px; }
  .driver-content h3 { margin-bottom: 18px; font-size: clamp(2.5rem, 10vw, 3.2rem); }
  .driver-content p { font-size: .9rem; }
  .race-number { font-size: 4.4rem; }
  .race-number-small { font-size: 3.7rem; }
  .car-card, .car-card-reverse { grid-template-columns: 1fr; gap: 24px; min-height: 0; padding: 38px 0; }
  .car-card-reverse .car-media { order: 0; }
  .car-media { min-height: 0; aspect-ratio: 3 / 2; }
  .car-copy { padding: 0 4px 12px; }
  .car-copy h3 { font-size: clamp(2.7rem, 13vw, 4rem); }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .partner-grid { grid-template-columns: 1fr 1fr; }
  .partner { min-height: 140px; padding: 20px; }
  .contact-grid { gap: 45px; }
  .lightbox[open] { grid-template-columns: 48px 1fr 48px; }
  .lightbox-arrow { width: 44px; }
}

@media (max-width: 520px) {
  .driver-card { grid-template-columns: 1fr; gap: 0; padding: 16px; }
  .portrait { min-height: 0; aspect-ratio: 3 / 4; }
  .driver-content { min-height: 0; padding: 28px 5px 14px; }
  .driver-content h3 { font-size: clamp(2.45rem, 13vw, 3.4rem); }
  .gallery-grid { grid-template-columns: 1fr; gap: 8px; }
  .partner-grid { grid-template-columns: 1fr; }
  .car-copy dl div { grid-template-columns: 105px 1fr; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
