/* ═══════════════════════════════════════════════════════
   PREMIUM AUTOMOTIVE COMPARISON — SLIDE SYSTEM
   Mercedes-Benz E300 AMG Line vs BMW 530i M Sport xDrive
═══════════════════════════════════════════════════════ */

/* ── TOKENS ──────────────────────────────────────────── */
:root {
  --bg:         #06060a;
  --surface:    #0d0d12;
  --surface-2:  #13131a;
  --border:     rgba(255,255,255,0.07);
  --border-hi:  rgba(255,255,255,0.14);

  --text-1: #f0f0f4;
  --text-2: #9090a8;
  --text-3: #555568;

  --benz:       #c4a45a;
  --benz-light: #d8bc7a;
  --benz-dark:  #8a7030;
  --benz-glow:  rgba(196,164,90,0.18);
  --benz-glow2: rgba(196,164,90,0.08);

  --bmw:        #1c69d4;
  --bmw-light:  #4a90f4;
  --bmw-dark:   #0a3d8a;
  --bmw-glow:   rgba(28,105,212,0.18);
  --bmw-glow2:  rgba(28,105,212,0.08);

  --green: #3dba6e;
  --red:   #e05050;

  --font-head: 'Montserrat', sans-serif;
  --font-body: 'Noto Sans KR', 'Inter', sans-serif;

  --ease:   cubic-bezier(0.4,0,0.2,1);
  --spring: cubic-bezier(0.34,1.56,0.64,1);

  --nav-h:     60px;
  --arrow-h:   64px;
  --container: 1280px;
}

/* ── RESET ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow: hidden; /* page-based layout — no body scroll */
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
canvas { display: block; }

/* ── LOADER ───────────────────────────────────────────── */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
  animation: loader-dismiss 0.6s ease 3s forwards;
}
@keyframes loader-dismiss { to { opacity:0; visibility:hidden; pointer-events:none; } }
#loader.hidden { opacity:0; visibility:hidden; pointer-events:none; animation:none; }

.loader-inner { text-align: center; }
.loader-logos {
  display: flex; align-items: center; gap: 20px;
  font-family: var(--font-head); font-size: 2.5rem; font-weight: 700;
  margin-bottom: 32px;
}
.loader-star   { color: var(--benz); animation: pulse-benz 1.2s ease infinite; }
.loader-vs     { font-size: 1rem; color: var(--text-3); letter-spacing: .3em; }
.loader-circle { color: var(--bmw); animation: pulse-bmw 1.2s ease infinite 0.3s; }
@keyframes pulse-benz  { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(0.9)} }
@keyframes pulse-bmw   { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(0.9)} }

.loader-bar-track {
  width: 240px; height: 2px; background: var(--surface-2);
  border-radius: 2px; overflow: hidden; margin: 0 auto 16px;
}
.loader-bar-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--benz), var(--bmw));
  animation: loader-fill 1.8s var(--ease) forwards;
}
@keyframes loader-fill { to { width:100%; } }
.loader-label {
  font-family: var(--font-head); font-size: .7rem;
  letter-spacing: .3em; color: var(--text-3); text-transform: uppercase;
}

/* ── NAVIGATION ──────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 200;
  background: rgba(6,6,10,0.9);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: 100%; max-width: var(--container);
  margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 16px;
}
.nav-brand {
  font-family: var(--font-head); font-weight: 600; font-size: .82rem;
  letter-spacing: .04em; flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
}
.nb-benz { color: var(--benz); }
.nb-vs   { color: var(--text-3); font-size: .7rem; }
.nb-bmw  { color: var(--bmw); }

.nav-slide-info { margin-left: auto; }
.nav-slide-label {
  font-family: var(--font-head); font-size: .68rem;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--text-3);
}
.nav-counter {
  font-family: var(--font-head); font-size: .72rem;
  color: var(--text-3); letter-spacing: .08em;
}
.nav-fs-btn {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-2); flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  margin-left: 8px;
}
.nav-fs-btn:hover { background: var(--surface); border-color: var(--border-hi); color: var(--text-1); }
.nav-fs-btn svg { width: 14px; height: 14px; }

/* ── SLIDES CONTAINER ────────────────────────────────── */
#slidesContainer {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  bottom: var(--arrow-h);
  overflow: hidden;
  z-index: 1;
}

/* ── SLIDE BASE ──────────────────────────────────────── */
.slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--bg);
  transform: translateX(100%);
  overflow: hidden;
  /* Default slides have vertical centering */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.slide.active { transform: translateX(0); }

