:root {
  color-scheme: dark;
}

html, body {
  margin: 0;
  padding: 0;
  background: #070505;
  height: 100%;
}

* { box-sizing: border-box; }

body {
  font-family: 'Jost', sans-serif;
  color: #EFE3D6;
}

a { color: #E0A855; text-decoration: none; }
a:hover { color: #f3d5a3; }

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.55); opacity: .25; }
}

@keyframes floatSpec {
  0% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(14px,-22px,0); }
  100% { transform: translate3d(0,0,0); }
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  background: #070505;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* background */
.bg { position: absolute; inset: 0; overflow: hidden; background: #070505; }
.bg-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  opacity: 0;
  transition: opacity 1500ms ease;
}
.bg-video.is-active { opacity: 1; }
.bg-gradient {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 22% 20%, rgba(201,85,47,.16) 0%, rgba(7,5,5,0) 60%),
    radial-gradient(55% 50% at 80% 75%, rgba(183,71,110,.14) 0%, rgba(7,5,5,0) 60%),
    linear-gradient(to bottom, rgba(7,5,5,.72) 0%, rgba(7,5,5,.34) 32%, rgba(7,5,5,.5) 70%, rgba(7,5,5,.88) 100%);
}
.bg-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(72% 62% at 50% 48%, rgba(7,5,5,0) 34%, rgba(7,5,5,.6) 100%);
}

.specks { position: absolute; inset: 0; pointer-events: none; opacity: .55; }
.speck {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,232,200,.5);
  filter: blur(1px);
  animation-name: floatSpec;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

/* header */
.topbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 44px 0;
}
.topbar-label {
  font-size: 11px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(239,227,214,.6);
}
.topbar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.brand-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 23px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: #F7EFE6;
  text-shadow: 0 2px 18px rgba(0,0,0,.7);
}
.brand-sub {
  font-size: 10px;
  letter-spacing: .36em;
  text-transform: uppercase;
  color: rgba(239,227,214,.5);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.fullscreen-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(224,168,85,.35);
  background: rgba(7,5,5,.35);
  backdrop-filter: blur(4px);
  color: #E8C083;
  cursor: pointer;
  transition: all 350ms ease;
}
.fullscreen-btn:hover {
  background: rgba(224,168,85,.18);
  border-color: rgba(224,168,85,.95);
}
.fs-icon { width: 16px; height: 16px; }
.fs-icon-collapse { display: none; }
.fullscreen-btn.is-active .fs-icon-expand { display: none; }
.fullscreen-btn.is-active .fs-icon-collapse { display: block; }

/* tabs */
.tabs {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: center;
  padding-top: 26px;
}
.tabs-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(224,168,85,.32);
  border-radius: 999px;
  background: rgba(7,5,5,.4);
  backdrop-filter: blur(6px);
}
.tab {
  border: none;
  cursor: pointer;
  padding: 9px 22px;
  border-radius: 999px;
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(239,227,214,.65);
  background: transparent;
  transition: all 500ms ease;
}
.tab.is-active#tabSafran { color: #1a0b08; background: #E8C083; }
.tab.is-active#tabCogu { color: #1a0b08; background: #F2CBD9; }

/* viewer */
.viewer {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(420px, 82dvh, 640px);
  padding: 12px 16px 0;
  container-type: size;
  container-name: viewer;
}

.ghost {
  position: absolute;
  left: 0; right: 0; top: 48%;
  transform: translateY(-50%);
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(90px, 16cqw, 200px);
  line-height: .8;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,240,225,.07);
  pointer-events: none;
  white-space: nowrap;
}

.nav-arrow {
  position: absolute;
  z-index: 6;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(7,5,5,.35);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(224,168,85,.45);
  color: #E8C083;
  font-size: 18px;
  font-family: 'Jost', sans-serif;
  transition: all 350ms ease;
}
.nav-arrow:hover {
  background: rgba(224,168,85,.18);
  border-color: rgba(224,168,85,.95);
}
.nav-arrow-prev { left: 6%; }
.nav-arrow-next { right: 6%; }

.panels {
  position: relative;
  width: min(1180px, 100%);
  height: clamp(400px, 78cqh, 600px);
}

.panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity 1300ms ease, transform 1600ms cubic-bezier(.22,.61,.36,1);
  opacity: 0;
  transform: scale(.96);
  pointer-events: none;
}
.panel.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.bottle-wrap {
  position: relative;
  width: clamp(230px, min(46cqw, 62cqh), 560px);
  height: clamp(262px, min(52cqw, 70cqh), 638px);
}

.bottle-glow {
  position: absolute;
  left: 50%; top: 52%;
  width: 120%; height: 120%;
  transform: translate(-50%, -52%);
  border-radius: 50%;
  filter: blur(18px);
}
.bottle-glow-a {
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,196,120,.42) 0%, rgba(201,85,47,.22) 40%, rgba(7,5,5,0) 72%);
}
.bottle-glow-b {
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,226,196,.4) 0%, rgba(183,71,110,.2) 40%, rgba(7,5,5,0) 72%);
}

.bottle-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.panel-a .bottle-img { filter: drop-shadow(0 34px 42px rgba(0,0,0,.65)) drop-shadow(0 0 26px rgba(255,170,110,.28)); }
.panel-b .bottle-img { filter: drop-shadow(0 34px 42px rgba(0,0,0,.6)) drop-shadow(0 0 26px rgba(255,225,205,.26)); }

.points { position: absolute; inset: 0; }

.point {
  position: absolute;
  width: 0; height: 0;
}
.point-dot {
  position: absolute;
  left: -13px; top: -13px;
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 500ms ease;
  opacity: 0;
}
.points.is-visible .point-dot { opacity: 1; }

