/* Incubator voyage-only homepage - dark cinematic, video traveler */

.inc-voyage {
  --voyage-p: 0;
  --voyage-vel: 0;
  position: relative;
  background: #050607;
  color: #f7f8f8;
  margin-top: calc(-1 * var(--fw-header-h, 4.5rem));
  min-height: 100svh;
}

/* Fixed stage behind content */
.inc-voyage__stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.inc-voyage__stage.is-active {
  opacity: 1;
}

.inc-voyage__webgl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.inc-voyage__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, transparent 20%, rgba(5, 6, 7, 0.55) 100%),
    linear-gradient(90deg, rgba(5, 6, 7, 0.75) 0%, transparent 42%, transparent 58%, rgba(5, 6, 7, 0.35) 100%);
  pointer-events: none;
}

.inc-voyage__progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  z-index: 8;
  background: linear-gradient(90deg, #8c2020, #e5e5e6 70%, #fff);
  will-change: width;
}

/* Video traveler - black-keyed canvas (no box, no soft halo) */
.inc-voyage__traveler {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  width: min(42vw, 17rem);
  aspect-ratio: 2 / 3;
  transform: translate3d(50vw, 68vh, 0) translate(-50%, -50%);
  will-change: transform;
  backface-visibility: hidden;
  background: transparent !important;
  overflow: visible;
  /* No filters/shadows - they create a rectangular halo */
  filter: none !important;
  box-shadow: none !important;
}

/* Hidden video sources (decoded frames only) */
.inc-voyage__video-src {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

/* True alpha plate after WebGL black-key - no shadows (shadows read as a “smudge”) */
.inc-voyage__char-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  background: transparent !important;
  filter: none !important;
  box-shadow: none !important;
}

/* Soft ground contact glow - landing only */
.inc-voyage__trail {
  position: absolute;
  top: 0;
  left: 0;
  width: 6rem;
  height: 1.75rem;
  transform-origin: center center;
  background: radial-gradient(ellipse at center, rgba(140, 32, 32, 0.22), transparent 72%);
  filter: blur(10px);
  opacity: 0;
  z-index: 3;
  border-radius: 50%;
  will-change: transform, opacity;
  pointer-events: none;
}

.inc-voyage__land-label {
  position: absolute;
  left: 50%;
  bottom: 16%;
  transform: translateX(-50%) translateY(10px);
  z-index: 6;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247, 248, 248, 0.72);
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.inc-voyage.is-arrived .inc-voyage__land-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.inc-voyage__cue {
  position: absolute;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247, 248, 248, 0.45);
  transition: opacity 0.35s ease;
}
.inc-voyage__cue.is-hidden {
  opacity: 0 !important;
}
.inc-voyage__cue-line {
  width: 1px;
  height: 2.4rem;
  background: linear-gradient(180deg, rgba(140, 32, 32, 0.95), transparent);
  animation: inc-cue 1.5s ease-in-out infinite;
}
@keyframes inc-cue {
  0%, 100% { transform: scaleY(0.55); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Flow panels */
.inc-voyage__flow {
  position: relative;
  z-index: 2;
  padding-top: var(--fw-header-h, 4.5rem);
}

.inc-voyage-panel {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 4vw, 2.5rem);
  box-sizing: border-box;
}

.inc-voyage-panel--right {
  justify-content: flex-end;
}

.inc-voyage-panel--wide {
  min-height: auto;
  padding-top: clamp(4rem, 10vw, 6rem);
  padding-bottom: clamp(4rem, 10vw, 6rem);
  align-items: flex-start;
}

.inc-voyage-panel--finale {
  justify-content: center;
  text-align: center;
  background: radial-gradient(ellipse 55% 40% at 50% 70%, rgba(140, 32, 32, 0.22), transparent 70%);
}

.inc-voyage-panel__card {
  width: min(100%, 38rem);
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  border-radius: 20px;
  /* iOS-style dark glass: dark but translucent so voyage motion shows through */
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.04) 38%,
      rgba(8, 9, 11, 0.28) 100%
    ),
    rgba(12, 13, 16, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(28px) saturate(1.45);
  -webkit-backdrop-filter: blur(28px) saturate(1.45);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 -1px 0 rgba(0, 0, 0, 0.2) inset,
    0 20px 56px rgba(0, 0, 0, 0.38);
  /* Keep layering cheap / correct under sticky stage */
  isolation: isolate;
  opacity: 0.78;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease;
}
.inc-voyage-panel.is-active .inc-voyage-panel__card {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  border-color: rgba(255, 255, 255, 0.22);
  border-top-color: rgba(255, 255, 255, 0.34);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 -1px 0 rgba(0, 0, 0, 0.18) inset,
    0 24px 64px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(180, 70, 62, 0.18);
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.05) 40%,
      rgba(8, 9, 11, 0.32) 100%
    ),
    rgba(12, 13, 16, 0.48);
}

/* Slightly denser glass on very small screens so type stays readable */
@media (max-width: 720px) {
  .inc-voyage-panel__card {
    background:
      linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.04) 40%,
        rgba(8, 9, 11, 0.38) 100%
      ),
      rgba(12, 13, 16, 0.52);
    backdrop-filter: blur(22px) saturate(1.35);
    -webkit-backdrop-filter: blur(22px) saturate(1.35);
  }
  .inc-voyage-panel.is-active .inc-voyage-panel__card {
    background:
      linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(255, 255, 255, 0.05) 40%,
        rgba(8, 9, 11, 0.4) 100%
      ),
      rgba(12, 13, 16, 0.55);
  }
}

