/*
 * play.limas.ca, the LemurSaucePacket website. The same brass-and-iron kit as the game's menus and the launcher:
 * the hi-res brass frame and button (assets/ui, from art/process.mjs `website`), the pack's pixel sprites drawn at
 * 3x like Minecraft draws them, and the palette of art/pixel-kit.mjs. A static page: no build, no framework.
 */

:root {
  --bg: #191715;
  --bg-deep: #110e0b;
  --bg-raised: #201d1b;
  --card: #2a2624;
  --card-hi: #332e2b;
  --line: #3a3430;
  --brass-dark: #87591a;
  --brass: #e0ac46;
  --brass-hi: #f8d982;
  --ink: #1d1407;
  --text: #f1e4c2;
  --text-2: #b9a98a;
  --text-3: #8a7f71;
  --ember: #e8623a;
  --green: #8fc44a;
  --sky: #6fb7e8;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --topbar: 64px;
  --head: 'Cinzel', 'Trajan Pro', Georgia, 'Times New Roman', serif;
  --px: 'Pixelify Sans', 'Segoe UI', system-ui, sans-serif;
  --body: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Roboto, Arial, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(25, 23, 21, 0.9), rgba(25, 23, 21, 0.9)),
    url('pixel/plate-plain.png') 0 0 / 96px 96px repeat,
    var(--bg);
  color: var(--text);
  font: 17px/1.62 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brass-hi);
  text-underline-offset: 3px;
}

a:hover {
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--brass-hi);
  outline-offset: 3px;
}

p {
  margin: 0 0 1em;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

h2 {
  font: 700 clamp(30px, 4.2vw, 46px) / 1.1 var(--head);
  letter-spacing: 0.01em;
  color: var(--brass-hi);
  text-shadow: 0 2px 0 #000, 0 0 24px rgba(224, 172, 70, 0.18);
}

h3 {
  font: 700 22px/1.25 var(--head);
  color: var(--text);
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--brass);
  color: var(--ink);
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

/* ---------------------------------------------------------------- top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar);
  background: rgba(17, 14, 11, 0.86);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid rgba(135, 89, 26, 0.55);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6), 0 10px 30px rgba(0, 0, 0, 0.25);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  text-decoration: none;
}

.brand img.mascot {
  width: 38px;
  height: 38px;
}

.brand img.wordmark {
  height: 26px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav a {
  padding: 8px 11px;
  border-radius: 4px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--brass-hi);
  background: rgba(224, 172, 70, 0.08);
}

.nav a.ext::after {
  content: ' ↗';
  font-size: 12px;
  opacity: 0.7;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-raised);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  position: relative;
  transition: transform 0.2s;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
}

.menu-toggle span::before {
  top: -6px;
}

.menu-toggle span::after {
  top: 6px;
}

/* ---------------------------------------------------------------- server status */

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-2);
  font: 600 13px/1 var(--body);
  white-space: nowrap;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-3);
  flex: none;
}

[data-state='online'] .dot,
.dot[data-state='online'] {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(143, 196, 74, 0.6);
  animation: pulse 2.4s infinite;
}

[data-state='offline'] .dot,
.dot[data-state='offline'] {
  background: var(--ember);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(143, 196, 74, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(143, 196, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(143, 196, 74, 0);
  }
}

/* ---------------------------------------------------------------- buttons */

/* The big one: the launcher's hi-res brass plate, lit amber on hover. */
.btn-brass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 68px;
  padding: 0 14px;
  border: 22px solid transparent;
  border-image: url('ui/button.webp') 44 fill / 22px stretch;
  color: var(--brass-hi);
  font: 800 18px/1 var(--body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 2px 0 #000;
  white-space: nowrap;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.55));
  transition: transform 0.12s, filter 0.12s;
}

.btn-brass:hover {
  border-image-source: url('ui/button-hover.webp');
  color: #fff;
  transform: translateY(-2px);
  filter: drop-shadow(0 12px 26px rgba(224, 172, 70, 0.35));
}

.btn-brass:active {
  transform: translateY(1px);
}

.btn-brass svg {
  flex: none;
}

