/* Public portal. The page reads top to bottom like the scene: night sky, treeline, firelit ground. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--night-950); color: var(--cream); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; }
svg { fill: currentColor; }
svg.sprite { position: absolute; width: 0; height: 0; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--flame); outline-offset: 4px; border-radius: 10px; }
[hidden] { display: none !important; }

/* Clay surfaces */
.clay-button, .token, .step, .support-section, .subscriber-note, .public-scene { background-size: 128px, auto; }
.clay-button {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 21px 13px; border: 0;
  border-radius: 17px 15px 18px 16px / 16px 18px 15px 17px; font-size: 15px; line-height: 1.3; font-weight: 700; color: #3d1707; white-space: nowrap;
  background-image: var(--grain), linear-gradient(175deg, #ffbb55, #f4831f 72%);
  box-shadow: inset 0 2px 0 rgba(255, 240, 200, .7), inset 0 -3px 4px rgba(150, 60, 0, .35), 0 5px 0 #8a3a0c, 0 12px 20px rgba(5, 4, 20, .45);
  transition: transform .12s ease-out, box-shadow .12s ease-out;
}
.clay-button svg { width: 16px; height: 16px; }
.clay-button:hover { transform: translateY(-2px); box-shadow: inset 0 2px 0 rgba(255, 240, 200, .7), inset 0 -3px 4px rgba(150, 60, 0, .35), 0 7px 0 #8a3a0c, 0 16px 24px rgba(5, 4, 20, .45); }
.clay-button:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255, 240, 200, .7), inset 0 -3px 4px rgba(150, 60, 0, .35), 0 1px 0 #8a3a0c, 0 4px 8px rgba(5, 4, 20, .45); }

/* Sky */
.sky {
  position: relative; isolation: isolate; overflow: hidden; padding-bottom: 150px;
  background: linear-gradient(180deg, #070921 0%, #0f1338 28%, #1d2060 58%, #3a2f78 84%, #5b4691 100%);
}
.stars { position: absolute; inset: 0 0 34%; z-index: -1; background: url('/assets/stars.svg') 0 0 / 640px; -webkit-mask-image: linear-gradient(#000 50%, transparent); mask-image: linear-gradient(#000 50%, transparent); }
.stars::after { content: ''; position: absolute; inset: 0; background: url('/assets/stars.svg') 210px 130px / 460px; animation: starlight 4.5s ease-in-out infinite alternate; }
@keyframes starlight { from { opacity: .1; } to { opacity: .9; } }
.moon { position: absolute; z-index: -1; top: 104px; right: max(5vw, calc(50% - 610px)); width: clamp(76px, 10.5vw, 146px); height: auto; filter: drop-shadow(0 0 34px rgba(251, 227, 188, .5)); animation: drift 7s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateY(10px) rotate(-4deg); } }

.portal-header { max-width: 1240px; margin: 0 auto; padding: 26px 32px 10px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.portal-brand { display: flex; align-items: center; gap: 12px; }
.portal-brand img { width: 44px; height: auto; filter: drop-shadow(0 4px 6px rgba(4, 3, 18, .5)); }
.portal-brand .clay-type { font-size: 27px; line-height: 1; }
.portal-brand small, .footer-wordmark small { display: block; margin-top: 7px; font: 600 10.5px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--dusk-200); }
.portal-header nav { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 500; color: var(--dusk-200); }
.portal-header nav a:not(.clay-button) { transition: color .15s; }
.portal-header nav a:not(.clay-button):hover { color: var(--cream); }

.intro { text-align: center; padding: 46px 24px 50px; }
.intro > * { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.intro > :nth-child(2) { animation-delay: .08s; }
.intro > :nth-child(3) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
.intro-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 17px 8px 13px; border-radius: 99px;
  font-size: 12px; line-height: 1.4; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--dusk-200);
  background: rgba(196, 187, 232, .1); box-shadow: inset 0 0 0 1.5px rgba(196, 187, 232, .2);
}
.warm-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--flame); box-shadow: 0 0 12px 2px var(--ember); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .5; } }
.intro h1 {
  margin: 20px 0 20px; padding-bottom: .09em; font-size: clamp(62px, 12.4vw, 168px); line-height: .92; font-weight: 900; letter-spacing: -.035em; color: transparent;
  background: linear-gradient(180deg, #fff6e2 18%, #fde2a8 54%, #fda529 97%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 5px 0 #2a1552) drop-shadow(0 18px 30px rgba(5, 4, 24, .55));
}
.intro > p { max-width: 540px; margin: 0 auto; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--dusk-200); }

