/* ============================================================
   Merge Car Rental — F1 Malaysia Chauffeur Landing Page
   Mobile-first, responsive
   ============================================================ */

:root {
  --ink: #0d0d0f;
  --ink-2: #141417;
  --paper: #f4f1ec;
  --red: #e3271e;
  --red-dark: #b71e17;
  --white: #ffffff;
  --muted-dark: #9c9c9c;
  --muted-light: #5c5c5c;
  --line-dark: rgba(255, 255, 255, 0.12);
  --line-light: rgba(13, 13, 15, 0.12);
  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-narrow: "Archivo Narrow", "Arial Narrow", sans-serif;
  --radius: 4px;
  --header-h: 64px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--ink);
  color: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 { margin: 0; line-height: 1.04; letter-spacing: -0.02em; font-weight: 800; }
p { margin: 0; }

.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- Eyebrow / ledes ---------- */
.eyebrow {
  font-family: var(--font-narrow);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 1rem;
}
.eyebrow-dark { color: var(--red); }

.section-lede { color: inherit; opacity: 0.75; max-width: 46ch; }

em { font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius);
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  min-height: 48px; /* comfortable tap target */
}
.btn:active { transform: scale(0.97); }

.btn-red { background: var(--red); color: var(--white); box-shadow: 0 6px 18px rgba(227, 39, 30, 0.35); }
.btn-red:hover { background: var(--red-dark); }

.btn-lg { padding: 1.05rem 1.9rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--ink); }

.btn-outline-dark {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-outline-dark:hover { background: var(--ink); color: var(--white); }

.link-arrow {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line-dark);
  padding-bottom: 0.2rem;
  transition: color 0.2s, border-color 0.2s;
}
.link-arrow:hover { color: var(--red); border-color: var(--red); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: linear-gradient(110deg, rgba(249, 250, 252, 0.98), rgba(224, 228, 234, 0.96));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(13, 13, 15, 0.14);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.logo { text-decoration: none; color: var(--ink); display: flex; align-items: center; line-height: 1; }
.site-header .logo img { width: 113px; height: 36px; object-fit: contain; }
.footer-brand-name { font-weight: 700; margin-bottom: 0.25rem; }
.footer-brand-name a { color: var(--white); text-decoration: none; }
.footer-brand-name a:hover { color: var(--red); }
.footer-brand-detail { color: var(--muted-dark); font-size: 0.72rem; margin: 0; }

.main-nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  background: linear-gradient(110deg, #f9fafc, #e0e4ea);
  flex-direction: column;
  padding: 1rem 1.25rem 1.5rem;
  gap: 0.25rem;
  border-bottom: 1px solid rgba(13, 13, 15, 0.14);
  transform: translateY(-115%);
  transition: transform 0.3s ease;
  display: flex;
  z-index: 99;
}
.main-nav.open { transform: translateY(0); }
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid rgba(13, 13, 15, 0.12);
}
.main-nav a:last-child { border-bottom: 0; }
.main-nav a.lang-switch { font-size: 0.85rem; opacity: 0.82; white-space: nowrap; }
.main-nav .nav-cta { margin-top: 0.75rem; border-bottom: 0; }
.main-nav a.nav-cta { color: var(--white); }

.nav-toggle {
  background: none;
  border: 0;
  cursor: pointer;
  width: 44px; height: 44px;
  display: grid;
  place-content: center;
  gap: 5px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 62% center;
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,13,15,0.55) 0%, rgba(13,13,15,0.25) 35%, rgba(13,13,15,0.82) 78%, rgba(13,13,15,0.96) 100%),
              linear-gradient(90deg, rgba(13,13,15,0.75) 0%, rgba(13,13,15,0.1) 70%);
}
.hero-content { padding: calc(var(--header-h) + 3rem) 0 2rem; }
.hero h1 {
  font-size: clamp(2.4rem, 8.5vw, 4.6rem);
  text-transform: none;
}
.hero h1 em { color: var(--white); }
.hero-sub { margin-top: 1.1rem; font-size: 1.05rem; opacity: 0.85; }
.hero-actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem; }

