/* ==========================================================================
   AMAZING MOTORS — Global Stylesheet
   Design system: Premium dark automotive. Brand red used as accent + CTA only.
   Bilingual: EN (LTR) / AR (RTL) via logical properties.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --bg:            #0B0B0D;
  --surface:       #141418;
  --surface-2:     #1B1B21;
  --surface-3:     #24242C;
  --border:        #2A2A32;
  --border-strong: #3A3A45;

  /* Text — all pairs verified >= 4.5:1 on --bg / --surface */
  --text:      #F4F4F6;  /* 18.1:1 on --bg */
  --text-2:    #A8A8B3;  /*  8.3:1 on --bg */
  --text-3:    #8B8B96;  /*  5.8:1 on --bg, 5.1:1 on --surface-2 — passes AA
                             against the lightest surface it is ever used on */

  /* Brand */
  --brand:          #FF1D25;  /* logo red — decorative use only (bars, rules) */
  --brand-ink:      #FF5A60;  /* brand-tinted TEXT on dark — 6.0:1 */
  --brand-cta:      #D9070F;  /* button fill — 5.3:1 with white text */
  --brand-cta-hover:#E8121A;  /* 4.6:1 with white text */

  /* Feedback */
  --success: #34D399;
  --danger:  #FF6B6B;

  /* Typography */
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar:      "Alexandria", "Segoe UI", Tahoma, sans-serif;

  /* Type scale */
  --fs-xs:   0.75rem;   /* 12 — labels only */
  --fs-sm:   0.875rem;  /* 14 */
  --fs-base: 1rem;      /* 16 — body floor */
  --fs-lg:   1.125rem;  /* 18 */
  --fs-xl:   1.375rem;  /* 22 */
  --fs-2xl:  1.75rem;   /* 28 */
  --fs-3xl:  clamp(2rem, 4.2vw, 3rem);
  --fs-4xl:  clamp(2.5rem, 7vw, 5rem);

  /* Spacing — 4px rhythm */
  --sp-1: 0.25rem; --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 3rem;    --sp-8: 4rem;
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --gutter:    clamp(1.25rem, 4vw, 2.5rem);
  --container: 1280px;

  /* Radius */
  --r-sm: 4px; --r-md: 8px; --r-lg: 14px; --r-pill: 999px;

  /* Elevation */
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 8px 24px rgba(0,0,0,.45);
  --shadow-3: 0 20px 60px rgba(0,0,0,.55);

  /* Motion */
  --ease-out: cubic-bezier(.22,.61,.36,1);
  --ease-in:  cubic-bezier(.55,.06,.68,.19);
  --dur-fast: 150ms;
  --dur:      250ms;
  --dur-slow: 400ms;

  /* Layers */
  --z-base: 1; --z-sticky: 40; --z-drawer: 80; --z-overlay: 90; --z-toast: 100;

  --header-h: 76px;

  /* Theme-dependent chrome */
  --header-bg: rgba(11,11,13,.92);
  --footer-bg: #060608;
  --logo-dark-display:  block;   /* white logo, for dark surfaces */
  --logo-light-display: none;    /* black logo, for light surfaces */
}

/* --------------------------------------------------------------------------
   1b. LIGHT THEME
   Dark is the default. This block only redefines tokens — no component rules
   live here, so the two themes can never drift apart structurally.
   Every pair below is contrast-checked against the lightest surface it lands on.
   -------------------------------------------------------------------------- */
[data-theme="light"] {
  --bg:            #FFFFFF;
  --surface:       #F5F5F7;
  --surface-2:     #FFFFFF;
  --surface-3:     #EBEBEF;
  --border:        #E4E4E9;
  --border-strong: #C7C7D0;

  --text:   #0F0F13;  /* 19.6:1 on white */
  --text-2: #55555F;  /*  7.4:1 on white, 6.7:1 on --surface */
  --text-3: #66666F;  /*  5.7:1 on white, 4.8:1 on --surface-3 */

  --brand:           #FF1D25;  /* decorative only, as in dark */
  --brand-ink:       #C20A11;  /* 6.3:1 — brand red dark enough to read on white */
  --brand-cta:       #D9070F;  /* 5.3:1 with white button text */
  --brand-cta-hover: #B3060C;

  --success: #047857;
  --danger:  #C0271F;

  --shadow-1: 0 1px 2px rgba(16,16,20,.06);
  --shadow-2: 0 8px 24px rgba(16,16,20,.10);
  --shadow-3: 0 20px 60px rgba(16,16,20,.16);

  --header-bg: rgba(255,255,255,.92);
  --footer-bg: #F0F0F3;
  --logo-dark-display:  none;
  --logo-light-display: block;
}

