/* Hero redesign: centered pill nav + scroll-shrink video stage */

.film--redesign {
  --stage-w: 100vw;
  --stage-h: 100svh;
  --stage-r: 0px;

  position: relative !important;
  min-height: 100svh !important;
  padding-bottom: 0 !important;
  background: #050406 !important;
  overflow: visible !important;
  isolation: isolate !important;
}

/* Any premium-kinetic-headline injected by premium-elements.js */
.film--redesign .premium-kinetic-headline {
  display: none !important;
}

.film__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.film__stage {
  position: relative;
  width: var(--stage-w, 100vw);
  height: var(--stage-h, 100svh);
  max-width: 100vw;
  max-height: 100svh;
  border-radius: var(--stage-r, 0px);
  overflow: hidden;
  background: #050406;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.4s ease;
  will-change: width, height, border-radius;
}

.film__stage-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.9) contrast(1.06) brightness(0.78);
}

.film__stage-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 4, 6, 0.18) 0%, rgba(5, 4, 6, 0.32) 60%, rgba(5, 4, 6, 0.62) 100%);
  pointer-events: none;
}

/* Top nav — floating glass bar with edge margins (Palantir style) */
.top-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1200px;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 clamp(20px, 3vw, 32px);
  background: rgba(10, 12, 16, 0.52);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.36);
  font-family: var(--body-font);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.top-nav.is-scrolled {
  background: rgba(10, 12, 16, 0.82);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.52);
}

.top-nav__brand {
  display: inline-flex;
  align-items: center;
}

.top-nav__logo {
  display: block;
  width: clamp(110px, 11vw, 155px);
  height: auto;
  filter: invert(1) hue-rotate(180deg) saturate(6);
}

.top-nav__links {
  display: flex;
  align-items: center;
  gap: clamp(24px, 2.6vw, 40px);
}

.top-nav__links a {
  color: rgba(251, 250, 247, 0.55);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.top-nav__links a:hover {
  color: rgba(251, 250, 247, 0.95);
}

.top-nav__cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 20px;
  border-radius: 999px;
  background: #5cff1f;
  color: #070907 !important;
  font-weight: 700;
  letter-spacing: 0.14em;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 0 20px -4px rgba(92, 255, 31, 0.55);
}

.top-nav__cta:hover {
  transform: translateY(-1px);
  background: #74ff3d;
  box-shadow: 0 0 28px -4px rgba(92, 255, 31, 0.75);
}

