/* ═══════════════════════════════════════════════════════════
   EBCO VEC — styles.css
   Brand: #1A1A2E (navy) | #C9A84C (gold)
═══════════════════════════════════════════════════════════ */

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0D0D1A;
  --navy:        #1A1A2E;
  --gold:        #C9A84C;
  --gold-dim:    rgba(201, 168, 76, 0.3);
  --gold-glow:   rgba(201, 168, 76, 0.15);
  --text-primary:#FFFFFF;
  --text-sec:    #A0A0B0;
  --card-bg:     rgba(255, 255, 255, 0.05);
  --card-border: 1px solid var(--gold-dim);
  --radius:      12px;
  --radius-sm:   8px;
  --transition:  0.3s ease;
  --navbar-h:    56px;
  --bar-h:       64px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
a      { color: var(--gold); text-decoration: none; }

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  background: linear-gradient(180deg, rgba(13,13,26,0.95) 0%, rgba(13,13,26,0) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 100;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.navbar__logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gold);
}

.navbar__logo-divider {
  width: 1px;
  height: 18px;
  background: var(--gold-dim);
}

.navbar__logo-sub {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-sec);
  text-transform: uppercase;
}

.navbar__help-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--card-bg);
  border: var(--card-border);
  color: var(--text-sec);
  display: flex; align-items: center; justify-content: center;
  transition: color var(--transition), border-color var(--transition);
}
.navbar__help-btn:hover { color: var(--gold); border-color: var(--gold); }

/* ── 3D Viewer ───────────────────────────────────────────── */
.viewer-wrap {
  position: fixed;
  inset: 0;
  top: var(--navbar-h);
  bottom: var(--bar-h);
}

model-viewer {
  width: 100%;
  height: 100%;
  background-color: var(--bg);
  --poster-color: var(--bg);
}

/* Progress bar inside model-viewer */
.model-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,0.1);
}
.model-progress__bar {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width 0.3s;
}

/* ── Fallback (shown when no GLB) ─────────────────────────── */
.viewer-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1A1A2E 0%, #0D0D1A 70%);
  z-index: 1;
  pointer-events: none;
}

.viewer-fallback__inner {
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 420px;
  pointer-events: auto;
}

.viewer-fallback__icon { font-size: 3rem; margin-bottom: 1rem; }

.viewer-fallback__inner h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.viewer-fallback__inner p {
  font-size: 0.85rem;
  color: var(--text-sec);
  line-height: 1.7;
}

.viewer-fallback__inner code {
  font-family: 'Courier New', monospace;
  background: rgba(201,168,76,0.12);
  color: var(--gold);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.8rem;
}

.viewer-fallback__demo-note {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.03em;
  font-weight: 500;
}

/* Demo hotspot area (shown in fallback) */
.demo-hotspot-area {
  position: relative;
  width: 280px;
  height: 140px;
  margin: 1.5rem auto 0;
  background: rgba(255,255,255,0.03);
  border: var(--card-border);
  border-radius: var(--radius);
  overflow: visible;
}

.hotspot--demo {
  position: absolute !important;
  top: auto !important;
  left: auto !important;
}

#demoHotspot1 { top: 40px !important; left: 60px !important; }
#demoHotspot2 { top: 70px !important; left: 180px !important; }

/* ── Hotspot Buttons ─────────────────────────────────────── */
.hotspot {
  position: relative;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--gold);
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform var(--transition);
  /* Override model-viewer default hotspot styles */
  --min-hotspot-opacity: 0;
}

.hotspot:hover { transform: scale(1.15); }
.hotspot:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Gold core dot */
.hotspot::after {
  content: '';
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold);
  position: absolute;
}

/* Pulsing ring animation */
.hotspot__pulse {
  position: absolute;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  animation: hotspot-pulse 2s ease-out infinite;
  pointer-events: none;
}

@keyframes hotspot-pulse {
  0%   { transform: scale(1);   opacity: 0.8; }
  70%  { transform: scale(2);   opacity: 0;   }
  100% { transform: scale(2);   opacity: 0;   }
}

/* Tooltip */
.hotspot__tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  border: var(--card-border);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
  transform: translateX(-50%) translateY(4px);
  backdrop-filter: blur(8px);
}

.hotspot:hover .hotspot__tooltip,
.hotspot:focus .hotspot__tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Tooltip arrow */
.hotspot__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%; transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--gold-dim);
}

