/* Quantum Real Estate. One sky, six islands.
   Without JS this is a plain stacked page; scene.js adds .js to <html>
   and the sections become overlays on a full-screen canvas. */

:root {
  --ink: #1a1046;
  --ink-soft: rgba(26, 16, 70, 0.78);
  --light: #fffaf0;
  --glow: #ffd95e;
  --sky: linear-gradient(180deg, #1a1250 0%, #3a1f82 18%, #8b2f96 34%, #e04f7c 48%, #ff8a4c 64%, #ffb568 82%, #ffd08a 100%);
  --font: "Avenir Next", "Segoe UI", "Fira Sans", Ubuntu, "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(1.25rem, 5vw, 6rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { background: #ff8a4c; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 0.9rem + 0.35vw, 1.3rem);
  line-height: 1.45;
  color: var(--ink);
}

h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--glow); outline-offset: 4px; border-radius: 2px; }
.copy :focus-visible, .hud :focus-visible { outline-color: var(--ink); }

/* ---------- top bar ---------- */
.bar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1rem, 2.4vh, 1.75rem) var(--pad);
  color: var(--light);
  text-transform: uppercase;
}

.mark {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.28em;
  text-decoration: none;
  white-space: nowrap;
}

.stops-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem clamp(1rem, 2.2vw, 2.6rem); }

.stops-nav a {
  position: relative;
  display: block;
  padding: 0.5rem 0;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-decoration: none;
}

.stops-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.15rem;
  height: 2px;
  background: var(--glow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.stops-nav a:hover::after, .stops-nav a[aria-current="true"]::after { transform: scaleX(1); }

/* ---------- the stops ---------- */
.stop {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 6rem var(--pad) clamp(4rem, 13vh, 9rem);
  background: var(--sky);
}

.copy { max-width: min(44rem, 46vw); }

.copy h1, .copy h2 {
  font-size: clamp(1.9rem, 0.9rem + 2.7vw, 5.6rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.copy p { margin-top: 0.9em; max-width: 34em; font-weight: 500; }

.btn {
  display: inline-block;
  margin-top: 1.6rem;
  padding: 0.95rem 2.4rem;
  border: 2px solid var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  background: linear-gradient(var(--ink), var(--ink)) no-repeat left / 0% 100%;
  transition: background-size 0.45s var(--ease), color 0.3s;
}

.btn:hover, .btn:focus-visible { background-size: 100% 100%; color: var(--glow); }
.btn:active { transform: translateY(1px); }

.records { margin-top: 1rem; display: grid; gap: 0.1rem; }

.records a {
  display: inline-block;
  padding: 0.3rem 0;
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}

.records a:hover { text-decoration-color: var(--light); }

.copy .small { font-size: 0.82em; color: var(--ink-soft); }

.foot {
  padding: 1rem var(--pad) 1.4rem;
  background: #ffd08a;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.sky, .hud { display: none; }

/* ---------- enhanced: one screen, a camera, no scroll ---------- */
.js, .js body { height: 100%; overflow: hidden; overscroll-behavior: none; touch-action: none; }
.js body { background: var(--sky); }

.js .sky { display: block; position: fixed; inset: 0; width: 100%; height: 100%; }

.js .bar { position: fixed; }

.js .stop {
  position: fixed;
  inset: 0;
  min-height: 0;
  background: none;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.45s ease, transform 0.7s var(--ease), visibility 0s linear 0.45s;
}

.js .stop.is-on {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0.12s, 0.12s, 0s;
}

.js .copy { pointer-events: auto; }

.js .foot {
  position: fixed;
  left: var(--pad);
  bottom: clamp(0.8rem, 3vh, 1.8rem);
  z-index: 4;
  padding: 0;
  background: none;
}

.js .hud {
  position: fixed;
  right: var(--pad);
  bottom: clamp(0.8rem, 3vh, 1.8rem);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.count { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.2em; font-variant-numeric: tabular-nums; }

.line { width: clamp(4rem, 9vw, 10rem); height: 2px; background: rgba(26, 16, 70, 0.25); }
.line span { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0.1667); }

.step {
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  padding: 0;
  border: 2px solid var(--ink);
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, opacity 0.25s;
}

.step span {
  width: 0.6rem; height: 0.6rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateX(2px) rotate(45deg);
}

.step-next span { transform: translateX(-2px) rotate(-135deg); }
.step:hover:not(:disabled), .step:focus-visible { background: var(--ink); color: var(--glow); }
.step:disabled { opacity: 0.35; cursor: default; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .mark { font-size: 0.8rem; letter-spacing: 0.22em; }
  .bar { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .stops-nav ul { gap: 0 1.1rem; }
  .copy { max-width: none; }
  .stop { padding-bottom: 5rem; }

  .js .stop { padding: 5rem var(--pad) 6.6rem; }
  .js .foot { right: var(--pad); bottom: 0.7rem; font-size: 0.6rem; letter-spacing: 0.04em; }
  .js .hud { bottom: 2.9rem; gap: 0.7rem; }
  .js .line { display: none; }
  .js .step { width: 2.5rem; height: 2.5rem; }

  /* the stop names become a column of dots on the right edge */
  .js .stops-nav { position: fixed; right: 0.35rem; top: 42%; transform: translateY(-50%); }
  .js .stops-nav ul { flex-direction: column; gap: 0; }
  .js .stops-nav a { width: 1.75rem; height: 1.75rem; padding: 0; display: grid; place-items: center; }
  .js .stops-nav a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .js .stops-nav a::after {
    position: static;
    width: 0.5rem; height: 0.5rem;
    border-radius: 50%;
    border: 2px solid var(--light);
    background: none;
    transform: none;
    transition: background-color 0.3s;
  }
  .js .stops-nav a[aria-current="true"]::after { background: var(--light); transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01s !important; transition-delay: 0s !important; }
  .js .stop { transform: none; }
}
