:root {
  --gold: #f0c93a;
  --gold2: #c9960a;
  --gold-glow: rgba(240, 201, 58, 0.18);
  --white: #ffffff;
  --ivory: rgba(245, 240, 230, 0.9);
  --muted: rgba(245, 240, 230, 0.72);
  --glb-ob-body-blue: #7ec8f0;
  --glb-ob-body-blue-deep: #5eb8e8;
  --glb-ob-title-gold-top: #fff2b8;
  --glb-ob-title-gold-mid: #d4af37;
  --glb-ob-title-gold-deep: #9a7220;
  --glb-ob-body-silver-top: #eef2f7;
  --glb-ob-body-silver-mid: #c5cdd6;
  --glb-ob-body-silver-deep: #95a3b0;
  --glb-ob-bg: #04040a;
  --glb-ob-gold: var(--gold);
  --glb-ob-gold-dim: rgba(240, 201, 58, 0.55);
  --glb-ob-text: var(--white);
  --glb-ob-f-serif: 'DM Serif Display', Georgia, 'Hiragino Mincho ProN', serif;
  --glb-ob-f-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --glb-ob-f-mono: 'DM Mono', monospace;
  --glb-ob-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --glb-ob-copy-dur: 900ms;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--glb-ob-bg);
  color: var(--white);
  font-family: var(--glb-ob-f-sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

body.glb-onboarding-v1 {
  overflow: hidden;
}

.glb-obv1 {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding: calc(8px + var(--safe-top)) 0 calc(10px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
}

.glb-obv1__track {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.glb-obv1__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--glb-ob-ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.glb-obv1__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.glb-obv1__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  will-change: transform;
}

.glb-obv1__slide.is-active .glb-obv1__bg {
  animation: glbObKenBurns 14s ease-out forwards;
}

@keyframes glbObKenBurns {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

.glb-obv1__bg--logo {
  background-image: url('assets/onboarding/ob-slide-01-earth.jpg');
  background-color: #04040a;
  background-position: center 58%;
  background-size: cover;
  filter: saturate(1.04) brightness(0.92);
  transform: scale(1);
}

.glb-obv1__slide.is-active .glb-obv1__bg--logo.earth {
  animation: earthDrift 60s linear infinite;
}

@keyframes earthDrift {
  0% {
    transform: scale(1) translateX(0);
  }
  50% {
    transform: scale(1.04) translateX(-10px);
  }
  100% {
    transform: scale(1) translateX(0);
  }
}

.glb-obv1__bg--connect {
  background-image: url('assets/onboarding/ob-slide-02-market.jpg');
  background-color: #2a1520;
  background-position: center 42%;
  filter: saturate(1.05) brightness(0.94);
}

.glb-obv1__bg--dictionary {
  background-image: url('assets/onboarding/ob-slide-03-map.jpg');
  background-color: #12343a;
  background-position: center 38%;
  filter: saturate(1.06) brightness(0.98);
}

.glb-obv1__bg--ai {
  background-image: url('assets/onboarding/ob-slide-04-airport-talk.jpg?v=20260613a');
  background-color: #1a2438;
  background-position: center 46%;
  filter: saturate(1.03) brightness(0.96);
}

.glb-obv1__bg--break {
  background-image: url('assets/onboarding/ob-slide-05-sunrise.jpg');
  background-color: #3a2810;
  background-position: center 52%;
  filter: saturate(1.08) brightness(1.02);
}

.glb-obv1__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.glb-obv1__scrim--logo {
  background: linear-gradient(180deg, rgba(4, 4, 10, 0.38) 0%, rgba(4, 4, 10, 0.1) 20%, transparent 46%, rgba(4, 4, 10, 0.36) 100%);
}

.glb-obv1__scrim--story {
  background: linear-gradient(180deg, rgba(4, 4, 10, 0.42) 0%, rgba(4, 4, 10, 0.22) 38%, rgba(4, 4, 10, 0.78) 100%);
}

.glb-obv1__scrim--story-2 {
  background: linear-gradient(90deg, rgba(4, 4, 10, 0.62) 0%, rgba(4, 4, 10, 0.28) 42%, rgba(4, 4, 10, 0.12) 72%, rgba(4, 4, 10, 0.35) 100%);
}

.glb-obv1__scrim--story-3 {
  background: linear-gradient(270deg, rgba(4, 4, 10, 0.62) 0%, rgba(4, 4, 10, 0.28) 42%, rgba(4, 4, 10, 0.12) 72%, rgba(4, 4, 10, 0.35) 100%);
}

.glb-obv1__scrim--story-4 {
  background: linear-gradient(180deg, rgba(4, 4, 10, 0.55) 0%, rgba(4, 4, 10, 0.18) 34%, rgba(4, 4, 10, 0.62) 100%);
}

.glb-obv1__scrim--story-5 {
  background: linear-gradient(180deg, rgba(4, 4, 10, 0.58) 0%, rgba(4, 4, 10, 0.14) 36%, rgba(4, 4, 10, 0.72) 100%);
}

.glb-obv1__content {
  position: relative;
  z-index: 3;
  margin-top: auto;
  padding: 0 1.5rem calc(1rem + var(--safe-bottom));
}

/* ── Page 1: Earth / Language ── */

.glb-obv1__content--hero {
  position: relative;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100%;
  padding: 0 1.5rem calc(1rem + var(--safe-bottom));
}

.glb-obv1__brand-block {
  position: absolute;
  top: calc(17% + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, 100%);
  margin: 0;
  text-align: center;
  padding: 0;
}

.glb-obv1__hero-bottom {
  width: 100%;
  max-width: 320px;
  margin: auto auto 0;
  text-align: center;
  padding-bottom: max(3vh, calc(4.5rem + var(--safe-bottom)));
}

.glb-obv1__hero-seq {
  opacity: 0;
}

.glb-obv1__slide.is-active .glb-obv1__hero-seq--glb {
  animation: glbObHeroGlb 1s ease-out 180ms forwards;
}

.glb-obv1__slide.is-active .glb-obv1__hero-seq--brand {
  animation: glbObCopyIn 900ms ease-out 420ms forwards;
}

.glb-obv1__slide.is-active .glb-obv1__hero-seq--lang {
  animation: glbObCopyIn 900ms ease-out 720ms forwards;
}

@keyframes glbObHeroGlb {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glbObCopyIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.glb-logo-main-wrap {
  position: relative;
  display: inline-block;
  overflow: hidden;
  margin: 0 0 0.55rem;
  filter:
    drop-shadow(0 2px 0 rgba(70, 42, 8, 0.45))
    drop-shadow(0 10px 28px rgba(212, 175, 55, 0.32));
}

.glb-logo-main {
  position: relative;
  display: inline-block;
  margin: 0;
  font-family: 'DM Serif Display', var(--glb-ob-f-serif);
  font-size: clamp(72px, 18vw, 110px);
  font-weight: 700;
  font-style: normal;
  line-height: 0.92;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff2b8 0%, #d4af37 42%, #8a5d18 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.glb-logo-main::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.75) 45%, transparent 70%);
  transform: translateX(-120%);
  animation: glbShine 4.8s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: soft-light;
}

@keyframes glbShine {
  0%,
  70% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

.glb-logo-sub {
  margin: 0;
  font-family: var(--glb-ob-f-sans);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  line-height: 1.55;
  color: #d8c18a;
  text-shadow: 0 0 14px rgba(212, 175, 55, 0.35);
}

.glb-obv1__field {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  text-align: left;
}

.glb-obv1__field-label {
  font-family: var(--glb-ob-f-sans);
  font-size: 0.58rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(240, 201, 58, 0.55);
}

.glb-obv1__field select {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 4px;
  border: 1px solid rgba(240, 201, 58, 0.4);
  background: rgba(0, 0, 0, 0.4);
  color: var(--white);
  font-family: var(--glb-ob-f-sans);
  font-size: 1rem;
  font-weight: 400;
  appearance: none;
  -webkit-appearance: none;
}

.glb-obv1__field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-glow);
}

/* ── Pages 2–5: Story copy (gold title / silver body, text only) ── */

.glb-obv1__content--story {
  position: relative;
  margin-top: 0;
  min-height: 100%;
  padding: 0 1.65rem calc(5.75rem + var(--safe-bottom));
}

.glb-obv1__story-title,
.glb-obv1__story-body {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.glb-obv1__title {
  margin: 0;
  font-family: var(--glb-ob-f-serif);
  font-size: clamp(2.55rem, 9.8vw, 4.35rem);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0.01em;
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: normal;
  color: #e8c85a;
  -webkit-text-fill-color: #e8c85a;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.glb-obv1__body {
  margin: 0;
  font-family: var(--glb-ob-f-sans);
  font-size: clamp(1.08rem, 3.9vw, 1.42rem);
  font-weight: 400;
  line-height: 1.68;
  letter-spacing: 0.03em;
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: normal;
  color: #c8d2dc;
  -webkit-text-fill-color: #c8d2dc;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* 2 — shopping / two people: title + body centered */
.glb-obv1__content--story-2 .glb-obv1__story-title {
  top: calc(13vh + var(--safe-top));
  left: 0;
  right: 0;
  width: auto;
  transform: none;
  text-align: center;
}

.glb-obv1__content--story-2 .glb-obv1__story-body {
  bottom: calc(11% + var(--safe-bottom));
  left: 0;
  right: 0;
  width: auto;
  transform: none;
  text-align: center;
}

.glb-obv1__content--story-2 .glb-obv1__body {
  font-size: clamp(1.12rem, 4.1vw, 1.48rem);
  line-height: 1.72;
}

/* 3 — mountain: title + body stacked right */
.glb-obv1__content--story-3 .glb-obv1__story-stack {
  left: auto;
  right: 1.65rem;
  align-items: flex-end;
}

.glb-obv1__content--story-3 .glb-obv1__story-title,
.glb-obv1__content--story-3 .glb-obv1__story-body {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
  width: auto;
  max-width: 16em;
  text-align: right;
}

.glb-obv1__content--story-3 .glb-obv1__title {
  font-size: clamp(2.35rem, 8.8vw, 3.85rem);
}

.glb-obv1__content--story-3 .glb-obv1__body {
  font-size: clamp(1.05rem, 3.7vw, 1.38rem);
}

/* English slide 3: keep copy off the subject's face — flush right */
html[lang="en"] .glb-obv1__content--story-3 .glb-obv1__story-stack {
  right: 0.55rem;
  left: auto;
  align-items: flex-end;
}

html[lang="en"] .glb-obv1__content--story-3 .glb-obv1__story-title,
html[lang="en"] .glb-obv1__content--story-3 .glb-obv1__story-body {
  max-width: min(52vw, 11.5rem);
  text-align: right;
}

/* 4 — airport: title top-left, body bottom center */
.glb-obv1__content--story-4 .glb-obv1__story-title {
  top: calc(13vh + var(--safe-top));
  left: 1.65rem;
  right: 1.65rem;
  width: auto;
  max-width: none;
  text-align: left;
}

.glb-obv1__content--story-4 .glb-obv1__title {
  font-size: clamp(2.05rem, 7.6vw, 3.35rem);
  max-width: 16em;
}

.glb-obv1__content--story-4 .glb-obv1__story-body {
  bottom: calc(11% + var(--safe-bottom));
  left: 0;
  right: 0;
  width: auto;
  transform: none;
  text-align: center;
}

.glb-obv1__content--story-4 .glb-obv1__body {
  font-size: clamp(1.1rem, 3.85vw, 1.44rem);
  line-height: 1.74;
}

/* 5 — sunrise: title + body stacked top-left */
.glb-obv1__content--story-5 {
  padding-top: 0;
}

.glb-obv1__story-stack {
  position: absolute;
  top: calc(13vh + var(--safe-top));
  left: 1.65rem;
  right: 1.65rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
  width: auto;
  max-width: none;
}

.glb-obv1__content--story-5 .glb-obv1__story-title,
.glb-obv1__content--story-5 .glb-obv1__story-body {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
  width: 100%;
  max-width: 16em;
  text-align: left;
}

.glb-obv1__content--story-5 .glb-obv1__title {
  font-size: clamp(2.55rem, 9.8vw, 4.35rem);
}

.glb-obv1__content--story-5 .glb-obv1__body {
  font-size: clamp(1.06rem, 3.75vw, 1.4rem);
  line-height: 1.72;
}

.glb-obv1__content--story-5 .glb-obv1__story-tagline {
  position: absolute;
  left: 1.65rem;
  bottom: calc(22% + var(--safe-bottom));
  max-width: 16em;
}

.glb-obv1__content--story-5 .glb-obv1__story-tagline .glb-obv1__body {
  margin: 0;
}

.glb-obv1__reveal {
  opacity: 1;
}

.glb-obv1__slide.is-active .glb-obv1__reveal--title,
.glb-obv1__slide.is-active .glb-obv1__reveal--body,
.glb-obv1__slide.is-active .glb-obv1__reveal--tagline {
  animation: none;
}

/* ── Footer / Navigation ── */

.glb-obv1__build {
  position: fixed;
  right: 8px;
  bottom: calc(2px + var(--safe-bottom));
  z-index: 20;
  margin: 0;
  font-family: var(--glb-ob-f-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(240, 201, 58, 0.45);
  pointer-events: none;
}

.glb-obv1__departure--foot {
  margin: 0.35rem 0 0;
  font-family: var(--glb-ob-f-sans);
  font-size: 0.46rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(240, 201, 58, 0.55);
  text-align: center;
}

.glb-obv1__foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 12px;
  padding: 0.6rem 1.25rem calc(0.65rem + var(--safe-bottom));
  pointer-events: none;
}

.glb-obv1__foot > * {
  pointer-events: auto;
}

.glb-obv1__foot-center {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.glb-obv1__btn--back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  background: none;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--glb-ob-f-sans);
  font-size: 0.75rem;
  font-weight: 300;
}

.glb-obv1__btn--back[hidden] {
  visibility: hidden;
  pointer-events: none;
}

.glb-obv1__back-chevron {
  font-size: 1.2rem;
  line-height: 1;
  opacity: 0.7;
}

.glb-obv1__dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.glb-obv1__dot {
  width: 18px;
  height: 1px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.25);
  transition: width 0.35s var(--glb-ob-ease), background 0.35s var(--glb-ob-ease);
}

.glb-obv1__dot.is-active {
  width: 28px;
  background: var(--gold);
}

.glb-obv1__btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: none;
}

.glb-obv1__btn--advance {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 8px 4px;
  color: var(--gold);
}

.glb-obv1__nav-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.glb-obv1__nav-line {
  display: block;
  width: 120px;
  height: 1px;
  background: var(--gold);
  transition: width 0.4s var(--glb-ob-ease), opacity 0.3s ease;
}

.glb-obv1__btn--advance:hover .glb-obv1__nav-line,
.glb-obv1__btn--advance:focus-visible .glb-obv1__nav-line {
  width: 148px;
}

.glb-obv1__nav-chevron {
  font-size: 24px;
  line-height: 1;
  font-weight: 300;
  color: var(--gold);
}

/* Page 5: line + › centered at bottom 8% */
.glb-obv1:has([data-slide="4"].is-active) .glb-obv1__foot {
  grid-template-columns: 1fr;
}

.glb-obv1:has([data-slide="4"].is-active) .glb-obv1__btn--advance {
  position: fixed;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  justify-self: center;
  z-index: 12;
}

.glb-obv1:has([data-slide="4"].is-active) .glb-obv1__btn--back {
  position: fixed;
  left: 1.25rem;
  bottom: calc(0.65rem + var(--safe-bottom));
  z-index: 12;
}

.glb-obv1:has([data-slide="4"].is-active) .glb-obv1__foot-center {
  position: fixed;
  left: 50%;
  bottom: calc(0.65rem + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 11;
}

@media (max-height: 720px) {
  .glb-obv1__title {
    font-size: clamp(2.2rem, 8.6vw, 3.55rem);
  }
  .glb-obv1__body {
    font-size: clamp(1rem, 3.5vw, 1.28rem);
  }
  .glb-obv1__content--story-2 .glb-obv1__story-title {
    top: calc(11vh + var(--safe-top));
  }

  .glb-obv1__content--story-2 .glb-obv1__story-body {
    bottom: calc(9% + var(--safe-bottom));
  }
  .glb-obv1__content--story-4 .glb-obv1__story-title {
    top: calc(11vh + var(--safe-top));
  }

  .glb-obv1__content--story-4 .glb-obv1__story-body {
    bottom: calc(9% + var(--safe-bottom));
  }

  .glb-obv1__content--story-5 .glb-obv1__story-tagline {
    bottom: calc(18% + var(--safe-bottom));
  }

  .glb-obv1__story-stack {
    top: calc(11vh + var(--safe-top));
    gap: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glb-obv1__slide,
  .glb-obv1__bg,
  .glb-logo-main::after,
  .glb-obv1__reveal,
  .glb-obv1__hero-seq,
  .glb-obv1__nav-line,
  .glb-obv1__dot {
    animation: none !important;
    transition: none !important;
  }

  .glb-obv1__slide.is-active .glb-obv1__reveal,
  .glb-obv1__slide.is-active .glb-obv1__hero-seq {
    opacity: 1;
  }

  .glb-obv1__slide.is-active .glb-obv1__hero-seq {
    transform: none;
  }

  .glb-obv1__bg {
    transform: scale(1.01);
    background-position: center 58%;
  }
}

html[dir='rtl'] .glb-obv1__foot {
  direction: rtl;
}
