/* 022 · Hypergarage (apex garage — Ferrari Enzo 2002) — 1:1 Reference-Faithful Bespoke Stylesheet */
:root {
  --hg-bg: #141416;
  --hg-footer: #0c0c0e;
  --hg-ink: #ffffff;
  --hg-muted: #8a8d93;
  --hg-crimson: #d5102d;
  --hg-line: rgba(255, 255, 255, 0.12);
  --hg-line-strong: rgba(255, 255, 255, 0.28);
}

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

html {
  scroll-behavior: smooth;
  background: var(--hg-bg);
  color: var(--hg-ink);
}

body {
  margin: 0;
  background: var(--hg-bg);
  color: var(--hg-ink);
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, a, button, span, dt, dd {
  letter-spacing: 0;
}

[dir="ltr"] {
  font-family: 'JetBrains Mono', 'Readex Pro', monospace;
}

/* Subtle Studio Film Grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.035;
  background-image: radial-gradient(rgba(255, 255, 255, 0.75) 0.6px, transparent 0.6px);
  background-size: 4px 4px;
}

/* Fixed HUD Top Bar */
.hg-hud-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  padding: 20px clamp(18px, 3.5vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(to bottom, rgba(12, 12, 14, 0.84) 0%, rgba(12, 12, 14, 0) 100%);
  pointer-events: none;
}

.hg-hud-header > * {
  pointer-events: auto;
}

.hg-brand-cluster {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hg-burger {
  width: 42px;
  height: 42px;
  border: 1px solid var(--hg-line-strong);
  background: rgba(20, 20, 22, 0.65);
  backdrop-filter: blur(10px);
  color: var(--hg-ink);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.hg-burger:hover {
  border-color: var(--hg-ink);
  background: rgba(213, 16, 45, 0.18);
}

.hg-burger i {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
}

.hg-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--hg-ink);
  line-height: 1.05;
}

.hg-logo-ar {
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
}

.hg-logo-en {
  font-size: 0.72rem;
  color: var(--hg-muted);
  text-transform: lowercase;
  letter-spacing: 0.12em;
}

.hg-hud-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hg-lang-btn,
.hg-icon-btn,
.hg-dir-btn {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--hg-line);
  background: rgba(20, 20, 22, 0.62);
  backdrop-filter: blur(10px);
  color: var(--hg-ink);
  font-family: inherit;
  font-size: 0.8rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.hg-lang-btn:hover,
.hg-icon-btn:hover,
.hg-dir-btn:hover {
  border-color: var(--hg-line-strong);
}

.hg-btn-outline {
  height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(20, 20, 22, 0.55);
  backdrop-filter: blur(10px);
  color: var(--hg-ink);
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.hg-btn-outline:hover {
  background: var(--hg-ink);
  color: #0c0c0e;
  border-color: var(--hg-ink);
}

.hg-btn-crimson {
  border-color: var(--hg-crimson);
  background: rgba(213, 16, 45, 0.16);
}

.hg-btn-crimson:hover {
  background: var(--hg-crimson);
  border-color: var(--hg-crimson);
  color: #ffffff;
}

/* Rotated Edge Lot Watermark */
.hg-lot-rail {
  position: fixed;
  inset-inline-start: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 42;
  writing-mode: vertical-rl;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.36);
  letter-spacing: 0.22em;
  pointer-events: none;
  user-select: none;
}

/* Fullscreen Navigation Drawer */
.hg-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(12, 12, 14, 0.94);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hg-drawer.is-open {
  opacity: 1;
  visibility: visible;
}

.hg-drawer-box {
  width: min(560px, 90vw);
  border: 1px solid var(--hg-line);
  padding: 36px;
  background: #141416;
}

.hg-drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--hg-line);
  padding-bottom: 16px;
  margin-bottom: 22px;
}

.hg-drawer-links {
  display: grid;
  gap: 12px;
}

