/* ================================================================
   СПИРИДОН — Premium Design System
   8px grid · European luxury furniture aesthetic
   ================================================================ */

:root {
  /* 8px spacing grid */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 40px;
  --s-6: 48px;
  --s-8: 64px;
  --s-10: 80px;
  --s-12: 96px;
  --s-16: 128px;

  /* Palette — warm stone, restrained accent */
  --bg: #f4f1ec;
  --bg-warm: #ebe6de;
  --surface: #faf9f7;
  --surface-elevated: #ffffff;
  --text: #1a1816;
  --text-secondary: #4a4540;
  --muted: #7a746c;
  --muted-light: #a39d95;
  --line: rgba(26, 24, 22, 0.09);
  --line-strong: rgba(26, 24, 22, 0.16);
  --accent: #8c7355;
  --accent-light: #a89272;
  --accent-dark: #6b5740;
  --dark: #121110;
  --dark-soft: #1e1c1a;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Shape & depth */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 4px 24px rgba(18, 17, 16, 0.05);
  --shadow-md: 0 12px 48px rgba(18, 17, 16, 0.07);
  --shadow-lg: 0 24px 64px rgba(18, 17, 16, 0.10);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 88px;
  --content-max: 1240px;
  --page-x: clamp(var(--s-3), 5vw, var(--s-10));
}

/* ——— Reset & base ——— */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
}

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

/* ——— Scroll reveal ——— */
.reveal {
  opacity: 0;
  transform: translateY(var(--s-4));
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }
.hero.reveal { transform: none; opacity: 1; }
.hero.reveal .heroContent > * {
  opacity: 1;
  transform: none;
  animation: heroUp 1s var(--ease-out) both;
}
@keyframes heroUp {
  from { opacity: 0; transform: translateY(var(--s-3)); }
  to { opacity: 1; transform: none; }
}

/* ——— Typography ——— */
.sectionLabel, .label, .heroKicker, .modalKicker, .productKicker {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.sectionLabel {
  margin-bottom: var(--s-3);
  padding: var(--s-1) 0;
  border: none;
  background: none;
  border-radius: 0;
}

h1, h2, h3, .brand, .footerLogo {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.hero h1 {
  font-size: clamp(52px, 7.5vw, 96px);
  line-height: 1.12;
  margin: 0 0 var(--s-4);
  color: #fff;
  text-shadow: 0 2px 48px rgba(0, 0, 0, 0.35);
}

.section h2,
.plannerTitle h2 {
  font-size: clamp(32px, 3.8vw, 52px);
  line-height: 1.28;
  font-weight: 300;
  margin: var(--s-2) 0 0;
  color: var(--text);
}

.intro p,
.sectionHead p,
.plannerTitle p,
.infoLead {
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
  font-weight: 300;
}

/* ——— Unified button system ——— */
.btn,
.headerBtn,
.btnFull,
.cardBtn,
.bmwStageHead button,
#resetViewBtn,
.roomTools button,
.navCta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  min-height: 48px;
  padding: 0 var(--s-4);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
              border-color 0.35s var(--ease), transform 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
}

.btn.primary,
.btnFull,
.cardBtn.solid,
.navCta {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}
.btn.primary:hover,
.btnFull:hover,
.cardBtn.solid:hover,
.navCta:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn.secondary,
.headerBtn,
.cardBtn.ghost,
.bmwStageHead button,
#resetViewBtn,
.roomTools button {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}
.btn.secondary:hover,
.headerBtn:hover,
.cardBtn.ghost:hover,
.bmwStageHead button:hover,
#resetViewBtn:hover,
.roomTools button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-2px);
}
.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btnFull { width: 100%; margin-top: var(--s-2); }