/* ── SLIDE BODY (standard centered slides) ───────────── */
.slide-body {
  width: 100%; max-width: var(--container);
  padding: 24px 24px 8px;
  overflow-y: auto;
  max-height: 100%;
  display: flex; flex-direction: column; align-items: center;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-2) transparent;
}
.slide-body::-webkit-scrollbar { width: 4px; }
.slide-body::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 2px; }

/* ── SCROLLABLE SLIDES (specs + verdict) ─────────────── */
.slide-scrollable {
  justify-content: flex-start;
}
.slide-body-scroll {
  width: 100%; height: 100%;
  overflow-y: auto;
  padding: 32px 24px 32px;
  max-width: var(--container);
  margin: 0 auto;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-2) transparent;
}
.slide-body-scroll::-webkit-scrollbar { width: 4px; }
.slide-body-scroll::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 2px; }

/* ── SECTION HEADER ──────────────────────────────────── */
.sec-header { text-align: center; margin-bottom: 32px; flex-shrink: 0; width: 100%; }
.sec-header-sm { margin-bottom: 16px; }
.sec-label {
  display: inline-block; margin-bottom: 8px;
  font-family: var(--font-head); font-size: .65rem;
  letter-spacing: .35em; text-transform: uppercase; color: var(--text-3);
}
.sec-header h2 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 2.5vw, 2.4rem);
  font-weight: 700; line-height: 1.15; margin-bottom: 8px;
}
.sec-header p { color: var(--text-2); font-size: .88rem; max-width: 480px; margin: 0 auto; }
.sec-header strong { color: var(--text-1); }

/* ── HERO SLIDE ──────────────────────────────────────── */
.slide-hero {
  position: absolute; justify-content: center;
  overflow: hidden; padding: 0;
}
.slide-hero.active { transform: translateX(0); }

#heroCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%; z-index: 0;
}
.hero-content {
  position: relative; z-index: 2;
  width: 100%; padding: 20px 24px 60px;
  display: flex; flex-direction: column; align-items: center; gap: 32px;
}
.hero-split {
  display: flex; align-items: center; gap: 0;
  width: 100%; max-width: 900px;
}
.hero-side {
  flex: 1; text-align: center; padding: 32px 16px;
  opacity: 0; transform: translateX(-30px);
  animation: hero-in 1.2s var(--ease) 2s forwards;
}
.hero-bmw { transform: translateX(30px); animation-delay: 2.1s; }
@keyframes hero-in { to { opacity:1; transform:translateX(0); } }

.hs-brand {
  font-family: var(--font-head); font-size: .72rem;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 8px;
}
.hero-benz .hs-brand { color: var(--benz-dark); }
.hero-bmw  .hs-brand { color: var(--bmw-dark); }

