:root {
  /* Typography source terms: Inter* Inter** longer supporting prose where calm readability needed. Playfair Display wordmark Display* Display** typography titles Playfair-style editorial elegance carved glowing tablets Space Grotesk* Grotesk** labels */
  --clay: #C96A3A;
  --cream: #F4E0B8;
  --aubergine: #24142F;
  --mint: #58F0B5;
  --marigold: #F6B93B;
  --coral: #FF6F61;
  --ink: #171018;
  --hero-font: 'Playfair Display', serif;
  --label-font: 'Space Grotesk', sans-serif;
  --body-font: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--aubergine);
  color: var(--cream);
  font-family: var(--body-font);
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: .18;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(244,224,184,.35) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 60%, rgba(23,16,24,.28) 0 1px, transparent 1px);
  background-size: 9px 9px, 13px 13px;
  mix-blend-mode: overlay;
}

.sky-market { position: relative; }

.deck {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: grid;
  isolation: isolate;
  padding: clamp(28px, 5vw, 76px);
}

.hero-deck {
  background:
    radial-gradient(circle at 70% 20%, rgba(246,185,59,.55), transparent 35%),
    radial-gradient(circle at 15% 86%, rgba(88,240,181,.16), transparent 28%),
    var(--aubergine);
}

.clay-deck {
  background:
    radial-gradient(circle at 80% 25%, rgba(88,240,181,.24), transparent 30%),
    linear-gradient(145deg, #F4E0B8 0%, #C96A3A 58%, #24142F 100%);
  color: var(--ink);
}

.mint-deck {
  background:
    radial-gradient(circle at 20% 72%, rgba(255,111,97,.55), transparent 26%),
    linear-gradient(120deg, #24142F 0%, #171018 42%, #58F0B5 160%);
}

.aubergine-deck {
  background:
    radial-gradient(circle at 73% 48%, rgba(246,185,59,.48), transparent 31%),
    linear-gradient(160deg, #171018 0%, #24142F 60%, #C96A3A 135%);
}

.gate-deck {
  place-items: center;
  background:
    radial-gradient(circle at 50% 48%, rgba(88,240,181,.26), transparent 28%),
    linear-gradient(115deg, #24142F 0%, #C96A3A 52%, #58F0B5 100%);
}

.aurora {
  position: absolute;
  width: 128vw;
  height: 26vh;
  left: -14vw;
  top: 37vh;
  background: linear-gradient(115deg, #24142F 0%, #C96A3A 52%, #58F0B5 100%);
  border: 2px solid rgba(23,16,24,.55);
  filter: blur(.2px) drop-shadow(0 0 34px rgba(88,240,181,.46));
  opacity: .78;
  transform: rotate(-16deg) translateX(var(--drift, 0px));
  z-index: -1;
  border-radius: 999px 42% 999px 30%;
}

.aurora::after {
  content: '';
  position: absolute;
  inset: 35% 3%;
  border-top: 3px dotted var(--cream);
  opacity: .6;
}

.aurora-clay { top: 44vh; transform: rotate(15deg) translateX(var(--drift, 0px)); opacity: .5; }
.aurora-mint { top: 20vh; transform: rotate(-22deg) translateX(var(--drift, 0px)); }
.aurora-horizon { top: 55vh; transform: rotate(20deg) translateX(var(--drift, 0px)); }
.aurora-gate { top: 42vh; opacity: .92; }

.deck-copy { max-width: 660px; z-index: 3; }
.title-plaque { align-self: start; justify-self: start; margin-top: 6vh; }
.upper-left { align-self: start; justify-self: start; margin-top: 5vh; }
.mid-right { align-self: center; justify-self: end; text-align: right; }
.lower-left { align-self: end; justify-self: start; margin-bottom: 7vh; }

.coordinate {
  font-family: var(--label-font);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: clamp(.68rem, 1.1vw, .86rem);
  font-weight: 700;
  color: var(--mint);
  margin: 0 0 18px;
}

.clay-deck .coordinate { color: var(--aubergine); }

h1, h2 {
  font-family: var(--hero-font);
  margin: 0;
  line-height: .88;
  letter-spacing: -.055em;
}

h1 {
  font-size: clamp(4.8rem, 15vw, 15rem);
  text-shadow: 0 18px 0 rgba(23,16,24,.42);
}

h1 span { display: block; font-style: italic; color: var(--marigold); margin-left: clamp(1rem, 9vw, 10rem); }

h2 { font-size: clamp(3rem, 7vw, 7.4rem); }

.lead, .deck-copy p:not(.coordinate), .gate-card p:not(.coordinate) {
  font-size: clamp(1rem, 1.45vw, 1.36rem);
  line-height: 1.55;
  max-width: 580px;
}

.floating-skyline {
  position: absolute;
  right: 6vw;
  bottom: 5vh;
  width: min(48vw, 680px);
  height: min(48vw, 620px);
  transform: rotate(-4deg);
  z-index: 2;
}

.portal, .horizon-portal {
  position: absolute;
  border: 4px solid var(--ink);
  background: radial-gradient(circle at 45% 35%, #F6B93B 0 13%, #FF6F61 14% 24%, #F4E0B8 25% 45%, #58F0B5 46% 100%);
  box-shadow: 18px 18px 0 rgba(23,16,24,.36);
}

.portal { inset: 9% 12% 14% 18%; border-radius: 50%; }

.kiosk {
  position: absolute;
  bottom: 18%;
  width: 28%;
  height: 28%;
  border: 4px solid var(--ink);
  background: var(--clay);
  box-shadow: 12px 12px 0 rgba(23,16,24,.34);
}

.kiosk-left { left: 20%; transform: skewY(-4deg); }
.kiosk-right { right: 13%; bottom: 28%; transform: skewY(5deg); background: var(--cream); }
.kiosk b { display: block; height: 36%; background: repeating-linear-gradient(90deg, var(--coral) 0 18px, var(--marigold) 18px 36px); border-bottom: 4px solid var(--ink); border-radius: 0 0 48% 48%; }
.kiosk span { position: absolute; left: 20%; right: 20%; bottom: 0; height: 42%; background: var(--aubergine); border: 3px solid var(--ink); border-bottom: 0; }

.coin, .cloud, .flag, .stair-beam, .parcel, .arch-window, .checker-strip, .squiggle, .glyph-board span, .orbit-field span, .memphis {
  position: absolute;
  border: 3px solid var(--ink);
}

.coin {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--marigold);
  color: var(--ink);
  font-family: var(--label-font);
  font-weight: 700;
  animation: float 4.8s ease-in-out infinite;
}
.coin-a { left: 7%; top: 22%; }
.coin-b { right: 3%; top: 10%; background: var(--mint); animation-delay: -1.4s; }

.cloud {
  width: 126px;
  height: 58px;
  left: 47%;
  top: 0;
  background: var(--cream);
  border-radius: 50px;
  box-shadow: 28px 9px 0 var(--cream), -20px 17px 0 var(--cream);
  animation: float 6s ease-in-out infinite reverse;
}
.flag { width: 62px; height: 42px; right: 19%; top: 38%; background: var(--coral); transform: skewX(-15deg); animation: flutter 1.8s ease-in-out infinite; }
.stair-beam { width: 45%; height: 14%; left: 18%; bottom: 8%; background: repeating-linear-gradient(90deg, var(--mint) 0 18px, transparent 18px 34px); transform: rotate(-18deg); }

.artifact {
  width: 210px;
  height: 280px;
  perspective: 1000px;
  z-index: 6;
  cursor: pointer;
}
.artifact-hero { position: absolute; right: 10vw; bottom: 10vh; }
.bottom-artifact { position: absolute; right: 12vw; bottom: 9vh; }
.flip-inner { width: 100%; height: 100%; transition: transform .85s cubic-bezier(.2,.8,.2,1); transform-style: preserve-3d; }
.artifact.flipped .flip-inner, .artifact:hover .flip-inner { transform: rotateY(180deg) rotateZ(-1deg); }
.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border: 4px solid var(--ink);
  border-radius: 24px;
  box-shadow: 14px 14px 0 rgba(23,16,24,.45), 0 0 0 0 rgba(88,240,181,.0);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  font-family: var(--label-font);
  text-transform: uppercase;
}
.artifact.flipped .flip-face { box-shadow: 14px 14px 0 rgba(23,16,24,.45), 0 0 34px rgba(88,240,181,.78); }
.front { background: var(--cream); color: var(--ink); }
.front strong { font-family: var(--hero-font); font-size: 6rem; line-height: .8; color: var(--coral); }
.front span { letter-spacing: .14em; font-weight: 700; }
.back { background: var(--aubergine); color: var(--cream); transform: rotateY(180deg); text-transform: none; font-size: 1.16rem; line-height: 1.35; justify-content: center; }
.compass { background: var(--mint); }
.token { background: var(--coral); }
.receipt { background: var(--cream); }
.lot { background: var(--marigold); }

.illustration-stack { position: absolute; inset: 0; }
.arch-window { width: 35vw; height: 58vh; right: 6vw; top: 13vh; border-radius: 50% 50% 12px 12px; background: var(--aubergine); box-shadow: 18px 18px 0 rgba(23,16,24,.28); }
.arch-window span { position: absolute; inset: 18%; border-radius: inherit; background: linear-gradient(115deg, #24142F 0%, #C96A3A 52%, #58F0B5 100%); }
.checker-strip { left: 4vw; bottom: 12vh; width: 42vw; height: 34px; background: repeating-linear-gradient(90deg, #171018 0 24px, #F4E0B8 24px 48px); transform: rotate(-8deg); }
.squiggle { left: 42vw; top: 31vh; border: 0; color: var(--coral); font: 700 5rem var(--label-font); transform: rotate(18deg); }
.parcel { width: 150px; height: 120px; background: var(--cream); font: 700 .9rem var(--label-font); display: grid; place-items: center; text-align: center; box-shadow: 10px 10px 0 rgba(23,16,24,.25); }
.parcel-one { right: 39vw; top: 54vh; transform: rotate(-12deg); }
.parcel-two { right: 24vw; top: 21vh; transform: rotate(9deg); background: var(--marigold); }

.artifact-row { position: absolute; left: 7vw; bottom: 10vh; display: flex; gap: clamp(18px, 3vw, 42px); transform: rotate(-5deg); }
.orbit-field span { width: 34px; height: 34px; border-radius: 50%; background: var(--marigold); animation: orbit 8s linear infinite; }
.orbit-field span:nth-child(1) { right: 12vw; top: 17vh; }
.orbit-field span:nth-child(2) { right: 30vw; bottom: 26vh; animation-delay: -2s; background: var(--mint); }
.orbit-field span:nth-child(3) { left: 12vw; top: 18vh; animation-delay: -4s; background: var(--coral); }
.orbit-field span:nth-child(4) { left: 44vw; top: 48vh; animation-delay: -6s; background: var(--cream); }

.horizon-portal { width: min(58vw, 720px); height: min(58vw, 720px); right: 6vw; top: 13vh; border-radius: 50%; overflow: hidden; }
.sun-disc { position: absolute; width: 34%; height: 34%; border-radius: 50%; background: var(--marigold); left: 18%; top: 18%; border: 4px solid var(--ink); }
.roofline { position: absolute; left: -5%; right: -5%; bottom: 14%; height: 24%; background: repeating-linear-gradient(135deg, var(--clay) 0 80px, var(--coral) 80px 120px); border-top: 4px solid var(--ink); }
.glyph-board { position: absolute; right: 9vw; bottom: 8vh; display: flex; gap: 14px; transform: rotate(8deg); }
.glyph-board span { position: static; width: 68px; height: 68px; display: grid; place-items: center; background: var(--cream); color: var(--ink); font: 700 2rem var(--label-font); }

.gate-card {
  width: min(780px, 86vw);
  padding: clamp(28px, 5vw, 70px);
  border: 4px solid var(--ink);
  background: rgba(36,20,47,.88);
  box-shadow: 24px 24px 0 rgba(23,16,24,.45);
  text-align: center;
  z-index: 5;
  transform: rotate(-2deg);
}
.gate-card h2 { color: var(--cream); font-size: clamp(4rem, 10vw, 9rem); }
.gate-card p { margin-left: auto; margin-right: auto; }
button {
  margin-top: 20px;
  border: 3px solid var(--ink);
  background: var(--mint);
  color: var(--ink);
  font: 700 .92rem var(--label-font);
  text-transform: uppercase;
  letter-spacing: .13em;
  padding: 18px 26px;
  box-shadow: 8px 8px 0 var(--ink);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
button:hover, .gate-card.open button { transform: translate(5px, 5px); box-shadow: 3px 3px 0 var(--ink); background: var(--marigold); }
.ledger-rings span { position: absolute; inset: 50%; width: 40vmin; height: 40vmin; border: 3px dotted var(--cream); border-radius: 50%; transform: translate(-50%, -50%) scale(.2); opacity: 0; transition: transform .9s ease, opacity .9s ease; }
.gate-card.open + .ledger-rings span { opacity: .75; transform: translate(-50%, -50%) scale(1); }
.gate-card.open + .ledger-rings span:nth-child(2) { transform: translate(-50%, -50%) scale(1.35); transition-delay: .1s; }
.gate-card.open + .ledger-rings span:nth-child(3) { transform: translate(-50%, -50%) scale(1.72); transition-delay: .2s; }

.memphis-one { width: 130px; height: 130px; right: 44vw; top: 18vh; border-radius: 50% 0 50% 50%; background: var(--coral); transform: rotate(20deg); }
.memphis-final { width: 28vw; height: 70px; left: 5vw; bottom: 13vh; background: repeating-linear-gradient(90deg, var(--ink) 0 28px, var(--cream) 28px 56px); transform: rotate(-18deg); }

.z-constellation { position: fixed; right: 22px; top: 50%; transform: translateY(-50%) rotate(20deg); z-index: 90; display: grid; gap: 18px; }
.z-constellation span { width: 13px; height: 13px; border: 2px solid var(--cream); border-radius: 50%; background: var(--aubergine); cursor: pointer; transition: transform .25s ease, background .25s ease; }
.z-constellation span.active { background: var(--mint); transform: scale(1.55); box-shadow: 0 0 18px var(--mint); }
.z-trail { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.z-trail i { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 24px var(--mint), 0 0 0 7px rgba(88,240,181,.18); transform: translate(var(--x, 8vw), var(--y, 8vh)); transition: transform .08s linear; }
.z-trail::before { content: ''; position: absolute; inset: 7vh 8vw 10vh; clip-path: polygon(0 0, 88% 24%, 11% 72%, 100% 100%, 99% 100%, 10% 73%, 87% 25%, 0 1%); background: linear-gradient(115deg, transparent, rgba(88,240,181,.55), rgba(255,111,97,.22), transparent); opacity: .38; }

@keyframes float { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-18px) rotate(8deg); } }
@keyframes flutter { 0%,100% { transform: skewX(-15deg) rotate(0); } 50% { transform: skewX(-25deg) rotate(5deg); } }
@keyframes orbit { from { transform: rotate(0deg) translateX(18px) rotate(0deg); } to { transform: rotate(360deg) translateX(18px) rotate(-360deg); } }

@media (max-width: 820px) {
  .deck { padding: 26px; }
  .floating-skyline, .horizon-portal { opacity: .72; width: 82vw; height: 82vw; right: -16vw; bottom: 6vh; top: auto; }
  .artifact-hero, .bottom-artifact { right: 7vw; bottom: 5vh; width: 150px; height: 205px; }
  .artifact-row { left: 6vw; right: 6vw; bottom: 7vh; gap: 12px; transform: rotate(0); }
  .artifact-row .artifact { width: 30vw; height: 42vw; }
  .front strong { font-size: 3.2rem; }
  .mid-right { text-align: left; justify-self: start; align-self: start; margin-top: 6vh; }
  .z-constellation { right: 12px; }
}
