/* Car9 — Car Rental in Dubai · brand tokens from brand.json */
:root {
  --bg: #0b0b0b;
  --surface: #141414;
  --surface-2: #1b1b1b;
  --ink: #f5f1e8;
  --muted: #a09a8d;
  --line: #262626;
  --accent: #e8b04b;
  --accent-ink: #1a1206;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Dubai", "Segoe UI", Tahoma, sans-serif;
  --radius: 8px;
  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

/* ── reveal on scroll ── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ── header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand { display: flex; align-items: baseline; gap: 12px; margin-right: auto; }
.brand-mark { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--accent); letter-spacing: 0.02em; }
.brand-sub { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 14px; font-size: 14px; color: var(--muted); border-radius: var(--radius); transition: color 0.15s ease, background 0.15s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--surface); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  min-height: 44px;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-gold { background: var(--accent); color: var(--accent-ink); }
.btn-gold:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── hero ── */
.hero {
  position: relative;
  min-height: min(90vh, 860px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; animation: heroZoom 18s ease-out forwards; }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,11,11,0.4) 0%, rgba(11,11,11,0.12) 42%, rgba(11,11,11,0.94) 100%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: var(--gutter); padding-top: 10vh; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.hero-eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.hero h1 { font-size: clamp(40px, 6.5vw, 78px); max-width: 14ch; margin-bottom: 20px; animation: fadeUp 0.9s ease both; }
.hero p.sub { font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 46ch; margin-bottom: 30px; animation: fadeUp 0.9s 0.15s ease both; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; animation: fadeUp 0.9s 0.3s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.trust { display: flex; flex-wrap: wrap; gap: 12px 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.trust-item { font-size: 13px; color: var(--muted); }
.trust-item strong { color: var(--ink); font-weight: 600; }
.stars { color: var(--accent); letter-spacing: 0.05em; }

/* ── sections ── */
.section { padding: clamp(56px, 9vw, 110px) var(--gutter); }
.section-inner { max-width: var(--max); margin: 0 auto; }
.section-head { margin-bottom: 36px; max-width: 62ch; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 12px; }
.section-head p { color: var(--muted); }

/* ── why ── */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.why-item { background: var(--surface); padding: 26px 24px; }
.why-item .n { font-family: var(--serif); font-size: 15px; color: var(--accent); margin-bottom: 10px; }
.why-item h3 { font-size: 18px; margin-bottom: 8px; }
.why-item p { font-size: 14px; color: var(--muted); }

/* ── filters ── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.filters input[type="search"], .filters select {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 14px;
  min-height: 44px;
  outline: none;
  transition: border-color 0.15s ease;
}
.filters input[type="search"] { flex: 1 1 240px; }
.filters input:focus, .filters select:focus { border-color: var(--accent); }
.filters .count { align-self: center; font-size: 13px; color: var(--muted); }

/* ── fleet grid ── */
.fleet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.car {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.car:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,0.45); }
.car[hidden] { display: none; }
.car-media { aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface-2); position: relative; }
.car-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.car:hover .car-media img { transform: scale(1.05); }
.car-badge { position: absolute; top: 12px; left: 12px; background: rgba(11,11,11,0.72); backdrop-filter: blur(6px); color: var(--accent); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; border: 1px solid var(--line); }
.car-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.car-body h3 { font-size: 19px; }
.car-body p { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.car-cta { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.car-cta::after { content: "→"; transition: transform 0.15s ease; }
.car:hover .car-cta::after { transform: translateX(3px); }
.empty { color: var(--muted); font-size: 15px; padding: 30px 0; }

/* ── car detail + gallery ── */
.detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.gallery { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.gallery-main { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface-2); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: opacity 0.25s ease; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(11,11,11,0.6); border: 1px solid var(--line); color: var(--ink); width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; transition: background 0.15s ease; z-index: 2; }
.gallery-nav:hover { background: rgba(232,176,75,0.85); color: var(--accent-ink); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; background: var(--surface); }
.gallery-thumbs button { flex: 0 0 auto; width: 64px; height: 85px; border-radius: 5px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--surface-2); }
.gallery-thumbs button.active { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-count { position: absolute; bottom: 12px; right: 12px; background: rgba(11,11,11,0.72); color: var(--ink); font-size: 12px; padding: 4px 10px; border-radius: 4px; z-index: 2; }
.detail-body h1 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 6px; }
.detail-body .tagline { color: var(--accent); font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 20px; }
.detail-desc { color: var(--muted); margin-bottom: 14px; }
.detail-desc.ar { direction: rtl; text-align: right; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0; }
.specs { border-top: 1px solid var(--line); padding-top: 20px; margin-bottom: 28px; }
.specs h4, .book h4 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.specs ul { list-style: none; display: grid; gap: 8px; }
.specs li { font-size: 14px; color: var(--ink); display: flex; gap: 10px; }
.specs li::before { content: "—"; color: var(--accent); }

/* ── booking form ── */
.book { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.book form { display: grid; gap: 12px; }
.book .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.book label { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.book input, .book select { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 12px; font-size: 14px; min-height: 44px; outline: none; width: 100%; color-scheme: dark; }
.book input:focus, .book select:focus { border-color: var(--accent); }
.book .hint { font-size: 12px; color: var(--muted); }

/* ── lightbox ── */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 6px; }
.lightbox .close { position: absolute; top: 20px; right: 24px; color: var(--ink); font-size: 30px; background: none; border: none; cursor: pointer; width: 44px; height: 44px; }

/* ── footer ── */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 56px var(--gutter) 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 36px; }
.footer-col h4 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer-col p, .footer-col a { font-size: 14px; color: var(--ink); display: block; margin-bottom: 6px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ── misc ── */
.breadcrumb { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 0; font-size: 13px; color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

@media (max-width: 760px) {
  .brand-sub { display: none; }
  .nav-links { display: none; }
  .detail { grid-template-columns: 1fr; }
  .book .row { grid-template-columns: 1fr; }
  .hero { min-height: 82vh; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