/* The game's own button, drawn like Minecraft draws it at GUI scale 3. */
.btn-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 22px;
  border: 12px solid transparent;
  border-image: url('pixel/button.png') 4 fill / 12px stretch;
  image-rendering: pixelated;
  color: var(--text);
  font: 600 19px/1 var(--px);
  text-decoration: none;
  text-shadow: 0 2px 0 #3a2a10;
  white-space: nowrap;
  cursor: pointer;
  background: none;
}

.btn-plate:hover {
  border-image-source: url('pixel/button-hover.png');
  color: #fff;
}

.btn-plate.small {
  min-height: 44px;
  padding: 0 10px;
  border-width: 9px;
  border-image-width: 9px;
  font-size: 16px;
}

.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--brass-dark);
  border-radius: 4px;
  background: rgba(224, 172, 70, 0.08);
  color: var(--brass-hi);
  font-weight: 700;
  text-decoration: none;
}

.btn-line:hover {
  background: rgba(224, 172, 70, 0.16);
  color: #fff;
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(100svh - var(--topbar), 980px);
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 72px 0 120px;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 50%;
  transform: scale(1.04);
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  to {
    transform: scale(1.1) translate(-1.2%, -0.8%);
  }
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(17, 14, 11, 0.95) 0%, rgba(17, 14, 11, 0.86) 30%, rgba(17, 14, 11, 0.45) 55%, rgba(17, 14, 11, 0.05) 80%),
    linear-gradient(0deg, var(--bg) 0%, rgba(25, 23, 21, 0) 26%);
}

.hero-inner {
  position: relative;
}

.hero-copy {
  max-width: 640px;
}

.hero-logo {
  margin: 0 0 22px;
}

.hero-logo img {
  display: block;
  width: min(100%, 600px);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.7));
}

.hero-tag {
  margin: 0 0 14px;
  font: 700 clamp(24px, 3.2vw, 34px) / 1.2 var(--head);
  color: var(--text);
  text-shadow: 0 2px 0 #000;
}

.hero-sub {
  max-width: 560px;
  color: #ddd0b0;
  font-size: 18px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin: 28px 0 14px;
}

.hero-meta {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}

.hero-meta strong {
  color: var(--text);
  font-weight: 600;
}

.address {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding: 12px 16px 12px 14px;
  border: 1px solid rgba(135, 89, 26, 0.8);
  border-radius: 6px;
  background: rgba(17, 14, 11, 0.72);
  color: var(--text);
  font: 600 15px/1.2 var(--body);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.35);
}

.address:hover {
  border-color: var(--brass);
}

.address code {
  font: 700 18px/1 var(--px);
  color: var(--brass-hi);
  letter-spacing: 0.02em;
}