@media (max-width: 900px) { :root { --header-h: 64px; } }

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; }

/* Arabic overrides — the condensed Latin display face has no Arabic coverage,
   and uppercase/tracking are meaningless in Arabic script. */
html[lang="ar"] body,
html[lang="ar"] h1, html[lang="ar"] h2,
html[lang="ar"] h3, html[lang="ar"] h4 {
  font-family: var(--font-ar);
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.35;
}
html[lang="ar"] .eyebrow { letter-spacing: normal; text-transform: none; }
html[lang="ar"] { --fs-4xl: clamp(2rem, 5.5vw, 3.75rem); }

/* Anything that pins the Latin body/display face must be restated for Arabic —
   Inter and Barlow Condensed carry no Arabic glyphs, so without this the text
   silently falls back to whatever the OS provides. */
html[lang="ar"] .btn,
html[lang="ar"] .eyebrow { font-family: var(--font-ar); }

/* --------------------------------------------------------------------------
   3. ACCESSIBILITY PRIMITIVES
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--brand-ink);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: var(--gutter);
  z-index: var(--z-toast);
  background: var(--brand-cta);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: 600;
}
.skip-link:focus { inset-block-start: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   4. LAYOUT HELPERS
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section--alt { background: var(--surface); }

.section-head { max-width: 62ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-ink);
  margin-bottom: var(--sp-4);
}
.eyebrow::before {
  content: "";
  inline-size: 28px;
  block-size: 3px;
  background: var(--brand);
  transform: skewX(-20deg);
}

.section-title { font-size: var(--fs-3xl); }
.section-lede {
  margin-top: var(--sp-4);
  color: var(--text-2);
  font-size: var(--fs-lg);
  max-width: 62ch;
  text-wrap: pretty;
}
.section-head--center .section-lede { margin-inline: auto; }

/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-block-size: 48px;
  padding: 0 var(--sp-6);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background-color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(.97); }

.btn--primary { background: var(--brand-cta); color: #fff; }
.btn--primary:hover { background: var(--brand-cta-hover); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: rgba(255,255,255,.07); border-color: var(--text-2); }

.btn--light { background: var(--text); color: var(--bg); }
.btn--light:hover { background: #fff; }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}
.btn .icon { inline-size: 20px; block-size: 20px; flex: none; }

/* Directional glyphs must mirror in RTL */
[dir="rtl"] .icon--dir { transform: scaleX(-1); }

/* --------------------------------------------------------------------------
   6. HEADER / NAVIGATION
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: var(--z-sticky);
  block-size: var(--header-h);
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, rgba(11,11,13,.85), rgba(11,11,13,0));
  transition: background-color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
  border-block-end: 1px solid transparent;

  /* Until it sticks, the header floats over the dark-scrimmed hero photo, so
     its contents stay white in BOTH themes. Once stuck it adopts the theme. */
  --hdr-fg:       #FFFFFF;
  --hdr-fg-muted: rgba(255,255,255,.78);
  --hdr-border:   rgba(255,255,255,.32);
  --hdr-hover:    rgba(255,255,255,.10);
}
/* Solid state: either scrolled (.is-stuck) or declared from the start
   (.header--solid, for pages whose hero is a theme surface rather than a dark
   photo — without this the white overlay text lands on a white background). */
.header.is-stuck,
.header--solid {
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-block-end-color: var(--border);

  --hdr-fg:       var(--text);
  --hdr-fg-muted: var(--text-2);
  --hdr-border:   var(--border-strong);
  --hdr-hover:    var(--surface-3);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  inline-size: 100%;
}

.brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;   /* logo art is 32px tall; extend the hit area to 44 */
}
.brand img {
  block-size: clamp(24px, 2.6vw, 32px);
  inline-size: auto;
}
/* Over the hero the white logo is always correct; once the header is stuck the
   logo follows the active theme. */
.brand__logo--dark  { display: block; }
.brand__logo--light { display: none; }
.header.is-stuck .brand__logo--dark,
.header--solid   .brand__logo--dark  { display: var(--logo-dark-display); }
.header.is-stuck .brand__logo--light,
.header--solid   .brand__logo--light { display: var(--logo-light-display); }

.nav { margin-inline-start: auto; }
.nav__list { display: flex; align-items: center; gap: var(--sp-1); }

.nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  min-block-size: 44px;
  padding-inline: var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hdr-fg-muted);
  background: none;
  border: 0;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: color var(--dur) var(--ease-out);
}
html[lang="ar"] .nav__link { text-transform: none; letter-spacing: normal; font-size: var(--fs-base); }
.nav__link:hover { color: var(--hdr-fg); }

.nav__link[aria-current="page"] { color: var(--hdr-fg); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-block-end: 6px;
  inset-inline: var(--sp-4);
  block-size: 2px;
  background: var(--brand);
}

.nav__caret {
  inline-size: 14px; block-size: 14px;
  transition: transform var(--dur) var(--ease-out);
}
.nav__link[aria-expanded="true"] .nav__caret { transform: rotate(180deg); }

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-start: 50%;
  transform: translateX(-50%) translateY(-8px);
  inline-size: 260px;
  padding: var(--sp-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out),
              visibility var(--dur);
}
.has-dropdown.is-open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-block-size: 44px;
  padding-inline: var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-2);
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
html[lang="ar"] .dropdown__link { font-size: var(--fs-base); }
.dropdown__link:hover { background: var(--surface-3); color: var(--text); }
.dropdown__brand { font-size: var(--fs-xs); color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; }

/* Header actions */
.header__actions { display: flex; align-items: center; gap: var(--sp-3); flex: none; }

.lang-toggle,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 44px;
  padding-inline: var(--sp-4);
  gap: var(--sp-2);
  background: transparent;
  border: 1px solid var(--hdr-border);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--hdr-fg-muted);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out);
}
.lang-toggle:hover,
.theme-toggle:hover { color: var(--hdr-fg); border-color: var(--hdr-fg); background: var(--hdr-hover); }
.lang-toggle .icon, .theme-toggle .icon { inline-size: 16px; block-size: 16px; }

/* Icon-only, so it needs to be square and still hit 44px */
.theme-toggle { inline-size: 44px; padding-inline: 0; }
.theme-toggle .icon { inline-size: 18px; block-size: 18px; }
/* Show only the icon for the theme you would switch TO */
.theme-toggle__sun  { display: none; }
.theme-toggle__moon { display: block; }
[data-theme="light"] .theme-toggle__sun  { display: block; }
[data-theme="light"] .theme-toggle__moon { display: none; }

/* In the drawer the toggles sit on the page background, not the header */
.drawer .lang-toggle,
.drawer .theme-toggle {
  color: var(--text-2);
  border-color: var(--border-strong);
}
.drawer .lang-toggle:hover,
.drawer .theme-toggle:hover { color: var(--text); border-color: var(--text); background: var(--surface-3); }

.header__call { white-space: nowrap; }

/* Mobile burger */
.burger {
  display: none;
  align-items: center;
  justify-content: center;
  inline-size: 48px; block-size: 48px;
  background: transparent;
  border: 1px solid var(--hdr-border);
  border-radius: var(--r-md);
  cursor: pointer;
}
.burger span {
  position: relative;
  display: block;
  inline-size: 20px; block-size: 2px;
  background: var(--hdr-fg);
  transition: background-color var(--dur-fast) var(--ease-out);
}
.burger span::before, .burger span::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inline-size: 20px; block-size: 2px;
  background: var(--hdr-fg);
  transition: transform var(--dur) var(--ease-out);
}
/* Drawer is open: the burger now sits on the page background, not the hero */
.burger[aria-expanded="true"] { border-color: var(--border-strong); }
.burger[aria-expanded="true"] span::before,
.burger[aria-expanded="true"] span::after { background: var(--text); }
.burger span::before { inset-block-start: -6px; }
.burger span::after  { inset-block-start: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + var(--sp-5)) var(--gutter) var(--sp-7);
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out),
              visibility var(--dur);
}
.drawer.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

.drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-block-size: 56px;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 600;
  text-transform: uppercase;
  border-block-end: 1px solid var(--border);
  color: var(--text);
}
html[lang="ar"] .drawer__link { font-family: var(--font-ar); text-transform: none; font-size: var(--fs-xl); }

.drawer__sub { padding-inline-start: var(--sp-4); }
.drawer__sub .drawer__link {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 500;
  text-transform: none;
  color: var(--text-2);
  min-block-size: 48px;
}
.drawer__footer { margin-block-start: var(--sp-6); display: grid; gap: var(--sp-3); }
.drawer__prefs { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.drawer__prefs .theme-toggle--wide { inline-size: auto; padding-inline: var(--sp-4); }
.drawer__prefs .theme-toggle--wide .theme-toggle__text { white-space: nowrap; }

@media (max-width: 1080px) {
  .nav, .header__call { display: none; }
  .burger { display: inline-flex; }
}

/* Narrow phones: collapse the header toggles to icons so the row cannot
   overflow. Both keep full labels inside the drawer. */
@media (max-width: 560px) {
  .header__actions .lang-toggle { inline-size: 44px; padding-inline: 0; }
  .header__actions .lang-toggle__text { display: none; }
}

/* --------------------------------------------------------------------------
   7. HERO SLIDER
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-block-size: clamp(560px, 92dvh, 940px);
  display: grid;
  isolation: isolate;
  background: #000;
  /* Text here sits on photography under a dark scrim, so it stays light in
     BOTH themes. Do not swap these for theme tokens. */
  color: #FFFFFF;
}
.hero .btn--ghost { color: #FFFFFF; border-color: rgba(255,255,255,.42); }
.hero .btn--ghost:hover { background: rgba(255,255,255,.14); border-color: #FFFFFF; }
.hero .btn--light { background: #FFFFFF; color: #0B0B0D; }
.hero .btn--light:hover { background: #E9E9EE; }

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 900ms var(--ease-out), visibility 900ms;
}
.hero__slide.is-active { opacity: 1; visibility: visible; }

.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__media img {
  inline-size: 100%; block-size: 100%;
  object-fit: cover;
  object-position: center;
}
/* Slow drift keeps the two stills from feeling static */
.hero__slide.is-active .hero__media img { animation: heroDrift 14s var(--ease-out) forwards; }
@keyframes heroDrift { from { transform: scale(1.06); } to { transform: scale(1); } }

/* YouTube cover-fill: oversize the iframe so it crops rather than letterboxes */
.hero__video { position: absolute; inset: 0; overflow: hidden; }
.hero__video iframe {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  inline-size: 100vw;
  block-size: 56.25vw;
  min-block-size: 100%;
  min-inline-size: 177.78vh;
  border: 0;
  pointer-events: none;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(11,11,13,.94) 0%, rgba(11,11,13,.55) 40%, rgba(11,11,13,.15) 70%, rgba(11,11,13,.5) 100%);
}

.hero__body {
  position: relative;
  z-index: var(--z-base);
  align-self: end;
  inline-size: 100%;
  /* Must clear the absolutely-positioned controls sitting at the bottom */
  padding-block-end: clamp(7.5rem, 18vh, 11rem);
  padding-block-start: calc(var(--header-h) + var(--sp-6));
}
.hero__content { max-width: min(100%, 46rem); }
.hero__title {
  font-size: var(--fs-4xl);
  max-width: 18ch;
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  color: #FF5A60;   /* fixed: sits on photography, not on a theme surface */
}
.hero__text {
  margin-block-start: var(--sp-4);
  max-width: 46ch;
  color: #FFFFFF;
  font-size: var(--fs-lg);
  text-shadow: 0 1px 12px rgba(0,0,0,.6);
  text-wrap: pretty;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-block-start: var(--sp-6); }

/* Slider controls */
.hero__controls {
  position: absolute;
  inset-block-end: clamp(1.5rem, 4vh, 2.5rem);
  inset-inline: var(--gutter);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  max-width: calc(var(--container) - var(--gutter) * 2);
  margin-inline: auto;
}

.hero__arrows { display: flex; gap: var(--sp-2); }
.hero__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 48px; block-size: 48px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--r-pill);
  background: rgba(11,11,13,.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.hero__arrow:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.5); }