/* The scene, framed in carved wood */
.public-scene {
  position: relative; z-index: 2; width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 14px 14px 0;
  border-radius: 34px 30px 36px 32px / 32px 36px 30px 34px;
  background-image: var(--grain), linear-gradient(172deg, #c9662f, #8c3b1a 58%, #6f2c13);
  box-shadow: inset 0 3px 0 rgba(255, 214, 170, .5), inset 0 -6px 8px rgba(45, 12, 0, .5), 0 9px 0 #3a1506, 0 34px 60px rgba(4, 3, 18, .6);
  animation: rise .9s cubic-bezier(.2, .8, .2, 1) .24s both;
}
.scene-window { aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #0a0c24; box-shadow: 0 0 0 3px #3a1506, 0 2px 0 4px rgba(255, 214, 170, .3); }
.scene-window iframe { display: block; width: 100%; height: 100%; border: 0; }
.scene-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 8px 15px 12px; font-size: 14px; line-height: 1.3; font-weight: 600; color: #ffe7c9; }
.scene-toolbar > div, .scene-mode { display: flex; align-items: center; gap: 10px; }
.scene-toolbar button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 14px; border: 0; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--cream);
  background: rgba(43, 14, 5, .55); box-shadow: inset 0 2px 4px rgba(20, 5, 0, .65), 0 1px 0 rgba(255, 214, 170, .28); transition: background .15s;
}
.scene-toolbar button:hover { background: rgba(43, 14, 5, .8); }
.scene-toolbar svg { width: 18px; height: 18px; }
.scene-toolbar button[aria-pressed='false'] .when-on, .scene-toolbar button[aria-pressed='true'] .when-off { display: none; }
.scene-toolbar button[aria-pressed='true'] { color: #3d1707; background: linear-gradient(175deg, #ffe08a, #f0a93c); box-shadow: inset 0 2px 0 rgba(255, 250, 220, .7), 0 2px 0 #3a1506; }

/* Treeline behind the frame */
.grove { position: absolute; z-index: 1; bottom: 26px; width: 330px; height: auto; pointer-events: none; display: none; }
.grove-left { left: calc(50% - 810px); }
.grove-right { right: calc(50% - 810px); transform: scaleX(-1); }
@media (min-width: 1360px) { .grove { display: block; } }
.horizon { position: absolute; inset: auto 0 0; height: 330px; z-index: 0; pointer-events: none; }
.horizon i { position: absolute; left: 0; right: 0; bottom: 0; background-repeat: repeat-x; background-position: center bottom; }
.horizon .ridge { height: 240px; bottom: 76px; background-image: url('/assets/ridge.svg'); background-size: 1500px 240px; }
.horizon .pines-far { height: 170px; bottom: 30px; background-image: url('/assets/pines-far.svg'); background-size: 1200px 170px; }
.horizon .pines-near { height: 230px; bottom: -1px; background-image: url('/assets/pines-near.svg'); background-size: 1200px 230px; }

/* Forest floor */
main { position: relative; padding: 0 16px 100px; background: linear-gradient(180deg, #0d1a26 0%, #101528 50%, #171226 100%); }
.campsite-details { position: relative; z-index: 3; width: min(1040px, 100%); margin: 0 auto; padding-top: 4px; transform: translateY(-74px); margin-bottom: -74px; display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 22px; align-items: center; }
.token {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px 17px; border-radius: 23px 20px 25px 21px / 21px 25px 20px 23px;
  background-image: var(--grain), linear-gradient(170deg, #30347f, #191d54 72%);
  box-shadow: inset 0 2px 0 rgba(206, 198, 255, .3), inset 0 -4px 5px rgba(5, 6, 28, .55), 0 6px 0 #080a24, 0 18px 28px rgba(4, 3, 18, .5);
}
.token > svg { width: 46px; height: 46px; padding: 11px; flex: none; border-radius: 50%; color: #4a1f0e; background: radial-gradient(circle at 35% 28%, #fff0b8, #fcd96b 50%, #eb9f30); box-shadow: inset 0 -3px 3px rgba(150, 70, 10, .5), 0 3px 0 #080a24; }
.token small { display: block; font-size: 11.5px; line-height: 1.4; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dusk-200); }
.token strong { display: block; font-size: 19px; line-height: 1.3; font-weight: 700; }
.token-clock { aspect-ratio: 3; flex-direction: column; justify-content: center; gap: 1px; padding: 0 14% 1%; text-align: center; background: url('/assets/clay-countdown-sign.webp') center / 100% 100% no-repeat; box-shadow: none; filter: drop-shadow(0 12px 14px rgba(4, 3, 18, .55)); }
.token-clock small { color: #f2c9a0; font-size: 10.5px; }
.token-clock strong { font-size: clamp(32px, 3.4vw, 38px); line-height: 1; font-weight: 900; text-shadow: 0 3px 0 #230b03; white-space: nowrap; }
.token-clock strong.is-words { font-size: clamp(17px, 2vw, 23px); line-height: 1.4; }
.watch-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 34px; }
.watch-links:not(:has(a:not([hidden]))) { display: none; }
.preview-note { max-width: 560px; margin: 26px auto 0; text-align: center; font-size: 15px; line-height: 1.6; color: var(--dusk-300); }

.how-section { width: min(1120px, 100%); margin: 120px auto 0; }
.section-intro { max-width: 640px; margin-bottom: 96px; }
.section-eyebrow { font-size: 12px; line-height: 1.4; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--tent); }
h2 { margin: 14px 0 16px; font-size: clamp(38px, 5.4vw, 66px); line-height: 1.02; }
.section-intro p { max-width: 460px; margin: 0; font-size: 18px; color: var(--dusk-200); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step { position: relative; padding: 102px 28px 32px; border-radius: 30px 26px 32px 28px / 28px 32px 26px 30px; }
.step img { position: absolute; top: -66px; left: 22px; width: auto; height: 152px; filter: drop-shadow(0 14px 12px rgba(4, 3, 18, .5)); transition: transform .4s cubic-bezier(.2, 1.5, .4, 1); }
.step:hover img { transform: translateY(-10px) rotate(-5deg); }
.step-number { position: absolute; top: 18px; right: 26px; font-size: 62px; line-height: 1; font-weight: 900; opacity: .26; }
.step h3 { margin: 0 0 10px; font: 800 25px/1.15 var(--display); font-variation-settings: 'SOFT' 100, 'WONK' 1; letter-spacing: -.01em; }
.step p { margin: 0; font-size: 16px; line-height: 1.6; color: rgba(255, 243, 218, .84); }
.step:nth-child(1) { transform: rotate(-1.2deg); background-image: var(--grain), linear-gradient(170deg, #c4622f, #7d3419 78%); box-shadow: inset 0 3px 0 rgba(255, 214, 170, .45), inset 0 -5px 6px rgba(45, 12, 0, .5), 0 8px 0 #3a1506, 0 26px 40px rgba(4, 3, 18, .5); }
.step:nth-child(2) { transform: translateY(20px) rotate(.9deg); background-image: var(--grain), linear-gradient(170deg, #3f7860, #1f4a3c 78%); box-shadow: inset 0 3px 0 rgba(200, 240, 200, .32), inset 0 -5px 6px rgba(4, 22, 18, .55), 0 8px 0 #0a1b18, 0 26px 40px rgba(4, 3, 18, .5); }
.step:nth-child(3) { transform: rotate(-.6deg); background-image: var(--grain), linear-gradient(170deg, #4a3f8c, #2a2466 78%); box-shadow: inset 0 3px 0 rgba(206, 198, 255, .32), inset 0 -5px 6px rgba(5, 6, 28, .55), 0 8px 0 #100d33, 0 26px 40px rgba(4, 3, 18, .5); }

/* Firelit ground */
.ground { position: relative; padding: 70px 16px 0; background: radial-gradient(ellipse 900px 480px at 50% 290px, rgba(254, 140, 28, .22), transparent 70%), linear-gradient(180deg, #171226 0%, #26131c 20%, #3a1a10 68%, #2b0e05 100%); }
.support-section {
  width: min(1040px, 100%); margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; gap: 36px; align-items: center; padding: 42px 46px 44px 34px;
  border-radius: 36px 32px 38px 34px / 34px 38px 32px 36px;
  background-image: var(--grain), linear-gradient(172deg, #c9662f, #8c3b1a 58%, #6f2c13);
  box-shadow: inset 0 3px 0 rgba(255, 214, 170, .5), inset 0 -6px 8px rgba(45, 12, 0, .5), 0 9px 0 #2b0e05, 0 34px 60px rgba(10, 3, 2, .6);
}
.support-lantern { width: 118px; height: auto; align-self: end; filter: drop-shadow(0 0 36px rgba(254, 165, 41, .6)); animation: flicker 3.2s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { filter: drop-shadow(0 0 36px rgba(254, 165, 41, .6)); } 45% { filter: drop-shadow(0 0 22px rgba(254, 165, 41, .38)); } 70% { filter: drop-shadow(0 0 42px rgba(254, 165, 41, .7)); } }
.support-section .section-eyebrow { color: #ffd9ae; }
.support-section h2 { margin: 10px 0 12px; font-size: clamp(32px, 4.2vw, 50px); text-shadow: 0 3px 0 #3a1506; }
.support-section p { max-width: 470px; margin: 0; font-size: 17px; color: #ffe7c9; }
.support-wallet { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 9px 9px 9px 16px; border-radius: 15px; background: rgba(43, 14, 5, .6); box-shadow: inset 0 2px 4px rgba(20, 5, 0, .7), 0 1px 0 rgba(255, 214, 170, .28); }
.support-wallet code { flex: 1; min-width: 0; padding: 4px 0; font: 500 13.5px/1.5 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; overflow-wrap: anywhere; color: #ffe7c9; }
.support-wallet button { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 8px 13px; border: 0; border-radius: 10px; font-size: 13.5px; font-weight: 700; color: #3d1707; background: linear-gradient(175deg, #ffe08a, #f0a93c); box-shadow: inset 0 2px 0 rgba(255, 250, 220, .7), 0 3px 0 #2b0e05; transition: transform .1s; }
.support-wallet button:active { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255, 250, 220, .7), 0 1px 0 #2b0e05; }
.support-wallet button svg { width: 15px; height: 15px; }
.support-qr { text-align: center; }
.qr-tile { display: grid; place-items: center; width: 176px; height: 176px; margin: 0 auto; overflow: hidden; border-radius: 18px; background: #fff6df; color: #caa173; transform: rotate(2.5deg); box-shadow: 0 0 0 4px #f1d6a4, 0 7px 0 4px #2b0e05, 0 22px 28px rgba(20, 6, 2, .5); }
.qr-tile svg { width: 44%; height: auto; }
.qr-tile img { display: block; width: 100%; height: 100%; }
.support-qr small { display: block; margin-top: 24px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ffd9ae; }

.subscriber-note {
  width: min(1040px, 100%); margin: 38px auto 0; display: flex; align-items: center; gap: 22px; padding: 26px 30px 28px;
  border-radius: 28px 25px 30px 26px / 26px 30px 25px 28px;
  background-image: var(--grain), linear-gradient(170deg, #3f7860, #1f4a3c 78%);
  box-shadow: inset 0 3px 0 rgba(200, 240, 200, .32), inset 0 -5px 6px rgba(4, 22, 18, .55), 0 7px 0 #0a1b18, 0 24px 36px rgba(10, 3, 2, .5);
}
.subscriber-star { display: grid; place-items: center; width: 58px; height: 58px; flex: none; border-radius: 50%; color: #4a1f0e; background: radial-gradient(circle at 35% 28%, #fff0b8, #fcd96b 50%, #eb9f30); box-shadow: inset 0 -3px 3px rgba(150, 70, 10, .5), 0 4px 0 #0a1b18; }
.subscriber-star svg { width: 28px; height: 28px; }
.subscriber-note > div { flex: 1; }
.subscriber-note h3 { margin: 0 0 6px; font: 800 24px/1.2 var(--display); font-variation-settings: 'SOFT' 100, 'WONK' 1; }
.subscriber-note p { max-width: 640px; margin: 0; font-size: 15.5px; line-height: 1.6; color: rgba(255, 243, 218, .86); }
.twitch-only { flex: none; padding: 8px 14px; border-radius: 99px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; color: #d6f0c8; background: rgba(4, 22, 18, .45); box-shadow: inset 0 2px 3px rgba(2, 12, 10, .6), 0 1px 0 rgba(200, 240, 200, .25); }

.portal-footer { width: min(1120px, 100%); margin: 84px auto 0; padding: 30px 6px 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 2px dashed rgba(255, 214, 170, .22); font-size: 14.5px; color: #e9bd92; }
.footer-wordmark { display: flex; align-items: center; gap: 11px; color: var(--cream); }
.footer-wordmark img { width: 36px; height: auto; }
.footer-wordmark .clay-type { font-size: 22px; line-height: 1; }
.footer-wordmark small { color: #e9bd92; }
.portal-footer > a:last-child { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #ffd9ae; }
.portal-footer > a:last-child:hover { color: var(--cream); }
.portal-footer > a:last-child svg { width: 15px; height: 15px; }

@media (max-width: 900px) {
  .campsite-details { grid-template-columns: 1fr 1fr; gap: 16px; }
  .token-clock { grid-column: 1 / -1; grid-row: 1; width: min(420px, 100%); margin: 0 auto; }
  .steps { grid-template-columns: 1fr; gap: 92px; }
  .step:nth-child(n) { transform: none; }
  .section-intro { margin-bottom: 100px; }
  .support-section { grid-template-columns: 1fr; gap: 30px; padding: 36px 26px 40px; text-align: center; }
  .support-section p { margin: 0 auto; }
  .support-lantern { display: none; }
  .support-wallet { text-align: left; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .portal-header { padding: 18px 18px 6px; }
  .portal-header nav > a:not(.clay-button) { display: none; }
  .portal-brand img { width: 36px; }
  .portal-brand .clay-type { font-size: 22px; }
  .portal-brand small { display: none; }
  .clay-button { padding: 10px 16px 11px; font-size: 14px; }
  .moon { top: 172px; right: 16px; width: 60px; }
  .intro { padding: 44px 18px 36px; }
  .intro-eyebrow { font-size: 10.5px; letter-spacing: .12em; }
  .sky { padding-bottom: 118px; }
  .public-scene { padding: 9px 9px 0; border-radius: 24px 21px 25px 22px; }
  .scene-window { border-radius: 15px; }
  .scene-toolbar { padding: 10px 4px 11px 8px; font-size: 13px; }
  .scene-toolbar button { padding: 7px 11px; font-size: 13px; }
  .campsite-details { transform: translateY(-58px); margin-bottom: -58px; gap: 12px; }
  .token { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 15px 15px; }
  .token-clock { align-items: center; }
  .token > svg { width: 38px; height: 38px; padding: 9px; }
  .token strong { font-size: 16px; }
  .token-clock strong { font-size: 32px; }
  .how-section { margin-top: 84px; }
  .subscriber-note { flex-wrap: wrap; padding: 22px 22px 24px; gap: 16px; }
  .subscriber-note > div { flex-basis: calc(100% - 80px); }
  .portal-footer { flex-direction: column; align-items: flex-start; gap: 18px; margin-top: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
