/* ════════════════════════════════════════════════════════════════
   SCROLL PANELS — full-viewport sections that slide over the
   sticky hero via absolute positioning + increasing z-index.
   JS (initPanelReveal) drives background-color (0→1) and filter
   as each panel scrolls in, creating the blur + fill entrance.
════════════════════════════════════════════════════════════════ */
.scroll-panel {
  position: absolute;
  left: 0;
  right: 0;
  min-height: auto;
  /* NOTE: scroll-snap-align removed — it has no effect on
     position:absolute elements (they're out of normal flow).
     Snap targets are now .snap-marker divs in normal flow. */
}

/* Invisible, zero-height markers placed in normal document flow.
   Kept for layout positioning — JS snap handles the actual snapping. */
.snap-marker {
  display: block;
  height: 1px;
  pointer-events: none;
}

/* Features anchor — first panel, immediately below the hero */
#featuresAnchor {
  top: 100vh;
  z-index: 15;
}

/* Roadmap anchor — second panel, slides over features */
#roadmapAnchor {
  /* top is set dynamically by adjustHeroLayout() */
  z-index: 20;
}

/* Background layer inside each panel.
   backdrop-filter + background-color are driven by JS here only —
   content siblings sit above this at z-index:1, staying sharp. */
.panel-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* JS will set backdrop-filter and background-color on scroll */
}

/* ── Features section: follows theme toggle ──
   All carousel text/UI uses var(--text-*) theme vars directly.
   Only light mode needs softer image shadows. */

html[data-theme="light"] #featuresAnchor .carousel-image-frame {
  box-shadow: var(--shadow-image);
}

/* Roadmap section — dark treatment (flows into dark footer) */
#roadmapAnchor .eyebrow {
  color: var(--brand-gold);
}
#roadmapAnchor .eyebrow::before {
  background: var(--brand-gold);
  opacity: 0.55;
}
#roadmapAnchor .section-heading {
  color: var(--text-primary);
}
#roadmapAnchor .section-body {
  color: var(--text-secondary);
}
#roadmapAnchor .section-img-wrap {
  border-color: var(--border-default);
  box-shadow: var(--shadow-image);
}
#roadmapAnchor .section-img-wrap::after {
  background: linear-gradient(to top, rgba(9,9,11,0.45) 0%, transparent 60%);
}

/* Roadmap — light mode: softer shadows + matching gradient */
html[data-theme="light"] #roadmapAnchor .section-img-wrap {
  box-shadow: var(--shadow-image);
}
html[data-theme="light"] #roadmapAnchor .section-img-wrap::after {
  background: linear-gradient(to top, rgba(250,250,249,0.45) 0%, transparent 60%); /* stone-50 @ 45% */
}


/* ── Globe section ── */
#globeAnchor {
  z-index: 18; /* between features (15) and roadmap (20) */
}

.globe-section {
  position: relative;
  z-index: 1;
  min-height: auto;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px) 1fr;
  grid-template-rows: auto 1fr 1fr;
  padding: var(--space-14) 48px;
  gap: var(--space-8);
  align-items: center;
  max-width: 1300px;
  margin: 0 auto;
}

.globe-eyebrow {
  grid-column: 1 / -1;
  text-align: center;
  font-size: var(--body-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  margin-bottom: -12px;
  align-self: end;
}

.globe-eyebrow::before,
.globe-eyebrow::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--brand-gold);
  opacity: 0.45;
}

.globe-canvas-wrap {
  grid-column: 2;
  grid-row: 2 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#globeCanvas {
  width: 100%;
  max-width: 400px;
  min-width: 200px;
  min-height: 200px;
  aspect-ratio: 1 / 1;
  display: block;
}