.hs-model {
  font-family: var(--font-head);
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 900; line-height: 1; margin-bottom: 8px;
}
.hero-benz .hs-model {
  background: linear-gradient(135deg, var(--benz-light), var(--benz), var(--benz-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-bmw .hs-model {
  background: linear-gradient(135deg, var(--bmw-light), var(--bmw), var(--bmw-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hs-trim { font-family: var(--font-head); font-size: .85rem; font-weight: 500; color: var(--text-2); letter-spacing: .05em; margin-bottom: 4px; }
.hs-year { font-size: .72rem; color: var(--text-3); letter-spacing: .1em; }

.hero-divider { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 80px; }
.hero-vs {
  width: 52px; height: 52px;
  background: var(--surface-2); border: 1px solid var(--border-hi);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: .72rem; font-weight: 700;
  color: var(--text-3); letter-spacing: .1em;
  opacity: 0; animation: hero-vs-in 0.8s var(--ease) 2.4s forwards;
}
@keyframes hero-vs-in { to { opacity:1; } }

.hero-tagline {
  text-align: center;
  opacity: 0; animation: hero-tag-in 0.8s var(--ease) 2.6s forwards;
}
@keyframes hero-tag-in { to { opacity:1; } }
.ht-main {
  font-family: var(--font-head); font-size: clamp(.9rem, 1.8vw, 1.3rem);
  font-weight: 300; color: var(--text-1); margin-bottom: 10px; letter-spacing: .05em;
}
.ht-stats {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px 4px; font-size: .76rem; color: var(--text-3);
  font-family: var(--font-head); letter-spacing: .06em;
}
.dot { color: var(--text-3); }

/* Hero next button */
.slide-next-hint {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 3;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  border-radius: 24px; padding: 8px 18px;
  font-family: var(--font-head); font-size: .72rem; letter-spacing: .15em;
  color: var(--text-2); cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  opacity: 0; animation: hero-tag-in 0.8s var(--ease) 3s forwards;
}
.slide-next-hint:hover { background: rgba(255,255,255,0.1); border-color: var(--border-hi); color: var(--text-1); }
.slide-next-hint svg { width: 14px; height: 14px; }

/* ── OVERVIEW ────────────────────────────────────────── */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px; align-items: start; width: 100%;
}
.ov-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.benz-card:hover { border-color: var(--benz-dark); box-shadow: 0 0 32px var(--benz-glow2); }
.bmw-card:hover  { border-color: var(--bmw-dark);  box-shadow: 0 0 32px var(--bmw-glow2); }

.ov-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.ov-badge {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.benz-badge { background: var(--benz-glow); color: var(--benz); }
.bmw-badge  { background: var(--bmw-glow);  color: var(--bmw); }
.ov-maker { font-size: .72rem; color: var(--text-3); letter-spacing: .1em; }
.ov-model { font-family: var(--font-head); font-size: .9rem; font-weight: 600; margin: 2px 0; }
.ov-code  { font-size: .7rem; color: var(--text-3); }

.ov-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ov-stat { text-align: center; }
.ov-val {
  display: block; font-family: var(--font-head);
  font-size: 1.4rem; font-weight: 700; line-height: 1.1; margin-bottom: 3px;
}
.benz-card .ov-val { color: var(--benz); }
.bmw-card  .ov-val { color: var(--bmw); }
.ov-val sub { font-size: .55em; font-weight: 400; color: var(--text-2); }
.ov-lbl { font-size: .7rem; color: var(--text-3); letter-spacing: .04em; }

.ov-shared {
  min-width: 240px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 14px; padding: 22px;
}
.ov-shared h3 {
  font-family: var(--font-head); font-size: .65rem;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 14px; text-align: center;
}
.shared-list { display: flex; flex-direction: column; gap: 6px; }
.shared-list li {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.shared-list li:last-child { border-bottom: none; }
.shared-list li span:first-child { color: var(--text-3); }
.shared-list li span:last-child  { font-weight: 600; color: var(--green); }

/* ── 3D VIEWER SLIDE ─────────────────────────────────── */
.slide-viewer { background: var(--bg); }
.slide-body-viewer {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  padding: 20px 24px 8px;
}
.viewer-wrap {
  flex: 1; display: flex; min-height: 0;
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden;
}
.viewer-half {
  flex: 1; position: relative;
  display: flex; flex-direction: column;
  min-height: 0;
}
.viewer-frame { flex: 1; border: none; display: block; width: 100%; min-height: 0; }
.viewer-caption {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  padding: 8px 16px; flex-shrink: 0;
  background: rgba(6,6,10,0.92);
  border-top: 1px solid var(--border);
}
.viewer-car-name {
  font-family: var(--font-head); font-size: .78rem; font-weight: 600;
  letter-spacing: .1em;
}
.viewer-benz-caption .viewer-car-name { color: var(--benz); }
.viewer-bmw-caption  .viewer-car-name { color: var(--bmw); }
.viewer-brand-dot { font-size: .82rem; }
.viewer-benz-caption .viewer-brand-dot { color: var(--benz); }
.viewer-bmw-caption  .viewer-brand-dot { color: var(--bmw); }
.viewer-brand-label {
  font-family: var(--font-head); font-size: .65rem;
  letter-spacing: .1em; color: var(--text-3); text-transform: uppercase;
}
.viewer-sep { width: 1px; background: var(--border); flex-shrink: 0; }
.viewer-glow {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  width: 60%; height: 2px; border-radius: 2px; z-index: 2; pointer-events: none;
}
.benz-glow { background: linear-gradient(90deg, transparent, var(--benz), transparent); }
.bmw-glow  { background: linear-gradient(90deg, transparent, var(--bmw),  transparent); }

/* ── PERFORMANCE ─────────────────────────────────────── */
.perf-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; width: 100%;
}
.perf-item {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 18px;
}
.perf-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.perf-name { font-size: .82rem; font-weight: 500; }
.perf-name em { color: var(--text-3); font-style: normal; font-size: .72rem; }
.perf-tag {
  font-family: var(--font-head); font-size: .62rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px;
}
.equal-tag { background: rgba(61,186,110,0.15); color: var(--green); }
.benz-tag  { background: var(--benz-glow2); color: var(--benz); }
.bmw-tag   { background: var(--bmw-glow2);  color: var(--bmw); }

.perf-bar-group { display: flex; flex-direction: column; gap: 9px; }
.pbr { display: flex; align-items: center; gap: 10px; }
.pbr-brand { font-size: .7rem; color: var(--text-3); width: 38px; flex-shrink: 0; }
.pbr-track { flex: 1; height: 5px; background: var(--surface); border-radius: 3px; overflow: hidden; }
.pbr-fill  { height: 100%; width: 0; border-radius: 3px; transition: width 1.2s cubic-bezier(0.25,1,0.5,1); }
.benz-pbr .pbr-fill { background: linear-gradient(90deg, var(--benz-dark), var(--benz)); }
.bmw-pbr  .pbr-fill { background: linear-gradient(90deg, var(--bmw-dark),  var(--bmw)); }
.pbr-val { font-size: .72rem; font-weight: 600; width: 74px; flex-shrink: 0; text-align: right; }
.benz-pbr .pbr-val { color: var(--benz); }
.bmw-pbr  .pbr-val { color: var(--bmw); }

/* ── FEATURES SLIDE ──────────────────────────────────── */
.slide-features {
  position: absolute; overflow: hidden;
  /* flex column: slide-body flexes up, detail panel anchors at bottom */
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}
.slide-features .slide-body {
  flex: 1; min-height: 0;
  padding-bottom: 4px;
  overflow: visible; /* let feat-panels handle scroll */
}

.feat-tabs {
  display: flex; gap: 6px; justify-content: center;
  margin-bottom: 16px; flex-wrap: wrap; flex-shrink: 0; width: 100%;
}
.ftab {
  padding: 7px 16px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; cursor: pointer;
  font-family: var(--font-body); font-size: .78rem; font-weight: 500;
  color: var(--text-3); transition: all 0.2s var(--ease);
}
.ftab:hover { border-color: var(--border-hi); color: var(--text-1); }
.ftab.active { background: var(--surface); border-color: var(--border-hi); color: var(--text-1); }

.feat-panels { width: 100%; flex: 1; min-height: 0; overflow: hidden; }
.feat-panel  { display: none; height: 100%; }
.feat-panel.active { display: block; }

.fcol-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  height: 100%; overflow-y: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-2) transparent;
}
.fcol-wrap::-webkit-scrollbar { width: 4px; }
.fcol-wrap::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 2px; }

.fcol {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px;
}
.benz-fcol { border-top: 2px solid var(--benz-dark); }
.bmw-fcol  { border-top: 2px solid var(--bmw-dark); }

.fcol h3 {
  font-family: var(--font-head); font-size: .85rem; font-weight: 700;
  margin-bottom: 14px; display: flex; align-items: center; gap: 7px;
}
.benz-dot { color: var(--benz); }
.bmw-dot  { color: var(--bmw); }

.fcol ul { display: flex; flex-direction: column; gap: 5px; }

/* Clickable feature items */
.fitem {
  font-size: .8rem; color: var(--text-2);
  padding: 8px 12px; border-radius: 6px;
  border-left: 2px solid transparent;
  background: rgba(255,255,255,0.02);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.fitem.clickable {
  cursor: pointer;
}
.fitem.clickable:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-1);
}
.benz-fcol .fitem.advantage {
  color: var(--text-1); border-left-color: var(--benz); background: var(--benz-glow2);
}
.bmw-fcol .fitem.advantage {
  color: var(--text-1); border-left-color: var(--bmw); background: var(--bmw-glow2);
}
.fitem.fitem-active {
  outline: 1px solid rgba(255,255,255,0.2);
}
.benz-fcol .fitem.fitem-active { outline-color: var(--benz); }
.bmw-fcol  .fitem.fitem-active { outline-color: var(--bmw); }

/* Feature detail — in-flow at bottom of features slide */
/* When open, pushes feat-panels UP instead of covering content */
.feature-detail {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  max-height: 0;
  overflow: hidden;
  background: var(--surface-2);
  border-top: 2px solid var(--border-hi);
  transition: max-height 0.45s var(--ease);
  box-shadow: 0 -16px 48px rgba(0,0,0,0.7);
}
.feature-detail.open {
  max-height: 200px;
}
.fd-inner {
  padding: 14px 20px 16px;
  position: relative;
  height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--surface) transparent;
}
.fd-close {
  position: absolute; top: 12px; right: 16px;
  background: rgba(255,255,255,0.08); border: 1px solid var(--border);
  border-radius: 50%; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; cursor: pointer; color: var(--text-2);
  transition: background 0.2s, color 0.2s; flex-shrink: 0; z-index: 1;
}
.fd-close:hover { background: rgba(255,255,255,0.15); color: var(--text-1); }
.fd-car-badge {
  display: inline-block; margin-bottom: 6px;
  font-family: var(--font-head); font-size: .65rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 4px;
}
.fd-benz { color: var(--benz); background: var(--benz-glow2); }
.fd-bmw  { color: var(--bmw);  background: var(--bmw-glow2); }
.fd-title {
  font-family: var(--font-head); font-size: .95rem; font-weight: 700;
  margin-bottom: 6px; color: var(--text-1); padding-right: 36px;
}
.fd-desc {
  font-size: .82rem; color: var(--text-2); line-height: 1.7;
}

/* ── SPEC TABLE ──────────────────────────────────────── */
.spec-scroll { overflow-x: auto; border-radius: 10px; }
.spec-table {
  width: 100%; border-collapse: collapse; min-width: 600px;
}
.spec-table th, .spec-table td {
  padding: 10px 14px; text-align: left; font-size: .8rem;
}
.spec-table thead th {
  background: var(--surface-2); border-bottom: 1px solid var(--border-hi);
  font-family: var(--font-head); font-weight: 600;
}
.spec-cat-head { color: var(--text-3); width: 180px; }
.benz-head { color: var(--benz); }
.bmw-head  { color: var(--bmw); }
.benz-head small, .bmw-head small { color: var(--text-3); font-weight: 400; font-size: .72rem; }

.spec-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
.spec-table tbody tr:hover { background: rgba(255,255,255,0.025); }
.spec-table tbody td:first-child { color: var(--text-3); font-size: .76rem; }
.group-row td {
  font-family: var(--font-head); font-size: .65rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--text-3);
  background: var(--surface-2) !important; padding-top: 12px; padding-bottom: 12px;
}
.benz-win { color: var(--benz); font-weight: 600; }
.bmw-win  { color: var(--bmw);  font-weight: 600; }