.hero__arrow .icon { inline-size: 20px; block-size: 20px; }

.hero__dots { display: flex; gap: var(--sp-2); margin-inline-start: auto; }
.hero__dot {
  position: relative;
  inline-size: 44px; block-size: 44px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.hero__dot::after {
  content: "";
  inline-size: 32px;
  block-size: 3px;
  background: rgba(255,255,255,.3);
  transition: background-color var(--dur) var(--ease-out);
}
.hero__dot[aria-selected="true"]::after { background: var(--brand); }

/* --------------------------------------------------------------------------
   8. ABOUT / WHO WE ARE
   -------------------------------------------------------------------------- */
.about__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (min-width: 900px) {
  .about__grid { grid-template-columns: 1.05fr .95fr; }
}

.about__copy p + p { margin-block-start: var(--sp-4); }
.about__copy p { color: var(--text-2); font-size: var(--fs-lg); text-wrap: pretty; }
.about__copy p strong { color: var(--text); font-weight: 600; }

.pillars { display: grid; gap: var(--sp-4); }
.pillar {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.section--alt .pillar { background: var(--surface-2); }
.pillar__icon {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 44px; block-size: 44px;
  border-radius: var(--r-md);
  background: rgba(255,29,37,.12);
  color: var(--brand-ink);
}
.pillar__icon .icon { inline-size: 22px; block-size: 22px; }
.pillar__title { font-size: var(--fs-xl); margin-bottom: var(--sp-1); }
.pillar__text { color: var(--text-2); font-size: var(--fs-sm); }
html[lang="ar"] .pillar__text { font-size: var(--fs-base); }

/* Facts strip */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin-block-start: clamp(3rem, 6vw, 4.5rem);
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.fact { background: var(--bg); padding: var(--sp-5); text-align: center; }
.section--alt .fact { background: var(--surface); }
.fact__num {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
/* line-height:1 is fine for the condensed Latin face but clips Alexandria's
   Arabic ascenders/descenders, so loosen it for Arabic only. */
html[lang="ar"] .fact__num { font-family: var(--font-ar); line-height: 1.3; }
.fact__label {
  margin-block-start: var(--sp-2);
  font-size: var(--fs-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-2);
}
html[lang="ar"] .fact__label { font-size: var(--fs-sm); letter-spacing: normal; text-transform: none; }

/* --------------------------------------------------------------------------
   9. CARS GRID
   -------------------------------------------------------------------------- */
.cars__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}

.car-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out);
}
.car-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-2);
  transform: translateY(-4px);
}
.car-card:focus-within {
  border-color: var(--brand-ink);
  box-shadow: var(--shadow-2);
}

.car-card__media {
  position: relative;
  aspect-ratio: 4 / 5;   /* matches source assets — prevents layout shift */
  overflow: hidden;
  background: var(--surface-3);
}
.car-card__media img {
  inline-size: 100%; block-size: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.car-card:hover .car-card__media img { transform: scale(1.05); }

.car-card__badge {
  position: absolute;
  inset-block-start: var(--sp-3);
  inset-inline-start: var(--sp-3);
  padding: var(--sp-1) var(--sp-3);
  background: rgba(11,11,13,.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #FFFFFF;   /* fixed: the pill is dark and sits on a photo in both themes */
}
html[lang="ar"] .car-card__badge { letter-spacing: normal; }

.car-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--sp-2);
  padding: var(--sp-5);
}
.car-card__name { font-size: var(--fs-xl); }
.car-card__name a::after { content: ""; position: absolute; inset: 0; } /* full-card hit area */
.car-card__desc { color: var(--text-2); font-size: var(--fs-sm); flex: 1; }
html[lang="ar"] .car-card__desc { font-size: var(--fs-base); }

