html, body { background: #000; color: #f4f0e8; }
body { font-family: 'Inter Tight', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }

/* Scroll stage: 300vh, three full-viewport scroll ranges */
.stage { height: 300vh; position: relative; }
.sticky-viewport {
  position: sticky; top: 0;
  height: 100vh; width: 100%;
  overflow: hidden;
}

.bg-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}

.vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.55) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.15), transparent 25%, transparent 75%, rgba(0,0,0,0.25));
}

/* Scenes: opacity is driven by JS, not a single .active class.
   This lets us crossfade smoothly across the continuous scrub. */
.scene {
  position: absolute; inset: 0; z-index: 2;
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.scene.pointer-on { pointer-events: auto; }

.eyebrow {
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 400;
  color: #c9a15a;
}
.hero-display {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.015em;
}
.hero-italic { font-style: italic; font-weight: 300; }
.rule { display: inline-block; width: 2.5rem; height: 1px; background: #c9a15a; vertical-align: middle; }

.chrome {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  padding: 1.75rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: auto;
}
.wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400; font-size: 1.35rem; letter-spacing: 0.02em;
}
.wordmark em { font-style: italic; color: #c9a15a; font-weight: 300; }

.progress-track {
  position: fixed; left: 0; right: 0; bottom: 0; height: 1px;
  background: rgba(244,240,232,0.12); z-index: 100;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(to right, #c9a15a, #f4f0e8);
}

/* Loader for first paint while the video buffers */
.loader {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: #000;
  transition: opacity 600ms ease;
}
.loader.hidden { opacity: 0; pointer-events: none; }
.loader-bar {
  width: 120px; height: 1px; background: rgba(244,240,232,0.15);
  position: relative; overflow: hidden;
}
.loader-bar::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, transparent, #c9a15a, transparent);
  animation: slide 1.4s ease-in-out infinite;
}
@keyframes slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes scrollBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.mobile-overlay {
  display: none;
  position: absolute; inset: 0; z-index: 1;
  background: rgba(0,0,0,0.5);
  pointer-events: none;
  transition: opacity 200ms ease;
}
@media (max-width: 767px) {
  .chrome { padding: 1.25rem 1.25rem; }
  .mobile-overlay { display: block; }
  .bg-video { object-position: calc(50% + 10px) 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .scene { transition: none !important; }
}

/* ── LED INDICATOR SECTION ───────────────────────────────── */
@keyframes ledBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}
.led-blink { animation: ledBlink 1.5s ease-in-out infinite; }

.led-panel {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
}
.led-nav-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(244,240,232,0.25);
  border: none; cursor: pointer; padding: 0;
  transition: background 300ms ease, transform 300ms ease, box-shadow 300ms ease;
}
.led-desc { transition: none; }

/* LED section — fades in as bottom layer when video fades out */
#ledWrapper { opacity: 0; will-change: opacity; }

/* Feature card body text */
.feat-body { color: rgba(244,240,232,0.7); line-height: 1.75; font-size: 1.1rem; }

/* LED circle layers */
.led-circle-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 300px; height: 300px;
}
.led-circle-haze {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
}
.led-circle-mid {
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
}
.led-circle-core { width: 72px; height: 72px; border-radius: 50%; }

