/* ShardHeart site: the game's cartoon look (gold, turquoise, golden hour, parchment). Every part stands on a painting
   that melts into the next one: no flat bands, no hard edges. */
:root {
  --night: #0b1322;
  --night-2: #13203a;
  --gold: #f3c25a;
  --gold-hi: #ffe39a;
  --gold-deep: #b9852a;
  --teal: #45e6df;
  --teal-deep: #0f8f97;
  --parch: #f6ead0;
  --ink: #3a2410;
  --text: #f6efe0;
  --muted: #e2d6bc;
  --radius: 18px;
  --frame: url(/img/card-frame.webp) 100 fill / 36px stretch;
  --title: "Eagle Lake", Georgia, serif;
  --body: "Alegreya Sans", system-ui, sans-serif;
  --num: "Cinzel", Georgia, serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--text); font: 500 18px/1.6 var(--body); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--gold); }
h1, h2, h3 { font-family: var(--title); font-weight: 400; margin: 0 0 .4em; }
::selection { background: rgba(69,230,223,.35); }

/* ---- the light that follows the pointer, the sparks of clicks */
.cursor-light { position: fixed; z-index: 60; left: 0; top: 0; width: 440px; height: 440px; margin: -220px 0 0 -220px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,220,140,.16), rgba(69,230,223,.07) 35%, rgba(0,0,0,0) 65%); mix-blend-mode: screen; opacity: 0; transition: opacity .4s; will-change: transform; }
.cursor-light.on { opacity: 1; }
.sparks { position: fixed; inset: 0; z-index: 70; pointer-events: none; width: 100vw; height: 100vh; }

/* ---- buttons: the game's turquoise plate and parchment plate, with a glint that runs across */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6em; padding: .85em 1.9em; border-radius: 14px; position: relative; overflow: hidden;
  font: 400 1.15rem var(--title); text-decoration: none; cursor: pointer; border: 3px solid var(--gold); isolation: isolate;
  transition: box-shadow .3s ease, filter .3s ease; box-shadow: 0 0 0 2px #2a1906, 0 8px 22px rgba(0,0,0,.45); will-change: transform; }