.address .copy {
  padding: 4px 8px;
  border-radius: 3px;
  background: rgba(224, 172, 70, 0.14);
  color: var(--brass-hi);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.address .players {
  color: var(--text-2);
  font-weight: 500;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  translate: -50% 0;
  color: var(--text-2);
  font: 600 12px/1 var(--px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.8;
}

.scroll-hint::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  margin: 10px auto 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  rotate: 45deg;
  animation: nudge 1.8s infinite;
}

@keyframes nudge {
  50% {
    translate: 0 5px;
  }
}

/* ---------------------------------------------------------------- facts band */

.facts {
  position: relative;
  margin-top: -64px;
  z-index: 2;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 30px solid transparent;
  border-image: url('ui/frame.webp') 80 / 30px round;
  background: linear-gradient(180deg, #24201d, #1a1715);
  background-clip: padding-box;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.fact {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  padding: 16px 10px;
  text-align: center;
}

.fact + .fact {
  border-left: 1px solid rgba(135, 89, 26, 0.35);
}

.fact img {
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.fact b {
  font: 700 30px/1 var(--px);
  color: var(--brass-hi);
}

.fact span {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.35;
}

/* ---------------------------------------------------------------- sections */

.section {
  padding: clamp(70px, 9vw, 120px) 0;
}

.section.tight {
  padding-top: clamp(40px, 5vw, 70px);
}

.section-head {
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head .lede {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 19px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--brass);
  font: 600 15px/1 var(--px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.kicker img {
  width: 36px;
  height: 36px;
}

.divider {
  height: 22px;
  margin: 0 auto;
  width: min(100% - 2 * var(--gutter), 520px);
  background:
    radial-gradient(circle at 50% 50%, var(--brass) 0 5px, transparent 6px),
    linear-gradient(90deg, transparent, var(--brass-dark) 20%, var(--brass) 50%, var(--brass-dark) 80%, transparent) 50% 50% / 100% 2px no-repeat;
  opacity: 0.85;
}

/* ---------------------------------------------------------------- features */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.feature + .feature {
  margin-top: clamp(70px, 9vw, 120px);
}

.feature.flip .feature-text {
  order: 2;
}

.feature-text h2 {
  margin-bottom: 18px;
}

.feature-text > p {
  color: #e2d6b8;
}

.ticks {
  list-style: none;
  margin: 18px 0 22px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ticks li {
  position: relative;
  padding-left: 30px;
  color: var(--text-2);
}

.ticks li strong {
  color: var(--text);
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 10px;
  height: 10px;
  rotate: 45deg;
  background: linear-gradient(135deg, var(--brass-hi), var(--brass-dark));
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6);
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brass-hi);
  font-weight: 700;
  text-decoration: none;
}

.more::after {
  content: '→';
  transition: translate 0.15s;
}

.more:hover::after {
  translate: 4px 0;
}

/* A screenshot in the brass frame. */
.framed {
  position: relative;
  margin: 0;
  border: 26px solid transparent;
  border-image: url('ui/frame.webp') 80 / 26px round;
  background: #0d0b09;
  background-clip: padding-box;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

.framed img,
.framed video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.framed.square img {
  aspect-ratio: 1;
}

.framed figcaption,
.shot figcaption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 4px 9px;
  border-radius: 3px;
  background: rgba(17, 14, 11, 0.78);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.3;
}

.stack {
  display: grid;
  gap: 18px;
}

.stack .pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.shot {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(135, 89, 26, 0.7);
  border-radius: 4px;
  background: #0d0b09;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.4s;
}

a.shot:hover img,
.shot.zoom:hover img {
  transform: scale(1.03);
}

.icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 22px;
}

.icon-row img {
  width: 54px;
  height: 54px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
}

/* ---------------------------------------------------------------- skills */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 22px 0 26px;
}

.skill {
  --tone: var(--brass);
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 2px 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--tone);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.28);
}

.skill img {
  grid-row: span 2;
  width: 40px;
  height: 40px;
}

.skill b {
  font: 600 16px/1.1 var(--px);
  color: var(--text);
}

.skill small {
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.2;
}

.skill.combat {
  --tone: var(--ember);
}

.skill.gathering {
  --tone: var(--green);
}

.skill.artisan {
  --tone: var(--brass);
}

.skill.support {
  --tone: var(--sky);
}

/* ---------------------------------------------------------------- dragon band */

.dragon {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(90px, 12vw, 170px) 0;
  border-block: 1px solid rgba(232, 98, 58, 0.35);
}

.dragon-art {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.dragon-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}

.dragon::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 8, 6, 0.94) 0%, rgba(12, 8, 6, 0.82) 38%, rgba(12, 8, 6, 0.25) 75%, rgba(12, 8, 6, 0.1) 100%),
    radial-gradient(ellipse at 80% 60%, rgba(232, 98, 58, 0.18), transparent 60%);
}

.dragon .kicker {
  color: #ff9a6a;
}

.dragon h2 {
  color: #ffd7a0;
  text-shadow: 0 2px 0 #000, 0 0 30px rgba(232, 98, 58, 0.35);
}

.dragon-copy {
  max-width: 600px;
}

.dragon-copy > p {
  color: #e9dcc0;
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 24px 0 28px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 12px 14px 12px 58px;
  border: 1px solid rgba(232, 98, 58, 0.3);
  border-radius: 4px;
  background: rgba(10, 7, 5, 0.6);
  color: var(--text-2);
}

