/* AHA AUTO PARTS — website v2 ("light"). Theme A (navy + brick, chosen 2026-11-18), set at night. */
:root {
  --night: #120F1F;
  --night-2: #1D1930;
  --panel: #2B1A6E;
  --line: rgba(255, 255, 255, .1);
  --white: #F5F5F7;
  --dim: rgba(245, 245, 247, .62);
  --dimmer: rgba(245, 245, 247, .38);
  --paper: #F8F6F2;
  --ink: #1F1A3D;
  --muted: #5A5670;
  --brick: #E87E1E;           /* main actions: logo orange, dark text */
  --warm: #FFE9B8;            /* headlight glow: kickers, focus, the logo's light */
  --r-xl: 36px; --r-l: 26px; --r-m: 18px;
  --nav-h: 72px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--night); color: var(--white);
  font-family: system-ui, -apple-system, "SF Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  font-size: 18px; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul, ol { list-style: none; padding: 0; }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.wrap--narrow { width: min(820px, 100% - 40px); }
[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 4px; border-radius: 10px; }
.skip { position: absolute; top: 12px; inset-inline-start: -9999px; z-index: 100; background: var(--white); color: var(--ink); padding: 10px 18px; border-radius: 999px; font-weight: 700; }
.skip:focus { inset-inline-start: 16px; }
[data-todo] { color: var(--dimmer); font-style: italic; font-weight: 400; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .4s var(--ease), border-color .4s var(--ease); border-bottom: 1px solid transparent; }
.nav.is-solid { background: rgba(18, 15, 31, .74); backdrop-filter: saturate(1.6) blur(18px); border-color: var(--line); }
.nav__inner { width: min(1200px, 100% - 32px); margin-inline: auto; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; direction: ltr; }
/* Logo lockup: the symbol is drawn as a lit headlight. The navy circle gets a warm rim and halo,
   so it reads on the navy night (brand colours unchanged); it brightens on hover. */