/* Large centered hero tagline — Palantir style */
.film__hero-tagline {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.film__hero-tagline p {
  margin: 0;
  text-align: center;
  font-family: var(--body-font, sans-serif);
  font-size: clamp(2.2rem, 5vw, 5.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.025em;
  color: #fff;
  text-shadow:
    0 2px 40px rgba(0, 0, 0, 0.5),
    0 0 120px rgba(92, 255, 31, 0.08);
}

/* Caption that fades in once stage has shrunk */
.film__caption {
  position: absolute;
  left: 50%;
  bottom: clamp(40px, 8vh, 96px);
  transform: translate(-50%, var(--caption-y, 24px));
  z-index: 4;
  max-width: min(620px, calc(100vw - 48px));
  text-align: center;
  opacity: var(--caption-opacity, 0);
  color: rgba(251, 250, 247, 0.86);
  font-family: var(--body-font);
  font-size: clamp(0.92rem, 1.1vw, 1.05rem);
  line-height: 1.6;
  letter-spacing: 0.01em;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.film__caption p {
  margin: 0;
}

/* Reduced motion: skip the shrink, just show full bleed */
@media (prefers-reduced-motion: reduce) {
  .film--redesign {
    min-height: 100svh;
  }
  .film__stage {
    width: 100vw;
    height: 100svh;
    border-radius: 0;
  }
  .film__caption {
    display: none;
  }
}

/* Mobile nav */
@media (max-width: 680px) {
  .top-nav {
    top: 12px;
    width: calc(100% - 28px);
    padding: 0 16px;
    height: 48px;
  }
  .top-nav__links {
    gap: 12px;
  }
  .top-nav__links a:not(.top-nav__cta) {
    display: none;
  }
  .film__hero-tagline p {
    font-size: clamp(1.4rem, 6.5vw, 2.2rem);
  }
}

/* ---------- Section 2: video mosaic ---------- */

.mosaic {
  --col-side: 0fr;
  --row-side: 0fr;
  --headline-a-op: 0;
  --headline-b-op: 0;
  --headline-a-y: 16px;
  --headline-b-y: 16px;

  position: relative;
  min-height: 280svh;
  background: #050406;
  overflow: visible;
}

.mosaic__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  width: 100%;
  overflow: hidden;
}

.mosaic__grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: var(--col-side, 0fr) 1fr var(--col-side, 0fr);
  grid-template-rows: var(--row-side, 0fr) 1fr var(--row-side, 0fr);
  gap: 4px;
  background: #050406;
}

.m-tile {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  background: #050406;
  filter: saturate(0.85) contrast(1.06) brightness(0.7);
}

.m-tile--tl { grid-column: 1; grid-row: 1; }
.m-tile--tc { grid-column: 2; grid-row: 1; }
.m-tile--tr { grid-column: 3; grid-row: 1; }
.m-tile--ml { grid-column: 1; grid-row: 2; }
.m-tile--mc { grid-column: 2; grid-row: 2; }
.m-tile--mr { grid-column: 3; grid-row: 2; }
.m-tile--bl { grid-column: 1; grid-row: 3; }
.m-tile--bc { grid-column: 2; grid-row: 3; }
.m-tile--br { grid-column: 3; grid-row: 3; }

.mosaic__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(5, 4, 6, 0) 30%, rgba(5, 4, 6, 0.55) 100%),
    linear-gradient(180deg, rgba(5, 4, 6, 0.25), rgba(5, 4, 6, 0.45));
}

.mosaic__text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 4;
  padding: 0 clamp(16px, 5vw, 64px);
}

.mosaic__headline {
  grid-area: 1 / 1;
  margin: 0;
  max-width: 16ch;
  color: var(--paper, #fbfaf7);
  font-family: var(--display-font);
  font-size: clamp(1.4rem, 3.2vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mosaic__headline--a {
  opacity: var(--headline-a-op, 0);
  transform: translateY(var(--headline-a-y, 16px));
}

.mosaic__headline--b {
  opacity: var(--headline-b-op, 0);
  transform: translateY(var(--headline-b-y, 16px));
}

@media (prefers-reduced-motion: reduce) {
  .mosaic {
    --col-side: 1fr;
    --row-side: 1fr;
    --headline-a-op: 1;
    --headline-a-y: 0;
    min-height: 100svh;
  }
}

/* Scroll hint */
.film__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
  animation: scroll-hint-pulse 2s ease-in-out infinite;
  z-index: 10;
}

.film__scroll-text {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--ui-font, sans-serif);
}

.film__scroll-arrow {
  width: 1.25rem;
  height: 1.25rem;
}

@keyframes scroll-hint-pulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 1;   transform: translateX(-50%) translateY(4px); }
}

/* ── Hero feature cards ── */
.hero-cards {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 38vh;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.06);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(20px, 3vh, 32px) clamp(20px, 2.5vw, 36px);
  background: rgba(8, 7, 10, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: none;
  cursor: pointer;
  text-align: left;
  color: #fbfaf7;
  overflow: hidden;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.5s ease, transform 0.5s ease, background 0.25s ease;
}

