:root {
  --font: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --night: #120b07;
  /* Where the center window sits on screen. scene.js keeps these in sync. */
  --win-x: 28vw;
  --win-y: 5vh;
  --win-w: 46vw;
  --win-h: 62vh;
  --win-cx: 50vw;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: #fff;
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- Scene ---------- */

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.is-ready .stage { opacity: 1; }

.world {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cabin {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}

/* The cabin photo, with passing shadows painted in by scene.js. */
.interior {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.glass {
  position: absolute;
  inset: 0;
}

.pane {
  position: absolute;
  border-radius: var(--r, 40px);
  overflow: hidden;
  background: rgba(170, 200, 225, 0.05);
  box-shadow: inset 0 0 calc(var(--r, 40px) * 0.8) rgba(14, 9, 5, 0.42);
}

.reflect {
  position: absolute;
  inset: 0 -12%;
  background: linear-gradient(112deg,
    transparent 16%, rgba(255, 255, 255, 0.10) 23%, rgba(255, 255, 255, 0.03) 31%, transparent 37%,
    transparent 61%, rgba(255, 255, 255, 0.06) 65%, transparent 71%);
  transform: translate3d(calc(var(--lx, 0) * -3%), 0, 0);
}

.grain {
  position: absolute;
  inset: -40%;
  opacity: 0.07;
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: grain 0.9s steps(5) infinite;
}

@keyframes grain {
  0% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-3%, 2%, 0); }
  40% { transform: translate3d(2%, -3%, 0); }
  60% { transform: translate3d(-2%, -1%, 0); }
  80% { transform: translate3d(3%, 3%, 0); }
}

/* ---------- Header ---------- */

.top {
  position: fixed;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(24, 16, 10, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.nav a {
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav a:hover { color: #fff; }

.nav a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.25em;
  border-radius: 0.8em;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-small {
  padding: 9px 16px;
  font-size: 13.5px;
  color: #fff;
  background: rgba(24, 16, 10, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.btn-light {
  color: #16110c;
  background: #fff;
  box-shadow: 0 8px 28px rgba(10, 20, 40, 0.18);
}

.btn-light:hover { box-shadow: 0 10px 34px rgba(10, 20, 40, 0.26); }

.btn-glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.38);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.btn-glass:hover { background: rgba(255, 255, 255, 0.22); }

/* ---------- Hero, inside the center window ---------- */

.hero {
  position: fixed;
  z-index: 2;
  left: var(--win-x);
  top: var(--win-y);
  width: var(--win-w);
  height: var(--win-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 6% 7%;
  text-align: center;
  /* 1em is 1% of the window's width, so the copy scales with the window. */
  font-size: calc(var(--win-w) / 100);
  pointer-events: none;
}

.hero > * { pointer-events: auto; }

.eyebrow {
  margin: 0 0 1.6em;
  font-size: max(12px, 1.55em);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 12px rgba(20, 40, 70, 0.35);
}

.hero h1 {
  margin: 0;
  font-size: max(34px, 8em);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-shadow: 0 0.04em 0.35em rgba(20, 40, 70, 0.3);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: max(10px, 1.3em);
  margin-top: max(20px, 3.4em);
}

.actions .btn { font-size: max(13px, 1.6em); }

.proof {
  margin: max(14px, 2.3em) 0 0;
  font-size: max(11px, 1.3em);
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 10px rgba(20, 40, 70, 0.35);
}

.proof b { color: #fff; font-weight: 600; }

.blurb {
  position: fixed;
  z-index: 2;
  left: var(--win-cx);
  bottom: max(22px, 4.2vh);
  transform: translateX(-50%);
  width: min(470px, 84vw);
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- Entrance ---------- */

.top, .hero > *, .blurb {
  opacity: 0;
  transition: opacity 1s ease, translate 1s cubic-bezier(0.2, 0.7, 0.2, 1);
  translate: 0 14px;
}

.is-ready .top, .is-ready .hero > *, .is-ready .blurb { opacity: 1; translate: 0 0; }
.is-ready .top { transition-delay: 0.5s; }
.is-ready .eyebrow { transition-delay: 0.7s; }
.is-ready .hero h1 { transition-delay: 0.82s; }
.is-ready .actions { transition-delay: 0.96s; }
.is-ready .proof { transition-delay: 1.08s; }
.is-ready .blurb { transition-delay: 1.2s; }

@media (max-width: 760px) {
  .nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .top, .hero > *, .blurb { translate: none; }
}
