:root {
  color-scheme: dark;
  --night: #071416;
  --deep: #0b2021;
  --mineral: #b7c7bd;
  --quiet: #7f9790;
  --copper: #d28c52;
  --amber: #d8b46a;
  --sea: #93b4a5;
  --clay: #c7795f;
  --violet: #a7a0c8;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--night);
  color: var(--mineral);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--night);
}

body {
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

button { font: inherit; }

.experience {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 2%, rgba(147, 180, 165, .08), transparent 31%),
    var(--night);
}

.experience::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: .18;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
}

.masthead {
  position: absolute;
  z-index: 8;
  top: calc(26px + var(--safe-top));
  left: calc(30px + var(--safe-left));
  width: min(560px, calc(100% - 60px - var(--safe-left) - var(--safe-right)));
  pointer-events: none;
}

.date-mark,
.reveal-kicker {
  margin: 0 0 10px;
  color: var(--copper);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.masthead h1 {
  max-width: 520px;
  margin: 0;
  color: #d5ded8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.instruction {
  max-width: 440px;
  margin: 14px 0 0;
  color: #9eb0a8;
  font-size: clamp(13px, 1.4vw, 16px);
  line-height: 1.35;
}

.local-world {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: opacity .55s ease, transform .7s cubic-bezier(.2,.72,.2,1);
}

.local-world.is-leaving {
  opacity: 0;
  transform: scale(.94);
  pointer-events: none;
}

.horizon-strip {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-x;
  outline: none;
}

.horizon-strip::-webkit-scrollbar { display: none; }

.horizon-strip:focus-visible::after {
  content: "";
  position: fixed;
  inset: 8px;
  z-index: 9;
  border: 2px solid rgba(210, 140, 82, .72);
  border-radius: 14px;
  pointer-events: none;
}

.site {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
}

.site::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 20, 22, .05), transparent 38%, rgba(7, 20, 22, .28));
  pointer-events: none;
}

.site-art {
  display: block;
  width: 100%;
  height: 100%;
}

