:root {
  --void: #0b141a;
  --deep: #12202a;
  --navy: #1a3140;
  --steel: #3e5c68;
  --sage: #6d8f80;
  --moss: #4f6f62;
  --mist: #a8bdb4;
  --foam: #d7e3dd;
  --paper: #f4f8f6;
  --glow: #edfff6;
  --beam: #8fa39c;
  --pane: #d7fff0;
  --shadow: rgba(6, 12, 16, 0.55);
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--void);
  color: var(--paper);
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}

html {
  scroll-behavior: auto;
}

html.booting {
  overflow: hidden;
}

html.booting body {
  opacity: 0;
}

html.ready body {
  opacity: 1;
  transition: opacity 0.9s ease;
}

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button,
a {
  font-family: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.world {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 100%, #1b3340 0%, var(--void) 58%);
}

.layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: opacity, transform;
  transform-origin: 50% 85%;
}

#origins .copy {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.layer svg {
  width: 100%;
  height: 100%;
  display: block;
}

.layer .hotspot {
  cursor: pointer;
  outline: none;
}

.layer .hotspot .hit {
  fill: transparent;
}

.layer .hotspot .pane {
  fill: var(--pane);
  filter: drop-shadow(0 0 6px rgba(215, 255, 240, 0.8));
  animation: pane-breathe 3.6s ease-in-out infinite;
}

.layer .hotspot .label {
  fill: var(--paper);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.layer .hotspot:hover .label,
.layer .hotspot:focus-visible .label {
  opacity: 1;
}

.layer .hotspot:hover .house-body,
.layer .hotspot:focus-visible .house-body {
  filter: drop-shadow(0 0 14px rgba(237, 255, 246, 0.4));
}

.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 48%, rgba(8, 14, 18, 0.42) 100%),
    linear-gradient(180deg, rgba(8, 14, 18, 0.2), transparent 18%, transparent 82%, rgba(8, 14, 18, 0.28));
  pointer-events: none;
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.mast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 1.5rem;
  pointer-events: none;
}

.mast a {
  pointer-events: auto;
  color: var(--paper);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.mast a:hover,
.mast a:focus-visible {
  color: var(--glow);
}

.altimeter {
  position: fixed;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.85rem;
}

.altimeter button {
  pointer-events: auto;
  appearance: none;
  border: 0;
  background: none;
  color: var(--mist);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  padding: 0;
}

.altimeter button .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--mist);
  background: transparent;
}

.altimeter button.is-active {
  color: var(--paper);
}

.altimeter button.is-active .dot {
  background: var(--glow);
  border-color: var(--glow);
  box-shadow: 0 0 10px rgba(237, 255, 246, 0.7);
}

.journey {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.layer[data-scene="origins"] {
  opacity: 1;
}

.panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 10vw 6rem;
  padding-right: max(10vw, 9rem);
  position: relative;
  pointer-events: none;
}

.panel .copy,
.panel .steel,
.panel .contacts {
  pointer-events: auto;
}

.panel.spacer {
  min-height: 100vh;
  padding: 0;
  pointer-events: none;
}

#road.panel.spacer {
  min-height: 180vh;
}

.copy {
  width: min(640px, 100%);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  text-shadow: 0 10px 30px var(--shadow);
}

.copy.is-in {
  opacity: 1;
  transform: none;
}

.kicker {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--mist);
  font-weight: 500;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 420;
  line-height: 1.12;
  margin: 0 0 1.1rem;
  color: var(--paper);
}

h1 {
  font-size: clamp(2.4rem, 6vw, 5.4rem);
}

h2 {
  font-size: clamp(2rem, 4.6vw, 4.1rem);
}

.lede,
.panel p {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(244, 248, 246, 0.88);
}

.lede em,
.panel p em {
  font-style: normal;
  color: var(--glow);
  font-weight: 500;
}

#origins .copy {
  align-self: flex-start;
  margin-top: 2vh;
}

#moving-out .copy {
  margin-right: auto;
}

#launch .copy {
  text-align: center;
  margin-inline: auto;
  margin-top: 22vh;
}

.contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 1.4rem;
  margin-top: 2rem;
}

.contacts a {
  color: var(--foam);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
}