/* ——— Unified card surface ——— */
.card-surface,
.productCard,
.panelBlock,
.summaryBox,
.modelBar,
.tabs,
.infoPanel,
.bmwStage,
.modalCard {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

/* ——— Header ——— */
.header {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto 0;
  height: var(--header-h);
  padding: 0 var(--page-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  background: rgba(244, 241, 236, 0.72);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: height 0.4s var(--ease), background 0.4s var(--ease),
              border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  animation: headerDrop 0.8s var(--ease-out) both;
}
@keyframes headerDrop {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.header.scrolled {
  height: 72px;
  background: rgba(250, 249, 247, 0.88);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.header.scrolled .brand { font-size: 22px; letter-spacing: 0.28em; }

.brand {
  font-size: 24px;
  letter-spacing: 0.32em;
  line-height: 1;
  color: var(--text);
  white-space: nowrap;
  transition: font-size 0.4s var(--ease), letter-spacing 0.4s var(--ease);
}

.header nav {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}
.header nav a {
  position: relative;
  padding: var(--s-1) 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.3s var(--ease);
}
.header nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s var(--ease);
}
.header nav a:hover { color: var(--text); }
.header nav a:hover::after { width: 100%; }

.navCta { display: none; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 0;
}
.burger span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.header.navOpen .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.header.navOpen .burger span:nth-child(2) { opacity: 0; }
.header.navOpen .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.headerBtn {
  height: 44px;
  padding: 0 var(--s-3);
  font-size: 12px;
}

/* ——— Hero ——— */
.hero {
  min-height: 100vh;
  position: relative;
  display: grid;
  align-items: center;
  padding: calc(var(--header-h) + var(--s-8)) var(--page-x) var(--s-8);
  background: url('assets/hero.png') center / cover no-repeat;
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(14, 12, 10, 0.58) 0%,
    rgba(14, 12, 10, 0.38) 45%,
    rgba(14, 12, 10, 0.12) 100%
  );
  z-index: -1;
}
.heroContent { max-width: 680px; }
.heroKicker {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--s-4);
  letter-spacing: 0.24em;
}
.hero p {
  max-width: 480px;
  font-size: 17px;
  line-height: 1.8;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}
.heroActions {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-top: var(--s-6);
}
.btn { min-height: 52px; padding: 0 var(--s-5); }

/* ——— Sections ——— */
.section,
.plannerSection {
  padding: var(--s-16) var(--page-x);
}
.intro,
.sectionHead {
  display: grid;
  grid-template-columns: minmax(280px, 520px) 1fr;
  gap: var(--s-10);
  align-items: end;
  max-width: var(--content-max);
  margin: 0 auto;
}
.plannerSection {
  background: var(--bg-warm);
  border-top: 1px solid var(--line);
}
.plannerTitle {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--s-8);
}
.plannerTitle .sectionLabel { margin-bottom: var(--s-3); }

.catalogTabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--s-1);
  padding: 6px;
  margin-top: var(--s-6);
  background: rgba(26, 24, 22, 0.04);
  border-radius: 999px;
  border: 1px solid var(--line);
}
.catalogTab {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.catalogTab:hover { color: var(--text); }
.catalogTab.active {
  color: var(--text);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-sm);
}

.catalogGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-3);
  margin-top: var(--s-5);
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  align-items: stretch;
}
.catalogGrid[hidden] {
  display: none !important;
}

/* ——— Product cards ——— */
.productCard {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-lg);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.productCard:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.productMedia { overflow: hidden; }
.productCard img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  background: var(--bg-warm);
  transition: transform 0.8s var(--ease-out);
}
.productCard:hover img { transform: scale(1.04); }
.productBody {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--s-4);
}
.productCard h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  line-height: 1.2;
  margin: var(--s-2) 0 var(--s-1);
}
.productCard p {
  min-height: 48px;
  margin: 0 0 var(--s-3);
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 300;
}
.productPrice {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 var(--s-3);
}
.productPrice--inquire {
  color: var(--muted);
  font-style: italic;
}
.productActions--single {
  grid-template-columns: 1fr;
}
.productActions {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
}
.productActions .cardBtn { height: 48px; font-size: 11px; }

/* ——— Model bar & tabs ——— */
.modelBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  max-width: var(--content-max);
  margin: 0 auto var(--s-4);
  padding: var(--s-4);
  border-radius: var(--radius-lg);
}
.modelBarLeft {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  min-width: 240px;
  flex: 1;
}
.modelBar select { height: 48px; max-width: 360px; }

.tabs {
  display: flex;
  gap: var(--s-1);
  flex-wrap: wrap;
  max-width: var(--content-max);
  margin: 0 auto var(--s-4);
  padding: var(--s-1);
  border-radius: var(--radius-md);
}
.tab {
  flex: 1 1 120px;
  border: 0;
  background: transparent;
  padding: var(--s-2) var(--s-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.tab:hover { color: var(--text); background: rgba(140, 115, 85, 0.08); }
.tab.active {
  background: var(--dark);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.tabPanels {
  max-width: var(--content-max);
  margin: 0 auto;
}
.tabPanel { display: none; }
.tabPanel.active {
  display: block;
  animation: tabIn 0.5s var(--ease-out);
}
@keyframes tabIn {
  from { opacity: 0; transform: translateY(var(--s-2)); }
  to { opacity: 1; transform: none; }
}

/* ——— Info panels ——— */
.infoPanel {
  padding: var(--s-6);
  border-radius: var(--radius-lg);
}
.infoPanel h3 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 300;
  line-height: 1.25;
  margin: 0 0 var(--s-3);
}
.infoMuted {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  font-weight: 300;
  margin: var(--s-3) 0 0;
}
.specGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-2);
}
.specItem {
  padding: var(--s-3);
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--line);
  transition: border-color 0.3s var(--ease);
}
.specItem:hover { border-color: var(--line-strong); }
.specItem b {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-1);
}
.specItem span {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-secondary);
  font-weight: 300;
}