.mark { display: block; width: 100%; height: auto; overflow: visible; }
.mark__c { stroke: var(--warm); stroke-opacity: .55; stroke-width: 14; filter: drop-shadow(0 0 40px rgba(255,233,184,.55)); transition: stroke-opacity .4s var(--ease), filter .4s var(--ease); }
.mark__o, .mark__r { transform-origin: 448px 400px; transition: transform .6s var(--ease); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; direction: ltr; color: var(--white); }
.brand__mark { width: 52px; flex: none; }
.brand__name { display: flex; flex-direction: column; line-height: 1; }
.brand__name b { font-family: "Montserrat", "Avenir Next", system-ui, sans-serif; font-weight: 800; font-size: 22px; letter-spacing: .04em;
  background: linear-gradient(#FFF27A, #F6C814 45%, #E9A40C); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand__name small { font-size: 9.5px; font-weight: 700; letter-spacing: .32em; color: var(--dim); margin-top: 4px; }
.brand:hover .mark__c, .brand:focus-visible .mark__c { stroke-opacity: 1; filter: drop-shadow(0 0 70px rgba(255,233,184,.9)); }
.brand:hover .mark__o { transform: rotate(-8deg); }
.brand:hover .mark__r { transform: rotate(8deg); }
.footer__brand { display: grid; place-items: center; margin-top: 64px; }
.footer__brand .mark { width: clamp(140px, 22vw, 240px); }
.footer__brand .mark__c { stroke-opacity: .8; filter: drop-shadow(0 0 90px rgba(255,233,184,.6)); }
@media (prefers-reduced-motion: reduce) { .mark__o, .mark__r, .mark__c { transition: none; } .brand:hover .mark__o, .brand:hover .mark__r { transform: none; } }
.nav__menu { display: flex; align-items: center; gap: 2px; }
.nav__menu a { display: block; padding: 10px 14px; border-radius: 999px; text-decoration: none; font-size: 15px; color: var(--dim); transition: color .2s, background .2s; }
.nav__menu a:hover { color: var(--white); background: rgba(255,255,255,.06); }
.nav__menu .nav__lang { border: 1px solid var(--line); font-weight: 700; color: var(--white); }
.nav__menu .nav__cta { color: var(--ink); background: var(--brick); font-weight: 700; margin-inline-start: 8px; }
.nav__menu .nav__cta:hover { background: #F6C814; color: var(--ink); }
.nav__toggle { display: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--white); cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; inset-inline: 14px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease); }
.nav__toggle span:first-child { top: 19px; } .nav__toggle span:last-child { top: 27px; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
@media (max-width: 860px) {
  .js .nav__toggle { display: block; }
  /* Without JavaScript the menu stays visible as a wrapped row instead of a dead toggle. */
  .no-js .nav__inner { height: auto; flex-wrap: wrap; padding: 12px 0; }
  .no-js .nav__menu { flex-wrap: wrap; }
  .js .nav__menu { display: none; position: absolute; inset-inline: 12px; top: calc(var(--nav-h) + 4px); flex-direction: column; align-items: stretch; background: rgba(21,21,24,.96); backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: var(--r-l); padding: 10px; }
  .js .nav__menu.is-open { display: flex; }
  .nav__menu a { font-size: 18px; padding: 14px 16px; color: var(--white); }
  .nav__menu .nav__cta { margin: 6px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px; border-radius: 999px; font-weight: 700; font-size: 17px; text-decoration: none; transition: transform .25s var(--ease), background .25s, color .25s; }
.btn:active { transform: scale(.97); }
.btn--light { background: var(--brick); color: var(--ink); }
.btn--light:hover { background: #F6C814; }
.btn--ghost { color: var(--white); border: 1px solid rgba(255,255,255,.28); }
.btn--ghost:hover { background: rgba(255,255,255,.08); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; isolation: isolate; }
/* Poster: the real night photo (cover, anchored on the truck). The WebGL layer redraws the same
   photo with live light from its headlights and fades in on top. */
.hero__scene { position: absolute; inset: 0; z-index: -1; background: var(--night); }
.hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 43% 50%; filter: brightness(.9); }
.hero__scene::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to left, rgba(18,15,31,.75) 0%, rgba(18,15,31,.2) 45%, transparent 70%); }
/* English (LTR): text sits on the left, so the photo is mirrored to keep the truck clear of it
   (Unsplash License allows edits) and the shade moves to the left. */
[dir="ltr"] .hero__photo { transform: scaleX(-1); object-position: 57% 50%; }
[dir="ltr"] .hero__scene::before { background: linear-gradient(to right, rgba(18,15,31,.75) 0%, rgba(18,15,31,.2) 45%, transparent 70%); }
.app__note { margin-top: 6px; font-size: 14px; color: var(--muted); }
:lang(en) body, body:lang(en) { letter-spacing: -.005em; }
.hero__scene::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(to top, var(--night), transparent); pointer-events: none; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s var(--ease); z-index: 1; }
.hero__canvas.is-live { opacity: 1; }
.hero__content { width: min(1200px, 100% - 40px); margin-inline: auto; padding: calc(var(--nav-h) + 40px) 0 clamp(72px, 12vh, 140px); }
.hero__eyebrow { display: inline-block; font-size: 14px; font-weight: 700; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; background: rgba(255,255,255,.04); }
.hero__title { font-size: clamp(56px, 12vw, 168px); line-height: .98; font-weight: 800; letter-spacing: -.01em; margin-top: 20px; text-shadow: 0 0 60px rgba(255,233,184,.18); }
.hero__lead { max-width: 34ch; font-size: clamp(18px, 2vw, 22px); color: var(--dim); margin-top: 22px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__scroll { position: absolute; inset-inline-start: 50%; bottom: 28px; translate: 50% 0; width: 28px; height: 46px; border: 1.5px solid rgba(255,255,255,.35); border-radius: 999px; }
.hero__scroll span { position: absolute; top: 9px; inset-inline-start: 50%; translate: 50% 0; width: 4px; height: 8px; border-radius: 4px; background: var(--white); animation: dot 1.8s var(--ease) infinite; }
@media (max-width: 860px), (max-height: 700px) { .hero__scroll { display: none; } }
@keyframes dot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Split words (JS adds .w spans, aria-hidden; the heading keeps an aria-label with the full text). */
.w { display: inline-block; white-space: pre; }
.motion .is-splitting .w { opacity: 0; transform: translateY(.45em); }
.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; }

/* ---------- Statement ---------- */
.statement { padding: clamp(110px, 18vh, 200px) 0; }
.statement__text { width: min(1100px, 100% - 40px); margin-inline: auto; font-size: clamp(30px, 4.8vw, 66px); line-height: 1.32; font-weight: 800; letter-spacing: -.01em; }
.motion .statement__text .g { color: rgba(245,245,247,.16); transition: color .2s linear; }
.motion .statement__text .g.on { color: var(--white); }

