/* The ITS landing page: the A to W journey (spec 2026-10-20-landing-journey-design). */
@font-face {
  font-family: Figtree;
  src: url(./fonts/Figtree-Regular.ttf);
  font-weight: 400;
}
@font-face {
  font-family: Figtree;
  src: url(./fonts/Figtree-Medium.ttf);
  font-weight: 500;
}
@font-face {
  font-family: Figtree;
  src: url(./fonts/Figtree-SemiBold.ttf);
  font-weight: 600;
}
@font-face {
  font-family: Figtree;
  src: url(./fonts/Figtree-Bold.ttf);
  font-weight: 700;
}

:root {
  --bg: #f7f6f3;
  --navy: #262b5e;
  --ink: #222538;
  --body: #585854;
  --terracotta: #c86d51;
  --brass: #d9b468;
  --line: rgba(38, 43, 94, 0.12);
  --glass: rgba(247, 246, 243, 0.88);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Figtree, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* No CSS smooth scroll: it fights the hash start and the scroll-driven camera; keys glide in JS. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Branded Preloader (0 -> 100%) */
#loader {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.65s;
}
/* Shown only when the first models are slow (a cold, slow start), never as a gate on a fast one. */
#loader.show {
  opacity: 1;
  visibility: visible;
}
#loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-mark {
  width: 96px;
  height: 52px;
  filter: drop-shadow(0 10px 24px rgba(38, 43, 94, 0.14));
  animation: loaderPulse 2.2s ease-in-out infinite;
}
@keyframes loaderPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.03);
  }
}
.loader-pct {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.loader-track {
  width: min(260px, 72vw);
  height: 5px;
  border-radius: 999px;
  background: rgba(38, 43, 94, 0.1);
  overflow: hidden;
}
.loader-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--navy);
  transition: width 0.15s ease-out;
}
.loader-caption {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--body);
}

/* Live mode only: the one fixed canvas, the loader, Skip and Replay. The page without
   JavaScript, WebGL or motion is the stacked static page below. */
#hero-canvas,
html:not(.live) #loader,
#skip,
#replay {
  display: none;
}
html.live #hero-canvas {
  display: block;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}
html.live:not(.opened) #skip,
html.live #replay {
  display: inline-flex;
}

/* Top Navigation Bar */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px max(24px, calc((100vw - 1240px) / 2));
  pointer-events: none;
}
.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}
.nav-right {
  justify-self: end;
}
.nav-logo-slot {
  width: 84px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed rgba(38, 43, 94, 0.18);
  transition:
    border-color 0.5s ease,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}
.nav-logo-slot svg {
  width: 82px;
  height: 44px;
  opacity: 0;
  transform: translateY(14px) scale(0.78);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-logo-slot.settled {
  border-color: transparent;
}
.nav-logo-slot.settled svg {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.btn-ghost {
  appearance: none;
  font:
    600 14px Figtree,
    sans-serif;
  color: var(--navy);
  background: rgba(247, 246, 243, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(38, 43, 94, 0.2);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.15s ease;
}
.btn-ghost:hover {
  background: #ffffff;
  transform: translateY(-1px);
}
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  padding: 14px 28px;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(38, 43, 94, 0.2);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(38, 43, 94, 0.26);
}
.cta.small {
  font-size: 14px;
  padding: 9px 18px;
  box-shadow: none;
}

/* Carried I · T · S thread & "Intelligent Travel Sidekick" window */
#its-thread {
  position: fixed;
  top: 78px;
  left: max(24px, calc((100vw - 1240px) / 2));
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}
#its-thread.visible {
  opacity: 1;
  transform: translateY(0);
}
#its-thread.words-mode {
  left: 50%;
  top: 84px;
  transform: translateX(-50%);
  align-items: center;
}
.its-words-row {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(247, 246, 243, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(38, 43, 94, 0.14);
  box-shadow: 0 12px 32px rgba(38, 43, 94, 0.08);
}
.its-word-item {
  font-size: 15px;
  font-weight: 500;
  color: var(--body);
  opacity: 0.32;
  transition:
    opacity 0.4s ease,
    color 0.4s ease,
    transform 0.4s ease;
}
.its-word-item strong {
  font-weight: 700;
  color: var(--navy);
}
.its-word-item.active {
  opacity: 1;
  color: var(--ink);
}
#its-thread.words-mode .its-word-item {
  font-size: 20px;
}

/* Drifting Travel Words Watermark (XYZ:release) */
#drifting-words {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#drifting-words.visible {
  opacity: 1;
}
.drift-word {
  position: absolute;
  font-size: clamp(14px, 1.5vw, 20px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(38, 43, 94, 0.13);
  white-space: nowrap;
  animation: floatWord 14s ease-in-out infinite alternate;
}
@keyframes floatWord {
  0% {
    transform: translate3d(-10px, -6px, 0);
  }
  100% {
    transform: translate3d(12px, 8px, 0);
  }
}

html:not(.live) .nav-logo-slot {
  border-color: transparent;
}
html:not(.live) .nav-logo-slot svg {
  opacity: 1;
  transform: none;
}
html:not(.live) #its-thread,
html:not(.live) #drifting-words {
  display: none;
}