.steps li strong {
  color: var(--text);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffb36b, #b8441c);
  color: #1a0b04;
  font: 700 16px/1 var(--px);
  box-shadow: 0 0 0 2px #2a1006, 0 0 14px rgba(232, 98, 58, 0.45);
}

/* ---------------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(51, 46, 43, 0.75), rgba(32, 29, 27, 0.75));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s, transform 0.15s;
}

.card:hover {
  border-color: rgba(224, 172, 70, 0.55);
  transform: translateY(-2px);
}

.card img.icon {
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
}

.card h3 {
  margin-bottom: 8px;
  font-size: 19px;
}

.card p {
  margin: 0;
  color: var(--text-2);
  font-size: 15.5px;
}

.card a.cover {
  position: absolute;
  inset: 0;
}

/* ---------------------------------------------------------------- showcase sheets (gear, capes) */

.sheets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.sheet {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 40%, rgba(224, 172, 70, 0.12), transparent 70%),
    rgba(0, 0, 0, 0.35);
}

.sheet img {
  display: block;
  width: 100%;
  image-rendering: auto;
}

.sheet figcaption {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}

/* ---------------------------------------------------------------- gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 12px;
}

.gallery .shot {
  cursor: zoom-in;
}

.gallery .shot.wide {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery .shot figcaption {
  opacity: 0;
  transition: opacity 0.2s;
}

.gallery .shot:hover figcaption,
.gallery .shot:focus-visible figcaption {
  opacity: 1;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: -18px 0 30px;
}

.gallery-filters button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-2);
  font: 600 14px/1 var(--body);
  cursor: pointer;
}

.gallery-filters button[aria-pressed='true'] {
  border-color: var(--brass);
  background: rgba(224, 172, 70, 0.14);
  color: var(--brass-hi);
}

.lightbox {
  width: min(96vw, 1680px);
  max-width: none;
  max-height: 96vh;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.lightbox::backdrop {
  background: rgba(8, 6, 5, 0.92);
  backdrop-filter: blur(4px);
}

.lightbox figure {
  margin: 0;
  border: 22px solid transparent;
  border-image: url('ui/frame.webp') 80 / 22px round;
  background: #0d0b09;
  background-clip: padding-box;
}

.lightbox img {
  display: block;
  width: 100%;
  max-height: calc(96vh - 110px);
  object-fit: contain;
  background: #0d0b09;
}

.lightbox figcaption {
  padding: 10px 6px 2px;
  color: var(--text-2);
  font-size: 15px;
  text-align: center;
}

.lightbox .lb-btn {
  position: fixed;
  top: 50%;
  translate: 0 -50%;
  width: 52px;
  height: 52px;
  border: 1px solid var(--brass-dark);
  border-radius: 50%;
  background: rgba(17, 14, 11, 0.85);
  color: var(--brass-hi);
  font-size: 24px;
  cursor: pointer;
}

.lightbox .lb-prev {
  left: 14px;
}

.lightbox .lb-next {
  right: 14px;
}

.lightbox .lb-close {
  top: 30px;
  right: 14px;
  translate: 0 0;
  font-size: 20px;
}

/* ---------------------------------------------------------------- join */

.join-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: join;
}

.join-step {
  counter-increment: join;
  position: relative;
  padding: 30px 24px 26px;
  border: 26px solid transparent;
  border-image: url('ui/frame.webp') 80 / 26px round;
  background: linear-gradient(180deg, #27231f, #1c1916);
  background-clip: padding-box;
}

.join-step::before {
  content: counter(join);
  position: absolute;
  top: -8px;
  right: 6px;
  font: 700 64px/1 var(--px);
  color: rgba(224, 172, 70, 0.16);
}

.join-step img.icon {
  width: 60px;
  height: 60px;
  margin-bottom: 12px;
}

.join-step h3 {
  margin-bottom: 8px;
}

.join-step p {
  color: var(--text-2);
  margin: 0;
}

.join-step .btn-line {
  margin-top: 16px;
}

.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.note {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-2);
  font-size: 15.5px;
}