/* Subtle gold glow behind the globe */
.globe-canvas-wrap::before {
  content: '';
  position: absolute;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,160,72,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.globe-text { max-width: 280px; }

.globe-text-nw { grid-column: 1; grid-row: 2; text-align: right; align-self: end; justify-self: end; }
.globe-text-ne { grid-column: 3; grid-row: 2; text-align: left; align-self: end; justify-self: start; }
.globe-text-sw { grid-column: 1; grid-row: 3; text-align: right; align-self: start; justify-self: end; }
.globe-text-se { grid-column: 3; grid-row: 3; text-align: left; align-self: start; justify-self: start; }

.globe-text-title {
  font-size: var(--heading-sm);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.globe-text-desc {
  font-size: var(--body-md);
  color: var(--text-secondary);
  line-height: 1.65;
}

@media (max-width: 900px) {
  .globe-section {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    text-align: center;
    padding: var(--space-18) var(--space-8);
    gap: var(--space-10);
  }
  .globe-eyebrow { grid-column: 1; margin-bottom: 0; }
  .globe-canvas-wrap { grid-column: 1; grid-row: 2; }
  .globe-text-nw, .globe-text-ne, .globe-text-sw, .globe-text-se {
    grid-column: 1;
    grid-row: auto;
    text-align: center;
    justify-self: center;
    align-self: auto;
  }
  .globe-text { max-width: 400px; }
  #globeCanvas { max-width: 300px; min-width: 180px; min-height: 180px; }
}


.features-section {
  position: relative;
  z-index: 1; /* above .panel-bg */
  padding: var(--space-10) 0 40px;
  width: 100%;
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.features-eyebrow {
  text-align: center;
  font-size: var(--body-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin-bottom: var(--space-15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
}

.features-eyebrow::before,
.features-eyebrow::after {
  content: '';
  display: block;
  width: 36px;
  height: 1px;
  background: var(--brand-gold);
  opacity: 0.45;
}

/* ── Carousel: faithful port of the original CSS ── */
.carousel-wrapper {
  width: 100%;
  max-width: 1200px;
  color: var(--text-primary);
  margin: 0 auto;
  padding: 0 2rem 2rem;
  font-family: var(--font-display);
  position: relative;
}

.carousel-bg-wash {
  pointer-events: none;
  z-index: 0;
  transition: background 1.2s ease;
  position: absolute;
  inset: 0;
}

.carousel-inner {
  z-index: 1;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  min-height: 520px;
  display: grid;
  position: relative;
}

.carousel-content { align-items: center; padding: 2rem 0; display: flex; }
.carousel-content-inner { max-width: 440px; }

.carousel-collection-num {
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  display: flex;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.carousel-collection-num.visible    { opacity: 1; transform: translateY(0); }
.carousel-collection-num.out        { opacity: 0; transform: translateY(-8px); }

.carousel-num-line {
  background-color: var(--text-muted);
  width: 2rem; height: 1px;
  display: block;
}

.carousel-num-text {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-caption);
  font-size: var(--body-xs);
  font-weight: 700;
}

.carousel-title {
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease 50ms, transform 0.5s ease 50ms;
}

.carousel-title.visible    { opacity: 1; transform: translateY(0); }
.carousel-title.out        { opacity: 0; transform: translateY(20px); }

.carousel-subtitle {
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  font-family: var(--font-caption);
  font-size: var(--body-xs);
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
}

.carousel-subtitle.visible { opacity: 1; transform: translateY(0); }
.carousel-subtitle.out     { opacity: 0; transform: translateY(12px); }

.carousel-description {
  color: var(--text-secondary);
  max-width: 380px;
  margin-bottom: 2.5rem;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.75;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease 0.15s, transform 0.5s ease 0.15s;
}

.carousel-description.visible { opacity: 1; transform: translateY(0); }
.carousel-description.out     { opacity: 0; transform: translateY(12px); }

.carousel-nav-arrows { gap: 0.75rem; display: flex; align-items: center; }

.carousel-arrow-btn {
  border: 1px solid var(--border-default);
  width: 48px; height: 48px;
  color: var(--text-primary);
  cursor: pointer;
  background: transparent;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  transition:
    background 0.35s var(--ease-smooth),
    color 0.35s var(--ease-smooth),
    border-color 0.35s var(--ease-smooth),
    transform 0.25s var(--ease-spring);
  display: flex;
}

.carousel-arrow-btn:hover  { background: var(--text-primary); color: var(--color-bg); border-color: var(--text-primary); transform: scale(1.06); }
.carousel-arrow-btn:active { transform: scale(0.94); }
.carousel-arrow-btn:focus-visible { outline: 2px solid var(--brand-gold); outline-offset: 2px; }

.carousel-image-container { justify-content: center; align-items: center; display: flex; position: relative; }

.carousel-image-frame {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  width: 100%;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.6s ease, transform 0.6s ease;
  box-shadow: var(--shadow-image);
}

.carousel-image-frame.visible    { opacity: 1; transform: scale(1); }
.carousel-image-frame.out        { opacity: 0; transform: scale(0.97); }

.carousel-image {
  object-fit: cover;
  width: 100%; height: 100%;
  transition: transform 8s ease-out;
  display: block;
  border-radius: var(--radius-lg);
}

.carousel-image-frame.visible .carousel-image { transform: scale(1.05); }
.carousel-image-frame.out     .carousel-image { transform: scale(1); }

.carousel-image-overlay { pointer-events: none; transition: background 1s ease; position: absolute; inset: 0; }


.carousel-progress-bar { z-index: 1; gap: 1rem; margin-top: 2.5rem; display: flex; position: relative; }

.carousel-progress-item {
  cursor: pointer;
  text-align: left;
  background: transparent;
  border: none;
  flex: 1 1 0%;
  padding: 0.75rem 0 0;
}

.carousel-progress-item:focus-visible { outline: 2px solid var(--brand-gold); outline-offset: 2px; border-radius: var(--radius-xs); }
.carousel-progress-item:active { opacity: 0.75; }

.carousel-progress-track {
  background-color: var(--border-default);
  border-radius: var(--radius-2xs);
  width: 100%; height: 1px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.carousel-progress-fill {
  background-color: var(--text-primary);
  border-radius: var(--radius-2xs);
  height: 100%;
  transition: width 50ms linear;
}

.carousel-progress-label {
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-caption);
  font-size: var(--body-xs);
  font-weight: 700;
  transition: color 0.4s ease;
}

.carousel-progress-item.active .carousel-progress-label,
.carousel-progress-item:hover  .carousel-progress-label { color: var(--text-primary); }

@media (max-width: 900px) {
  .carousel-inner { grid-template-columns: 1fr; gap: 2rem; min-height: auto; }
  .carousel-content { order: 2; padding: 0; }
  .carousel-content-inner { max-width: 100%; }
  .carousel-image-container { order: 1; }
  .carousel-image-frame { aspect-ratio: 4 / 3; max-height: 360px; }
  .carousel-title { font-size: clamp(2rem, 6vw, 2.75rem); }
  .carousel-description { max-width: 100%; }
}

@media (max-width: 600px) {
  .carousel-wrapper { padding: 0 1.25rem 1.25rem; }
  .carousel-progress-bar { gap: 0.5rem; margin-top: 1.5rem; }
  .carousel-progress-label { font-size: var(--body-xs); }
  .carousel-image-frame { aspect-ratio: 16 / 10; max-height: 260px; }
  .carousel-description { margin-bottom: 1.75rem; font-size: 1rem; }
  .carousel-arrow-btn { width: 42px; height: 42px; }
}