.plumb {
  --site-color: var(--copper);
  position: absolute;
  z-index: 4;
  left: 62%;
  top: 48%;
  width: 48px;
  height: 52%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

.site--plain .plumb { --site-color: var(--amber); left: 42%; top: 50%; }
.site--ridge .plumb { --site-color: var(--sea); left: 50%; top: 39%; }
.site--roofs .plumb { --site-color: var(--clay); left: 68%; top: 48%; }
.site--ice .plumb { --site-color: var(--violet); left: 54%; top: 47%; }
.site.is-marked .plumb { opacity: 1; }

.plumb__cap {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 11px;
  height: 11px;
  border: 2px solid var(--site-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--night);
  box-shadow: 0 0 0 6px rgba(7, 20, 22, .52);
}

.plumb__thread {
  position: absolute;
  top: 0;
  bottom: 24px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(var(--site-color), color-mix(in srgb, var(--site-color) 58%, transparent));
  transform-origin: top;
  animation: thread-arrive .72s cubic-bezier(.2,.8,.2,1) both;
}

.plumb__weight {
  position: absolute;
  bottom: 9px;
  left: 50%;
  width: 13px;
  height: 20px;
  transform: translateX(-50%);
  background: var(--site-color);
  clip-path: polygon(50% 0, 100% 58%, 50% 100%, 0 58%);
  animation: weight-arrive .72s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes thread-arrive {
  from { transform: translateX(-50%) scaleY(0); }
  to { transform: translateX(-50%) scaleY(1); }
}

@keyframes weight-arrive {
  from { opacity: 0; transform: translate(-50%, -34px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.field-controls {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

.round-button,
.drop-button,
.return-button {
  min-width: 48px;
  min-height: 48px;
  border: 1px solid rgba(183, 199, 189, .34);
  color: #dce4df;
  background: rgba(7, 20, 22, .84);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .24);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}

.round-button {
  width: 48px;
  padding: 0;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}

.drop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 168px;
  padding: 0 22px;
  border-color: rgba(210, 140, 82, .58);
  border-radius: 999px;
  color: #efd9c5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: lowercase;
}

.drop-button__mark { color: var(--copper); font-size: 20px; }
.drop-button.is-set { border-color: rgba(147, 180, 165, .45); color: #9fb2aa; }

.round-button:hover,
.drop-button:hover,
.return-button:hover { border-color: var(--copper); background: rgba(18, 42, 42, .9); }

.round-button:active,
.drop-button:active,
.return-button:active { transform: translateY(1px); }

button:focus-visible {
  outline: 3px solid #e9b071;
  outline-offset: 4px;
}

.journey {
  position: absolute;
  z-index: 9;
  right: calc(30px + var(--safe-right));
  bottom: calc(38px + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  color: #8ea29a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
}

.journey__dots { display: flex; gap: 6px; }
.journey__dots span {
  width: 18px;
  height: 2px;
  background: #304946;
  transition: background .2s ease, transform .2s ease;
}
.journey__dots span.is-active { background: #d7a067; transform: scaleY(2); }
.journey__dots span.is-marked { background: #9bb5aa; }

.status {
  position: absolute;
  z-index: 9;
  left: calc(30px + var(--safe-left));
  bottom: calc(40px + var(--safe-bottom));
  max-width: 250px;
  margin: 0;
  color: #7f9790;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-style: italic;
  line-height: 1.3;
}

.reveal {
  position: absolute;
  inset: 0;
  z-index: 12;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transform: scale(1.035);
  background: var(--night);
  transition: opacity .55s ease, transform .8s cubic-bezier(.2,.72,.2,1), visibility 0s linear .8s;
}

.reveal.is-visible {
  visibility: visible;
  opacity: 1;
  transform: scale(1);
  transition-delay: 0s;
}

.planet {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translate(8%, 4%) scale(.76);
  transform-origin: 60% 52%;
  transition: opacity .62s ease, transform 1.1s cubic-bezier(.18,.74,.2,1);
}

.reveal.is-visible .planet { opacity: 1; transform: translate(0, 0) scale(1); }

.reveal-line { stroke-linecap: round; }
.reveal-line__ghost { opacity: .16; }
.reveal-site { transition: opacity .4s ease; }

.center-mark { opacity: 0; transition: opacity .5s ease .62s; }
.reveal.is-settled .center-mark { opacity: 1; }

.reveal-copy {
  position: absolute;
  z-index: 3;
  top: calc(30px + var(--safe-top));
  left: calc(30px + var(--safe-left));
  max-width: min(520px, calc(100% - 60px));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .48s ease 1.35s, transform .48s ease 1.35s;
}

.reveal.is-settled .reveal-copy { opacity: 1; transform: translateY(0); }

.reveal-copy h2 {
  margin: 0;
  color: #dce4df;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5.4vw, 72px);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.045em;
}

.reveal-copy > p:last-child {
  margin: 15px 0 0;
  color: #91a69e;
  font-size: clamp(13px, 1.5vw, 17px);
  line-height: 1.35;
}

.return-button {
  position: absolute;
  z-index: 5;
  right: calc(30px + var(--safe-right));
  bottom: calc(28px + var(--safe-bottom));
  min-width: 190px;
  padding: 0 20px;
  border-radius: 999px;
  color: #b8c8c0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: lowercase;
  opacity: 0;
  transition: opacity .4s ease .85s, border-color .2s ease, background .2s ease;
}

.reveal.is-settled .return-button { opacity: 1; }

.static-poster {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  background: var(--night);
}
.static-poster svg { width: 100%; height: 100%; }
.static-poster div { position: absolute; top: 32px; left: 32px; width: min(520px, calc(100% - 64px)); }
.static-poster p { margin: 0 0 12px; color: #97aaa2; font-size: 13px; }
.static-poster h1 { margin: 0 0 14px; color: #dce4df; font: 400 clamp(36px, 6vw, 74px)/.96 Georgia, serif; letter-spacing: -.04em; }

.share-mode .masthead,
.share-mode .local-world,
.share-mode .return-button { display: none !important; }
.share-mode .reveal { visibility: visible; opacity: 1; transform: none; }
.share-mode .planet { opacity: 1; transform: none; transition: none; }
.share-mode .reveal-copy { top: 38px; left: 44px; max-width: 650px; opacity: 1; transform: none; }
.share-mode .reveal-copy::before { content: "20 · 09 · 26"; display: block; margin-bottom: 10px; color: var(--copper); font-size: 12px; font-weight: 700; letter-spacing: .22em; }
.share-mode .reveal-copy h2 { max-width: 640px; font-size: 64px; }
.share-mode .reveal-copy > p:last-child { font-size: 18px; }
.share-mode .center-mark { opacity: 1; }

@media (max-width: 720px) {
  .masthead {
    top: calc(18px + var(--safe-top));
    left: calc(18px + var(--safe-left));
    width: calc(100% - 36px - var(--safe-left) - var(--safe-right));
  }
  .masthead h1 { max-width: 330px; font-size: clamp(28px, 9.5vw, 42px); }
  .instruction { max-width: 310px; margin-top: 9px; font-size: 13px; }
  .date-mark { margin-bottom: 7px; font-size: 9px; }
  .field-controls { bottom: calc(26px + var(--safe-bottom)); gap: 8px; }
  .drop-button { min-width: 150px; padding: 0 16px; }
  .round-button { width: 46px; min-width: 46px; min-height: 46px; }
  .journey { right: calc(18px + var(--safe-right)); bottom: calc(89px + var(--safe-bottom)); }
  .journey__count { display: none; }
  .journey__dots span { width: 14px; }
  .status { left: calc(18px + var(--safe-left)); bottom: calc(93px + var(--safe-bottom)); max-width: 190px; font-size: 12px; }
  .plumb { height: 56%; top: 43%; }
  .site--plain .plumb { top: 46%; }
  .site--ridge .plumb { top: 36%; }
  .site--roofs .plumb { top: 44%; }
  .site--ice .plumb { top: 43%; }
  .planet { width: 150%; left: -25%; max-width: none; }
  .reveal-copy { top: calc(20px + var(--safe-top)); left: calc(18px + var(--safe-left)); max-width: calc(100% - 36px); }
  .reveal-copy h2 { max-width: 340px; font-size: clamp(35px, 10vw, 48px); }
  .reveal-copy > p:last-child { max-width: 310px; }
  .return-button { right: calc(18px + var(--safe-right)); bottom: calc(20px + var(--safe-bottom)); min-width: 188px; }
}

@media (max-height: 620px) and (orientation: landscape) {
  .masthead { top: 16px; left: 20px; }
  .masthead h1 { max-width: 430px; font-size: 30px; }
  .instruction { margin-top: 8px; }
  .field-controls { bottom: 16px; }
  .journey { right: 20px; bottom: 26px; }
  .status { display: none; }
  .reveal-copy { top: 18px; left: 20px; }
  .reveal-copy h2 { font-size: 46px; }
  .return-button { bottom: 16px; right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }
}

.no-js .experience { display: none; }
.js .static-poster { display: none; }