.note strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.note.warn {
  border-left-color: var(--ember);
}

.note.info {
  border-left-color: var(--sky);
}

/* ---------------------------------------------------------------- prose pages (join guide, updates) */

.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(70px, 10vw, 130px) 0 clamp(50px, 7vw, 90px);
  border-bottom: 1px solid rgba(135, 89, 26, 0.5);
}

.page-hero img.bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(17, 14, 11, 0.95), rgba(17, 14, 11, 0.75) 50%, rgba(17, 14, 11, 0.45)), linear-gradient(0deg, var(--bg), transparent 50%);
}

.page-hero h1 {
  font: 800 clamp(36px, 5.5vw, 62px) / 1.05 var(--head);
  color: var(--brass-hi);
  text-shadow: 0 3px 0 #000;
}

.page-hero p {
  max-width: 640px;
  margin-top: 16px;
  color: #e2d6b8;
  font-size: 19px;
}

.prose {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.toc {
  position: sticky;
  top: calc(var(--topbar) + 24px);
  padding: 16px 0;
  border-left: 2px solid rgba(135, 89, 26, 0.6);
}

.toc a {
  display: block;
  padding: 5px 14px;
  color: var(--text-2);
  font-size: 15px;
  text-decoration: none;
}

.toc a:hover {
  color: var(--brass-hi);
}

.prose-body h2 {
  margin: 56px 0 16px;
  font-size: clamp(26px, 3vw, 34px);
}

.prose-body h2:first-child {
  margin-top: 0;
}

.prose-body h3 {
  margin: 28px 0 10px;
  font-size: 20px;
  color: var(--brass);
}

.prose-body p,
.prose-body li {
  color: #ddd1b3;
}

.prose-body ol,
.prose-body ul {
  padding-left: 22px;
}

.prose-body li + li {
  margin-top: 6px;
}

.prose-body .framed,
.prose-body .shot {
  margin: 22px 0 26px;
}

.prose-body kbd {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 4px;
  background: var(--card);
  font: 600 14px/1.4 var(--body);
  color: var(--text);
}

.prose-body code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #141210;
  font-size: 15px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 22px;
  font-size: 15.5px;
}

.table th,
.table td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  background: var(--bg-raised);
  color: var(--brass);
  font-weight: 700;
}

/* ---------------------------------------------------------------- updates */

.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 30px;
  border-left: 2px solid rgba(135, 89, 26, 0.6);
}

.timeline li {
  position: relative;
  padding: 0 0 26px;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -38px;
  top: 6px;
  width: 14px;
  height: 14px;
  rotate: 45deg;
  background: linear-gradient(135deg, var(--brass-hi), var(--brass-dark));
  box-shadow: 0 0 0 3px var(--bg);
}

.timeline .ver {
  display: inline-block;
  margin-right: 10px;
  padding: 2px 9px;
  border: 1px solid var(--brass-dark);
  border-radius: 3px;
  background: rgba(224, 172, 70, 0.1);
  color: var(--brass-hi);
  font: 700 15px/1.4 var(--px);
}

.timeline time {
  color: var(--text-3);
  font-size: 14px;
}

.timeline p {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 18px;
}

/* ---------------------------------------------------------------- FAQ */

.faq {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.15s;
}

.faq details[open] {
  border-color: rgba(224, 172, 70, 0.5);
}

.faq summary {
  position: relative;
  padding: 16px 50px 16px 20px;
  font-weight: 700;
  font-size: 17.5px;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  translate: 0 -50%;
  color: var(--brass);
  font: 700 24px/1 var(--px);
  transition: rotate 0.2s;
}

.faq details[open] summary::after {
  rotate: 45deg;
}

.faq details > div {
  padding: 0 20px 16px;
  color: var(--text-2);
}

.faq details > div p:last-child {
  margin: 0;
}

/* ---------------------------------------------------------------- final call and footer */

.final {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(80px, 10vw, 140px) 0;
  text-align: center;
}

.final img.bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}

