/* Redline edition — motion layer on top of styles.css.
   Everything here is progressive: if fx.js or GSAP does not load, the page still reads normally. */

/* Cover the page until the curtain takes over; fades by itself if the script never runs */
html.fx body::before { content: ""; position: fixed; inset: 0; z-index: 9998; background: var(--ink); pointer-events: none; animation: fxFailsafe .4s 2.5s forwards; }
html.fx.fx-on body::before { display: none; }
@keyframes fxFailsafe { to { opacity: 0; visibility: hidden; } }
html.lenis { scroll-behavior: auto; }
html.fx-on .rise > * { animation: none; }

/* film grain: one static layer, no blending */
html.fx-on body::after {
  content: ""; position: fixed; inset: 0; z-index: 9000; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Curtain + loader ─────────────────────────────── */
.fx-curtain { position: fixed; inset: 0; z-index: 9999; display: flex; pointer-events: none; }
.fx-curtain i { flex: 1; background: var(--ink); border-right: 1px solid var(--line); position: relative; transform-origin: top; will-change: transform; }
.fx-curtain i::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad); }
.fx-loader { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; pointer-events: none; color: var(--text); }
.fx-loader__in { display: grid; justify-items: center; gap: 1.2rem; }
.fx-loader svg { width: min(46vw, 240px); height: auto; overflow: visible; }
.fx-loader__rpm { font: 900 clamp(3.4rem, 12vw, 7rem)/.85 var(--f-display); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.fx-loader__lbl { font: 500 .72rem/1 var(--f-mono); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

/* ── Cursor ───────────────────────────────────────── */
.fx-dot, .fx-ring { position: fixed; left: 0; top: 0; z-index: 9500; pointer-events: none; border-radius: 50%; opacity: 0; }
.fx-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--heat); }
.fx-ring { width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 1.5px solid var(--amber); display: grid; place-items: center; transition: width .25s ease, height .25s ease, margin .25s ease, background .25s ease, border-color .25s ease; }
.fx-ring span { font: 600 .62rem/1 var(--f-mono); letter-spacing: .14em; color: #000; opacity: 0; transition: opacity .2s ease; }
.fx-ring.is-link { width: 70px; height: 70px; margin: -35px 0 0 -35px; background: color-mix(in srgb, var(--amber) 16%, transparent); }
.fx-ring.is-view { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: var(--amber); }
.fx-ring.is-view span { opacity: 1; }
.fx-ring.is-text { width: 4px; height: 34px; margin: -17px 0 0 -2px; border-radius: 2px; background: var(--amber); }
html.fx-cursor, html.fx-cursor a, html.fx-cursor button, html.fx-cursor label, html.fx-cursor select { cursor: none; }

/* ── Tachometer HUD ───────────────────────────────── */
.fx-tach { --text: #f1f2f5; --dim: #8b93a3; --line-2: #3a4152; --ink: #090b0f; position: fixed; left: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 45; width: 104px; padding: 8px 8px 9px; border: 1px solid var(--line-2); border-radius: 10px; background: color-mix(in srgb, var(--ink) 94%, transparent); cursor: pointer; color: var(--text); display: grid; gap: 2px; justify-items: center; }
.fx-tach { opacity: 0; transform: translateY(24px); pointer-events: none; transition: opacity .4s ease, transform .4s ease, border-color .2s ease, box-shadow .2s ease; }
.fx-tach.is-on { opacity: 1; transform: none; pointer-events: auto; }
.fx-tach svg { width: 100%; height: auto; overflow: visible; }
.fx-tach__num { font: 600 .7rem/1 var(--f-mono); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.fx-tach__num small { color: var(--dim); font-size: .58rem; letter-spacing: .16em; margin-left: .3em; }
.fx-tach.is-red { border-color: var(--heat); box-shadow: 0 0 26px -6px var(--heat); }
.fx-tach.is-red .fx-tach__num { color: var(--heat); }
@media (max-width: 700px) { .fx-tach { width: 78px; left: 12px; } }

/* ── Split headings ───────────────────────────────── */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .06em .04em .1em 0; margin: -.06em -.04em -.1em 0; }
.wi { display: inline-block; will-change: transform; }
.display { transform: skewX(-6deg); transform-origin: left bottom; }

/* ── Tilt cards + glare ───────────────────────────── */
.sw, .dyno, .map, .tune-photo, .post__img, .lead__photo { position: relative; }
.sw::after, .dyno::after, .map::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .3s ease; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--amber) 22%, transparent), transparent 60%); }
.sw:hover::after, .dyno:hover::after, .map:hover::after { opacity: 1; }