/* Sentence 1: the opening over A (live), the page's first line (static) */
.opening {
  margin: 0;
  padding: 120px 24px 24px;
  text-align: center;
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}
html.live .opening {
  position: fixed;
  top: 15vh;
  left: 0;
  right: 0;
  z-index: 12;
  padding: 0 24px;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
html.live.opened .opening {
  opacity: 0;
}

/* The scenes: stacked cards (static), or one screen each on the scroll track (live) */
.journey {
  position: relative;
  padding: 0 72px 64px 16px;
}
.scene {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0;
}
.still {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  background: #efede8;
}
.card h2 {
  margin: 18px 0 8px;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.card h2 .letter {
  color: var(--navy);
  margin-right: 4px;
}
.card .line {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--body);
}
.card .line + .line {
  color: var(--ink);
  font-weight: 600;
}
.card details {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--body);
}
.card summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
}
.card summary:focus-visible,
.rail a:focus-visible,
.btn-ghost:focus-visible,
.cta:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}
.finale {
  text-align: center;
}
.finale h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.finale-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

html.live {
  scroll-snap-type: y proximity;
}
html.live .journey {
  height: calc((var(--screens) + 1) * 100vh);
  padding: 0;
}
html.live .scene {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--snap) * var(--screens) * 100vh);
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0 72px 40px max(24px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: flex-end;
  scroll-snap-align: start;
  pointer-events: none;
}
html.live .still {
  display: none;
}
html.live .card {
  pointer-events: auto;
  width: min(400px, 100%);
  max-height: calc(100vh - 140px);
  overflow: auto;
  padding: 16px 22px 18px;
  border-radius: 24px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(38, 43, 94, 0.09);
  transition: opacity 0.4s ease;
}
html.live .card h2 {
  margin-top: 0;
}
html.live:not(.opened) .card {
  opacity: 0;
}
html.live .finale {
  align-items: flex-start;
  justify-content: center;
  padding-top: 84px;
}
html.live .finale .card {
  width: min(740px, 100%);
  background: radial-gradient(
    ellipse at center,
    rgba(247, 246, 243, 0.92) 0%,
    rgba(247, 246, 243, 0.68) 72%,
    rgba(247, 246, 243, 0) 100%
  );
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

/* The A to W rail: vertical on the right (desktop), a thin scrubber at the bottom (phone) */
.rail {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 22;
}
.rail ol {
  list-style: none;
  margin: 0;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 999px;
  background: rgba(247, 246, 243, 0.7);
  backdrop-filter: blur(10px);
}
.rail a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 22px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  border: 1.5px solid transparent;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}
.rail a.passed {
  background: var(--navy);
  color: var(--bg);
}
.rail a[aria-current] {
  background: var(--bg);
  color: var(--navy);
  border-color: var(--navy);
  transform: scale(1.22);
}
.rail-finale .rail-letter {
  color: var(--brass);
  font-size: 13px;
}
.rail-word {
  position: absolute;
  right: 34px;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  opacity: 0;
  transform: translateX(6px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  pointer-events: none;
}
.rail a:hover .rail-word,
.rail a:focus-visible .rail-word {
  opacity: 1;
  transform: none;
}

@media (max-width: 767px) {
  .nav {
    padding: 12px 16px;
  }
  .journey {
    padding: 0 16px 56px;
  }
  html.live .scene {
    padding: 0 16px 44px;
  }
  html.live .card {
    width: 100%;
    max-height: calc(100vh - 120px);
  }
  html.live .finale {
    padding-top: 66px;
  }
  .rail {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    padding: 0 12px 4px;
  }
  .rail ol {
    flex-direction: row;
    gap: 2px;
    padding: 0;
    background: none;
    backdrop-filter: none;
  }
  .rail li {
    flex: 1;
  }
  .rail a,
  .rail a.passed,
  .rail a[aria-current] {
    width: 100%;
    height: 24px;
    border: 0;
    border-radius: 0;
    background: none;
    transform: none;
  }
  .rail a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    height: 3px;
    border-radius: 2px;
    background: rgba(38, 43, 94, 0.16);
  }
  .rail a.passed::after {
    background: var(--navy);
  }
  .rail a[aria-current]::after {
    background: var(--brass);
    height: 7px;
    bottom: 6px;
  }
  .rail-letter {
    display: none;
  }
  .rail-word,
  .rail a:hover .rail-word,
  .rail a:focus-visible .rail-word {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* Chips: the founder's other words for the scene, as small pills */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  background: rgba(38, 43, 94, 0.05);
}

/* Visible focus everywhere */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

/* The finale: the h1, its line and sentence 2 */
.finale-line {
  margin: 0 0 8px;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.4;
  color: var(--body);
}
.spine {
  margin: 0 0 22px;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--navy);
}

/* After the reveal: trust, the call to action again, product proof, the footer */
.after {
  position: relative;
  z-index: 10;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.after-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 72px 24px 48px;
}
.after h2 {
  margin: 0 0 24px;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.02em;
  text-align: center;
}
.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.trust li {
  padding: 20px 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #ffffff;
}
.trust h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--navy);
}
.trust p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--body);
}
.after-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 48px 0 64px;
  text-align: center;
}
.after-cta p {
  margin: 0;
  font-size: 18px;
  color: var(--body);
}
.proof {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 24px;
}
.proof img {
  display: block;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(38, 43, 94, 0.14);
}
.proof-laptop {
  width: min(560px, 54%);
}
.proof-phone {
  width: min(190px, 20%);
}
.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--body);
}
.footer a {
  color: var(--navy);
}
.legal {
  display: flex;
  gap: 16px;
}
html.live.past .rail,
html.live.past #its-thread {
  visibility: hidden;
}

@media (max-width: 767px) {
  .trust {
    grid-template-columns: 1fr;
  }
  .proof {
    flex-wrap: wrap;
  }
  .proof-laptop {
    display: none; /* not fetched on a phone (a lazy image that is not displayed never loads) */
  }
  .proof-phone {
    width: calc(50% - 12px);
  }
  .after-inner {
    padding-bottom: 72px;
  }
}
