/* Landing only: the fixed island scene and the scroll chapters that sit on it. */


/* ---------- scene ---------- */
.scene {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, #cbe1f2 0%, #e9eef2 55%, #fbe3ce 100%);
}
.scene canvas { width: 100%; height: 100%; opacity: 0; transition: opacity .6s ease; }
.gl .scene canvas { opacity: 1; }
.no-gl .scene canvas { display: none; }
@media (prefers-reduced-motion: reduce) { .scene canvas { display: none; } }

.landing .land { position: relative; z-index: 1; overflow-x: clip; }
.landing .foot { position: relative; z-index: 2; }

/* ---------- chapters ---------- */
.ch { position: relative; height: 170vh; }
.ch-hero { height: 150vh; }
.ch-close { height: 140vh; }
.ch-in {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex;
  padding: calc(var(--nav-h) + 40px) var(--gut) 72px;
  max-width: 1440px; margin: 0 auto;
}
.copy { position: relative; max-width: 640px; }
/* A soft paper wash behind the words so they hold on top of the marks. */
.copy::before {
  content: ""; position: absolute; z-index: -1; inset: -110px -180px -150px -200px;
  background: radial-gradient(closest-side, rgba(244, 248, 251, .98), rgba(244, 248, 251, .96) 55%, rgba(244, 248, 251, .7) 80%, rgba(244, 248, 251, 0));
  pointer-events: none;
}

.hl {
  font-weight: 700; letter-spacing: -0.06em; line-height: .9;
  font-size: clamp(52px, 8.4vw, 136px);
  margin: 0 0 22px; padding-bottom: .06em;
}
.hl-xl { font-size: clamp(72px, 15vw, 240px); letter-spacing: -0.07em; }
.line { font-size: 17px; line-height: 1.5; color: var(--ink); font-weight: 500; max-width: 30em; margin: 0 0 28px; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; }

.ch-hero .ch-in { align-items: center; }
.ch-hero .hl { font-size: clamp(56px, 10vw, 168px); }
.ch-hero .copy { max-width: 900px; }
.ch-grid .ch-in { align-items: center; }
.ch-claim .ch-in { align-items: center; }
.ch-towers .ch-in { align-items: center; justify-content: flex-end; }
.ch-towers .copy { text-align: left; }
.ch-own .ch-in { align-items: center; justify-content: flex-start; }
.ch-token .ch-in { align-items: center; justify-content: center; text-align: center; }
.ch-token .copy { max-width: 980px; }
.ch-close .ch-in { align-items: center; justify-content: center; text-align: center; }
.ch-close .ctas { justify-content: center; }
.ch-close .copy::before { inset: -120px -200px; }
.ch-grid .copy::before { inset: -90px -160px -170px -180px; }

/* figures (only rendered once each number is worth showing) */
.figures { display: inline-flex; flex-wrap: wrap; gap: 14px 40px; margin: 4px 0 0 -18px; padding: 16px 18px; border-radius: 10px; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.figures div { display: flex; flex-direction: column; gap: 4px; }
.figures b { font-weight: 700; font-size: 32px; letter-spacing: -0.04em; line-height: 1; }
.figures span { font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }

/* bag size control */
.bag { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); background: rgba(255, 255, 255, .82); overflow: hidden; }
.bag button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
  padding: 13px 16px;
}
.bag button + button { border-left: 1px solid var(--line-2); }
.bag button:hover { color: var(--ink); background: rgba(17, 19, 17, .05); }
.bag button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* three kinds of land */
.kinds { list-style: none; margin: 0; padding: 0; max-width: 460px; border-top: 1px solid var(--line-2); }
.kinds li {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
}
.kinds li span:first-child { color: var(--ink); }
.kinds li:nth-child(1) span:first-child { color: var(--coral); }
.kinds li:nth-child(2) span:first-child { color: var(--sea); }
.kinds li:nth-child(3) span:first-child { color: var(--leaf); }
.kinds li span:last-child { text-align: right; }
.kinds { background: rgba(255, 255, 255, .9); }
.kinds li { color: var(--ink); }

/* token */
.ca-box { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 8px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255, 255, 255, .86); }
.ca-code { font: 400 13px/1.3 var(--mono); color: var(--ink); text-decoration: none; padding: 0 10px; word-break: break-all; }
.ca-code:hover { text-decoration: underline; }

/* recent landowners, after the scene */
.ledger { position: relative; z-index: 2; background: var(--paper); border-top: 1px solid var(--line); }
.ledger-in { max-width: 1440px; margin: 0 auto; padding: 72px var(--gut) 80px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px 64px; }
.hl-sm { font-size: clamp(36px, 4.4vw, 60px); letter-spacing: -0.05em; line-height: .95; }
.ledger .kicker { grid-column: 1 / -1; margin: 0; }
.ledger ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.ledger li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ledger li .addr { font-family: var(--mono); font-size: 13px; }
.ledger li .sub { font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-left: 6px; }
.ledger time { font: 400 12px/1.6 var(--mono); color: var(--ink-3); white-space: nowrap; }