/* ---------- Section heads ---------- */
.kicker { font-size: 14px; font-weight: 800; letter-spacing: .04em; color: var(--warm); }
.kicker--dim { color: var(--dimmer); }
.h2 { font-size: clamp(38px, 6.4vw, 92px); line-height: 1.06; font-weight: 800; letter-spacing: -.01em; margin-top: 12px; }

/* ---------- Parts (horizontal) ---------- */
.parts { padding: 40px 0 clamp(80px, 12vh, 140px); overflow: hidden; }
.parts__head { width: min(1200px, 100% - 40px); margin-inline: auto; margin-bottom: 48px; }
.parts__viewport:focus-visible { outline-offset: -4px; }
.parts__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.parts__viewport::-webkit-scrollbar { display: none; }
.parts__track { display: flex; gap: 16px; padding-inline: max(20px, calc((100% - 1200px) / 2)); width: max-content; }
.part { scroll-snap-align: start; position: relative; width: clamp(270px, 30vw, 400px); aspect-ratio: 4 / 5; border-radius: var(--r-xl); padding: 30px; display: flex; flex-direction: column; justify-content: flex-end;
  background: radial-gradient(90% 70% at 50% 18%, rgba(255,233,184,.16), transparent 62%), var(--panel); border: 1px solid var(--line); overflow: hidden; transition: border-color .3s, transform .4s var(--ease); }
.part:hover { border-color: rgba(255,233,184,.4); transform: translateY(-6px); }
/* Photo fills the card; a night gradient keeps the title readable and ties it to the hero. */
.part__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.72) saturate(.9); transform: scale(1.04); transition: transform .8s var(--ease), filter .6s var(--ease); }
.part::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18,15,31,.95) 0%, rgba(18,15,31,.55) 38%, rgba(18,15,31,.05) 70%); pointer-events: none; }
.part:hover .part__img { transform: scale(1); filter: brightness(.9) saturate(1); }
.part > :not(.part__img) { position: relative; z-index: 1; }
.part__icon { position: absolute !important; top: 22px; inset-inline-start: 22px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(18,15,31,.45); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(8px); font-size: 24px; color: var(--white); }
.part__n { position: absolute !important; top: 24px; inset-inline-end: 28px; font-weight: 800; color: var(--dimmer); direction: ltr; }
.part h3 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 800; }
.part p { color: var(--dim); font-size: 16px; margin-top: 4px; }

