/* Live and Let SMP — shared styles */
:root {
  --night: #0d1210;
  --night-2: #141b17;
  --line: #2a3530;
  --ink: #efe8d8;          /* warm parchment */
  --muted: #b3ab99;
  --lantern: #f2b45c;      /* cozy accent */
  --frost: #8fc7e8;        /* adventure accent */
  --green: #2d783d;        /* brand */
  --green-hi: #3a9150;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--sans);
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--lantern); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }
code { font-family: var(--mono); }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.eyebrow {
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--lantern); margin: 0 0 .75rem;
}
.section-title { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
.pixel { image-rendering: pixelated; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-block-size: 3rem; padding: .7rem 1.35rem;
  border-radius: .5rem; border: 2px solid transparent;
  font: 600 1rem/1 var(--sans); text-decoration: none; color: #fff;
  transition: background-color .2s, border-color .2s, transform .2s var(--ease-out), box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, .copy-btn:focus-visible, .slot:focus-visible { outline: 3px solid var(--lantern); outline-offset: 3px; }
.btn-primary { background: var(--green); border-color: #4aa05f40; box-shadow: inset 0 -3px 0 #0003, 0 6px 20px -8px #2d783d; }
.btn-primary:hover { background: var(--green-hi); box-shadow: inset 0 -3px 0 #0003, 0 10px 28px -8px #3a9150; }
.btn-primary::after {           /* light sweep on hover */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, #ffffff40 50%, transparent 65%);
  transform: translateX(-120%);
}
.btn-primary:hover::after { transform: translateX(120%); transition: transform .7s var(--ease-out); }
.btn-ghost { background: #0d121099; border-color: #efe8d855; color: var(--ink); backdrop-filter: blur(4px); }
.btn-ghost:hover { border-color: var(--ink); background: #0d1210cc; }
.btn img { width: 1.35rem; height: auto; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Server address chip ---------- */
.address {
  display: inline-flex; align-items: stretch; max-width: 100%;
  background: #0a0e0cd9; border: 1px solid var(--line); border-radius: .6rem;
  position: relative;
}
.address code {
  display: flex; align-items: center; padding: .7rem .85rem;
  font: 600 min(1.05rem, 4.2vw)/1.2 var(--mono); color: var(--ink);
  white-space: nowrap;
}
.copy-btn {
  min-inline-size: 4.75rem; min-block-size: 2.75rem;
  border: 0; border-inline-start: 1px solid var(--line);
  border-radius: 0 .6rem .6rem 0;
  background: #ffffff0f; color: var(--lantern);
  font: 600 .95rem var(--sans); cursor: pointer;
  transition: background-color .15s, color .15s;
}
.copy-btn:hover { background: #ffffff1c; }
.copy-btn[data-copied] { color: #8fd9a6; }
.copy-btn[data-failed] { color: #ff9b8a; }
.tip {
  position: absolute; inset-block-start: calc(100% + .45rem); inset-inline-end: 0;
  padding: .3rem .6rem; border-radius: .4rem;
  background: var(--ink); color: var(--night); font-size: .85rem; font-weight: 600;
  white-space: nowrap; pointer-events: none; z-index: 5;
  opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s var(--ease-out);
}
.tip:not(:empty) { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-block-size: 100svh; display: grid; place-items: center;
  padding-block: 5rem 6rem; text-align: center;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%;
  animation: settle 18s var(--ease-out) both;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 58%, #0d121099 0%, #0d121000 70%),
    linear-gradient(to bottom, #0d121066 0%, #0d121000 28%, #0d121000 55%, #0d1210cc 85%, var(--night) 100%);
}
.embers { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { display: grid; justify-items: center; }
.hero h1 { margin-bottom: 1.1rem; }
.hero .logo {
  width: min(600px, 88vw); filter: drop-shadow(0 8px 22px #000a);
  animation: bob 5s ease-in-out infinite;
}
.pitch {
  font-family: var(--serif); font-size: clamp(1.25rem, 1rem + 1.4vw, 1.8rem);
  line-height: 1.3; max-width: 28ch; margin: 0 0 1.4rem; text-shadow: 0 2px 14px #000;
}
.status {
  display: inline-flex; align-items: center; gap: .55rem;
  min-block-size: 1.9rem; padding: .3rem .85rem; margin: 0 0 1rem;
  border-radius: 999px; background: #0a0e0cb3; border: 1px solid #ffffff1f;
  font-size: .88rem; color: var(--ink);
  opacity: 0; transition: opacity .5s;
}
.status.is-ready { opacity: 1; }
.status .dot {
  width: .55rem; height: .55rem; border-radius: 50%; background: #5ee07f;
  box-shadow: 0 0 0 0 #5ee07f99; animation: ping 2.2s ease-out infinite;
}
.hero .address { margin-bottom: 1.1rem; }
.hero .actions { justify-content: center; }
.meta { margin: 1.25rem 0 0; color: var(--muted); font-size: .9rem; text-shadow: 0 1px 6px #000; }
.scroll-cue {
  position: absolute; inset-block-end: 1.5rem; inset-inline-start: 50%; translate: -50% 0;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  color: var(--ink); opacity: .7; text-decoration: none;
  animation: nudge 2.4s ease-in-out infinite;
}
.scroll-cue:hover { opacity: 1; }
.scroll-cue svg { width: 1.25rem; height: 1.25rem; }

/* entrance: staggered rise */
.rise { animation: rise .9s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 110ms + 150ms); }

/* hero content drifts up and fades as you scroll away (progressive enhancement) */
@supports (animation-timeline: scroll()) {
  .hero-inner {
    animation: drift linear both;
    animation-timeline: scroll(root);
    animation-range: 0 90vh;
  }
}

/* ---------- Sticky bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: #0d1210e6; backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-105%); transition: transform .35s var(--ease-out);
}
.bar.is-shown { transform: none; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-block-size: 3.5rem; }
.bar-logo img { height: 1.9rem; width: auto; }
.bar-right { display: flex; align-items: center; gap: .6rem; }
.bar .address code { font-size: .9rem; padding: .35rem .7rem; }
.bar .copy-btn { min-block-size: 2.25rem; min-inline-size: 4rem; font-size: .85rem; }
.bar .btn { min-block-size: 2.4rem; padding: .45rem .95rem; font-size: .9rem; }
.bar .address { display: none; }
@media (min-width: 720px) { .bar .address { display: inline-flex; } }

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 1ms);
}
.js [data-reveal="img"] { transform: scale(1.06); clip-path: inset(8% 8% 8% 8% round .6rem); transition-property: opacity, transform, clip-path; transition-duration: .9s, 1.2s, 1.1s; }
.js [data-reveal="left"] { transform: translateX(-36px); }
.js [data-reveal="right"] { transform: translateX(36px); }
.js [data-reveal].is-in { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round .6rem); }

/* ---------- Settle in / Set out ---------- */
.halves { padding-block: 6rem 3rem; }
.halves-intro { max-width: 40rem; margin-bottom: 3.5rem; }
.halves-intro p { color: var(--muted); margin: .9rem 0 0; }
.half { display: grid; gap: 1.5rem; margin-bottom: 5rem; }
.half figure { margin: 0; position: relative; }
.half figure > img:first-child { border-radius: .6rem; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.half h3 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); margin-bottom: .6rem; color: var(--lantern); }
.half.out h3 { color: var(--frost); }
.half p { margin: 0 0 1rem; }
.half ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.half li { padding-inline-start: 1.4rem; position: relative; color: var(--muted); }
.half li::before {
  content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .6em;
  width: .5rem; height: .5rem; background: var(--lantern);
}
.half.out li::before { background: var(--frost); }
.half li b { color: var(--ink); font-weight: 600; }
.half figure .small-shot { display: none; }

@media (min-width: 860px) {
  .half { grid-template-columns: 1.15fr 1fr; gap: 3.5rem; align-items: center; }
  .half.out figure { order: 2; }
  .half figure .small-shot {
    display: block; position: absolute; width: 42%; aspect-ratio: 16 / 10; object-fit: cover;
    inset-block-end: -2.5rem; inset-inline-end: -1.5rem;
    border: 4px solid var(--night); border-radius: .6rem;
    box-shadow: 0 14px 34px #000a;
  }
  .half.out figure .small-shot { inset-inline-end: auto; inset-inline-start: -1.5rem; }
}

/* ---------- Gallery ---------- */
.gallery { padding-block: 1rem 6rem; }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.shot { overflow: hidden; border-radius: .45rem; background: var(--night-2); }
.shot img {
  width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  transition: transform 1.2s var(--ease-out), filter .6s;
  filter: saturate(.92);
}
.shot:hover img { transform: scale(1.06); filter: saturate(1.08); }
.shots .wide { grid-column: span 2; }
@media (min-width: 860px) {
  .shots { grid-template-columns: repeat(4, 1fr); gap: .75rem; }
  .shots .wide { grid-row: span 2; }
}

/* ---------- The deal (rules) ---------- */
.deal { padding-block: 6rem; background: linear-gradient(to bottom, var(--night), var(--night-2) 30%, var(--night-2) 70%, var(--night)); }
.deal .wrap { display: grid; gap: 2.5rem; }
.deal-head p { color: var(--muted); margin: 1rem 0 0; max-width: 30rem; }
.deal-head a { display: inline-block; margin-top: 1.25rem; font-weight: 600; text-decoration: none; }
.deal-head a:hover { text-decoration: underline; }
.pledges { list-style: none; padding: 0; margin: 0; display: grid; gap: 2.25rem; }
.pledge { display: grid; grid-template-columns: 3rem 1fr; gap: .25rem 1rem; }
.pledge .num { font: 600 .85rem/2.6 var(--mono); color: var(--lantern); }
.pledge h3 { font-size: clamp(1.45rem, 1.15rem + 1.3vw, 2.1rem); position: relative; padding-bottom: .5rem; }
.pledge h3::after {
  content: ""; position: absolute; inset-inline-start: 0; inset-block-end: 0;
  width: 3.5rem; height: 3px; background: var(--green-hi);
  transform-origin: left; transform: scaleX(1);
}
.js .pledge h3::after { transform: scaleX(0); transition: transform .9s var(--ease-out) .35s; }
.js .pledge.is-in h3::after { transform: scaleX(1); }
.pledge p { grid-column: 2; margin: .5rem 0 0; color: var(--muted); max-width: 34rem; }
@media (min-width: 900px) {
  .deal .wrap { grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: start; }
  .deal-head { position: sticky; top: 6rem; }
}

/* ---------- Hotbar ---------- */
.know { padding-block: 6rem; text-align: center; }
.know .hint { color: var(--muted); margin: .9rem 0 2.75rem; }
.hint .keys-hint { display: none; }
@media (hover: hover) and (pointer: fine) { .hint .keys-hint { display: inline; } .hint .tap-hint { display: none; } }

.game { display: grid; justify-items: center; gap: 1.1rem; }
.item-name {
  min-block-size: 1.6rem; margin: 0;
  font: 700 1.05rem/1.5 var(--mono); color: #fff; text-shadow: .12em .12em 0 #3f3f3f;
  animation: name-fade 2.6s ease-out both;
}
.xp {
  width: min(100%, 620px); height: 6px; background: #1b2a12; border: 1px solid #000;
  border-radius: 1px; overflow: hidden;
}
.xp span {
  display: block; height: 100%; width: 100%; background: linear-gradient(#b9ff6a, #6cd43a);
  transform-origin: left; transform: scaleX(0);
}
.xp.is-running span { animation: xp-fill var(--cycle, 5.5s) linear forwards; }
.xp.is-stopped { opacity: .35; }

.hotbar {
  display: grid; grid-template-columns: repeat(9, 1fr);
  width: min(100%, 620px);
  padding: 3px; gap: 0;
  background: #00000080; border: 2px solid #1c1c1c;
  box-shadow: inset 0 0 0 2px #6f6f6f, 0 18px 40px -12px #000;
}
.slot {
  position: relative; aspect-ratio: 1; padding: 0; cursor: pointer;
  display: grid; place-items: center;
  background: #8b8b8b22; border: 0;
  box-shadow: inset 2px 2px 0 #00000060, inset -2px -2px 0 #ffffff1c;
  transition: background-color .15s;
}
.slot:hover { background: #ffffff1f; }
.slot img { width: 64%; height: auto; transition: transform .25s var(--ease-out); }
.slot[aria-selected="true"] { z-index: 1; }
.slot[aria-selected="true"]::after {
  content: ""; position: absolute; inset: -5px;
  border: 3px solid #f4f4f4; box-shadow: 0 0 0 2px #000, inset 0 0 0 2px #000;
  animation: select-pop .25s var(--ease-out);
}
.slot[aria-selected="true"] img { transform: translateY(-2px) scale(1.08); }
.slot .n {
  position: absolute; inset-block-end: 1px; inset-inline-end: 4px;
  font: 700 .62rem var(--mono); color: #ffffffa0; text-shadow: 1px 1px 0 #000;
}
@media (max-width: 480px) { .slot .n { display: none; } }

/* All panels share one grid cell, so the box is always as tall as the
   tallest panel and nothing below it moves when the selection changes. */
.tooltips { display: grid; width: min(100%, 560px); margin-top: .4rem; }
.tooltip {
  grid-area: 1 / 1; text-align: start;
  background: #0b100df5; padding: 1rem 1.15rem 1.1rem;
  border: 3px solid;
  border-image: linear-gradient(#5fbf7f, #1f5a2b) 1;
  box-shadow: inset 0 0 0 2px #0b100d, inset 0 0 0 3px #2d783d55, 0 14px 30px -12px #000;
  font: 600 .98rem/1.55 var(--mono);
  text-shadow: .1em .1em 0 #00000099;
}
.tooltips .tooltip[hidden] { display: block; visibility: hidden; }
@media (max-width: 480px) {
  .tooltip { font-size: .86rem; padding: .85rem .9rem .95rem; }
  .tooltip h3 { font-size: 1rem; }
}
.tooltip.is-entering { animation: tip-in .35s var(--ease-out); }
.tooltip h3 { font: 700 1.1rem/1.4 var(--mono); margin: 0 0 .35rem; }
.tooltip p { margin: 0; color: #aaaaaa; }
.tooltip .lore { color: #d8bd7e; font-style: italic; margin-top: .45rem; }
.tooltip .use { color: #8fb8ff; margin-top: .45rem; }
.tooltip .warn { color: #ff6b6b; margin-top: .45rem; }
.tooltip code { color: #ffd966; }
.c-yellow { color: #ffff55; } .c-aqua { color: #55ffff; } .c-white { color: #ffffff; }
.c-gray { color: #e0e0e0; } .c-pink { color: #ff77ff; } .c-green { color: #55ff55; }
.c-teal { color: #55ffcc; } .c-red { color: #ff5555; } .c-gold { color: #ffaa00; }

/* ---------- Join ---------- */
.join { position: relative; isolation: isolate; padding-block: 7rem; overflow: hidden; }
.join-bg { position: absolute; inset: 0; z-index: -1; }
.join-bg img { width: 100%; height: 100%; object-fit: cover; }
.join-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, #0d1210f2 0%, #0d1210cc 55%, #0d121066 100%), linear-gradient(to bottom, var(--night), #0d121000 18%); }
.join .section-title { margin-bottom: 2.25rem; }
.steps { list-style: none; padding: 0; margin: 0 0 2.25rem; display: grid; gap: 1.5rem; max-width: 40rem; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; }
.steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem; border-radius: .4rem;
  background: var(--green); font: 700 1.1rem var(--serif);
  box-shadow: inset 0 -3px 0 #0004;
}
.js .steps li::before { transform: scale(.4); opacity: 0; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1) .2s, opacity .3s .2s; }
.js .steps li.is-in::before { transform: none; opacity: 1; }
.steps h3 { font: 600 1.1rem/1.3 var(--sans); margin-bottom: .2rem; }
.steps p { margin: 0; color: var(--muted); }
.join .address { margin-bottom: 1.75rem; }
.discord-count { margin: .9rem 0 0; color: var(--muted); font-size: .9rem; min-block-size: 1.4em; }

/* ---------- Footer ---------- */
.site-foot { padding-block: 2.5rem 3rem; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.site-foot .row { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between; }
.site-foot nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-foot a { color: var(--ink); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.legal { margin: 1rem 0 0; font-size: .8rem; opacity: .75; }

/* ---------- Keyframes ---------- */
@keyframes settle { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes drift { to { opacity: 0; transform: translateY(-60px); } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 #5ee07f99; } 70%, 100% { box-shadow: 0 0 0 9px #5ee07f00; } }
@keyframes xp-fill { to { transform: scaleX(1); } }
@keyframes select-pop { from { transform: scale(.82); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes tip-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes name-fade { 0% { opacity: 0; transform: translateY(4px); } 12%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ---------- Reduced motion: keep it calm ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .hero-inner { animation: none !important; }
  .js [data-reveal], .js [data-reveal="img"] { transform: none; clip-path: none; transition: opacity .4s; }
  .js .pledge h3::after, .js .steps li::before { transition: none; transform: none; opacity: 1; }
  .btn, .btn:hover { transform: none; }
  .shot img { transition: none; }
  .xp.is-running span { animation: none; }
  .item-name { animation: none; }
}