/* ── PRICE ───────────────────────────────────────────── */
.price-arena {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 20px; align-items: center; width: 100%; margin-bottom: 24px;
}
.price-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px; text-align: center;
  transition: transform 0.3s var(--spring), box-shadow 0.3s;
}
.price-card:hover { transform: translateY(-3px); }
.benz-price-card:hover { box-shadow: 0 16px 48px var(--benz-glow2); border-color: var(--benz-dark); }
.bmw-price-card:hover  { box-shadow: 0 16px 48px var(--bmw-glow2);  border-color: var(--bmw-dark); }

.price-maker { font-size: .72rem; letter-spacing: .12em; color: var(--text-3); margin-bottom: 3px; }
.price-name  { font-family: var(--font-head); font-size: .85rem; font-weight: 600; margin-bottom: 16px; }
.price-num   { margin-bottom: 18px; }
.pn-amount   { font-family: var(--font-head); font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; }
.benz-price-card .pn-amount { color: var(--benz); }
.bmw-price-card  .pn-amount { color: var(--bmw); }
.pn-unit { font-family: var(--font-head); font-size: .9rem; color: var(--text-2); margin-left: 2px; }

.price-pros { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.price-pros li {
  font-size: .79rem; padding: 5px 9px; border-radius: 5px;
  display: flex; align-items: center; gap: 7px;
}
.price-pros li::before { content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.price-pros li.pro { color: var(--text-2); background: rgba(255,255,255,0.02); }
.price-pros li.pro::before { background: var(--green); }
.price-pros li.con { color: var(--text-3); }
.price-pros li.con::before { background: var(--text-3); }

.price-gap { text-align: center; padding: 16px; flex-shrink: 0; }
.price-gap-num { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; color: var(--text-1); margin-bottom: 3px; }
.price-gap-label { font-size: .7rem; color: var(--text-3); letter-spacing: .08em; margin-bottom: 10px; }
.price-gap-arrow {
  font-family: var(--font-head); font-size: .68rem; font-weight: 600;
  color: var(--bmw); letter-spacing: .06em;
  background: var(--bmw-glow2); padding: 4px 10px; border-radius: 20px;
}

/* ── VERDICT ─────────────────────────────────────────── */
.verdict-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-bottom: 24px; width: 100%;
}
.verdict-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px; transition: border-color 0.3s;
}
.benz-verdict { border-top: 3px solid var(--benz); }
.bmw-verdict  { border-top: 3px solid var(--bmw); }