/* ---------- Origin (paper section: light breaks the night) ---------- */
.origin { background: var(--paper); color: var(--ink); padding: clamp(90px, 14vh, 160px) 0; border-radius: var(--r-xl) var(--r-xl) 0 0; }
.origin .kicker { color: var(--muted); }
.origin__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 48px; }
.origin__card { background: #fff; border-radius: var(--r-l); padding: 30px; min-height: 260px; display: flex; flex-direction: column; justify-content: flex-end; }
.origin__tag { align-self: flex-start; margin-bottom: auto; font-weight: 900; letter-spacing: .08em; background: var(--ink); color: #fff; border-radius: 12px; padding: 8px 12px; font-size: 14px; direction: ltr; }
.origin__card h3 { font-size: 34px; font-weight: 800; }
.origin__card p { color: var(--muted); font-size: 16px; }
.brands { margin-top: 14px; background: #fff; border-radius: var(--r-l); padding: 26px 30px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.brands__label { font-weight: 700; color: var(--muted); font-size: 15px; }
.brands__list { display: flex; flex-wrap: wrap; gap: 8px; direction: ltr; justify-content: flex-end; }
.brands__list li { background: var(--paper); border-radius: 999px; padding: 10px 20px; font-weight: 800; }
.brands__note { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .origin__grid { grid-template-columns: 1fr; } .origin__card { min-height: 180px; } .brands { grid-template-columns: 1fr; } .brands__list { justify-content: flex-start; } }

/* ---------- App ---------- */
.app { background: var(--paper); color: var(--ink); padding: 40px 0 clamp(90px, 14vh, 160px); }
.app .kicker { color: var(--muted); }
.app__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 100px); align-items: start; }
.app__phone { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; place-items: center; }
.phone { position: relative; width: min(340px, 80vw); aspect-ratio: 414 / 900; border-radius: 52px; padding: 12px; background: #0b0b0c; box-shadow: 0 40px 80px rgba(0,0,0,.25), inset 0 0 0 2px #2a2a2d; }
.phone__screen { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: cover; border-radius: 40px; opacity: 0; transform: scale(.98); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.phone__screen.is-active { opacity: 1; transform: none; }
.steps { margin-top: 36px; }
.step { padding: 28px 0; border-top: 1px solid rgba(17,17,19,.1); transition: opacity .4s var(--ease); }
/* Dim inactive steps only while the scroll-linked showcase runs; keep readable contrast. */
.motion .step { opacity: .55; }
.step.is-active { opacity: 1; }
.step h3 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; }
.step p { color: var(--muted); margin-top: 4px; }
.app__status { margin-top: 28px; font-size: 15px; color: var(--muted) !important; }
@media (min-width: 861px) { .step { min-height: 46vh; display: flex; flex-direction: column; justify-content: center; } }
@media (max-width: 860px) { .app__grid { grid-template-columns: 1fr; } .app__phone { position: relative; top: 0; } .step { opacity: 1; } }

/* ---------- Trade ---------- */
.trade { background: var(--paper); padding-bottom: clamp(60px, 10vh, 120px); }
.trade > .wrap { background: var(--night-2); border-radius: var(--r-xl); padding: clamp(36px, 6vw, 80px); color: var(--white); position: relative; overflow: hidden; }
.trade > .wrap::before { content: ""; position: absolute; inset: -30% -10% auto auto; width: 70%; height: 90%; background: radial-gradient(closest-side, rgba(255,233,184,.18), transparent); pointer-events: none; }
.trade__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 44px; position: relative; }
.trade__steps li { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: var(--r-l); padding: 26px; }
.trade__steps span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--white); color: var(--ink); font-weight: 900; font-size: 20px; margin-bottom: 18px; }
.trade__steps p { color: var(--dim); }
@media (max-width: 860px) { .trade__steps { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { background: var(--paper); color: var(--ink); padding: clamp(60px, 10vh, 120px) 0; border-radius: 0 0 var(--r-xl) var(--r-xl); }
.faq .kicker { color: var(--muted); }
.faq .h2 { margin-bottom: 36px; }
details { border-top: 1px solid rgba(17,17,19,.12); }
details:last-of-type { border-bottom: 1px solid rgba(17,17,19,.12); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 26px 0; font-size: clamp(20px, 2.2vw, 26px); font-weight: 800; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 36px; height: 36px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111113' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center/18px no-repeat; transition: transform .3s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); padding: 0 0 26px; max-width: 60ch; }

/* ---------- Final ---------- */
.final { padding: clamp(110px, 18vh, 200px) 0 80px; text-align: center; }
.final__title { font-size: clamp(48px, 9vw, 140px); line-height: 1; font-weight: 800; text-shadow: 0 0 70px rgba(255,233,184,.2); }
.contact { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 64px; text-align: start; }
.contact div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px; }
.contact dt { color: var(--dimmer); font-size: 14px; }
.contact dd { margin: 6px 0 0; font-weight: 700; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .contact { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); overflow: hidden; }
.footer__word { font-size: clamp(120px, 34vw, 520px); line-height: .8; font-weight: 900; text-align: center; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.14); margin-top: 40px; direction: ltr; user-select: none; }
.footer__row { display: flex; justify-content: space-between; gap: 12px; padding: 24px 0 36px; color: var(--dimmer); font-size: 14px; }
.footer__row a { text-decoration: none; }

/* ---------- Reveal ---------- */
/* Hidden only once main.js has started the motion system ("motion" class), so content never
   disappears if a script fails to load (Codex review). */
.motion [data-reveal] { opacity: 0; transform: translateY(28px); }

/* ---------- Reduced motion: final states, no scrub, no shader (main.js also skips Lenis). ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion [data-reveal], .motion .is-splitting .w { opacity: 1 !important; transform: none !important; }
  .motion .statement__text .g { color: var(--white); }
  .hero__canvas { display: none; }
}

/* Photo credits */
.credits { border: 0; width: 100%; }
.credits summary { font-size: 14px; font-weight: 600; padding: 0; color: var(--dimmer); justify-content: flex-start; }
.credits summary::after { display: none; }
.credits ul { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 0 0; font-size: 13px; }
.credits a { color: var(--dim); }
.footer__row { flex-wrap: wrap; }