/* ── Inner page heroes with a photo behind ────────── */
.page-hero.has-bg { --text: #f1f2f5; --muted: #c3c8d3; --dim: #969dac; --line: #2a2f3c; color: var(--text); border-bottom-color: #1c2029; padding-block: clamp(5rem, 13vw, 10rem) clamp(3rem, 7vw, 5.5rem); background: #06070a; }
.page-hero.has-bg::before, .page-hero.has-bg::after { display: none; }
.ph-bg { position: absolute; inset: -12% 0; z-index: -1; }
.ph-bg img { width: 100%; height: 100%; object-fit: cover; }
.ph-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 7, 10, .93) 0%, rgba(6, 7, 10, .62) 55%, rgba(6, 7, 10, .3) 100%), linear-gradient(0deg, rgba(6, 7, 10, .9), transparent 45%); }

/* ── Home: hero ───────────────────────────────────── */
.xhero { --text: #f4f5f7; --muted: #c9cdd6; --dim: #9aa1af; --line-2: rgba(255, 255, 255, .28); position: relative; isolation: isolate; overflow: hidden; color: var(--text); background: #050608; min-height: min(100svh, 1000px); display: grid; align-items: end; margin-top: -73px; padding-top: 73px; }
.xhero__media { position: absolute; inset: 0; z-index: -2; }
.xhero__media video, .xhero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xhero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(5, 6, 8, .95) 0%, rgba(5, 6, 8, .2) 46%, rgba(5, 6, 8, .5) 100%), linear-gradient(90deg, rgba(5, 6, 8, .82), rgba(5, 6, 8, .1) 70%); }
.xhero__embers { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.xhero .wrap { display: grid; gap: clamp(1rem, 2vw, 1.6rem); padding-block: clamp(3rem, 6vw, 5rem) clamp(1.6rem, 3vw, 2.6rem); }
.xhero h1 { font-size: clamp(3.4rem, min(11.5vw, 19.5svh), 13rem); line-height: .8; }
.xhero h1 .ln { display: block; }
.xhero__row { display: grid; gap: 1.8rem; align-items: end; }
@media (min-width: 900px) { .xhero__row { grid-template-columns: minmax(0, 1.1fr) auto; } }
.xhero__chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.xchip { border: 1px solid var(--line-2); border-radius: 100px; padding: .7em 1.1em; font: 500 .74rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; background: rgba(5, 6, 8, .6); }
.xchip b { font-weight: 600; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-right: .5em; }
.xhero__cue { position: absolute; right: var(--gutter); top: 50%; writing-mode: vertical-rl; font: 500 .68rem/1 var(--f-mono); letter-spacing: .34em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 1rem; }
.xhero__cue::after { content: ""; width: 1px; height: 70px; background: linear-gradient(var(--heat), transparent); animation: cue 1.6s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 900px) { .xhero__cue { display: none; } }
.site-head.is-over { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; --text: #f4f5f7; --muted: #c9cdd6; --line-2: rgba(255, 255, 255, .3); color: var(--text); }
.site-head { transition: background .35s ease, border-color .35s ease; }
html.fx-on .site-head:not(.is-over), html.fx-on .jump { backdrop-filter: none; -webkit-backdrop-filter: none; background: color-mix(in srgb, var(--ink) 95%, transparent); }
.xhero__media img { animation: kenburns 24s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); } }
@media (max-width: 1040px) { .site-head.is-over .nav { background: #10131a; border-color: #222734; --line: #222734; } }

/* glitch on the hot word */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; opacity: 0; -webkit-text-fill-color: currentColor; }
.glitch::before { color: #29e6ff; animation: glitchA 4.2s steps(1) infinite; }
.glitch::after { color: #ff2b6a; animation: glitchB 4.2s steps(1) infinite; }
@keyframes glitchA { 0%, 91%, 100% { opacity: 0; } 92% { opacity: .8; transform: translate(-.04em, .02em); clip-path: inset(10% 0 62% 0); } 94% { opacity: .8; transform: translate(.05em, -.02em); clip-path: inset(58% 0 12% 0); } 96% { opacity: .8; transform: translate(-.03em, 0); clip-path: inset(34% 0 40% 0); } 97% { opacity: 0; } }
@keyframes glitchB { 0%, 91%, 100% { opacity: 0; } 92% { opacity: .8; transform: translate(.05em, -.02em); clip-path: inset(52% 0 18% 0); } 94% { opacity: .8; transform: translate(-.05em, .03em); clip-path: inset(8% 0 70% 0); } 96% { opacity: .8; transform: translate(.03em, 0); clip-path: inset(70% 0 6% 0); } 97% { opacity: 0; } }

/* ── Home: marquee pair ───────────────────────────── */
.makes { border-top: 0; }
.makes__track { animation: none; will-change: transform; }
.shout { overflow: hidden; padding-block: clamp(1rem, 2.4vw, 2rem); border-bottom: 1px solid var(--line); }
.shout__track { display: flex; gap: 4vw; width: max-content; will-change: transform; }
.shout__track span { font: 900 clamp(4rem, 13vw, 12rem)/.85 var(--f-display); text-transform: uppercase; white-space: nowrap; color: transparent; -webkit-text-stroke: 1.5px var(--line-2); }
.shout__track span:nth-child(even) { color: var(--text); -webkit-text-stroke: 0; }
.shout__track i { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 0; }

/* ── Home: horizontal services ────────────────────── */
.hs { position: relative; overflow: hidden; background: var(--panel); border-block: 1px solid var(--line); }
.hs__track { display: flex; gap: clamp(1rem, 2vw, 2rem); padding: clamp(2rem, 5vw, 4rem) var(--gutter); will-change: transform; }
.hs__panel { flex: none; width: min(78vw, 980px); min-height: min(72vh, 640px); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; position: relative; isolation: isolate; display: grid; align-content: end; padding: clamp(1.4rem, 3vw, 2.6rem); gap: 1rem; --text: #f4f5f7; --muted: #cfd3db; color: var(--text); background: #07080b; }
.hs__panel img { position: absolute; inset: 0 -8%; width: 116%; max-width: none; height: 100%; object-fit: cover; z-index: -2; }
.hs__panel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(5, 6, 8, .95) 8%, rgba(5, 6, 8, .25) 62%, rgba(5, 6, 8, .5)); }
.hs__panel h3 { font: 900 clamp(3rem, 8vw, 7rem)/.84 var(--f-display); text-transform: uppercase; transform: skewX(-6deg); transform-origin: left bottom; }
.hs__panel p { max-width: 46ch; color: var(--muted); font-size: 1.08rem; }
.hs__tag { position: absolute; left: clamp(1.4rem, 3vw, 2.6rem); top: clamp(1.4rem, 3vw, 2.6rem); font: 600 .72rem/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; border: 1px solid rgba(255, 255, 255, .35); border-radius: 100px; padding: .65em 1em; background: rgba(5, 6, 8, .55); }
.hs__intro, .hs__outro { --text: inherit; --muted: inherit; flex: none; width: min(70vw, 560px); display: grid; align-content: center; gap: 1.4rem; padding-inline: clamp(.5rem, 2vw, 2rem); }
.hs__bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(.8rem, 2vw, 1.4rem); height: 2px; background: var(--line); }
.hs__bar i { display: block; height: 100%; width: 100%; background: var(--grad); transform: scaleX(0); transform-origin: left; }
@media (max-width: 899px) {
  .hs__track { flex-direction: column; }
  .hs__panel, .hs__intro, .hs__outro { width: 100%; min-height: 420px; }
  .hs__intro, .hs__outro { min-height: 0; }
  .hs__bar { display: none; }
}

/* ── Home: benefit rows ───────────────────────────── */
.rows { display: grid; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: 1rem 2rem; align-items: baseline; padding-block: clamp(1rem, 2.2vw, 1.8rem); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.row::before { content: ""; position: absolute; inset: 0; background: var(--grad); transform: scaleY(0); transform-origin: bottom; transition: transform .45s cubic-bezier(.2, .8, .2, 1); z-index: -1; }
.row:hover::before { transform: scaleY(1); }
.row { isolation: isolate; transition: color .3s ease, padding .45s cubic-bezier(.2, .8, .2, 1); }
.row:hover { color: #140500; padding-inline: clamp(.8rem, 2vw, 2rem); }
.row code { font: 500 .72rem/1 var(--f-mono); letter-spacing: .16em; color: var(--dim); transition: color .3s ease; }
.row b { font: 900 clamp(1.9rem, 5.2vw, 4.4rem)/.9 var(--f-display); text-transform: uppercase; }
.row span { color: var(--muted); max-width: 30ch; text-align: right; font-size: .95rem; transition: color .3s ease; }
.row:hover code, .row:hover span { color: #140500; }
@media (max-width: 760px) { .row { grid-template-columns: 1fr; gap: .4rem; } .row span { text-align: left; } }

/* ── Home: pinned statement ───────────────────────── */
.say { position: relative; isolation: isolate; overflow: hidden; min-height: 100svh; display: grid; align-items: center; background: #050608; --text: #f4f5f7; color: var(--text); }
.say video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .75; }
.say::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 80% at 50% 50%, rgba(5, 6, 8, .45), rgba(5, 6, 8, .93)); }
.say p { font: 900 clamp(2.8rem, 9.4vw, 9.5rem)/.86 var(--f-display); text-transform: uppercase; transform: skewX(-6deg); max-width: 14ch; }
.say p span { opacity: .14; display: inline-block; }
.say p span.hot { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.say small { display: block; margin-top: 2rem; font: 500 .74rem/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: #c9cdd6; }

/* ── Home: quote with photo ───────────────────────── */
.xquote { position: relative; isolation: isolate; overflow: hidden; --text: #f4f5f7; --muted: #c9cdd6; --line: rgba(255, 255, 255, .16); color: var(--text); background: #050608; }
.xquote > img { position: absolute; inset: -14% 0; width: 100%; height: 128%; object-fit: cover; z-index: -2; }
.xquote::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 6, 8, .94), rgba(5, 6, 8, .55)); }
.xquote .quotes { background: var(--line); border-color: var(--line); }
.xquote .q { background: rgba(5, 6, 8, .8); }

/* ── Home: closing CTA ────────────────────────────── */
.xcta { position: relative; overflow: hidden; text-align: center; padding-block: clamp(5rem, 12vw, 10rem); }
.xcta .wrap { display: grid; justify-items: center; gap: clamp(1.2rem, 2.5vw, 2rem); }
.xcta h2 { font-size: clamp(4rem, 17vw, 17rem); line-height: .82; transform-origin: center bottom; }
.xcta__badge { position: relative; width: clamp(150px, 20vw, 230px); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--grad); color: #140500; }
.xcta__badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 14s linear infinite; }
.xcta__badge text { font: 600 9.4px var(--f-mono); letter-spacing: 2.6px; text-transform: uppercase; fill: #140500; }
.xcta__badge b { font: 900 2.4rem/1 var(--f-display); }
.xcta__badge:hover svg { animation-duration: 3s; }
@keyframes spin { to { transform: rotate(360deg); } }

/* sparks canvas for the "sent" moments */
.fx-sparks { position: fixed; inset: 0; z-index: 9400; pointer-events: none; width: 100%; height: 100%; }

@media (prefers-reduced-motion: reduce) {
  html.fx body::before, html.fx-on body::after { display: none; }
  .display, .hs__panel h3, .say p { transform: none; }
  .say p span { opacity: 1; }
}

/* hero photo: push the car to the right of the headline on wide screens */
@media (min-width: 900px) { .xhero__media img { width: 128%; max-width: none; object-position: 50% 62%; } }
