:root {
  --accent: #f2643e;
  --ink: #fff;
  --night: #0c0b0a;          /* the page behind the glass */
  --cream: #f4ede2;
  --cream-dim: rgba(244, 237, 226, 0.66);
  --rule: rgba(244, 237, 226, 0.14);
  --gutter: clamp(22px, 6vw, 96px);
  --sans: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --display: 'Jost', 'Futura', 'Century Gothic', sans-serif;
}

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

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='11' cy='11' r='8.5' fill='none' stroke='rgba(0,0,0,.28)' stroke-width='3'/%3E%3Ccircle cx='11' cy='11' r='8.5' fill='none' stroke='white' stroke-width='1.4'/%3E%3Ccircle cx='11' cy='11' r='1.4' fill='white'/%3E%3C/svg%3E") 11 11, auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- scene ---------- */

/* the film sits under everything: the scene covers it on the beach and
   uncovers it once you are through the glass */
#reel {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--night);
  pointer-events: none;
}
#reel.settle { transition: transform 1.7s cubic-bezier(0.22, 1, 0.36, 1); }

#scene {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
#scene.zooming {
  transition: transform 1.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
/* the set comes at you, slowly then all at once, and thins out to the film */
#scene.diving {
  transition: transform 1.3s cubic-bezier(0.6, 0, 0.85, 0.3), opacity 0.4s linear 0.9s;
  will-change: transform, opacity;
}
#scene.surfacing {
  transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s linear;
  will-change: transform, opacity;
}
#gl {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
}

/* film grain over everything, re-seeded by hopping the tile around */
#grain {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.08;
  transition: opacity 0.5s ease;
  mix-blend-mode: overlay;
  background-image: var(--grain, none);
  background-size: 192px 192px;
  animation: grain 0.6s steps(1) infinite;
}
@keyframes grain {
  0%   { background-position: 0 0; }
  17%  { background-position: -61px 37px; }
  33%  { background-position: 83px -29px; }
  50%  { background-position: -17px -91px; }
  67%  { background-position: 47px 71px; }
  83%  { background-position: -99px 13px; }
}

/* the glare of the glass as you pass through it */
#flash {
  position: fixed;
  inset: 0;
  z-index: 24;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, #fff 0%, rgba(255, 243, 226, 0.9) 38%, rgba(255, 243, 226, 0) 100%);
}
#flash.go { animation: flash 2s linear; }
@keyframes flash {
  0%, 40% { opacity: 0; }
  62%     { opacity: 0.5; }
  100%    { opacity: 0; }
}

/* shown when WebGL is unavailable */
#fallback {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 90% at 28% 18%, #e7bd83 0%, #c99258 45%, #8c5c33 100%);
}
#fallback span {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(44px, 10vw, 128px);
  letter-spacing: 0.16em;
  color: var(--accent);
}
.no-gl #scene { display: none; }
.no-gl #fallback { display: flex; }
.no-gl #btnReset { display: none; }
.no-gl.diving #fallback, .no-gl.inside #fallback { opacity: 0; visibility: hidden; }

/* ---------- the screen is a button ---------- */

/* laid over the glass; main.js keeps it in step with the set */
#tvBtn {
  position: fixed;
  z-index: 30;
  left: var(--scr-x, 50%);
  top: var(--scr-y, 50%);
  width: var(--scr-w, 0);
  height: var(--scr-h, 0);
  padding: 0;
  border: 0;
  border-radius: var(--scr-r, 0);
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
#tvBtn[hidden] { display: none; }
#tvBtn span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
#tvBtn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
}
.diving #tvBtn, .inside #tvBtn { display: none; }

/* no set to press without WebGL: the button stands on its own */
.no-gl #tvBtn {
  left: 50%;
  top: 64%;
  width: auto;
  height: auto;
  padding: 13px 26px;
  transform: translateX(-50%);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.no-gl #tvBtn span {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
}

/* ---------- loader ---------- */

#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  transition: opacity 0.6s ease 0.15s;
}
#loader.done {
  opacity: 0;
  pointer-events: none;
}
#loadNum {
  text-align: center;
  transition: opacity 0.45s ease;
}
#loadNum.out { opacity: 0; }
#loadPct {
  font-size: 80px;
  line-height: 80px;
  font-weight: 400;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
#loadLabel {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 14px;
}

/* ---------- header / footer ---------- */

#hdr, #ftr {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 31;
  pointer-events: none;
  opacity: 0;
}
#hdr { top: 0; height: 150px; transform: translateY(-8px); }
#ftr { bottom: 0; height: 100px; transform: translateY(8px); }
#hdr.in, #ftr.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
#ftr.in { transition-delay: 0.15s; }