.btn::after { content: ""; position: absolute; inset: 3px; border-radius: 10px; border: 1px solid rgba(255,255,255,.35); pointer-events: none; }
.btn::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; width: 40%; left: -60%; transform: skewX(-22deg);
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.45), rgba(255,255,255,0)); transition: left .7s var(--ease); }
.btn:hover::before { left: 120%; }
.btn.shine::before { animation: shine 3.6s ease-in-out infinite; }
@keyframes shine { 0%, 55% { left: -60%; } 80%, 100% { left: 130%; } }
.btn-main { color: #fff8e6; background: linear-gradient(180deg, #3fd4d6, #0d7c86 68%, #0b6670); text-shadow: 0 2px 0 #0a3e44, 0 0 10px rgba(0,0,0,.4); }
.btn-alt { color: var(--ink); background: linear-gradient(180deg, #fff6df, #e5cf9c); }
.btn:hover { filter: brightness(1.1); box-shadow: 0 0 0 2px #2a1906, 0 12px 30px rgba(0,0,0,.5), 0 0 34px rgba(69,230,223,.5); }
.btn-sm { padding: .5em 1.2em; font-size: .98rem; }
.btn-big { padding: 1em 2.3em; font-size: 1.3rem; }
.btn-huge { padding: .8em 2em .8em 1.5em; font-size: 1.5rem; text-align: left; }
.btn-huge svg { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 2px 0 #0a3e44); }
.btn-huge > span { display: grid; line-height: 1.15; }
.btn-huge small { font: 700 .82rem var(--body); letter-spacing: .03em; color: #c9fbf7; text-shadow: none; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---- the bar on top */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem clamp(16px, 4vw, 48px); transition: background .4s ease, box-shadow .4s ease, padding .4s ease; }
.nav.solid { background: linear-gradient(180deg, rgba(9,16,30,.92), rgba(9,16,30,.78)); backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: 0 1px 0 rgba(243,194,90,.4), 0 10px 30px rgba(0,0,0,.35); padding-top: .45rem; padding-bottom: .45rem; }
.nav-brand { display: flex; align-items: center; gap: .6rem; color: var(--gold); text-decoration: none; font: 400 1.35rem var(--title); text-shadow: 0 2px 6px #000; }
.nav-brand img { border-radius: 50%; box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(69,230,223,.5); transition: transform .5s var(--ease); }
.nav-brand:hover img { transform: rotate(-12deg) scale(1.1); }
.nav-links { display: flex; gap: clamp(.2rem, 1vw, .8rem); padding: .3rem; border-radius: 99px; background: rgba(9,16,30,.4); border: 1px solid rgba(243,194,90,.2); backdrop-filter: blur(6px); }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .02em; text-shadow: 0 2px 6px #000; padding: .35em 1em; border-radius: 99px; transition: background .3s, color .3s, box-shadow .3s; }
.nav-links a:hover { background: rgba(243,194,90,.15); color: var(--gold-hi); }
.nav-links a.on { background: linear-gradient(180deg, rgba(63,212,214,.4), rgba(13,124,134,.4)); color: #fff; box-shadow: inset 0 0 0 1px rgba(69,230,223,.7), 0 0 14px rgba(69,230,223,.3); }
.nav-right { display: flex; align-items: center; gap: .7rem; }
.lang { background: rgba(9,16,30,.4); color: var(--gold); border: 2px solid rgba(243,194,90,.6); border-radius: 10px; font: 800 .85rem var(--body); padding: .35em .6em; cursor: pointer; }
.lang:hover { background: rgba(243,194,90,.18); }
.burger { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.burger span { display: block; width: 26px; height: 3px; margin: 5px 0; background: var(--gold); border-radius: 2px; }

/* ---- the rail: one crystal for each part of the page */
.rail { position: fixed; z-index: 45; right: clamp(10px, 1.6vw, 26px); top: 50%; translate: 0 -50%; display: grid; gap: 14px; }
.rail a { position: relative; display: block; width: 18px; height: 18px; }
.rail i { position: absolute; inset: 3px; transform: rotate(45deg); background: rgba(243,194,90,.25); border: 1.5px solid rgba(243,194,90,.85); transition: all .35s var(--ease); box-shadow: 0 0 6px rgba(0,0,0,.6); }
.rail a:hover i { background: rgba(243,194,90,.6); }
.rail a.on i { background: var(--teal); border-color: #fff; box-shadow: 0 0 12px var(--teal), 0 0 0 4px rgba(69,230,223,.2); inset: 1px; }
.rail span { position: absolute; right: 30px; top: 50%; translate: 0 -50%; white-space: nowrap; font: 800 .85rem var(--body); color: var(--gold-hi);
  opacity: 0; transform: translateX(8px); transition: all .3s var(--ease); pointer-events: none; background: rgba(9,16,30,.8); padding: .15em .7em; border-radius: 8px; border: 1px solid rgba(243,194,90,.35); }
.rail a:hover span, .rail a.on span { opacity: 1; transform: none; }
.rail a.on span { opacity: .0; }
.rail a.on:hover span { opacity: 1; }

/* ---- the hero */
.hero { position: relative; height: 100vh; min-height: 680px; overflow: hidden; display: grid; place-items: center; }
.hero-layers { position: absolute; inset: -6% -4%; }
.layer { position: absolute; inset: 0; background: center bottom / cover no-repeat; will-change: transform; }
.layer-ark { animation: ark-float 9s ease-in-out infinite; }
@keyframes ark-float { 50% { translate: 0 -16px; } }
.sunrays { position: absolute; left: 0; top: 0; width: 75%; height: 95%; pointer-events: none; mix-blend-mode: screen; opacity: .5;
  background: repeating-conic-gradient(from 190deg at 20% 44%, rgba(255,214,140,.2) 0deg 3.5deg, rgba(255,214,140,0) 3.5deg 10deg);
  -webkit-mask-image: radial-gradient(ellipse at 20% 44%, #000 0%, rgba(0,0,0,.55) 30%, transparent 68%); mask-image: radial-gradient(ellipse at 20% 44%, #000 0%, rgba(0,0,0,.55) 30%, transparent 68%);
  transform-origin: 20% 44%; animation: rays 16s ease-in-out infinite alternate; }
@keyframes rays { to { transform: rotate(5deg) scale(1.06); opacity: .32; } }
.beam { position: absolute; left: 50%; top: 20%; width: 13vmin; height: 56%; translate: -50% 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(180deg, rgba(120,255,248,0), rgba(120,255,248,.32) 30%, rgba(120,255,248,.5) 70%, rgba(120,255,248,0)); filter: blur(16px); animation: beam 3.2s ease-in-out infinite; }
@keyframes beam { 50% { opacity: .5; width: 9vmin; } }
.fx { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; pointer-events: none; }  /* over the shade, under the words */
.hero-shade { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(11,19,34,0) 45%, rgba(11,19,34,.45) 100%), linear-gradient(180deg, rgba(11,19,34,.5), rgba(11,19,34,0) 20%); }
.hero-content { position: relative; z-index: 3; text-align: center; padding: 0 16px; margin-top: -4vh; }
.hero-content::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 60%; width: min(1000px, 110vw); height: 64%; translate: -50% -50%;
  background: radial-gradient(ellipse at center, rgba(8,13,26,.6), rgba(8,13,26,0) 70%); pointer-events: none; }
.hero-logo { width: min(760px, 88vw); height: auto; margin: 0 auto; filter: drop-shadow(0 12px 28px rgba(0,0,0,.55)); animation: logo-in 1.6s var(--ease) both, logo-breathe 6s 1.6s ease-in-out infinite; }
@keyframes logo-in { from { opacity: 0; transform: translateY(30px) scale(.92); } }
@keyframes logo-breathe { 50% { transform: scale(1.015); filter: drop-shadow(0 12px 28px rgba(0,0,0,.55)) drop-shadow(0 0 22px rgba(69,230,223,.35)); } }
.hero-tag { font: 400 clamp(1.35rem, 2.6vw, 2.1rem) var(--title); color: var(--parch); margin: .2em 0 .1em; text-shadow: 0 3px 10px #000, 0 0 2px #000; animation: rise 1s .5s both; }
.hero-sub { color: var(--parch); font-size: clamp(1rem, 1.6vw, 1.25rem); margin: 0 0 1.5em; text-shadow: 0 2px 8px #000; animation: rise 1s .7s both; }
.hero-cta { display: flex; gap: 1.1rem; justify-content: center; flex-wrap: wrap; animation: rise 1s .9s both; }
.hero-badge { display: inline-flex; align-items: center; gap: .55em; margin-top: 1.5em; padding: .4em 1.1em; border-radius: 99px; background: rgba(11,19,34,.65);
  border: 1px solid rgba(69,230,223,.5); color: var(--teal); font-weight: 800; animation: rise 1s 1.1s both; backdrop-filter: blur(4px); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; translate: -50% 0; z-index: 3; width: 30px; height: 48px; border: 2px solid var(--gold); border-radius: 16px; box-shadow: 0 0 14px rgba(0,0,0,.5); }
.scroll-hint span { position: absolute; left: 50%; top: 9px; width: 4px; height: 10px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: wheel 1.8s infinite; }
@keyframes wheel { 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---- the parts of the page: each on its painting, melted into its neighbours (masks, no edges) */
/* each part's painting (and its shade) reaches 340px under the next part; the next part fades its own painting in over
   that, from its top edge: the pictures cross-fade into each other and the page's own colour never shows between them */
:root { --melt: 300px; --under: 340px; }
.sec { position: relative; isolation: isolate; padding: calc(var(--melt) * .55 + clamp(60px, 7vw, 110px)) clamp(16px, 5vw, 64px) calc(var(--melt) * .8 + 40px); margin-top: calc(var(--melt) * -1); }
.sec-bg, .sec::before { position: absolute; inset: 0 0 calc(var(--under) * -1) 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 var(--melt)); mask-image: linear-gradient(180deg, transparent 0, #000 var(--melt)); }
.sec-bg { z-index: -2; background: center / cover no-repeat; will-change: transform; }
.sec::before { content: ""; z-index: -1; }
.sec-inner { position: relative; max-width: 1240px; margin: 0 auto; }
.title { text-align: center; font-size: clamp(2.3rem, 5vw, 3.8rem); color: var(--gold); text-shadow: 0 3px 0 #3a2208, 0 6px 22px rgba(0,0,0,.75), 0 0 40px rgba(243,194,90,.25); }
.lead { max-width: 760px; margin: 0 auto 2.8rem; text-align: center; color: var(--text); font-size: 1.2rem; text-shadow: 0 2px 8px rgba(0,0,0,.9), 0 0 2px #000; }
.divider { width: min(560px, 80vw); margin: 0 auto 1.2rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }

/* about: the sea under the golden sky; medallions on framed parchment */
.about::before { background: rgba(8,13,26,.42); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.pillar { position: relative; text-align: center; padding: 5.6rem 1.4rem 1.4rem; margin-top: 4.5rem; color: var(--ink); border: 36px solid transparent; border-image: var(--frame);
  filter: drop-shadow(0 20px 30px rgba(0,0,0,.5)); transition: transform .25s ease, filter .3s; }
.pillar:hover { filter: drop-shadow(0 26px 40px rgba(0,0,0,.55)) drop-shadow(0 0 26px rgba(69,230,223,.35)); }
.medal { position: absolute; left: 50%; top: -8.4rem; width: 176px; height: 176px; translate: -50% 0; filter: drop-shadow(0 10px 16px rgba(0,0,0,.55)); transition: transform .6s var(--ease); animation: medal-bob 5s ease-in-out infinite; }
.pillar:nth-child(2) .medal { animation-delay: -1.6s; }
.pillar:nth-child(3) .medal { animation-delay: -3.2s; }
@keyframes medal-bob { 50% { margin-top: -8px; } }
.pillar:hover .medal { transform: rotate(-8deg) scale(1.08); }
.pillar h3 { color: #5a3410; font-size: 1.5rem; }
.pillar p { margin: 0; color: #4a3520; }

/* ---- the story */
.story { position: relative; height: 520vh; margin-top: calc(var(--melt) * -1); }  /* no colour of its own: the stage fades in over the part above */
.story-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; background: #05080f; -webkit-mask-image: linear-gradient(180deg, transparent, #000 var(--melt)); mask-image: linear-gradient(180deg, transparent, #000 var(--melt)); }
.scene { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.scene.on { opacity: 1; }
.sl { position: absolute; inset: -8%; background: center / cover no-repeat; will-change: transform; }
.story-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, rgba(0,0,0,0) 45%, rgba(0,0,0,.6)), linear-gradient(180deg, rgba(5,8,15,.5), rgba(5,8,15,0) 18%, rgba(5,8,15,0) 62%, rgba(5,8,15,.9)); }
.caption { position: absolute; left: 50%; bottom: 7vh; translate: -50% 0; width: min(880px, 92vw); text-align: center; padding: 1.4rem 2rem 1.1rem;
  background: linear-gradient(180deg, rgba(10,14,24,.84), rgba(10,14,24,.7)); border: 2px solid rgba(243,194,90,.75); border-radius: var(--radius); backdrop-filter: blur(8px);
  box-shadow: 0 0 0 3px rgba(0,0,0,.4), 0 18px 40px rgba(0,0,0,.5), inset 0 0 30px rgba(69,230,223,.08); }
.caption-kicker { margin: 0; font: 600 .8rem var(--num); letter-spacing: .25em; text-transform: uppercase; color: var(--teal); }
.caption-text { margin: .4em 0 .7em; font: 400 clamp(1.15rem, 2vw, 1.5rem)/1.5 var(--title); color: var(--parch); min-height: 3em; transition: opacity .45s ease, transform .45s ease, filter .45s; }
.caption-text.out { opacity: 0; transform: translateY(10px); filter: blur(4px); }
.caption-bar { height: 3px; border-radius: 3px; background: rgba(243,194,90,.2); overflow: hidden; margin: 0 auto .7rem; width: 60%; }
.caption-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--teal)); box-shadow: 0 0 10px var(--teal); }
.caption-dots { display: flex; gap: 10px; justify-content: center; }
.caption-dots i { width: 9px; height: 9px; transform: rotate(45deg); background: rgba(243,194,90,.35); transition: background .3s, transform .3s; }
.caption-dots i.on { background: var(--teal); transform: rotate(45deg) scale(1.4); box-shadow: 0 0 8px var(--teal); }

/* ---- the world: the Ark among the stars behind painted cards in a gold frame */
.features::before { background: rgba(8,12,24,.5); }
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2rem; }
.card { grid-column: span 2; position: relative; display: flex; flex-direction: column; color: var(--ink); border: 36px solid transparent; border-image: var(--frame);
  filter: drop-shadow(0 22px 34px rgba(0,0,0,.55)); transition: transform .25s ease, filter .3s; }
.card:nth-child(4), .card:nth-child(5) { grid-column: span 3; }
.card:hover { filter: drop-shadow(0 28px 44px rgba(0,0,0,.6)) drop-shadow(0 0 30px rgba(69,230,223,.4)); }
.card-art { position: relative; aspect-ratio: 3 / 2; margin: -10px -10px 0; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 2px #8a5a1c, 0 0 0 4px #f3d48a, 0 6px 14px rgba(0,0,0,.35); }
.card-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255,255,255,.45), rgba(255,255,255,0) 50%); mix-blend-mode: soft-light; }
.card:hover .card-art::after { opacity: 1; }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.card:hover .card-art img { transform: scale(1.08); }
.card-body { padding: 1.1rem .3rem 0; }
.card h3 { font-size: 1.5rem; color: #5a3410; }
.card p { margin: 0; color: #4a3520; }

/* ---- the tests: the healed land */
.beta::before { background: rgba(11,19,34,.42); }
.beta-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.4rem; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.2rem; }
.steps li { display: flex; gap: 1.2rem; align-items: flex-start; padding: 1.3rem 1.5rem; border-radius: var(--radius); position: relative;
  background: linear-gradient(135deg, rgba(14,26,48,.88), rgba(9,16,30,.78)); border: 1px solid rgba(69,230,223,.45); backdrop-filter: blur(6px);
  box-shadow: 0 14px 30px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.04); transition: transform .35s var(--ease), border-color .3s, box-shadow .3s; }
.steps li:hover { transform: translateX(10px); border-color: var(--teal); box-shadow: 0 14px 30px rgba(0,0,0,.4), 0 0 24px rgba(69,230,223,.25); }
.steps b { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; font: 800 1.35rem var(--num); color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff1c4, var(--gold) 60%, var(--gold-deep)); box-shadow: 0 0 0 2px #2a1906, 0 0 18px rgba(243,194,90,.45); }
.steps h3 { font-size: 1.35rem; color: var(--parch); margin-bottom: .15em; }
.steps p { margin: 0; color: var(--muted); }
.roadmap { color: var(--ink); padding: .4rem .8rem; border: 36px solid transparent; border-image: var(--frame); filter: drop-shadow(0 22px 34px rgba(0,0,0,.5)); transition: transform .25s ease; }
.roadmap h3 { color: #5a3410; font-size: 1.5rem; }
.roadmap ul { list-style: none; margin: 0; padding: 0; position: relative; }
.roadmap ul::before { content: ""; position: absolute; left: .78rem; top: 1rem; bottom: 1rem; width: 3px; background: rgba(138,106,62,.3); border-radius: 3px; }
.roadmap ul::after { content: ""; position: absolute; left: .78rem; top: 1rem; width: 3px; height: var(--road, 0%); background: linear-gradient(180deg, #3aa65a, var(--teal)); border-radius: 3px;
  transition: height 1.8s var(--ease); box-shadow: 0 0 8px rgba(69,230,223,.6); }
.roadmap li { position: relative; padding: .6rem 0 .6rem 2.3rem; font-weight: 800; color: #7a6040; }
.roadmap li::before { content: ""; position: absolute; z-index: 1; left: .2rem; top: .8rem; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #8a6a3e; background: #efe0bd; }
.roadmap li.done { color: #2f5d3a; }
.roadmap li.done::before { background: #3aa65a; border-color: #1f5d33; box-shadow: inset 0 0 0 3px #efe0bd; }
.roadmap li.now { color: #0b6670; }
.roadmap li.now::before { background: var(--teal); border-color: var(--teal-deep); box-shadow: 0 0 0 5px rgba(69,230,223,.3); animation: pulse 1.6s infinite; }

/* ---- download: the constructs over the world */
.download { min-height: 100vh; display: flex; align-items: center; }
.download::before { background: linear-gradient(90deg, rgba(8,12,24,.86) 0%, rgba(8,12,24,.55) 40%, rgba(8,12,24,.1) 66%); }
.dl-inner { width: 100%; }
.dl-text { max-width: 620px; }
.title-left, .lead-left { text-align: left; margin-left: 0; }
.divider-left { margin-left: 0; }
.dl-buttons { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.4rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.chips li { padding: .4em .95em; border-radius: 99px; font-weight: 800; font-size: .95rem; color: var(--parch); background: rgba(9,16,30,.6); border: 1px solid rgba(243,194,90,.45); backdrop-filter: blur(4px); }

/* ---- join: the game's own login window, on the town at dusk */
.join .sec-bg, .join::before { bottom: 0; }  /* the last part: nothing below it to reach under */
.join { min-height: 100vh; display: grid; place-items: center; padding-bottom: 140px; }
.join::before { background: linear-gradient(180deg, rgba(11,19,34,.2), rgba(11,19,34,.35) 60%, rgba(7,12,22,.8)); }
.panel { position: relative; z-index: 2; width: 560px; max-width: 100%; min-height: 600px; padding: clamp(84px, 21vw, 112px) clamp(30px, 11vw, 64px) 64px;
  background: url(/img/login-panel.webp) center / 100% 100% no-repeat; color: var(--ink); filter: drop-shadow(0 28px 44px rgba(0,0,0,.65)); }
.panel-plaque { position: absolute; top: 3.6%; left: 22%; right: 22%; height: 8.5%; display: grid; place-items: center; font: 400 clamp(1.3rem, 3.4vw, 1.75rem) var(--title); color: #3a2410; }
.panel form { display: grid; gap: .9rem; padding: 0 .6rem; }
.panel label { display: grid; gap: .25rem; font-weight: 800; color: #4a2d12; }
.panel input { font: 500 1.08rem var(--body); color: #fff6df; padding: .75em 1em; border-radius: 12px; border: 2px solid #c9952f; background: #0f1d3d;
  box-shadow: inset 0 3px 8px rgba(0,0,0,.6); outline: none; transition: border-color .2s, box-shadow .2s; }
.panel input:focus { border-color: var(--teal); box-shadow: inset 0 3px 8px rgba(0,0,0,.6), 0 0 0 3px rgba(69,230,223,.35), 0 0 18px rgba(69,230,223,.35); }
.form-note { margin: 0; font-size: .95rem; color: #6b5034; text-align: center; }
.form-error { margin: 0; min-height: 1.4em; color: #a3261c; font-weight: 800; text-align: center; }
.form-error.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.panel .btn { margin-top: .3rem; width: 86%; justify-self: center; }
.join-done { text-align: center; display: grid; justify-items: center; gap: .4rem; padding: .4rem .6rem 0; }
.join-done img { border-radius: 50%; box-shadow: 0 0 0 4px var(--gold), 0 0 24px rgba(69,230,223,.5); margin-bottom: .4rem; animation: ark-float 5s ease-in-out infinite; }
.join-done h3 { color: #5a3410; font-size: 1.8rem; }
.join-done p { margin: 0 0 .8rem; color: #4a3520; }

/* ---- footer, back to top */
.footer { position: relative; text-align: center; padding: 220px 16px 40px; margin-top: -260px; background: linear-gradient(180deg, rgba(7,12,22,0), #070c16 200px); color: var(--muted); }
.footer img { margin: 0 auto .6rem; border-radius: 50%; }
.footer p { margin: .3rem 0; }
.foot-links { display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap; }
.foot-links a { color: var(--gold); text-decoration: none; }
.foot-small { font-size: .85rem; opacity: .7; }
.to-top { position: fixed; z-index: 45; right: clamp(14px, 2vw, 28px); bottom: 22px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%;
  color: #fff; background: linear-gradient(180deg, #3fd4d6, #0b6670); border: 3px solid var(--gold); box-shadow: 0 0 0 2px #2a1906, 0 8px 20px rgba(0,0,0,.5);
  opacity: 0; transform: translateY(20px) scale(.8); transition: all .4s var(--ease); pointer-events: none; }
.to-top svg { width: 24px; height: 24px; }
.to-top.on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { box-shadow: 0 0 0 2px #2a1906, 0 8px 20px rgba(0,0,0,.5), 0 0 22px rgba(69,230,223,.6); }

/* ---- appearing as you scroll */
.reveal { opacity: 0; transform: translateY(40px) scale(.98); transition: opacity .9s ease, transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- phones */
@media (max-width: 1100px) { .rail { display: none; } }
@media (max-width: 960px) {
  .pillars, .beta-grid { grid-template-columns: 1fr; }
  .pillar { margin-top: 6rem; }
  .cards { grid-template-columns: 1fr; }
  .card, .card:nth-child(4), .card:nth-child(5) { grid-column: auto; }
  .download::before { background: linear-gradient(90deg, rgba(8,12,24,.86) 0%, rgba(8,12,24,.55) 40%, rgba(8,12,24,.1) 66%); }
  .dl-text { text-align: center; margin: 0 auto; }
  .title-left, .lead-left { text-align: center; margin-left: auto; }
  .divider-left { margin-left: auto; }
  .dl-buttons, .chips { justify-content: center; }
}
@media (max-width: 760px) {
  .nav-links { position: fixed; inset: 64px 12px auto 12px; flex-direction: column; gap: 0; background: rgba(9,16,30,.96); border-radius: 14px; padding: .4rem 1rem; display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem; border-bottom: 1px solid rgba(243,194,90,.15); border-radius: 8px; }
  .burger { display: block; }
  .nav-right .btn-sm { display: none; }
  .panel { min-height: 0; }
  .story { height: 460vh; }
  .btn-huge { font-size: 1.25rem; }
  .cursor-light { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---- sub-pages (Tools/make_pages.py) */
.sub .sub-hero { position: relative; isolation: isolate; padding: 170px 16px 90px; text-align: center; overflow: hidden; }
.sub-hero-bg { position: absolute; z-index: -1; inset: 0; background: center / cover no-repeat; filter: saturate(1.1);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.sub-hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(8,12,24,.55), rgba(8,12,24,.35) 50%, rgba(11,19,34,1)); }
.sub-hero .lead { margin-bottom: 0; }
.sub-body { padding: 10px clamp(16px, 5vw, 64px) 120px; }
.sub-inner { max-width: 1180px; margin: 0 auto; }
.sub-inner .title { margin-top: 70px; font-size: clamp(2rem, 4vw, 2.9rem); }
.sub-inner .title:first-child { margin-top: 10px; }
.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.key { display: flex; align-items: center; gap: 14px; padding: .8rem 1rem; border-radius: 14px; background: rgba(14,26,48,.85); border: 1px solid rgba(243,194,90,.35); }
.key kbd { min-width: 74px; padding: .35em .6em; text-align: center; font: 800 .95rem var(--num); color: var(--ink); border-radius: 9px;
  background: linear-gradient(180deg, #fff6df, #e5cf9c); box-shadow: 0 3px 0 #8a5a1c, 0 0 0 2px #2a1906; white-space: nowrap; }
.key span { color: var(--parch); font-weight: 700; }
.pillar.has-medal { padding-top: 5.2rem; }
.pillar:not(.has-medal) { margin-top: 0; padding-top: 1.4rem; }
.skill-key { font: 600 .8rem var(--num); letter-spacing: .14em; text-transform: uppercase; color: #0b6670 !important; margin-bottom: .4em !important; }
.rarities { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.rarities span { display: grid; text-align: center; padding: .7rem 1.3rem; border-radius: 14px; font: 400 1.25rem var(--title); color: var(--c); background: rgba(9,16,30,.8);
  border: 2px solid var(--c); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 40%, transparent); }
.rarities small { font: 700 .8rem var(--body); color: var(--muted); }
.faq { max-width: 860px; }
.qa { margin-bottom: 14px; padding: 0 1.3rem; border-radius: 14px; background: rgba(14,26,48,.88); border: 1px solid rgba(243,194,90,.4); transition: border-color .3s; }
.qa[open] { border-color: var(--teal); box-shadow: 0 0 22px rgba(69,230,223,.18); }
.qa summary { cursor: pointer; list-style: none; padding: 1.05rem 0; font: 400 1.25rem var(--title); color: var(--gold); display: flex; justify-content: space-between; gap: 1rem; }
.qa summary::after { content: "+"; color: var(--teal); font: 800 1.4rem var(--body); transition: transform .3s; }
.qa[open] summary::after { transform: rotate(45deg); }
.qa p { margin: 0 0 1.1rem; color: var(--text); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.shot { display: block; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 2px #8a5a1c, 0 0 0 4px #f3d48a, 0 16px 30px rgba(0,0,0,.5); }
.shot img { width: 100%; height: auto; transition: transform 1s var(--ease); }
.shot:hover img { transform: scale(1.06); }
.lightbox { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; background: rgba(5,8,15,.92); backdrop-filter: blur(6px); }
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 10px; box-shadow: 0 0 0 3px var(--gold), 0 20px 60px rgba(0,0,0,.7); }
.lightbox button { position: absolute; top: 18px; right: 22px; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--gold); background: rgba(9,16,30,.8); color: var(--gold); font-size: 1.3rem; cursor: pointer; }

.discord-link { display: inline-block; margin-top: .2em; font-weight: 800; color: #4b5bd6; }
.steps a { color: var(--teal); font-weight: 800; }