.car-card__more {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-block-start: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--brand-ink);
}
.car-card__more .icon { inline-size: 16px; block-size: 16px; transition: transform var(--dur) var(--ease-out); }
.car-card:hover .car-card__more .icon { transform: translateX(4px); }
[dir="rtl"] .car-card:hover .car-card__more .icon { transform: scaleX(-1) translateX(4px); }

/* --------------------------------------------------------------------------
   10. REACH OUT / FORM
   -------------------------------------------------------------------------- */
.reach__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}
@media (min-width: 900px) { .reach__grid { grid-template-columns: 1fr 1fr; } }

.contact-cards { display: grid; gap: var(--sp-4); margin-block-start: var(--sp-6); }
.contact-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-block-size: 72px;
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.contact-card:hover { border-color: var(--border-strong); background: var(--surface-3); }
.contact-card__icon {
  flex: none;
  display: grid; place-items: center;
  inline-size: 44px; block-size: 44px;
  border-radius: var(--r-md);
  background: rgba(255,29,37,.12);
  color: var(--brand-ink);
}
.contact-card__icon .icon { inline-size: 22px; block-size: 22px; }
.contact-card__label { font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
html[lang="ar"] .contact-card__label { font-size: var(--fs-sm); letter-spacing: normal; text-transform: none; }
.contact-card__value { font-weight: 600; }
.contact-card__value[dir="ltr"] { display: inline-block; }

/* Form */
.form { display: grid; gap: var(--sp-5); }
.form__row { display: grid; gap: var(--sp-5); }
@media (min-width: 560px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: var(--sp-2); }
.field__label { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.field__req { color: var(--brand-ink); margin-inline-start: 2px; }

.field__input,
.field__select,
.field__textarea {
  inline-size: 100%;
  min-block-size: 52px;             /* >= 44px touch target */
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-base);        /* 16px — stops iOS zoom-on-focus */
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.field__textarea { min-block-size: 130px; resize: vertical; line-height: 1.6; }
.field__input::placeholder, .field__textarea::placeholder { color: var(--text-3); }
.field__input:hover, .field__select:hover, .field__textarea:hover { border-color: var(--text-3); }
.field__input:focus, .field__select:focus, .field__textarea:focus {
  outline: none;
  border-color: var(--brand-ink);
  background: var(--surface-3);
}
.field__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8A8B3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-4) center;
  background-size: 18px;
  padding-inline-end: var(--sp-8);
}
/* The chevron is a data-URI, so its colour cannot inherit — restate it for light */
[data-theme="light"] .field__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355555F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
[dir="rtl"] .field__select {
  background-position: left var(--sp-4) center;
  padding-inline-end: var(--sp-4);
  padding-inline-start: var(--sp-8);
}
.field__select option { background: var(--surface-2); color: var(--text); }

.field__help { font-size: var(--fs-sm); color: var(--text-3); }

.field__error {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--danger);
}
.field__error .icon { inline-size: 16px; block-size: 16px; flex: none; }
.field.has-error .field__error { display: flex; }
.field.has-error .field__input,
.field.has-error .field__select,
.field.has-error .field__textarea { border-color: var(--danger); }

.form__note { font-size: var(--fs-sm); color: var(--text-3); }
.form__status {
  display: none;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.form__status.is-visible { display: flex; }
.form__status--ok { background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.35); color: var(--success); }
.form__status--err { background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.35); color: var(--danger); }
.form__status .icon { inline-size: 20px; block-size: 20px; flex: none; }

/* --------------------------------------------------------------------------
   11. LOCATION
   -------------------------------------------------------------------------- */
.location__grid { display: grid; gap: clamp(2rem, 4vw, 3rem); align-items: stretch; }
@media (min-width: 900px) { .location__grid { grid-template-columns: 1fr 1.35fr; } }