/* Per-color circle styles */
.led-white .led-circle-haze { background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 65%); }
.led-white .led-circle-mid  { background: radial-gradient(circle, rgba(255,255,255,0.22) 0%, transparent 70%); }
.led-white .led-circle-core { background: #fff; box-shadow: 0 0 0 6px rgba(255,255,255,0.15), 0 0 30px 10px rgba(255,255,255,0.8), 0 0 80px 30px rgba(255,255,255,0.4), 0 0 160px 60px rgba(255,255,255,0.12); }

.led-red .led-circle-haze { background: radial-gradient(circle, rgba(229,57,53,0.08) 0%, transparent 65%); }
.led-red .led-circle-mid  { background: radial-gradient(circle, rgba(229,57,53,0.28) 0%, transparent 70%); }
.led-red .led-circle-core { background: #e53935; box-shadow: 0 0 0 6px rgba(229,57,53,0.2), 0 0 30px 10px rgba(229,57,53,0.8), 0 0 80px 30px rgba(229,57,53,0.4), 0 0 160px 60px rgba(229,57,53,0.12); }

.led-green .led-circle-haze { background: radial-gradient(circle, rgba(67,160,71,0.08) 0%, transparent 65%); }
.led-green .led-circle-mid  { background: radial-gradient(circle, rgba(67,160,71,0.28) 0%, transparent 70%); }
.led-green .led-circle-core { background: #43a047; box-shadow: 0 0 0 6px rgba(67,160,71,0.2), 0 0 30px 10px rgba(67,160,71,0.8), 0 0 80px 30px rgba(67,160,71,0.4), 0 0 160px 60px rgba(67,160,71,0.12); }

.led-purple .led-circle-haze { background: radial-gradient(circle, rgba(156,39,176,0.08) 0%, transparent 65%); }
.led-purple .led-circle-mid  { background: radial-gradient(circle, rgba(156,39,176,0.28) 0%, transparent 70%); }
.led-purple .led-circle-core { background: #9c27b0; box-shadow: 0 0 0 6px rgba(156,39,176,0.2), 0 0 30px 10px rgba(156,39,176,0.8), 0 0 80px 30px rgba(156,39,176,0.4), 0 0 160px 60px rgba(156,39,176,0.12); }

/* Color dots used in step descriptions */
.led-dot-white  { background: #fff;    box-shadow: 0 0 10px 3px rgba(255,255,255,0.6); }
.led-dot-red    { background: #e53935; box-shadow: 0 0 10px 3px rgba(229,57,53,0.6);   }
.led-dot-green  { background: #43a047; box-shadow: 0 0 10px 3px rgba(67,160,71,0.6);   }
.led-dot-purple { background: #9c27b0; box-shadow: 0 0 10px 3px rgba(156,39,176,0.6);  }

/* ── WINE FINDER CROSS ─────────────────────────────────────── */
.wine-cross {
  display: grid;
  grid-template-columns: repeat(5, 44px);
  grid-template-rows: repeat(5, 44px);
  gap: 14px;
  align-items: center;
  justify-items: center;
}
.cross-slot { display: flex; align-items: center; justify-content: center; }
.cross-slot.empty { visibility: hidden; pointer-events: none; }

.bottle-dot-white {
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.08),
              0 0 10px 3px rgba(255,255,255,0.5),
              0 0 26px 8px rgba(255,255,255,0.14);
  opacity: 0.55;
}
.bottle-dot-green {
  width: 38px; height: 38px; border-radius: 50%;
  background: #43a047;
  box-shadow: 0 0 0 5px rgba(67,160,71,0.18),
              0 0 18px 5px rgba(67,160,71,0.9),
              0 0 50px 18px rgba(67,160,71,0.45),
              0 0 100px 35px rgba(67,160,71,0.18);
}
@keyframes greenGlowPulse {
  0%, 100% {
    box-shadow: 0 0 0 5px rgba(67,160,71,0.18), 0 0 18px 5px rgba(67,160,71,0.9),
                0 0 50px 18px rgba(67,160,71,0.45), 0 0 100px 35px rgba(67,160,71,0.18);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(67,160,71,0.28), 0 0 30px 10px rgba(67,160,71,1.0),
                0 0 80px 28px rgba(67,160,71,0.65), 0 0 160px 55px rgba(67,160,71,0.28);
    transform: scale(1.15);
  }
}
.green-glow-pulse { animation: greenGlowPulse 2.2s ease-in-out infinite; }

/* ── SENSOR PANEL ──────────────────────────────────────────── */
.sensor-panel {
  width: 390px;
  border: 1px solid rgba(244,240,232,0.1);
  background: rgba(244,240,232,0.02);
}
.sensor-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(244,240,232,0.1);
}
.sensor-metric { padding: 1.5rem 1.75rem; }
.sensor-metric:first-child { border-right: 1px solid rgba(244,240,232,0.1); }
.sensor-metric-label {
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.62rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: rgba(244,240,232,0.4);
}
.sensor-metric-value {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300; font-size: 3.2rem;
  line-height: 1; color: #f4f0e8; letter-spacing: -0.02em;
}
.sensor-metric-value sup {
  font-size: 1.4rem; vertical-align: top; margin-top: 0.3rem; display: inline-block;
}
.sensor-metric-unit {
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.6rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(244,240,232,0.28);
  margin-top: 0.4rem;
}
.sensor-graph-wrap { padding: 1.25rem 1.75rem 1.25rem; }
.sensor-graph-legend {
  display: flex; gap: 1.5rem; margin-top: 0.65rem;
}
.legend-item {
  display: flex; align-items: center; gap: 0.45rem;
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.58rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(244,240,232,0.38);
}
.legend-line { width: 18px; height: 1px; }

/* ── FORM MODAL ──────────────────────────────────────────────── */
.form-modal {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  padding: 1.5rem;
  transition: opacity 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.form-success {
  transition: opacity 400ms ease;
  text-align: center;
  padding: 2rem 0;
}
#successCheck circle  { transition: stroke-dashoffset 600ms cubic-bezier(0.22, 0.61, 0.36, 1); }
#successCheck polyline { transition: stroke-dashoffset 400ms cubic-bezier(0.22, 0.61, 0.36, 1) 500ms; }

/* ── VIDEO MODAL ─────────────────────────────────────────────── */
.video-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.88);
  align-items: center; justify-content: center;
}
.video-modal-inner { position: relative; width: min(900px,92vw); aspect-ratio: 16/9; }
.video-modal-iframe { width: 100%; height: 100%; display: block; }
.video-modal-close {
  position: absolute; top: -2.5rem; right: 0;
  background: none; border: none; color: #fff;
  font-size: 1.4rem; cursor: pointer;
  font-family: 'Inter Tight', sans-serif;
}

/* ── FORM INPUTS ─────────────────────────────────────────────── */
.form-label { display:block; font-family:'Inter Tight',sans-serif; font-size:0.65rem; letter-spacing:0.22em; text-transform:uppercase; color:#f4f0e8; margin-bottom:0.45rem; }
.form-input { display:block; width:100%; box-sizing:border-box; background:rgba(244,240,232,0.04); border:1px solid rgba(244,240,232,0.12); color:#f4f0e8; font-family:'Inter Tight',sans-serif; font-size:0.9rem; padding:0.7rem 0.85rem; outline:none; transition:border-color 200ms ease; }
.form-input:focus { border-color:rgba(201,161,90,0.6); }
.form-input::placeholder { color:rgba(244,240,232,0.18); }
.form-input:disabled, .form-input[disabled] { opacity:0.4; cursor:not-allowed; }
.form-input.field-invalid { border-color: rgba(239,68,68,0.75); }
.field-error-msg { display:block; font-family:'Inter Tight',sans-serif; font-size:0.6rem; letter-spacing:0.08em; color:#f87171; margin-top:0.3rem; }
@keyframes formSpin { to { transform: rotate(360deg); } }
.submit-spinner { width: 16px; height: 16px; animation: formSpin 0.8s linear infinite; }
@media (max-width: 767px) {
  #formModal { align-items: flex-start !important; overflow-y: auto !important; padding: 1rem !important; }
  #formModalInner { padding: 2.5rem 1.25rem 1.5rem !important; }
}