/* the chrome ducks out for the dive; the header comes back on the far side */
.diving #hdr.in, .diving #ftr.in, .inside #ftr.in {
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  visibility: hidden;
}
.inside #btnReset { display: none; }
.icon[hidden] { display: none; }
#btnBack {
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  margin-right: 6px;
  font: 500 13px/20px var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
#btnBack[hidden] { display: none; }
#btnBack svg { flex: none; }
#btnBack:hover { transform: none; }
#btnBack:hover svg { transform: translateX(-3px); }
#btnBack svg { transition: transform 0.15s ease; }
/* over the page the header needs a deeper shade than it does over sand */
.inside #hdr { height: 120px; }
.inside #hdr::after { background: linear-gradient(to bottom, rgba(12, 11, 10, 0.88), rgba(12, 11, 10, 0)); }

/* the shade behind the chrome settles in after the bars arrive */
#hdr::after, #ftr::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.9s ease;
}
#hdr::after { background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0)); }
#ftr::after { background: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0)); }
#hdr.grad::after, #ftr.grad::after { opacity: 1; }

.bar {
  position: absolute;
  top: 20px;
  left: 30px;
  right: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.icons {
  display: flex;
  gap: 16px;
  align-items: center;
}
.icon {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  pointer-events: auto;
  opacity: 0.95;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.icon::before {          /* a finger-sized hit area around a 20px glyph */
  content: '';
  position: absolute;
  inset: -10px;
}
.icon:hover { opacity: 1; transform: scale(1.1); }
.icon:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 5px;
  border-radius: 3px;
}
.icon svg {
  display: block;
  width: 20px;
  height: 20px;
}
.icon svg[hidden] { display: none; }

#copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  margin: 0;
  text-align: center;
  font-size: 14px;
  line-height: 22px;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
#copy .legal { margin-left: 18px; }
#copy a {
  position: relative;
  margin-left: 18px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}
#copy a::before {          /* a finger-sized hit area */
  content: '';
  position: absolute;
  inset: -10px -8px;
}
#copy a:first-child { margin-left: 0; }
#copy a:hover { text-decoration: underline; text-underline-offset: 4px; }
#copy a:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}

#socialM { display: none; }

/* the people behind it, where a row of social icons would be */
.people {
  display: flex;
  gap: 26px;
  align-items: center;
  font: 500 13px/20px var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.people a {
  position: relative;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0.95;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.people a::before {        /* a finger-sized hit area */
  content: '';
  position: absolute;
  inset: -10px -8px;
}
.people a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.people a:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 5px;
  border-radius: 3px;
}

/* ---------- tap hint ---------- */

#tapHint {
  position: fixed;
  left: 50%;
  top: var(--hint-y, calc(100% - 80px));
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  z-index: 31;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
#tapHint.show { opacity: 0.9; }
#tapHint::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  animation: tapPress 1.9s ease-in-out infinite;
}
#tapHint::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  opacity: 0;
  animation: tapRipple 1.9s ease-out infinite;
}
@keyframes tapPress {
  0%, 22%, 46%, 100% { transform: scale(1); }
  32%                { transform: scale(0.7); }
}
@keyframes tapRipple {
  0%, 30% { transform: scale(0.3); opacity: 0; }
  38%     { opacity: 0.75; }
  70%     { transform: scale(1.25); opacity: 0; }
  100%    { transform: scale(1.25); opacity: 0; }
}

/* ---------- through the glass: the page about Altora ---------- */

#inside {
  position: fixed;
  inset: 0;
  z-index: 25;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
  color: var(--cream);
  cursor: auto;
  touch-action: pan-y;
  user-select: text;
  -webkit-user-select: text;
  outline: none;
}
.inside #inside {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.5s ease;
}
.inside #grain { opacity: 0; }

:where(#inside) :where(h2, h3, p, ul) { margin: 0; }
#inside ::selection { background: var(--accent); color: var(--night); }

/* things ease up into place as they come into view */
.js .rise {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .rise.seen {
  opacity: 1;
  transform: none;
}

/* The top of the page is the film itself, full-bleed: the same shot the set
   was playing, now with nothing between you and it. */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(96px, 15vh, 148px) var(--gutter) clamp(44px, 8vh, 88px);
}
/* The words sit above and below; the middle is left to whoever is in the
   tube. The shade follows the words and lifts off the middle. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(12, 11, 10, 0.66) 0%, rgba(12, 11, 10, 0.3) 30%, rgba(12, 11, 10, 0.06) 48%,
                    rgba(12, 11, 10, 0.1) 58%, rgba(12, 11, 10, 0.74) 80%, var(--night) 100%);
}
.hero::after {             /* a memory of the tube: faint scanlines */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.16) 0 1px, rgba(0, 0, 0, 0) 1px 3px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
}