.hero-strip {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 1rem 0 1.1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-dark);
  background: rgba(13, 13, 15, 0.55);
  backdrop-filter: blur(6px);
}
.hero-strip li {
  font-family: var(--font-narrow);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  padding: 0 0.4rem;
}
.hero-strip li + li { border-inline-start: 1px solid var(--line-dark); }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
.section-light { background: var(--paper); color: var(--ink); }
.section-dark { background: var(--ink-2); }

.section-head { max-width: 760px; }
.section h2 { font-size: clamp(2rem, 6vw, 3.4rem); }
.section-head .section-lede { margin-top: 1.25rem; }

/* ---------- Features ---------- */
.features {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.feature {
  border-top: 1px solid var(--line-light);
  padding-top: 1.4rem;
}
.feature-icon { width: 34px; height: 34px; stroke: var(--red); margin-bottom: 0.9rem; }
.feature h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.feature p { color: var(--muted-light); font-size: 0.95rem; }

/* ---------- Collection ---------- */
.collection-head { display: flex; flex-direction: column; gap: 1.5rem; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tab {
  font-family: var(--font-narrow);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  min-height: 40px;
}
.tab:hover { border-color: var(--white); }
.tab.is-active { background: var(--red); border-color: var(--red); }

.fleet {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.car-card {
  background: #1a1a1e;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease;
}
.car-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.car-card.is-hidden { display: none; }
.car-media { aspect-ratio: 16 / 10; overflow: hidden; background: #242428; }
.car-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.car-card:hover .car-media img { transform: scale(1.04); }
.car-body { padding: 1.35rem 1.35rem 1.5rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.car-body h3 { font-size: 1.35rem; }
.car-tag { color: var(--muted-dark); font-size: 0.92rem; }
.car-class {
  font-family: var(--font-narrow);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0.35rem 0 0.75rem;
}
.car-note { font-size: 0.75rem; color: var(--muted-dark); text-align: center; }

/* ---------- Split (Beyond) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--ink);
  padding: 0;
}
.split-media { min-height: 280px; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-body { padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1.25rem, 5vw, 4rem); display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.split-body h2 { font-size: clamp(1.9rem, 5.5vw, 3rem); }
.split-body p { opacity: 0.78; max-width: 46ch; }

/* ---------- Steps ---------- */
.section-steps { background: var(--ink); }
.steps-title { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.steps {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.steps li {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  border-top: 1px solid var(--line-dark);
  padding-top: 1.4rem;
}
.step-num {
  font-family: var(--font-narrow);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
  min-width: 3.2rem;
}
.steps h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.steps p { color: var(--muted-dark); font-size: 0.92rem; max-width: 30ch; }

/* ---------- FAQ ---------- */
.faq-layout { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.faq-intro .btn { margin-top: 1.75rem; }

.accordion { border-top: 1px solid var(--line-light); }
.acc-item { border-bottom: 1px solid var(--line-light); }
.acc-btn {
  width: 100%;
  background: none;
  border: 0;
  text-align: start;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  padding-block: 1.15rem;
  padding-inline: 0 2.4rem;
  cursor: pointer;
  position: relative;
  min-height: 52px;
}
.acc-icon { position: absolute; inset-inline-end: 0.2rem; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); }
.acc-icon::before, .acc-icon::after {
  content: "";
  position: absolute;
  background: var(--red);
  top: 50%; left: 50%;
  transition: transform 0.25s ease;
}
.acc-icon::before { width: 14px; height: 2px; transform: translate(-50%, -50%); }
.acc-icon::after { width: 2px; height: 14px; transform: translate(-50%, -50%); }
.acc-btn[aria-expanded="true"] .acc-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.acc-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.acc-panel p {
  color: var(--muted-light);
  font-size: 0.94rem;
  padding: 0 0 1.25rem;
  max-width: 60ch;
}

/* ---------- Final CTA ---------- */
.cta-final { position: relative; padding: clamp(5rem, 14vw, 9rem) 0; overflow: hidden; isolation: isolate; }
.cta-media { position: absolute; inset: 0; z-index: -1; }
.cta-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.cta-final::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(13,13,15,0.88) 0%, rgba(13,13,15,0.45) 60%, rgba(13,13,15,0.3) 100%);
}
.cta-content h2 { font-size: clamp(2.1rem, 7vw, 4rem); }
.cta-content p { margin: 1.1rem 0 1.9rem; opacity: 0.85; font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); border-top: 1px solid var(--line-dark); padding: 2.5rem 0 6.5rem; }
.footer-inner { display: flex; flex-direction: column; gap: 1.1rem; }
.footer-tag { font-family: var(--font-narrow); letter-spacing: 0.08em; color: var(--muted-dark); font-size: 0.85rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-nav a { color: var(--white); text-decoration: none; font-size: 0.85rem; font-weight: 600; }
.footer-nav a:hover { color: var(--red); }
.footer-legal { color: var(--muted-dark); font-size: 0.72rem; }
.footer-legal a { color: inherit; text-underline-offset: 0.2em; }
.footer-legal a:hover { color: var(--white); }

/* ---------- Floating WhatsApp + sticky bar ---------- */
.wa-float {
  position: fixed;
  inset-inline-end: 1rem;
  bottom: 5.2rem;
  z-index: 90;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s ease;
}
.wa-float:hover { transform: scale(1.08); }

.sticky-cta {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 89;
  background: rgba(13, 13, 15, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-dark);
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
}
.sticky-cta .btn { min-height: 50px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   TABLET & DESKTOP
   ============================================================ */
@media (min-width: 700px) {
  .features { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .fleet { grid-template-columns: repeat(3, 1fr); }
  .collection-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .faq-layout { grid-template-columns: 0.9fr 1.1fr; gap: 4rem; }
  .split { grid-template-columns: 1fr 1fr; }
  .split-media { min-height: 100%; }
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .footer-legal { width: 100%; }
}

@media (min-width: 900px) {
  :root { --header-h: 76px; }

  .nav-toggle { display: none; }
  .main-nav {
    position: static;
    transform: none;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    background: none;
    border: 0;
    padding: 0;
  }
  .main-nav a { font-size: 0.9rem; padding: 0; border: 0; }
  .main-nav a.lang-switch { font-size: 0.82rem; }
  .main-nav a:not(.nav-cta):hover { color: var(--red-dark); }
  .main-nav .nav-cta { margin-top: 0; padding: 0.7rem 1.4rem; }

  .hero-media img { object-position: center; }
  .hero-content { padding-bottom: 4rem; }
  .hero-strip { margin-top: 3.5rem; }
  .hero-strip li { font-size: 0.72rem; }

  .sticky-cta { display: none; }
  .wa-float { bottom: 1.5rem; inset-inline-end: 1.5rem; }
  .site-footer { padding-bottom: 2.5rem; }
}

/* ============================================================
   RTL (Arabic) overrides — direction, fonts, script-safe spacing
   ============================================================ */
[dir="rtl"] body {
  font-family: "IBM Plex Sans Arabic", "Tajawal", "Segoe UI", sans-serif;
}
/* Letter-spacing breaks Arabic letter joining — neutralize it */
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; }
[dir="rtl"] .eyebrow,
[dir="rtl"] .tab,
[dir="rtl"] .car-class,
[dir="rtl"] .hero-strip li,
[dir="rtl"] .footer-tag { letter-spacing: 0; }
/* Arabic has no italic tradition — synthesised slant hurts readability.
   Use the brand red as the emphasis instead. */
[dir="rtl"] em { font-style: normal; color: var(--red); }
/* Flip directional scrims so text stays on the dark side */
[dir="rtl"] .hero-scrim {
  background: linear-gradient(180deg, rgba(13,13,15,0.55) 0%, rgba(13,13,15,0.25) 35%, rgba(13,13,15,0.82) 78%, rgba(13,13,15,0.96) 100%),
              linear-gradient(270deg, rgba(13,13,15,0.75) 0%, rgba(13,13,15,0.1) 70%);
}
[dir="rtl"] .cta-final::before {
  background: linear-gradient(270deg, rgba(13,13,15,0.88) 0%, rgba(13,13,15,0.45) 60%, rgba(13,13,15,0.3) 100%);
}
/* Re-anchor the photos so the cars stay visible away from the text side */
[dir="rtl"] .hero-media img { object-position: 35% center; }
[dir="rtl"] .cta-media img { object-position: 30% center; }
[dir="rtl"] .step-num { font-family: inherit; min-width: 2.6rem; }