.hero-cards.is-visible .hero-card--1 { opacity: 1; transform: translateY(0); transition-delay: 0s; }
.hero-cards.is-visible .hero-card--2 { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.hero-cards.is-visible .hero-card--3 { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }

.hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(92,255,31,0.07) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.hero-card:hover::before { opacity: 1; }
.hero-card:hover { background: rgba(14, 13, 18, 0.9); }

.hero-card__num {
  display: block;
  font-family: var(--display-font, sans-serif);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #5cff1f;
  margin-bottom: clamp(10px, 2vh, 18px);
  text-transform: uppercase;
}

.hero-card__title {
  display: block;
  font-family: var(--display-font, sans-serif);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  text-transform: uppercase;
  color: #fbfaf7;
  margin-bottom: 8px;
}

.hero-card__sub {
  display: block;
  font-size: clamp(0.72rem, 0.9vw, 0.82rem);
  font-weight: 400;
  line-height: 1.5;
  color: rgba(251,250,247,0.5);
  max-width: 26ch;
}

.hero-card__arrow {
  position: absolute;
  top: clamp(20px, 3vh, 32px);
  right: clamp(20px, 2.5vw, 36px);
  font-size: 1.1rem;
  color: rgba(251,250,247,0.2);
  transition: color 0.25s ease, transform 0.25s ease;
}
.hero-card:hover .hero-card__arrow {
  color: #5cff1f;
  transform: translate(3px, -3px);
}

/* active-card accent line */
.hero-card--3 .hero-card__title { color: #5cff1f; }

@media (max-width: 680px) {
  .hero-cards {
    grid-template-columns: 1fr;
    height: auto;
  }
}

/* ── Journey / How It Works section ── */
.journey-section {
  background: #050406;
  padding: clamp(80px, 12vh, 140px) clamp(20px, 6vw, 120px);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.journey-section__header {
  max-width: 600px;
  margin-bottom: clamp(60px, 9vh, 100px);
}

.journey-section__kicker {
  font-family: var(--display-font, sans-serif);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #5cff1f;
  margin: 0 0 16px;
}

.journey-section__title {
  font-family: var(--display-font, sans-serif);
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fbfaf7;
  margin: 0;
  text-transform: uppercase;
}

/* Horizontal scroll track */
.journey-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 clamp(20px, 6vw, 120px) 32px;
  margin: 0 calc(-1 * clamp(20px, 6vw, 120px));
  scrollbar-width: none;
  cursor: grab;
}
.journey-track::-webkit-scrollbar { display: none; }
.journey-track:active { cursor: grabbing; }

/* Individual tile */
.jtile {
  position: relative;
  flex: 0 0 clamp(340px, 42vw, 560px);
  height: clamp(460px, 66vh, 680px);
  scroll-snap-align: start;
  border-radius: 14px;
  overflow: hidden;
  background: #111013 center/cover no-repeat;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 3.5vw, 40px);
  transition: border-color 0.25s ease;
  user-select: none;
}
.jtile:hover { border-color: rgba(92,255,31,0.25); }

/* Dark gradient overlay — sits above the future bg image */
.jtile__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5,4,6,0.18) 0%,
    rgba(5,4,6,0.55) 55%,
    rgba(5,4,6,0.88) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.jtile__num {
  position: absolute;
  top: clamp(20px, 2.5vw, 28px);
  left: clamp(28px, 3.5vw, 40px);
  font-family: var(--display-font, sans-serif);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #5cff1f;
  z-index: 2;
}

.jtile__body {
  position: relative;
  z-index: 2;
  height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.jtile__title {
  font-family: var(--display-font, sans-serif);
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #fbfaf7;
  margin: 0 0 12px;
  line-height: 1.1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jtile__desc {
  font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  line-height: 1.6;
  color: rgba(251,250,247,0.65);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Last tile green accent */
.jtile--cta { border-color: rgba(92,255,31,0.2); }
.jtile--cta .jtile__title { color: #5cff1f; }

/* Drag scroll JS hook */
@media (max-width: 680px) {
  .journey-section { padding-left: 0; padding-right: 0; }
  .journey-section__header { padding: 0 20px; }
}