.eyebrow, .kicker {
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.eyebrow i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 12px 2px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}
.kicker { color: var(--accent); }

.hero-title {
  margin-top: clamp(14px, 2.2vh, 24px);
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(56px, 11.4vw, 176px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 30px rgba(12, 11, 10, 0.35);
}
.hero-lede {
  max-width: 30em;
  font-size: clamp(18px, 1.55vw, 23px);
  line-height: 1.5;
  color: rgba(244, 237, 226, 0.9);
  text-wrap: pretty;
}
.inside .hero-title { transition-delay: 0.12s; }
.inside .hero-lede { transition-delay: 0.3s; }
.inside .hero .cue { transition-delay: 0.44s; }

.cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(30px, 5vh, 52px);
  padding: 13px 22px 13px 24px;
  border: 1px solid rgba(244, 237, 226, 0.5);
  border-radius: 999px;
  background: none;
  color: var(--cream);
  font: 500 13px/20px var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}
.cue, .js .cue.rise {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
              opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.cue svg { width: 16px; height: 16px; }
.cue:hover {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--night);
}
.cue:focus-visible, .in-foot a:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 4px;
}

/* below the film the page is solid, and slides up over it */
.band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  column-gap: clamp(24px, 4vw, 72px);
  padding: clamp(84px, 15vh, 176px) var(--gutter);
  border-top: 1px solid var(--rule);
  background: var(--night);
}
.hero + .band { border-top: 0; }
.band .kicker { padding-top: 0.9em; }
.band h2 {
  max-width: 17em;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(34px, 5.3vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.band h2 em {
  font-style: normal;
  color: var(--accent);
}
.band-body > p {
  margin-top: clamp(24px, 3.6vh, 40px);
  max-width: 34em;
  font-size: clamp(18px, 1.45vw, 22px);
  line-height: 1.55;
  color: var(--cream-dim);
  text-wrap: pretty;
}

.builds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 44px);
  margin-top: clamp(40px, 7vh, 80px);
  padding: 0;
  list-style: none;
}
.builds li {
  padding-top: 22px;
  border-top: 2px solid var(--accent);
}
.builds li:nth-child(2) { transition-delay: 0.1s; }
.builds li:nth-child(3) { transition-delay: 0.2s; }
.builds h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.builds p {
  margin-top: 12px;
  max-width: 22em;
  font-size: 17px;
  line-height: 1.5;
  color: var(--cream-dim);
}

/* the last word is set on the tube's own orange */
.closer {
  border-top: 0;
  background: var(--accent);
  color: var(--night);
}
.closer .kicker { color: var(--night); }
.closer .band-body > p { color: rgba(12, 11, 10, 0.82); }
#inside .closer ::selection { background: var(--night); color: var(--cream); }

.in-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 36px;
  padding: 40px var(--gutter) 44px;
  background: var(--night);
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.in-foot .cue {
  margin: 0 auto 0 0;
  padding: 11px 22px 11px 18px;
}
.in-foot nav {
  display: flex;
  gap: 28px;
}
.in-foot a {
  color: var(--cream);
  text-decoration: none;
}
.in-foot a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 860px) {
  .band { grid-template-columns: minmax(0, 1fr); }
  .band .kicker { padding: 0 0 22px; }
  .builds { grid-template-columns: minmax(0, 1fr); }
  .builds p { max-width: 30em; }
}

/* ---------- phones ---------- */

@media (max-width: 640px) {
  .hero { padding-top: 96px; }
  .eyebrow { font-size: 11px; letter-spacing: 0.16em; }
  .eyebrow i { margin: 0 8px 2px; }
  .in-foot { flex-direction: column; align-items: flex-start; }
  .in-foot .cue { margin: 0 0 10px; }
  .bar { justify-content: center; }
  #social { display: none; }
  #ftr { height: 150px; }
  #socialM {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 78px;
    justify-content: center;
  }
  #copy {
    bottom: 20px;
    line-height: 14px;
  }
  #copy .legal {
    display: block;
    margin: 14px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #scene.zooming, #scene.diving, #scene.surfacing { transition: none; }
  #reel.settle { transition: none; }
  #flash.go { animation: none; }
  #hdr.in, #ftr.in { transition: none; }
  .js .rise, .cue, .js .cue.rise { transition: none; }
  .js .rise { transform: none; }
  #grain { animation: none; }
  #tapHint::before, #tapHint::after { animation: none; }
}