.hg-drawer-links a,
.hg-drawer-links button {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif;
  font-size: 1.05rem;
  color: var(--hg-ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.hg-drawer-links a:hover,
.hg-drawer-links button:hover {
  border-color: var(--hg-crimson);
  background: rgba(213, 16, 45, 0.1);
}

/* 3-Slide Pinned Scrollytelling Stage */
.hg-scroll-track {
  position: relative;
  height: 250vh;
}

html.is-preview .hg-scroll-track {
  height: 100vh;
}

.hg-stage {
  position: sticky;
  top: 0;
  height: 100dvh;
  min-height: 620px;
  width: 100%;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 100%, #2b2d30 0%, #1c1d1f 45%, #141416 100%);
  transition: background 0.7s ease;
}

.hg-stage[data-slide="2"] {
  background: radial-gradient(110% 90% at 50% 60%, #36383b 0%, #1c1d1f 60%, #121214 100%);
}

/* Left Crimson Studio Bloom */
.hg-crimson-bloom {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(48% 52% at 18% 58%, rgba(213, 16, 45, 0.26) 0%, rgba(213, 16, 45, 0) 72%),
    linear-gradient(to top, rgba(12, 12, 14, 0.88) 0%, rgba(12, 12, 14, 0.12) 32%, rgba(12, 12, 14, 0.56) 100%);
  z-index: 2;
  transition: opacity 0.6s ease;
}

.hg-stage[data-slide="2"] .hg-crimson-bloom {
  opacity: 0.55;
}

/* Interactive 3D Car Turntable Plate */
.hg-car-viewport {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  cursor: grab;
}

.hg-car-viewport:active {
  cursor: grabbing;
}

.hg-car-rig {
  width: min(1240px, 96vw);
  aspect-ratio: 16 / 9;
  position: relative;
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1), filter 0.7s ease;
  will-change: transform;
}

.hg-car-rig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  mask-image: radial-gradient(92% 86% at 50% 52%, #000 66%, transparent 100%);
  -webkit-mask-image: radial-gradient(92% 86% at 50% 52%, #000 66%, transparent 100%);
  user-select: none;
  -webkit-user-drag: none;
}

.hg-stage[data-slide="1"] .hg-car-rig {
  transform: scale(1.18) translate(7%, -2%);
}

.hg-stage[data-slide="2"] .hg-car-rig {
  transform: scale(1.25) translate(-8%, -4%);
  filter: contrast(1.06) saturate(0.94);
}

/* Stage Overlay Layout */
.hg-stage-ui {
  position: relative;
  z-index: 5;
  height: 100%;
  max-width: 1420px;
  margin: 0 auto;
  padding: 92px clamp(20px, 4.2vw, 56px) 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.hg-stage-ui a,
.hg-stage-ui button {
  pointer-events: auto;
}

/* Slide Panels */
.hg-slide-layer {
  position: relative;
  flex: 1;
  display: grid;
}

.hg-slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s ease;
}

.hg-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Slide 01: Overview Top Split */
.hg-s1-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.hg-hero-title {
  margin: 0;
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif;
  font-size: clamp(2.5rem, 5.4vw, 5rem);
  font-weight: 700;
  line-height: 1.02;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
}

.hg-stroke-enzo {
  font-family: 'Readex Pro', sans-serif;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1.6px rgba(255, 255, 255, 0.88);
  letter-spacing: 0.03em;
}

.hg-year-sup {
  font-size: clamp(0.95rem, 1.4vw, 1.25rem);
  color: var(--hg-crimson);
  font-weight: 600;
  transform: translateY(-1.2em);
}

.hg-price-box {
  text-align: end;
  background: rgba(14, 14, 16, 0.56);
  backdrop-filter: blur(10px);
  border: 1px solid var(--hg-line);
  padding: 16px 20px;
}

.hg-price-val {
  display: block;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 700;
  color: var(--hg-ink);
  line-height: 1.15;
}

.hg-price-note {
  display: block;
  font-size: 0.78rem;
  color: var(--hg-muted);
  margin: 4px 0 12px;
}

.hg-s1-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
}

.hg-s1-tagline {
  margin: 0;
  max-width: 470px;
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  color: rgba(255, 255, 255, 0.84);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}

/* Slide 02: Design Focus Card */
.hg-focus-card {
  margin-top: auto;
  margin-bottom: 18px;
  max-width: 500px;
  background: rgba(16, 16, 18, 0.76);
  backdrop-filter: blur(14px);
  border: 1px solid var(--hg-line);
  border-inline-start: 3px solid var(--hg-crimson);
  padding: 26px 28px;
  pointer-events: auto;
}

.hg-kicker {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--hg-crimson);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 6px;
}

.hg-focus-card h2 {
  margin: 0 0 10px;
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1.15;
}

.hg-focus-card p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.96rem;
}

.hg-aero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hg-aero-badges span {
  padding: 5px 11px;
  border: 1px solid var(--hg-line);
  font-size: 0.78rem;
  color: var(--hg-muted);
}

/* Slide 03: Engine Specs DL */
.hg-engine-wrap {
  margin-top: auto;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 28px;
  align-items: end;
}

.hg-specs {
  margin: 0;
  background: rgba(14, 14, 16, 0.8);
  backdrop-filter: blur(14px);
  border: 1px solid var(--hg-line);
  padding: 20px 24px;
  display: grid;
  gap: 14px;
  pointer-events: auto;
}

