/* Drift page (T-050). Loaded only on /drift/ together with static/fonts/fonts.css. Scoped to body.ng-page-drift. */
body.ng-page-drift { --d-bg: #09090c; --d-bg-alt: #111116; --d-red: #e6342f; --d-fg: #f5f5f5; --d-muted: #a4a7b0; overflow-x: hidden; background: var(--d-bg); }
body.ng-page-drift .ng-main { max-width: none; padding: 0; }
body.ng-page-drift .ng-page { color: var(--d-fg); }

/* Full-bleed sections inside the theme's centred container */
body.ng-page-drift .ng-page .alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
body.ng-page-drift .ng-page > article > *:first-child { margin-top: 0; }
body.ng-page-drift .ng-drift-section { padding: clamp(3.5rem, 8vw, 6.5rem) 1.25rem; margin: 0; }
body.ng-page-drift .ng-drift-section > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
body.ng-page-drift .ng-drift-alt { background: var(--d-bg-alt); }

/* Typography */
body.ng-page-drift .ng-kicker { color: var(--d-red); font: 700 .78rem/1.2 Orbitron, system-ui, sans-serif; letter-spacing: .32em; text-transform: uppercase; margin: 0 0 .6rem; }
body.ng-page-drift .ng-section-title { font: 900 clamp(1.2rem, 6vw, 2.6rem)/1.15 Orbitron, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .02em; margin: 0 0 1.5rem; color: var(--d-fg); }
body.ng-page-drift .ng-underline::after { content: ""; display: block; width: 56px; height: 3px; background: var(--d-red); margin: 1rem auto 0; }
body.ng-page-drift .ng-page p { line-height: 1.7; color: #d6d8de; }
body.ng-page-drift .ng-accent { color: var(--d-red); }
body.ng-page-drift .ng-section-title, body.ng-page-drift .ng-drift-title, body.ng-page-drift .ng-card-title { overflow-wrap: break-word; }

/* Hero */
body.ng-page-drift .ng-drift-hero { margin: 0; padding: 3.25rem 1.25rem 3rem; min-height: min(56vh, 560px) !important; }
body.ng-page-drift .ng-drift-hero .wp-block-cover__background { background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.35) 45%, var(--d-bg) 100%) !important; opacity: 1 !important; }
body.ng-page-drift .ng-drift-title { font: 900 clamp(2rem, 9vw, 6.2rem)/.95 Orbitron, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .01em; margin: 0 0 1.25rem; color: #fff; text-shadow: 0 6px 30px rgba(0,0,0,.6); }
body.ng-page-drift .ng-drift-lead { font-size: clamp(1rem, 2.2vw, 1.2rem); color: #e8e8ec !important; margin-bottom: 2rem; }

/* Buttons */
body.ng-page-drift .wp-block-button__link { font: 700 .82rem/1 Orbitron, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; padding: 1rem 1.6rem; border-radius: 2px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; transition: transform .15s ease, background .15s ease; }
body.ng-page-drift .ng-btn-primary .wp-block-button__link { background: var(--d-red); color: #fff; border: 2px solid var(--d-red); }
body.ng-page-drift .ng-btn-primary .wp-block-button__link:hover { background: #ff4a3f; transform: translateY(-2px); }
body.ng-page-drift .ng-btn-ghost .wp-block-button__link { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.7); }
body.ng-page-drift .ng-btn-ghost .wp-block-button__link:hover { border-color: #fff; transform: translateY(-2px); }
body.ng-page-drift .ng-btn-wide, body.ng-page-drift .ng-btn-wide .wp-block-button__link { width: min(100%, 520px); }

/* Story */
body.ng-page-drift .ng-story-cols { gap: clamp(2rem, 5vw, 4rem); }
body.ng-page-drift .ng-tilt { margin: 0; transform: rotate(-2deg); box-shadow: 14px 14px 0 var(--d-red), 0 20px 50px rgba(0,0,0,.6); }
body.ng-page-drift .ng-tilt img { display: block; width: 100%; height: auto; }
body.ng-page-drift .ng-facts { margin-top: 1.75rem; gap: 1rem; border-top: 1px solid #25252d; padding-top: 1.5rem; }
body.ng-page-drift .ng-fact { margin: 0; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--d-muted) !important; line-height: 1.4 !important; }
body.ng-page-drift .ng-fact strong { display: block; font: 900 1.6rem/1.1 Orbitron, system-ui, sans-serif; color: var(--d-red); letter-spacing: 0; margin-bottom: .3rem; }

/* Image cards (cover blocks) */
body.ng-page-drift .ng-cards { gap: 1.25rem; margin-top: 2.5rem; }
body.ng-page-drift .ng-card { margin: 0; border-radius: 3px; overflow: hidden; padding: 1.5rem; }
body.ng-page-drift .ng-card .wp-block-cover__image-background { transition: transform .6s ease; }
body.ng-page-drift .ng-card:hover .wp-block-cover__image-background { transform: scale(1.05); }
body.ng-page-drift .ng-card .wp-block-cover__background { background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.85) 100%) !important; opacity: 1 !important; }
body.ng-page-drift .ng-card-kicker { color: var(--d-red) !important; font: 700 .68rem/1.2 Orbitron, system-ui, sans-serif; letter-spacing: .28em; text-transform: uppercase; margin: 0 0 .35rem !important; }
body.ng-page-drift .ng-card-title { font: 800 1.05rem/1.25 Orbitron, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .03em; color: #fff; margin: 0; }
body.ng-page-drift .ng-card-title a { color: inherit; text-decoration: none; }

/* Two wide track photos, edge to edge */
body.ng-page-drift .ng-drift-wide { gap: 0; margin: 0; }
body.ng-page-drift .ng-drift-wide .wp-block-column { margin: 0; }
body.ng-page-drift .ng-card-wide { border-radius: 0; }

/* Merch */
body.ng-page-drift .ng-merch .wp-block-column { background: #16161c; border: 1px solid #23232b; padding-bottom: 1.25rem; transition: border-color .2s ease; }
body.ng-page-drift .ng-merch .wp-block-column:hover { border-color: var(--d-red); }
body.ng-page-drift .ng-merch .wp-block-image { margin: 0 0 1rem; aspect-ratio: 4 / 3; overflow: hidden; background: #fff; }
body.ng-page-drift .ng-merch .wp-block-image a { display: block; height: 100%; }
body.ng-page-drift .ng-merch .wp-block-image img { width: 100%; height: 100% !important; object-fit: cover; }
body.ng-page-drift .ng-merch .ng-card-kicker, body.ng-page-drift .ng-merch .ng-card-title { padding: 0 1.1rem; }
body.ng-page-drift .ng-merch + .wp-block-buttons { margin-top: 2.5rem; }

/* Closing CTA */
body.ng-page-drift .ng-drift-cta { padding: 5rem 1.25rem; margin: 0; }
body.ng-page-drift .ng-drift-cta .wp-block-cover__background { background: linear-gradient(120deg, rgba(10,4,4,.92) 0%, rgba(120,20,12,.78) 100%) !important; opacity: 1 !important; }

/* Mobile */
@media (max-width: 781px) {
  body.ng-page-drift .ng-drift-hero { min-height: min(56vh, 480px) !important; padding-top: 3rem; padding-bottom: 3rem; }
  body.ng-page-drift .ng-tilt { transform: none; box-shadow: 8px 8px 0 var(--d-red); }
  body.ng-page-drift .ng-card { min-height: 280px !important; }
  body.ng-page-drift .ng-card-wide { min-height: 320px !important; }
  body.ng-page-drift .ng-facts .ng-fact strong { font-size: 1.25rem; }
  body.ng-page-drift .ng-fact { font-size: .6rem; letter-spacing: .04em; }
}
@media (prefers-reduced-motion: reduce) {
  body.ng-page-drift * { transition: none !important; }
}

/* ---------- Motorsport layer (v2) ---------- */

/* Hero: slow Ken Burns zoom, red diagonal stripe, scroll cue */
body.ng-page-drift .ng-drift-hero { overflow: hidden; }
body.ng-page-drift .ng-drift-hero .wp-block-cover__image-background { animation: ng-kenburns 16s ease-out both; }
@keyframes ng-kenburns { from { transform: scale(1.14); } to { transform: scale(1); } }
body.ng-page-drift .ng-drift-hero::after {
  content: ""; position: absolute; z-index: 2; left: -10%; bottom: 14%; width: 46%; height: 6px;
  background: linear-gradient(90deg, transparent, var(--d-red) 30%, #ff7a3d); transform: skewY(-8deg); opacity: .85; pointer-events: none;
}
body.ng-page-drift .ng-drift-hero .wp-block-cover__inner-container::after {
  content: ""; display: block; width: 22px; height: 22px; margin: 2.5rem auto 0; border-right: 2px solid rgba(255,255,255,.7);
  border-bottom: 2px solid rgba(255,255,255,.7); transform: rotate(45deg); animation: ng-cue 1.8s ease-in-out infinite;
}
@keyframes ng-cue { 0%, 100% { transform: translateY(0) rotate(45deg); opacity: .5; } 50% { transform: translateY(8px) rotate(45deg); opacity: 1; } }
body.ng-page-drift .ng-drift-title { font-style: italic; }

/* Ticker band */
body.ng-page-drift .ng-marquee { overflow: hidden; background: var(--d-red); color: #fff; padding: 1.15rem 0; transform: skewY(-2deg); margin: -1.25rem 0 0; position: relative; z-index: 3; box-shadow: 0 10px 30px rgba(230,52,47,.25); }
body.ng-page-drift .ng-marquee-track { display: flex; width: max-content; gap: 2rem; animation: ng-marquee 28s linear infinite; font: 900 italic clamp(1rem, 2.4vw, 1.5rem)/1 Orbitron, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; transform: skewY(2deg); }
body.ng-page-drift .ng-marquee-track i { font-style: normal; opacity: .6; }
@keyframes ng-marquee { from { transform: translateX(0) skewY(2deg); } to { transform: translateX(-50%) skewY(2deg); } }

/* Angled section edges */
body.ng-page-drift .ng-drift-alt { clip-path: polygon(0 3vw, 100% 0, 100% calc(100% - 3vw), 0 100%); padding-top: calc(clamp(3.5rem, 8vw, 6.5rem) + 3vw); padding-bottom: calc(clamp(3.5rem, 8vw, 6.5rem) + 3vw); }

/* Outlined 222 watermark behind the story */
body.ng-page-drift .ng-drift-story { position: relative; overflow: hidden; }
body.ng-page-drift .ng-drift-story::before {
  content: "222"; position: absolute; right: -2vw; top: 50%; transform: translateY(-50%); z-index: 0; pointer-events: none;
  font: 900 italic 26vw/1 Orbitron, system-ui, sans-serif; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.06);
}
body.ng-page-drift .ng-drift-story > * { position: relative; z-index: 1; }

/* Cards: cut corner, growing red bar, zoom */
body.ng-page-drift .ng-card { clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%); cursor: zoom-in; }
body.ng-page-drift .ng-card::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--d-red); transform: scaleX(.18); transform-origin: left; transition: transform .45s ease; z-index: 2; }
body.ng-page-drift .ng-card:hover::after, body.ng-page-drift .ng-card:focus-visible::after { transform: scaleX(1); }
body.ng-page-drift .ng-card:focus-visible, body.ng-page-drift .ng-tilt:focus-visible { outline: none; box-shadow: inset 0 0 0 3px #fff; }
body.ng-page-drift .ng-tilt { cursor: zoom-in; }
body.ng-page-drift .ng-merch .wp-block-column { clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%); }

/* Scroll reveal (only when JS runs, see drift.js) */
.ng-js body.ng-page-drift .ng-reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.ng-js body.ng-page-drift .ng-reveal.is-in { opacity: 1; transform: none; }

/* Lightbox */
.ng-lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 92vh; }
.ng-lightbox::backdrop { background: rgba(5,5,8,.92); }
.ng-lightbox img { display: block; max-width: 96vw; max-height: 86vh; width: auto; height: auto; object-fit: contain; }
.ng-lightbox p { margin: .6rem 0 0; color: #f5f5f5; font: 600 .9rem/1.4 system-ui, sans-serif; text-align: center; }
.ng-lightbox button { position: fixed; top: 14px; right: 14px; width: 48px; height: 48px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.6); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }

@media (max-width: 781px) {
  body.ng-page-drift .ng-drift-hero::after { width: 70%; bottom: 10%; }
  body.ng-page-drift .ng-drift-story::before { font-size: 42vw; top: 18%; }
  body.ng-page-drift .ng-marquee { margin-top: -.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.ng-page-drift .ng-drift-hero .wp-block-cover__image-background,
  body.ng-page-drift .ng-marquee-track,
  body.ng-page-drift .ng-drift-hero .wp-block-cover__inner-container::after { animation: none; }
  .ng-js body.ng-page-drift .ng-reveal { opacity: 1; transform: none; }
}

/* Opening video (right after the hero): 16:9, never stretched, max 1280px wide */
body.ng-page-drift .ng-drift-video { box-sizing: border-box; margin: 0; padding: clamp(1.75rem, 4vw, 3rem) 1.25rem clamp(.5rem, 2vw, 1.5rem); background: var(--d-bg); }
body.ng-page-drift .ng-drift-video__frame { max-width: 1280px; margin: 0 auto; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(230,52,47,.25); position: relative; }
body.ng-page-drift .ng-drift-video__frame::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--d-red); z-index: 1; pointer-events: none; }
body.ng-page-drift .ng-drift-video__player { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #000; }
body.ng-page-drift .ng-drift-video + .ng-drift-story { padding-top: clamp(2.5rem, 6vw, 5rem); }
@media (max-width: 781px) {
  body.ng-page-drift .ng-drift-video { padding: 1.5rem 1rem .5rem; }
  body.ng-page-drift .ng-drift-video__frame { border-radius: 8px; }
}
/* "Sound on" button over the video (shown only while the browser keeps it muted) */
body.ng-page-drift .ng-drift-video__sound { position: absolute; top: clamp(.6rem, 2vw, 1.25rem); left: clamp(.6rem, 2vw, 1.25rem); z-index: 2; display: inline-flex; align-items: center; gap: .55rem; min-height: 48px; padding: .75rem 1.15rem; border: 0; border-radius: 999px; background: var(--d-red); color: #fff; font: 700 .8rem/1 Orbitron, system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.45); animation: ng-sound-pulse 1.8s ease-out infinite; }
body.ng-page-drift .ng-drift-video__sound:hover { background: #ff4a3f; }
body.ng-page-drift .ng-drift-video__sound[hidden] { display: none; }
@keyframes ng-sound-pulse { 0% { box-shadow: 0 0 0 0 rgba(230,52,47,.65), 0 8px 24px rgba(0,0,0,.45); } 100% { box-shadow: 0 0 0 18px rgba(230,52,47,0), 0 8px 24px rgba(0,0,0,.45); } }
@media (max-width: 781px) {
  body.ng-page-drift .ng-drift-video__sound { min-height: 44px; padding: .6rem .9rem; font-size: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.ng-page-drift .ng-drift-video__sound { animation: none; }
}