.vc-icon { font-size: 1.3rem; margin-bottom: 12px; display: block; }
.benz-verdict .vc-icon { color: var(--benz); }
.bmw-verdict  .vc-icon { color: var(--bmw); }
.verdict-card h3 { font-family: var(--font-head); font-size: 1rem; font-weight: 700; margin-bottom: 3px; }
.vc-sub { font-size: .75rem; color: var(--text-3); margin-bottom: 14px; }
.verdict-card ul { display: flex; flex-direction: column; gap: 7px; }
.verdict-card li {
  font-size: .82rem; color: var(--text-2); padding: 5px 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 7px;
}
.verdict-card li::before { content: '→'; color: var(--text-3); flex-shrink: 0; }
.benz-verdict li::before { color: var(--benz-dark); }
.bmw-verdict  li::before { color: var(--bmw-dark); }
.verdict-card li:last-child { border-bottom: none; }
.verdict-card li em { color: var(--text-3); font-style: italic; margin-left: 4px; }

.verdict-summary {
  background: var(--surface-2); border: 1px solid var(--border-hi);
  border-radius: 14px; overflow: hidden; width: 100%; margin-bottom: 32px;
}
.vs-inner { padding: 32px; }
.vs-inner h3 {
  font-family: var(--font-head); font-size: .95rem; font-weight: 700;
  margin-bottom: 14px;
  background: linear-gradient(90deg, var(--benz), var(--bmw));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.vs-inner p { color: var(--text-2); font-size: .87rem; line-height: 1.8; margin-bottom: 10px; }
.vs-inner p:last-child { margin-bottom: 0; }
.vs-inner strong { color: var(--text-1); font-weight: 600; }

/* ── FOOTER (inside last slide) ──────────────────────── */
.slide-footer {
  text-align: center; padding: 20px 0;
  border-top: 1px solid var(--border);
}
.footer-brands { font-family: var(--font-head); font-size: .72rem; color: var(--text-3); letter-spacing: .08em; margin-bottom: 8px; }
.fb-sep { margin: 0 10px; }
.footer-note { font-size: .7rem; color: var(--text-3); line-height: 1.6; max-width: 480px; margin: 0 auto; }

/* ── NAVIGATION DOTS ─────────────────────────────────── */
#navDots {
  position: fixed; right: 20px; top: 50%;
  transform: translateY(-50%);
  z-index: 250;
  display: flex; flex-direction: column; gap: 10px;
}
.ndot {
  position: relative;
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.18); border: none; cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}
.ndot:hover { background: rgba(255,255,255,0.4); transform: scale(1.4); }
.ndot.active { background: var(--text-1); transform: scale(1.3); }
.ndot-label {
  position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-head); font-size: .58rem; letter-spacing: .1em;
  color: var(--text-3); white-space: nowrap;
  opacity: 0; transition: opacity 0.2s;
  pointer-events: none;
}
.ndot:hover .ndot-label,
.ndot.active .ndot-label { opacity: 1; }