.final::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 50%, rgba(17, 14, 11, 0.6), rgba(17, 14, 11, 0.94) 70%), linear-gradient(180deg, var(--bg), transparent 30%, transparent 70%, var(--bg-deep));
}

.final .mascot {
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.6));
}

.final h2 {
  margin: 14px 0 12px;
}

.final p {
  max-width: 560px;
  margin: 0 auto 28px;
  color: var(--text-2);
  font-size: 18px;
}

.final .cta-row {
  justify-content: center;
}

.footer {
  padding: 46px 0 34px;
  background: var(--bg-deep);
  border-top: 1px solid rgba(135, 89, 26, 0.45);
  color: var(--text-3);
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 30px;
}

.footer h4 {
  margin: 0 0 12px;
  color: var(--brass);
  font: 600 13px/1 var(--px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer a {
  color: var(--text-2);
  text-decoration: none;
}

.footer a:hover {
  color: var(--brass-hi);
}

.footer .brand img.wordmark {
  height: 24px;
}

.footer .legal {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.6;
}

/* ---------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  translate: -50% 20px;
  padding: 10px 18px;
  border: 1px solid var(--brass-dark);
  border-radius: 6px;
  background: rgba(17, 14, 11, 0.95);
  color: var(--brass-hi);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, translate 0.2s;
}

.toast.show {
  opacity: 1;
  translate: -50% 0;
}

/* ---------------------------------------------------------------- reveal on scroll */

.reveal {
  opacity: 0;
  translate: 0 26px;
  transition: opacity 0.7s ease, translate 0.7s ease;
}

.reveal.in {
  opacity: 1;
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-art img,
  .dot,
  .scroll-hint::after {
    animation: none !important;
  }
  .reveal {
    opacity: 1;
    translate: none;
    transition: none;
  }
}

/* ---------------------------------------------------------------- narrow screens */

@media (max-width: 1080px) {
  .facts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .fact:nth-child(4) {
    border-left: 0;
  }
  .fact:nth-child(n + 4) {
    border-top: 1px solid rgba(135, 89, 26, 0.35);
  }
}

@media (max-width: 960px) {
  .menu-toggle {
    display: block;
  }
  .nav {
    position: fixed;
    inset: var(--topbar) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 18px;
    background: rgba(17, 14, 11, 0.98);
    border-bottom: 1px solid var(--brass-dark);
  }
  .nav a {
    padding: 13px 6px;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
  }
  .topbar.open .nav {
    display: flex;
  }
  .topbar-actions {
    margin-left: auto;
  }
  .feature,
  .feature.flip {
    grid-template-columns: 1fr;
  }
  .feature.flip .feature-text {
    order: 0;
  }
  .join-steps,
  .notes {
    grid-template-columns: 1fr;
  }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .prose {
    grid-template-columns: 1fr;
  }
  .toc {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .topbar .status {
    display: none;
  }
  .brand img.wordmark {
    height: 20px;
  }
  .hero {
    padding: 40px 0 110px;
  }
  .hero::before {
    background: linear-gradient(180deg, rgba(17, 14, 11, 0.7), rgba(17, 14, 11, 0.86) 45%, var(--bg));
  }
  .btn-brass {
    width: 100%;
  }
  .cta-row .btn-plate {
    width: 100%;
  }
  .address {
    width: 100%;
    flex-wrap: wrap;
  }
  .facts-grid {
    grid-template-columns: repeat(2, 1fr);
    border-width: 18px;
    border-image-width: 18px;
  }
  .fact {
    border-left: 0 !important;
    border-top: 1px solid rgba(135, 89, 26, 0.35);
  }
  .fact:nth-child(-n + 2) {
    border-top: 0;
  }
  .framed,
  .join-step {
    border-width: 16px;
    border-image-width: 16px;
  }
  .stack .pair,
  .sheets {
    grid-template-columns: 1fr;
  }
  .gallery {
    grid-template-columns: 1fr;
  }
  .gallery .shot.wide {
    grid-column: auto;
    grid-row: auto;
  }
  .gallery .shot figcaption {
    opacity: 1;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .lightbox .lb-btn {
    width: 42px;
    height: 42px;
  }
}