/* ── Room Selector ───────────────────────────────────────── */
.room-selector {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bar-h);
  background: rgba(13,13,26,0.92);
  border-top: var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.5rem;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.room-selector__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-sec);
  transition: color var(--transition), background var(--transition);
  min-width: 44px; min-height: 44px;
  justify-content: center;
  text-transform: uppercase;
}

.room-selector__btn--active,
.room-selector__btn:hover {
  color: var(--gold);
  background: var(--gold-glow);
}

.room-selector__btn--active {
  position: relative;
}

.room-selector__btn--active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 2px;
  background: var(--gold);
  border-radius: 0 0 2px 2px;
}

.room-selector__icon { font-size: 1rem; }

/* ── Overlay ─────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Product Card ────────────────────────────────────────── */
.product-card {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 300;
  background: var(--navy);
  border: var(--card-border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Hidden state — controlled by GSAP */
  transform: translateY(100%);
  visibility: hidden;
}

.product-card__scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex: 1;
}

/* Close button */
.product-card__close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-sec);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: color var(--transition), background var(--transition);
}
.product-card__close:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.15);
}

/* Image block */
.product-card__image-wrap {
  position: relative;
  padding: 1.5rem 1.5rem 0;
}

.product-card__image-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(201,168,76,0.06) 100%);
  border: 1px dashed var(--gold-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card__image-label {
  font-size: 0.75rem;
  color: var(--text-sec);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-card__category {
  position: absolute;
  bottom: -12px; left: 2rem;
  background: var(--gold);
  color: var(--bg);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
}

/* Body content */
.product-card__body {
  padding: 1.75rem 1.5rem 2rem;
}

.product-card__name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

/* Feature list */
.product-card__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
}

.product-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-sec);
  line-height: 1.4;
}

.feature-check {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold-glow);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  margin-top: 1px;
}

/* Action buttons */
.product-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all var(--transition);
  min-height: 44px;
  width: 100%;
  cursor: pointer;
}

.btn--primary {
  background: var(--gold);
  color: #0D0D1A;
  border: 2px solid var(--gold);
}
.btn--primary:hover {
  background: #D4B060;
  border-color: #D4B060;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201,168,76,0.3);
}

.btn--ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
}
.btn--ghost:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
}

/* ── Desktop: card as side panel ─────────────────────────── */
@media (min-width: 768px) {
  .product-card {
    left: auto;
    right: 0;
    bottom: var(--bar-h);
    top: var(--navbar-h);
    width: 380px;
    max-height: none;
    border-radius: var(--radius) 0 0 var(--radius);
    border-right: none;
    border-bottom: var(--card-border);
    /* Hidden state for desktop (slide from right) */
    transform: translateX(100%);
  }

  .product-card__image-placeholder { height: 200px; }

  .product-card__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .btn { width: auto; flex: 1 1 auto; }
}

/* ── Intent Popup ────────────────────────────────────────── */
.intent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.intent-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

.intent-popup {
  background: var(--navy);
  border: var(--card-border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 0 1px var(--gold-dim);
  position: relative;
}

.intent-popup__brand {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.intent-popup__heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.intent-popup__sub {
  font-size: 0.85rem;
  color: var(--text-sec);
  margin-bottom: 1.75rem;
}

/* Intent option cards */
.intent-popup__options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.intent-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--radius-sm);
  text-align: left;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  cursor: pointer;
  min-height: 44px;
}

.intent-option:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
  transform: translateX(4px);
}

.intent-option:active { transform: translateX(2px) scale(0.99); }

.intent-option__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.intent-option__label {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  line-height: 1.2;
}

.intent-option__desc {
  font-size: 0.75rem;
  color: var(--text-sec);
  display: block;
  margin-top: 0.15rem;
}

.intent-option__text { display: flex; flex-direction: column; }

.intent-popup__skip {
  font-size: 0.8rem;
  color: var(--text-sec);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
  padding: 0.5rem;
  min-height: 44px;
}
.intent-popup__skip:hover { color: var(--text-primary); }

/* ── Scrollbar styling ───────────────────────────────────── */
.product-card__scroll::-webkit-scrollbar { width: 4px; }
.product-card__scroll::-webkit-scrollbar-track { background: transparent; }
.product-card__scroll::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
  border-radius: 2px;
}

/* ── Utility ─────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