/* ── SLIDE ARROWS ────────────────────────────────────── */
#slideArrows {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--arrow-h);
  z-index: 200;
  background: rgba(6,6,10,0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  gap: 20px;
}
.sarrow {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-2);
  transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}
.sarrow:hover { background: var(--surface); border-color: var(--border-hi); color: var(--text-1); }
.sarrow:disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
.sarrow svg { width: 16px; height: 16px; }

#slideNumDisplay {
  font-family: var(--font-head); font-size: .78rem;
  color: var(--text-3); letter-spacing: .1em;
  display: flex; align-items: center; gap: 6px; min-width: 48px; justify-content: center;
}
.sn-sep { color: var(--text-3); }
#slideNumCur { color: var(--text-1); font-weight: 600; }

/* ── SCROLLBAR ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── SELECTION ───────────────────────────────────────── */
::selection { background: var(--benz-glow); color: var(--text-1); }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .overview-grid { grid-template-columns: 1fr; }
  .ov-shared { min-width: unset; width: 100%; order: -1; }
  .ov-stats  { grid-template-columns: repeat(4, 1fr); }
  .price-arena { grid-template-columns: 1fr; gap: 14px; }
  .price-gap { display: flex; align-items: center; gap: 14px; justify-content: center; }
  .price-gap-label { display: none; }
}

@media (max-width: 768px) {
  :root { --nav-h: 52px; --arrow-h: 56px; }

  .hero-split { flex-direction: column; gap: 4px; }
  .hero-side { transform: translateX(0) !important; }
  .hero-divider { width: 100%; }
  .hero-vs { width: 38px; height: 38px; font-size: .62rem; }

  .overview-grid { gap: 14px; }
  .ov-stats { grid-template-columns: 1fr 1fr; }

  .viewer-wrap { flex-direction: column; }

  .perf-grid { grid-template-columns: 1fr; }

  .fcol-wrap { grid-template-columns: 1fr; }
  .feat-panel.active { overflow-y: auto; }

  .verdict-grid { grid-template-columns: 1fr; }

  #navDots { display: none; }

  .feature-detail {
    left: 0; transform: translateY(100%);
    max-width: 100%; border-radius: 12px 12px 0 0;
  }
  .feature-detail.open { transform: translateY(0); }
}

@media (max-width: 480px) {
  .hs-model { font-size: 2.8rem; }
  .feat-tabs { gap: 4px; }
  .ftab { padding: 6px 10px; font-size: .72rem; }
  .ov-stats { gap: 10px; }
  .ov-val { font-size: 1.2rem; }
}