/* ---------- reveal (only once JS adds body.anim) ---------- */
.anim .ch .copy > * { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.anim .ch .copy::before { opacity: 0; transition: opacity .8s ease; }
.anim .ch.in .copy > *, .anim .ch.in .copy::before { opacity: 1; transform: none; }
.anim .ch.in .copy > :nth-child(2) { transition-delay: .06s; }
.anim .ch.in .copy > :nth-child(3) { transition-delay: .14s; }
.anim .ch.in .copy > :nth-child(4) { transition-delay: .22s; }
.anim .ch.in .copy > :nth-child(5) { transition-delay: .28s; }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .ch { height: 150vh; }
  .ch-hero { height: 130vh; }
  .ch-in { padding: calc(var(--nav-h) + 20px) var(--gut) 64px; }
  .ch-in, .ch-grid .ch-in, .ch-claim .ch-in, .ch-towers .ch-in, .ch-own .ch-in { align-items: flex-end; justify-content: flex-start; }
  .hl, .ch-hero .hl { font-size: clamp(42px, 12.6vw, 64px); margin-bottom: 16px; }
  .hl-xl { font-size: clamp(64px, 22vw, 120px); }
  .line { font-size: 15px; margin-bottom: 20px; }
  .copy::before { inset: -110px calc(-1 * var(--gut)) -64px; background: linear-gradient(180deg, rgba(244, 248, 251, 0), rgba(244, 248, 251, .9) 110px, rgba(244, 248, 251, .96)); }
  .ch-grid .copy::before { inset: -40px calc(-1 * var(--gut)) -110px; background: linear-gradient(0deg, rgba(244, 248, 251, 0), rgba(244, 248, 251, .9) 110px, rgba(244, 248, 251, .96)); }
  .hl.hl-xl { font-size: clamp(64px, 22vw, 110px); }
  .ch-token .ch-in { align-items: center; justify-content: center; }
  .ch-close .copy::before, .ch-token .copy::before { inset: -80px calc(-1 * var(--gut)); background: radial-gradient(closest-side, rgba(244, 248, 251, .96), rgba(244, 248, 251, .8) 60%, rgba(244, 248, 251, 0)); }
  .bag button { padding: 12px 11px; letter-spacing: .1em; }
  .kinds li { grid-template-columns: 1fr auto; gap: 12px; letter-spacing: .08em; font-size: 10px; }
  .hl, .ch-hero .hl { font-size: clamp(38px, 11vw, 60px); }
  .ledger-in { grid-template-columns: 1fr; padding: 48px var(--gut) 56px; }
  .ledger li { flex-direction: column; gap: 4px; }
}
@media (max-width: 380px) { .bag button { padding: 12px 8px; font-size: 10px; } }

/* ---------- words in the world ---------- */
/* When a chapter's headline is drawn into the island, its page copy steps back to a small caption. */
.gl .ch.worded .hl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.gl .ch.worded .ch-in { align-items: flex-end; }
.gl .ch.worded .copy { max-width: 440px; padding: 18px 20px 20px; border-radius: 12px; background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); box-shadow: 0 10px 30px rgba(18, 32, 58, .08); }
.gl .ch.worded .copy > :last-child { margin-bottom: 0; }
.gl .ch.worded .copy::before { display: none; }
.gl .ch.worded .line { font-size: 16px; margin-bottom: 16px; }
.gl .ch.worded .line:last-child { margin-bottom: 0; }
.gl .ch-close.worded .ch-in, .gl .ch-towers.worded .ch-in { justify-content: center; }
.gl .ch-close.worded .copy, .gl .ch-towers.worded .copy { text-align: center; }
.gl .ch-towers.worded .kinds { margin: 0 auto; background: transparent; }
.gl .ch-close.worded .copy { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* callouts pinned to places on the island */
.tags { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.tag { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .25s ease; will-change: transform; }
.tag i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px #fff; }
.tag i::after { content: ''; position: absolute; left: 3.5px; bottom: 8px; width: 1px; height: 46px; background: var(--ink); }
.tag span { position: absolute; left: -1px; bottom: 54px; display: flex; flex-direction: column; gap: 3px; padding: 7px 10px 8px; background: rgba(255, 255, 255, .92); border-left: 2px solid var(--ink); white-space: nowrap; }
.tag b { font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.tag em { font: 400 11px/1 var(--mono); font-style: normal; letter-spacing: .06em; color: var(--ink-2); }
@media (max-width: 720px) { .tag span { bottom: 40px; } .tag i::after { height: 32px; } }