.reviewCard {
  padding: var(--s-4);
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--line);
  margin-bottom: var(--s-2);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.reviewCard:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.reviewCard:last-child { margin-bottom: 0; }
.reviewCard .stars { color: var(--accent); letter-spacing: 4px; font-size: 14px; }
.reviewCard p {
  margin: var(--s-2) 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-secondary);
  font-weight: 300;
}
.reviewCard b { font-size: 13px; color: var(--muted); font-weight: 400; }

/* ——— BMW constructor ——— */
.bmwConstructor {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--s-4);
  align-items: start;
}
.bmwParams {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.bmwParams .panelBlock { margin-bottom: 0; }

.bmwStage {
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.bmwStageHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
}
.bmwStageHead h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  margin: 0;
}
.bmwHint {
  margin: var(--s-1) 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  font-weight: 300;
}
.bmwStage .canvas3dWrap {
  height: 620px;
  border-radius: 0;
  background: linear-gradient(180deg, #f0ebe4 0%, #e5ddd3 100%);
}

/* ——— Form controls ——— */
.panelBlock {
  padding: var(--s-3);
  border-radius: var(--radius-lg);
  margin-bottom: var(--s-2);
}
.panelBlock h3 {
  margin: 0 0 var(--s-2);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
input, select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 0 var(--s-2);
  outline: none;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
input:focus, select:focus {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(140, 115, 85, 0.12);
}
.twoInputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
}
.twoInputs label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.twoInputs input { margin-top: var(--s-1); }

.miniPreview {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--s-2);
  align-items: center;
}
.miniPreview img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}
.miniPreview b {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  display: block;
}
.miniPreview span {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 300;
}

.choiceTitle {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: var(--s-3) 0 var(--s-1);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s-1);
}
.seg, .fabric {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: var(--s-2);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 400;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}
.seg:hover, .fabric:hover {
  border-color: var(--accent-light);
  transform: translateY(-1px);
}
.seg.active, .fabric.active {
  border-color: var(--accent);
  background: rgba(140, 115, 85, 0.08);
  color: var(--accent-dark);
}
.fabrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-1);
}
.fabric {
  display: flex;
  align-items: center;
  gap: var(--s-1);
}
.fabric i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

/* ——— Price panel ——— */
.pricePanel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}
.pricePanel .summaryBox {
  margin-top: 0;
  padding: var(--s-5);
  border-radius: var(--radius-lg);
}
.summaryBox span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.summaryBox h3 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 300;
  margin: var(--s-1) 0 var(--s-3);
}
.summaryBox p {
  border-bottom: 1px solid var(--line);
  padding: 0 0 var(--s-2);
  margin: 0 0 var(--s-2);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 300;
}
.summaryBox em { font-style: normal; color: var(--muted); }
.priceTotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--s-2) 0 var(--s-3);
  padding: var(--s-3);
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--line);
}
.priceTotal span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.priceTotal b {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
}
.priceAside h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 300;
  margin: 0 0 var(--s-3);
}
.priceList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.priceList li {
  position: relative;
  padding-left: var(--s-4);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
  font-weight: 300;
}
.priceList li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ——— 3D canvas ——— */
.canvas3dWrap {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  cursor: grab;
}
.canvas3dWrap:active { cursor: grabbing; }
.canvas3dWrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.viewer3dHint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  pointer-events: none;
}