.hg-spec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hg-spec-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.hg-spec-row dt {
  font-size: 0.86rem;
  color: var(--hg-muted);
}

.hg-spec-row dd {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--hg-ink);
}

/* Bottom Stage Counter & Slide Tabs */
.hg-stage-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hg-slide-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hg-slide-tab {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--hg-line);
  background: rgba(16, 16, 18, 0.65);
  color: var(--hg-muted);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.22s ease;
}

.hg-slide-tab.is-active {
  border-color: var(--hg-ink);
  color: var(--hg-ink);
  background: rgba(213, 16, 45, 0.22);
}

.hg-pager {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hg-counter {
  font-size: 0.84rem;
  color: var(--hg-muted);
  letter-spacing: 0.12em;
}

.hg-counter b {
  color: var(--hg-ink);
}

.hg-arrow-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--hg-line-strong);
  background: rgba(20, 20, 22, 0.7);
  color: var(--hg-ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hg-arrow-btn:hover {
  background: var(--hg-crimson);
  border-color: var(--hg-crimson);
}

/* Section 4: #detail Provenance 50/50 Split */
.hg-detail {
  background: #141416;
  border-top: 1px solid var(--hg-line);
  padding: clamp(64px, 8vw, 112px) clamp(20px, 4.5vw, 64px);
}

.hg-detail-grid {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4.5vw, 64px);
  align-items: center;
}

.hg-detail-media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hg-line);
  aspect-ratio: 16 / 10;
  background: #0c0c0e;
}

.hg-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: hgKenBurns 18s ease-in-out infinite alternate;
}

@keyframes hgKenBurns {
  from { transform: scale(1.02) translate(0, 0); }
  to { transform: scale(1.1) translate(-1.5%, -1%); }
}

.hg-media-stamp {
  position: absolute;
  bottom: 14px;
  inset-inline-start: 14px;
  padding: 6px 12px;
  background: rgba(12, 12, 14, 0.82);
  border: 1px solid var(--hg-line);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.1em;
}

.hg-detail-copy .hg-prov-tag {
  display: inline-block;
  color: var(--hg-crimson);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  margin-bottom: 12px;
}

.hg-detail-copy h2 {
  margin: 0 0 18px;
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif;
  font-size: clamp(1.85rem, 3vw, 2.75rem);
  line-height: 1.2;
}

.hg-detail-copy p {
  margin: 0 0 28px;
  color: var(--hg-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.hg-prov-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--hg-line);
}

.hg-prov-metric strong {
  display: block;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--hg-ink);
  margin-bottom: 4px;
}

.hg-prov-metric span {
  font-size: 0.82rem;
  color: var(--hg-muted);
}

/* Section 5: #enquire 4-Column Dark Footer */
.hg-footer {
  scroll-margin-top: 88px;
  background: var(--hg-footer);
  border-top: 1px solid var(--hg-line);
  padding: clamp(86px, 9vw, 116px) clamp(20px, 4.5vw, 64px) 34px;
}

.hg-footer-cols {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 1.35fr 0.8fr 1fr;
  gap: 32px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--hg-line);
}

.hg-fcol h3 {
  margin: 0 0 12px;
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif;
  font-size: 1rem;
  color: var(--hg-ink);
}

.hg-fcol p {
  margin: 0 0 16px;
  color: var(--hg-muted);
  font-size: 0.9rem;
}

.hg-flinks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
}

.hg-flinks a {
  color: var(--hg-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.hg-flinks a:hover {
  color: var(--hg-ink);
}

.hg-enquire-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.hg-enquire-form input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--hg-line-strong);
  background: #141416;
  color: var(--hg-ink);
  font-family: inherit;
  font-size: 0.85rem;
}

.hg-toast {
  margin-top: 10px;
  font-size: 0.82rem;
  color: #4ade80;
  display: none;
}

.hg-toast.is-shown {
  display: block;
}

.hg-foot-bottom {
  max-width: 1360px;
  margin: 26px auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.84rem;
  color: var(--hg-muted);
}

.hg-foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 720px) {
  .hg-lot-rail,
  .hg-lang-btn,
  .hg-dir-btn {
    display: none;
  }
  .hg-s1-top,
  .hg-s1-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .hg-price-box {
    text-align: start;
    width: 100%;
  }
  .hg-engine-wrap,
  .hg-detail-grid,
  .hg-footer-cols {
    grid-template-columns: 1fr;
  }
  .hg-prov-metrics {
    grid-template-columns: 1fr;
  }
}