.inc-voyage-panel__card--wide {
  width: min(100%, 52rem);
}

.inc-voyage-panel__card--center {
  margin-inline: auto;
  text-align: center;
}

.inc-voyage-panel--right .inc-voyage-panel__card {
  margin-left: auto;
}

.inc-voyage__fig {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(229, 229, 230, 0.65);
}

.inc-voyage__eyebrow {
  display: inline-block;
  color: #e07068;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.inc-voyage-panel h1,
.inc-voyage-panel h2 {
  font-family: var(--fw-font-display, "Cormorant Garamond", Georgia, serif);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 0.4rem 0 1.1rem;
  color: #fff;
}

.inc-voyage-panel h1 {
  font-size: clamp(2.35rem, 6vw, 4.25rem);
  max-width: 14ch;
}

.inc-voyage-panel h2 {
  font-size: clamp(1.75rem, 4vw, 2.85rem);
  max-width: 18ch;
}

.inc-voyage-panel__card--center h2 {
  margin-inline: auto;
}

.inc-voyage-panel__lead {
  margin: 0;
  font-size: clamp(1.02rem, 1.8vw, 1.15rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  max-width: 36rem;
}

.inc-voyage-panel__card--center .inc-voyage-panel__lead {
  margin-inline: auto;
}

.inc-voyage-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.inc-voyage-panel__actions--center {
  justify-content: center;
}

.inc-voyage-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  background: #e5e5e6 !important;
  color: #08090a !important;
  border: 1.5px solid #e5e5e6 !important;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}
.inc-voyage-btn:hover {
  background: #fff !important;
  transform: translateY(-1px);
}
.inc-voyage-btn--ghost {
  background: transparent !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}
.inc-voyage-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: #fff !important;
}

.inc-voyage-paths {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.inc-voyage-path {
  display: grid;
  grid-template-columns: 3.25rem 1fr auto;
  gap: 1rem;
  padding: 1.2rem 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background 0.2s ease, padding 0.2s ease;
}
.inc-voyage-path:hover {
  background: rgba(255, 255, 255, 0.05);
  padding-left: 0.75rem;
}
.inc-voyage-path__n {
  color: #e07068;
  font-weight: 700;
  font-size: 0.8125rem;
  padding-top: 0.2rem;
}
.inc-voyage-path h3 {
  margin: 0 0 0.3rem;
  font-family: var(--fw-font-sans, Manrope, system-ui, sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}
.inc-voyage-path p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.68);
}
.inc-voyage-path__go {
  color: rgba(255, 255, 255, 0.4);
  padding-top: 0.15rem;
}

.theme-incubator:has(.inc-voyage) main {
  background: transparent;
}

.theme-incubator:has(.inc-voyage) .theme-footer,
.theme-incubator:has(.inc-voyage) .inc-foot {
  position: relative;
  z-index: 2;
}

/*
 * Voyage homepage is always cinematic black. Light-mode tokens paint dark
 * nav ink + dark logo, which vanish on the stage. Keep light chrome here.
 */
html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) {
  color: rgba(242, 242, 242, 0.88);
  --inc-header-ink: rgba(242, 242, 242, 0.82);
  --inc-header-ink-strong: #ffffff;
  --inc-header-scrolled: rgba(10, 10, 11, 0.9);
  --inc-line: rgba(255, 255, 255, 0.12);
  --inc-btn-soft-border: rgba(242, 242, 242, 0.4);
  --inc-btn-soft-ink: #f2f2f2;
  --inc-btn-bg: #f2f2f2;
  --inc-btn-ink: #0a0a0b;
}

html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-site-nav > a,
html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-site-nav__trigger {
  color: rgba(242, 242, 242, 0.82) !important;
}

html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-site-nav > a.is-active,
html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-site-nav__trigger.is-active,
html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-site-nav a.is-active {
  color: #ffffff !important;
}

html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-header__logo-img--ink {
  display: none !important;
}

html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-header__logo-img--pale {
  display: block !important;
}

html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-header__toggle-icon span {
  background: #ffffff !important;
}

html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-color-mode {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-color-mode__btn {
  color: rgba(242, 242, 242, 0.55) !important;
}

html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-color-mode__btn.is-active,
html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-color-mode__btn[aria-pressed="true"],
html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-color-mode__btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-lang-switcher {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-btn--header:not(.fw-btn--platform) {
  border-color: rgba(242, 242, 242, 0.4) !important;
  color: #f2f2f2 !important;
}

/* Desktop dropdown still uses light surface + dark ink (readable) */
html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-site-nav__menu {
  background: #121214 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-site-nav__menu a {
  color: #f2f2f2 !important;
}

html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-site-nav__menu a:hover,
html[data-theme="light"] .theme-incubator:has(.inc-voyage) .fw-header:not(.is-menu-open) .fw-site-nav__menu a.is-active {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

@media (max-width: 800px) {
  .inc-voyage__traveler {
    width: min(48vw, 12rem);
  }
  .inc-voyage-path {
    grid-template-columns: 2.5rem 1fr;
  }
  .inc-voyage-path__go {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .inc-voyage__cue-line { animation: none; }
  .inc-voyage-panel__card {
    opacity: 1 !important;
    transform: none !important;
  }
}