/* ——— Modal ——— */
.modalOverlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--s-3);
  background: rgba(18, 17, 16, 0.52);
  backdrop-filter: blur(8px);
}
.modalOverlay.open { display: flex; }
.modalCard {
  position: relative;
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  padding: var(--s-6) var(--s-5) var(--s-4);
  animation: modalIn 0.4s var(--ease-out);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(var(--s-2)) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modalClose {
  position: absolute;
  top: var(--s-2);
  right: var(--s-2);
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.modalClose:hover { background: var(--bg); color: var(--text); }
.modalCard h3 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 300;
  margin: var(--s-2) 0 var(--s-1);
}
.modalSub {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  font-weight: 300;
  margin: 0 0 var(--s-4);
}
.modalCard form { display: flex; flex-direction: column; gap: var(--s-2); }
.modalCard label {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.modalCard input {
  height: 52px;
  padding: 0 var(--s-2);
  font-size: 15px;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}
.modalNote { min-height: 18px; font-size: 14px; text-align: center; margin: var(--s-1) 0 0; }
.modalNote.ok { color: #4a6b3a; }
.modalNote.err { color: #9a4a38; }
.modalPrivacy {
  font-size: 11px;
  color: var(--muted-light);
  text-align: center;
  line-height: 1.5;
  margin: var(--s-1) 0 0;
  font-weight: 300;
}

/* ——— Footer ——— */
footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.72);
  padding: var(--s-10) var(--page-x) 0;
}
.footerInner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--s-10);
  max-width: var(--content-max);
  margin: 0 auto;
  padding-bottom: var(--s-8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footerLogo {
  display: inline-block;
  font-size: 28px;
  letter-spacing: 0.32em;
  color: #fff;
  margin-bottom: var(--s-3);
  transition: opacity 0.3s var(--ease);
}
.footerLogo:hover { opacity: 0.75; }
.footerTagline {
  display: block;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 300;
  max-width: 260px;
}
.footerCols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
}
.footerCol h4 {
  margin: 0 0 var(--s-2);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-light);
}
.footerCol p {
  margin: 0 0 var(--s-1);
  line-height: 1.7;
  font-size: 15px;
  font-weight: 300;
}
.footerCol a {
  color: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.footerCol a:hover {
  color: #fff;
  border-color: var(--accent-light);
}
.socialLinks {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.socialLink {
  font-size: 14px;
  letter-spacing: 0.02em;
  border-bottom: none !important;
  opacity: 0.75;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.socialLink:hover {
  opacity: 1;
  transform: translateX(4px);
}
.footerBottom {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--s-4) 0 var(--s-5);
}
.footerCopy {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 300;
}

/* ——— Legacy / unused planner 2D (preserved) ——— */
.hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.centerPanel { overflow: hidden; }
.roomHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  margin-bottom: var(--s-2);
  border-radius: var(--radius-lg);
}
.roomTools { display: flex; gap: var(--s-1); }
.stickyBlock { position: sticky; top: calc(var(--header-h) + var(--s-2)); }

/* ——— Responsive ——— */
@media (max-width: 1250px) {
  .catalogGrid { grid-template-columns: repeat(2, 1fr); }
  .bmwConstructor { grid-template-columns: 1fr; }
  .bmwStage .canvas3dWrap { height: 520px; }
  .footerCols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .pricePanel { grid-template-columns: 1fr; }
  .footerInner { grid-template-columns: 1fr; gap: var(--s-6); }
}

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

  .header { height: 64px; padding: 0 var(--s-3); }
  .header.scrolled { height: 60px; }
  .brand { font-size: 18px; letter-spacing: 0.24em; }
  .headerBtn { display: none; }
  .burger { display: flex; }

  .header nav {
    display: none;
    position: absolute;
    top: calc(100% + var(--s-1));
    left: var(--s-2);
    right: var(--s-2);
    flex-direction: column;
    gap: var(--s-1);
    padding: var(--s-2);
    background: var(--surface-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
  }
  .header.navOpen nav { display: flex; }
  .header nav a {
    width: 100%;
    padding: var(--s-2);
    font-size: 15px;
  }
  .header nav a::after { display: none; }
  .header nav a:hover { background: var(--bg); }
  .navCta {
    display: flex !important;
    margin-top: var(--s-1);
    color: #fff !important;
    background: var(--dark);
    border-color: var(--dark);
  }

  .hero {
    padding: calc(var(--header-h) + var(--s-6)) var(--s-3) var(--s-6);
    min-height: 100vh;
  }
  .hero h1 { font-size: clamp(40px, 10vw, 52px); }
  .hero p { font-size: 15px; }
  .heroActions { flex-direction: column; }
  .btn { width: 100%; }

  .section, .plannerSection { padding: var(--s-10) var(--s-3); }
  .intro, .sectionHead { grid-template-columns: 1fr; gap: var(--s-4); }
  .section h2, .plannerTitle h2 { font-size: 32px; }
  .catalogGrid { grid-template-columns: 1fr; }
  .productCard img { height: 300px; }
  .productActions { grid-template-columns: 1fr; }
  .tab { flex: 1 1 45%; font-size: 11px; }
  .infoPanel { padding: var(--s-4); }
  .modelBar { padding: var(--s-3); }
  .bmwStage .canvas3dWrap { height: 420px; }
  .canvas3dWrap { height: 420px; }
  .twoInputs { grid-template-columns: 1fr 1fr; }
  .segmented { grid-template-columns: 1fr 1fr; }
  .segmented .seg:last-child { grid-column: 1 / -1; }
  .footerCols { grid-template-columns: 1fr; gap: var(--s-4); }
}

@media (max-width: 560px) {
  .modalCard { padding: var(--s-5) var(--s-3) var(--s-4); }
  .modalCard h3 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