.contacts a:hover,
.contacts a:focus-visible {
  color: var(--glow);
  border-bottom-color: var(--glow);
}

.foundations-stage {
  width: min(860px, 100%);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
}

#foundations {
  justify-content: center;
}

.foundations-stage .copy {
  width: 100%;
  text-align: center;
  margin-bottom: 1rem;
}

#foundations h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
}

.steel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  margin-top: 7.5rem;
  min-width: 0;
  background:
    linear-gradient(180deg, #9aafa8 0%, #73868a 48%, #5c706c 100%);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.steel::before,
.steel::after {
  content: none;
  display: none;
}

.crane-art {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 8px);
  width: min(420px, 70%);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.92;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
}

.crane-hook {
  display: none;
}

.steel article {
  background: rgba(12, 22, 28, 0.78);
  min-height: 210px;
  min-width: 0;
  padding: 1.4rem 1.3rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(237, 255, 246, 0.08);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.steel.is-in article {
  opacity: 1;
  transform: none;
}

.steel article:nth-child(2) { transition-delay: 0.08s; }
.steel article:nth-child(3) { transition-delay: 0.16s; }
.steel article:nth-child(4) { transition-delay: 0.24s; }

.steel h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--glow);
}

.steel p {
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(244, 248, 246, 0.84);
}

.rise {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 30;
  appearance: none;
  border: 1px solid rgba(215, 227, 221, 0.28);
  background: rgba(14, 24, 30, 0.55);
  color: var(--paper);
  padding: 0.7rem 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  cursor: pointer;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.66rem;
  backdrop-filter: blur(10px);
}

.rise svg {
  width: 18px;
  height: 18px;
  stroke: var(--glow);
  fill: none;
  animation: rise-nudge 1.8s ease-in-out infinite;
}

.rise.is-gone {
  opacity: 0;
  pointer-events: none;
}

.memory {
  border: 0;
  padding: 0;
  width: min(460px, calc(100vw - 2rem));
  background: transparent;
}

.memory::backdrop {
  background: rgba(8, 14, 18, 0.62);
}

.memory-frame {
  background: linear-gradient(180deg, #2a3f48, #1b2c34);
  padding: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(215, 227, 221, 0.2);
}

.memory-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--navy);
}

.memory-frame h3 {
  margin: 0.9rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--paper);
}

.memory-frame p {
  margin: 0 0 0.4rem;
  color: var(--foam);
  font-weight: 300;
  line-height: 1.55;
}

.memory-close {
  appearance: none;
  border: 0;
  background: none;
  color: var(--mist);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.68rem;
  margin-top: 0.8rem;
  cursor: pointer;
  padding: 0;
}

.memory-close:hover,
.memory-close:focus-visible {
  color: var(--glow);
}

.hint-nudge .rise {
  animation: pulse-border 0.9s ease;
}

@keyframes pane-breathe {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

@keyframes rise-nudge {
  0%, 100% { transform: translateY(3px); }
  50% { transform: translateY(-3px); }
}

@keyframes pulse-border {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 6px rgba(237, 255, 246, 0.16); }
}

@keyframes drift {
  from { transform: translate3d(-1.5%, 0, 0); }
  to { transform: translate3d(1.5%, 0, 0); }
}

@keyframes plane-float {
  0%, 100% { transform: translate(0, 0) rotate(-6deg); }
  50% { transform: translate(1.2%, -1.4%) rotate(-4deg); }
}

.clouds-shift {
  animation: drift 18s ease-in-out infinite alternate;
}

.plane-shift {
  transform-origin: 50% 50%;
  animation: plane-float 7s ease-in-out infinite;
}

@media (max-width: 860px) {
  .altimeter {
    display: none;
  }

  .panel {
    padding: 6.2rem 6vw 5rem;
  }

  #moving-out .copy,
  #origins .copy {
    margin-left: 0;
  }

  .steel {
    grid-template-columns: 1fr;
  }

  .steel article {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.ready body,
  .copy,
  .steel article,
  .layer,
  .rise svg,
  .clouds-shift,
  .plane-shift,
  .layer .hotspot .pane {
    animation: none;
    transition: none;
  }
}