/* touch devices don't reliably fire hover/mouseenter, so keep dots visible */
@media (hover: none), (pointer: coarse) {
  .point-dot { opacity: 1; }
}

.point-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: dotPulse 2800ms ease-in-out infinite;
}
.panel-a .point-ring { border: 1px solid rgba(232,192,131,.8); }
.panel-b .point-ring { border: 1px solid rgba(245,214,226,.75); }

.point-core {
  position: absolute;
  left: 9px; top: 9px;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.panel-a .point-core { background: #E8C083; box-shadow: 0 0 12px rgba(232,192,131,.9); }
.panel-b .point-core { background: #F2CBD9; box-shadow: 0 0 12px rgba(242,203,217,.9); }

.point-card {
  position: absolute;
  width: 238px;
  transform: translate(-50%,-50%);
  padding: 16px 18px;
  backdrop-filter: blur(10px);
  border-radius: 3px;
  pointer-events: none;
  transition: opacity 380ms ease;
  opacity: 0;
}
.panel-a .point-card { background: rgba(14,8,7,.88); border: 1px solid rgba(224,168,85,.34); }
.panel-b .point-card { background: rgba(12,8,12,.88); border: 1px solid rgba(245,214,226,.3); }
.point.is-active .point-card { opacity: 1; }
.point.is-active { z-index: 20; }

.point-card-label {
  font-size: 9px;
  letter-spacing: .3em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.panel-a .point-card-label { color: #E0A855; }
.panel-b .point-card-label { color: #EBA9C1; }

.point-card-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  line-height: 1.3;
}
.panel-a .point-card-value { color: #F5EAE0; }
.panel-b .point-card-value { color: #F7EDE4; }

.product-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-shadow: 0 2px 20px rgba(0,0,0,.7);
  text-align: center;
}
.product-brand {
  font-size: 10px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(239,227,214,.55);
}
.product-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #F7EFE6;
}
.product-name-b { color: #F9F1E9; }
.product-family {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 19px;
  letter-spacing: .08em;
}
.product-family-a { color: #E8C083; }
.product-family-b { color: #F2CBD9; }

/* footer */
.footbar {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 0 44px 34px;
}
.footbar-rule {
  width: min(680px, 80%);
  height: 1px;
  background: linear-gradient(to right, rgba(224,168,85,0), rgba(224,168,85,.4), rgba(224,168,85,0));
}
.footbar-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}
.counter {
  font-size: 11px;
  letter-spacing: .3em;
  color: rgba(239,227,214,.55);
}
.dots { display: flex; align-items: center; gap: 9px; }
.dot {
  border: none;
  padding: 0;
  cursor: pointer;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(239,227,214,.25);
  transition: background 400ms ease;
}
.dot.is-active.dot-a { background: #E8C083; }
.dot.is-active.dot-b { background: #F2CBD9; }
.hint {
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(239,227,214,.4);
}

/* responsive */
@media (max-width: 900px) {
  .topbar { padding: 20px 20px 0; }
  .brand-title { font-size: 18px; letter-spacing: .3em; }
  .viewer { padding: 12px 8px 0; }
  .nav-arrow { width: 42px; height: 42px; font-size: 16px; }
  .nav-arrow-prev { left: 2%; }
  .nav-arrow-next { right: 2%; }
  .point-card { width: min(56vw, 190px); padding: 12px 14px; }
  .footbar { padding: 0 20px 24px; }
  .hint { display: none; }
}

@media (max-width: 560px) {
  .topbar-label { display: none; }
  .topbar { padding: 16px 16px 0; }
  .brand-title { font-size: 15px; letter-spacing: .22em; }
  .brand-sub { font-size: 9px; letter-spacing: .28em; }
  .tabs { padding-top: 16px; }
  .tab { padding: 8px 14px; font-size: 9px; letter-spacing: .18em; }
  .ghost { font-size: clamp(56px, 22vw, 120px); }
  .nav-arrow { width: 36px; height: 36px; font-size: 14px; }
  .point-card { width: min(64vw, 200px); font-size: 90%; }
  .product-name { font-size: clamp(26px, 8vw, 40px); letter-spacing: .06em; }
  .product-family { font-size: 15px; }
  .footbar-controls { gap: 14px; }
}

@media (max-width: 380px) {
  .tabs-inner { gap: 3px; padding: 4px; }
  .tab { padding: 7px 10px; font-size: 8px; letter-spacing: .12em; }
  .nav-arrow-prev { left: 1%; }
  .nav-arrow-next { right: 1%; }
}

/* keep tooltip cards from overflowing the viewport on narrow screens */
@media (max-width: 640px) {
  .point-card {
    left: 0 !important;
    top: 30px !important;
    transform: translateX(-50%) !important;
  }
}

/* short / landscape viewports (e.g. phone in landscape) */
@media (max-height: 480px) {
  .topbar { padding: 12px 20px 0; }
  .tabs { padding-top: 10px; }
  .viewer { min-height: 0; padding: 8px 8px 0; }
  .panels { height: clamp(280px, 88cqh, 420px); }
  .bottle-wrap { width: clamp(160px, 36cqh, 320px); height: clamp(182px, 41cqh, 364px); }
  .footbar { padding: 0 20px 16px; gap: 10px; }
  .hint { display: none; }
}

/* container-query fallback for browsers without size containment support */
@supports not (container-type: size) {
  .viewer { min-height: clamp(420px, 82svh, 640px); }
  .ghost { font-size: clamp(90px, 16vw, 200px); }
  .panels { height: clamp(400px, 78svh, 600px); }
  .bottle-wrap {
    width: clamp(230px, min(46vw, 62svh), 560px);
    height: clamp(262px, min(52vw, 70svh), 638px);
  }
}