/* ── HERO (updated) ─────────────────────────────────── */
.hero-eyebrow {
  font-family: var(--font-head); font-size: .68rem;
  letter-spacing: .3em; text-transform: uppercase; color: var(--text-3);
  margin-bottom: 24px;
  opacity: 0; animation: hero-tag-in 0.8s var(--ease) 2s forwards;
}
.hs-emblem {
  font-size: 2rem; margin-bottom: 10px; display: block;
}
.hero-benz .hs-emblem { color: var(--benz); }
.hero-bmw  .hs-emblem { color: var(--bmw); }
.hs-motto {
  font-family: var(--font-head); font-size: .78rem; font-style: italic;
  color: var(--text-2); letter-spacing: .03em; margin-bottom: 6px;
}
.hs-since { font-size: .7rem; color: var(--text-3); letter-spacing: .1em; }
.hero-tagline-main {
  font-family: var(--font-head); font-size: clamp(.9rem, 1.8vw, 1.3rem);
  font-weight: 300; color: var(--text-1); margin-bottom: 10px; letter-spacing: .05em;
  opacity: 0; animation: hero-tag-in 0.8s var(--ease) 2.6s forwards;
}

/* ── TOC SLIDE ───────────────────────────────────────── */
.slide-toc { background: var(--bg); }
.toc-header {
  margin-bottom: 32px; width: 100%;
  opacity: 0; animation: slide-up 0.8s var(--ease) 0.2s forwards;
}
.toc-header h2 {
  font-family: var(--font-head); font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; color: var(--text-1);
}
@keyframes slide-up { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }

.toc-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; width: 100%; max-width: 900px;
}
.toc-item {
  padding: 26px 30px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.2s;
  opacity: 0;
}
.slide.active .toc-item:nth-child(1) { animation: slide-up 0.5s var(--ease) 0.3s forwards; }
.slide.active .toc-item:nth-child(2) { animation: slide-up 0.5s var(--ease) 0.4s forwards; }
.slide.active .toc-item:nth-child(3) { animation: slide-up 0.5s var(--ease) 0.5s forwards; }
.slide.active .toc-item:nth-child(4) { animation: slide-up 0.5s var(--ease) 0.6s forwards; }
.slide.active .toc-item:nth-child(5) { animation: slide-up 0.5s var(--ease) 0.7s forwards; }
.slide.active .toc-item:nth-child(6) { animation: slide-up 0.5s var(--ease) 0.8s forwards; }
.toc-item:hover { background: rgba(255,255,255,0.03); }
.toc-item:nth-child(odd) { border-right: 1px solid var(--border); }
.toc-item:nth-child(5), .toc-item:nth-child(6) { border-bottom: none; }
.toc-num {
  font-family: var(--font-head); font-size: .72rem; color: var(--text-3);
  letter-spacing: .1em; margin-bottom: 10px;
}
.toc-rule { height: 1px; background: var(--border); margin-bottom: 12px; }
.toc-title {
  font-family: var(--font-head); font-size: clamp(.9rem, 1.4vw, 1.1rem);
  font-weight: 700; color: var(--text-1); margin-bottom: 6px;
}
.toc-desc { font-size: .8rem; color: var(--text-3); line-height: 1.5; }