.location__panel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.location__map {
  position: relative;
  min-block-size: 340px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.location__map iframe { inline-size: 100%; block-size: 100%; position: absolute; inset: 0; border: 0; }

/* --------------------------------------------------------------------------
   12. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--footer-bg);
  border-block-start: 1px solid var(--border);
  padding-block: clamp(3rem, 6vw, 4.5rem) var(--sp-6);
}
.footer__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.footer__brand img { block-size: 32px; inline-size: auto; margin-bottom: var(--sp-4); }
.footer__tagline { color: var(--text-2); font-size: var(--fs-sm); max-width: 34ch; }
html[lang="ar"] .footer__tagline { font-size: var(--fs-base); }

.footer__title {
  font-size: var(--fs-sm);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: var(--sp-4);
}
html[lang="ar"] .footer__title { font-family: var(--font-ar); letter-spacing: normal; text-transform: none; }

.footer__list { display: grid; gap: var(--sp-1); }
.footer__list a {
  display: flex;
  align-items: center;
  min-block-size: 44px;
  color: var(--text-2);
  font-size: var(--fs-sm);
  transition: color var(--dur-fast) var(--ease-out);
}
html[lang="ar"] .footer__list a { font-size: var(--fs-base); }
.footer__list a:hover { color: var(--text); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  justify-content: space-between;
  margin-block-start: clamp(2.5rem, 5vw, 3.5rem);
  padding-block-start: var(--sp-5);
  border-block-start: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--text-3);
}
.footer__bottom a {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  color: var(--text-2);
}
.footer__bottom a:hover { color: var(--text); }

/* Inline links that sit in body copy still need a 44px hit area */
.link-target {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
}

/* Floating WhatsApp */
.wa-float {
  position: fixed;
  inset-block-end: clamp(1rem, 3vw, 1.75rem);
  inset-inline-end: clamp(1rem, 3vw, 1.75rem);
  z-index: var(--z-sticky);
  display: grid;
  place-items: center;
  inline-size: 56px; block-size: 56px;
  border-radius: var(--r-pill);
  background: #25D366;
  color: #04310F;
  box-shadow: var(--shadow-2);
  transition: transform var(--dur) var(--ease-out);
}
.wa-float:hover { transform: scale(1.06); }
.wa-float:active { transform: scale(.95); }
.wa-float .icon { inline-size: 28px; block-size: 28px; }
/* Keep clear of the iOS home indicator */
@supports (padding: env(safe-area-inset-bottom)) {
  .wa-float { inset-block-end: calc(clamp(1rem, 3vw, 1.75rem) + env(safe-area-inset-bottom)); }
}

/* --------------------------------------------------------------------------
   13. SCROLL REVEAL
   -------------------------------------------------------------------------- */
/* Fail-safe: content is visible by default. It is only hidden for the reveal
   animation once JS has confirmed it is running (html.js), so a blocked or
   broken script can never leave the page blank. */
.reveal { opacity: 1; transform: none; }

html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   13b. MOBILE REFINEMENTS (shared pages)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  /* Car grid: two per row reads as a range; one per row reads as a long list */
  .cars__grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
  .car-card__body { padding: var(--sp-4) var(--sp-3); gap: var(--sp-1); }
  .car-card__name { font-size: var(--fs-lg); }
  /* 13px rather than 12px — 12 is the floor for body text and reads cramped in
     a 162px card. Clamped to 3 lines so the cards stay the same height. */
  .car-card__desc {
    font-size: 0.8125rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  html[lang="ar"] .car-card__desc { font-size: var(--fs-sm); }
  .car-card__more { font-size: var(--fs-xs); }
  .car-card__badge { font-size: 10px; padding: 2px var(--sp-2); }

  /* Full-width CTAs are easier to hit than side-by-side half buttons */
  .hero__cta .btn,
  .contact-cards + .hero__cta .btn { inline-size: 100%; }

  /* Tighten vertical rhythm */
  .section { padding-block: clamp(3rem, 8vw, 4rem); }
  .section-head { margin-bottom: 2rem; }

  /* Map needs height to be usable on a phone */
  .location__map { min-block-size: 300px; }
  .location__panel { padding: var(--sp-5) var(--sp-4); }

  /* Pillars: reduce the icon/padding weight */
  .pillar { padding: var(--sp-4); gap: var(--sp-3); }
}

/* --------------------------------------------------------------------------
   14. REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal, html.js .reveal { opacity: 1; transform: none; }
  .hero__slide.is-active .hero__media img { animation: none; transform: none; }
}