/* ── TWO-COL GRID (history, perf, consumer) ─────────── */
.two-col-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%;
}
.brand-col {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
}
.benz-col { border-top: 3px solid var(--benz); }
.bmw-col  { border-top: 3px solid var(--bmw); }
.brand-col-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.brand-badge {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0;
}
.benz-badge-bg { background: var(--benz-glow); color: var(--benz); }
.bmw-badge-bg  { background: var(--bmw-glow); color: var(--bmw); }
.brand-col-label { font-family: var(--font-head); font-size: .7rem; letter-spacing: .1em; color: var(--text-3); }
.brand-col-founding { font-family: var(--font-head); font-size: .9rem; font-weight: 700; }
.benz-col .brand-col-founding { color: var(--benz); }
.bmw-col  .brand-col-founding { color: var(--bmw); }
.brand-motto {
  font-family: var(--font-head); font-size: .78rem; font-style: italic;
  color: var(--text-2); margin-bottom: 12px; padding: 8px 10px;
  background: rgba(255,255,255,0.03); border-radius: 6px;
}
.item-list { display: flex; flex-direction: column; gap: 4px; }
.iitem {
  font-size: .8rem; padding: 8px 10px; border-radius: 6px; color: var(--text-2);
  border-left: 2px solid transparent; background: rgba(255,255,255,0.02);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.iitem.clickable { cursor: pointer; }
.benz-col .iitem.clickable:hover { background: var(--benz-glow2); border-left-color: var(--benz); color: var(--text-1); }
.bmw-col  .iitem.clickable:hover { background: var(--bmw-glow2); border-left-color: var(--bmw); color: var(--text-1); }
.iitem.fitem-active { outline: 1px solid; }
.benz-col .iitem.fitem-active { outline-color: var(--benz); background: var(--benz-glow2); }
.bmw-col  .iitem.fitem-active { outline-color: var(--bmw); background: var(--bmw-glow2); }
.iitem-year {
  font-family: var(--font-head); font-size: .68rem; font-weight: 700;
  margin-right: 6px;
}
.benz-col .iitem-year { color: var(--benz); }
.bmw-col  .iitem-year { color: var(--bmw); }

/* ── IMAGE BANNERS ───────────────────────────────────── */
.img-banner {
  width: 100%; border-radius: 10px; overflow: hidden;
  margin-bottom: 16px; flex-shrink: 0; border: 1px solid var(--border);
}
.img-banner img { width: 100%; height: 180px; object-fit: cover; display: block; }
.img-banner-sm {
  width: 100%; border-radius: 10px; overflow: hidden;
  margin-bottom: 16px; flex-shrink: 0; border: 1px solid var(--border);
}
.img-banner-sm img { width: 100%; height: 130px; object-fit: cover; display: block; }
.design-banner {
  width: 100%; border-radius: 8px; overflow: hidden;
  margin-bottom: 12px; flex-shrink: 0; border: 1px solid var(--border);
  flex: 0 0 auto;
}
.design-banner img { width: 100%; height: 100px; object-fit: cover; display: block; }

/* ── PERFORMANCE SECTION TITLE ───────────────────────── */
.perf-section-title {
  font-family: var(--font-head); font-size: .65rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; width: 100%;
}

/* ── MARKET BARS (consumer slide) ────────────────────── */
.market-section {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px; margin-bottom: 0;
}
.market-title {
  font-family: var(--font-head); font-size: .65rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; text-align: center;
}
.market-bars { display: flex; flex-direction: column; gap: 12px; }
.mbar-row { display: flex; align-items: center; gap: 10px; }
.mbar-label { font-size: .75rem; color: var(--text-2); width: 70px; flex-shrink: 0; }
.mbar-track { flex: 1; height: 10px; background: var(--surface); border-radius: 5px; overflow: hidden; }
.mbar-fill { height: 100%; border-radius: 5px; transition: width 1.4s cubic-bezier(0.25,1,0.5,1); width: 0; }
.mbar-fill.benz { background: linear-gradient(90deg, var(--benz-dark), var(--benz)); }
.mbar-fill.bmw  { background: linear-gradient(90deg, var(--bmw-dark), var(--bmw)); }
.mbar-val { font-family: var(--font-head); font-size: .78rem; font-weight: 700; width: 72px; text-align: right; flex-shrink: 0; }
.mbar-row.benz .mbar-val { color: var(--benz); }
.mbar-row.bmw  .mbar-val { color: var(--bmw); }

/* ── FEATURE DETAIL (global panel) ──────────────────── */
.feature-detail {
  position: relative; width: 100%; flex-shrink: 0;
  max-height: 0; overflow: hidden;
  background: var(--surface-2); border-top: 2px solid var(--border-hi);
  transition: max-height 0.45s var(--ease);
  box-shadow: 0 -16px 48px rgba(0,0,0,0.7);
}
.feature-detail.open { max-height: 200px; }
.fd-inner {
  padding: 14px 20px 16px; position: relative;
  height: 200px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--surface) transparent;
}
.fd-close {
  position: absolute; top: 12px; right: 16px;
  background: rgba(255,255,255,0.08); border: 1px solid var(--border);
  border-radius: 50%; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; cursor: pointer; color: var(--text-2);
  transition: background 0.2s, color 0.2s; z-index: 1;
}
.fd-close:hover { background: rgba(255,255,255,0.15); color: var(--text-1); }
.fd-car-badge {
  display: inline-block; margin-bottom: 6px;
  font-family: var(--font-head); font-size: .65rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 4px;
}
.fd-benz { color: var(--benz); background: var(--benz-glow2); }
.fd-bmw  { color: var(--bmw);  background: var(--bmw-glow2); }
.fd-title {
  font-family: var(--font-head); font-size: .95rem; font-weight: 700;
  margin-bottom: 6px; color: var(--text-1); padding-right: 36px;
}
.fd-desc { font-size: .82rem; color: var(--text-2); line-height: 1.7; }

/* ── RESPONSIVE (additions) ──────────────────────────── */
@media (max-width: 900px) {
  .two-col-grid { grid-template-columns: 1fr; }
  .toc-grid { grid-template-columns: 1fr; }
  .toc-item:nth-child(odd) { border-right: none; }
  .toc-item:nth-child(5) { border-bottom: 1px solid var(--border); }
  .toc-item:nth-child(6) { border-bottom: none; }
}
