/* Valheim City Builder – landing page */

@font-face { font-family: "Cinzel"; src: url("fonts/cinzel.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Averia Serif Libre"; src: url("fonts/averia-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Averia Serif Libre"; src: url("fonts/averia-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Averia Serif Libre"; src: url("fonts/averia-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0c0a08;
  --bg-2: #120e0a;
  --line: #4a3520;
  --line-2: #6e5131;
  --gold: #e2b35f;
  --gold-2: #f5d48f;
  --gold-3: #fff0c8;
  --ember: #ff9a3c;
  --text: #eadfc8;
  --muted: #b6a88d;
  --dim: #8a7e69;
  --nav-h: 64px;
  --head: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Averia Serif Libre", Georgia, "Times New Roman", serif;
  --wood: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='200'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .22' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .05 0 0 0 0 .03 0 0 0 0 .01 0 0 0 .55 -.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E");
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--noise), var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--gold-2); text-decoration-color: rgba(245, 212, 143, .4); text-underline-offset: 3px; }
a:hover { color: var(--gold-3); }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; }
code { font: .92em/1.4 ui-monospace, Consolas, monospace; background: rgba(0, 0, 0, .35); border: 1px solid rgba(226, 179, 95, .18); padding: .05em .35em; border-radius: 3px; color: var(--gold-2); word-break: break-word; }
strong { color: var(--gold-3); font-weight: 700; }
.sprite { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--gold); color: #1b0f05; padding: 8px 14px; border-radius: 4px; }
.skip:focus { top: 12px; }

/* ---------- keys & buttons ---------- */
kbd {
  display: inline-block; min-width: 2em; padding: .2em .5em .25em; margin: 0 .08em;
  font: 700 .82em/1.2 var(--head); text-align: center; color: var(--gold-2);
  background: linear-gradient(#3b2d1e, #1f170f);
  border: 1px solid #6b5030; border-bottom-width: 3px; border-radius: 5px;
  box-shadow: 0 2px 0 #050302, inset 0 1px 0 rgba(255, 220, 150, .16);
  vertical-align: .08em;
}
.kbd-big { font-size: 1.15em; padding: .15em .55em .2em; color: var(--gold-3); animation: pulse 3.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 2px 0 #050302, 0 0 0 rgba(255, 154, 60, 0); } 50% { box-shadow: 0 2px 0 #050302, 0 0 22px rgba(255, 154, 60, .55); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .85em 1.45em; border-radius: 4px; border: 1px solid;
  font: 700 .95rem/1 var(--head); letter-spacing: .06em; text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn .i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn .i .fill { fill: currentColor; stroke: none; }
.btn-primary {
  color: #221204; border-color: #ffe0a0;
  background: linear-gradient(180deg, #ffd889 0%, #eaa847 52%, #b86b22 100%);
  box-shadow: 0 0 0 1px #4a2a0c, 0 10px 28px -8px rgba(255, 140, 40, .55), inset 0 1px 0 rgba(255, 255, 255, .55);
  text-shadow: 0 1px 0 rgba(255, 235, 190, .5);
}
.btn-primary:hover { color: #221204; transform: translateY(-1px); box-shadow: 0 0 0 1px #4a2a0c, 0 14px 34px -8px rgba(255, 150, 50, .75), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-ghost { color: var(--gold-2); border-color: rgba(226, 179, 95, .5); background: rgba(16, 11, 7, .6); backdrop-filter: blur(4px); }
.btn-ghost:hover { color: var(--gold-3); border-color: var(--gold-2); background: rgba(40, 27, 15, .75); transform: translateY(-1px); }
.btn-sm { padding: .6em 1.05em; font-size: .82rem; }

.tag {
  display: inline-block; padding: .2em .5em; margin-left: .35em; vertical-align: .2em;
  font: 700 .62rem/1 var(--head); letter-spacing: .12em; text-transform: uppercase;
  color: #9fc3d6; border: 1px solid rgba(159, 195, 214, .45); border-radius: 3px;
}
.pill {
  display: inline-block; padding: .4em .9em; border-radius: 99px;
  color: #ffd2a1; background: rgba(255, 120, 30, .12); border: 1px solid rgba(255, 154, 60, .45);
}

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(12, 9, 6, .9); backdrop-filter: blur(10px); border-color: rgba(226, 179, 95, .16); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .7); }
.nav-in { max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold-2); font: 800 1.05rem/1 var(--head); letter-spacing: .06em; }
.brand img { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--gold); box-shadow: 0 0 0 2px #1b120a, 0 0 14px rgba(255, 170, 70, .35); }
.nav nav { display: flex; align-items: center; gap: 4px; }
.nav nav a:not(.btn) { padding: 8px 12px; color: var(--text); text-decoration: none; font: 600 .86rem/1 var(--head); letter-spacing: .08em; border-radius: 4px; }
.nav nav a:not(.btn):hover { color: var(--gold-2); background: rgba(226, 179, 95, .08); }
.nav nav .btn { margin-left: 8px; }
.menu-btn { display: none; width: 44px; height: 44px; padding: 11px 10px; background: rgba(16, 11, 7, .6); border: 1px solid rgba(226, 179, 95, .4); border-radius: 4px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 2px; background: var(--gold-2); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(640px, 100svh);
  display: flex; align-items: flex-start; justify-content: center;
  background: linear-gradient(180deg, #05080c 0%, #0b141c 34%, #17212a 56%, #33292a 72%, #0a0d0e 100%);
}
.hero .scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 58% 42% at 50% 34%, rgba(4, 6, 9, .55), rgba(4, 6, 9, 0) 72%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 160px; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(12, 10, 8, 0), var(--bg)); }
.hero-in { width: 100%; max-width: 900px; padding: calc(var(--nav-h) + clamp(28px, 7vh, 90px)) 16px 0; text-align: center; }
.eyebrow { margin: 0 0 .9rem; font: 600 .8rem/1 var(--head); letter-spacing: .34em; text-transform: uppercase; color: var(--ember); text-shadow: 0 0 18px rgba(255, 154, 60, .4); }
h1 { display: flex; flex-direction: column; align-items: center; margin-bottom: .35em; }
.h1-top { font-size: clamp(1rem, 2.6vw, 1.55rem); font-weight: 600; letter-spacing: .62em; margin-right: -.62em; color: var(--gold-2); opacity: .9; }
.h1-main {
  font-size: clamp(2.7rem, 10.5vw, 7rem); font-weight: 800; letter-spacing: .02em; line-height: 1.02;
  background: linear-gradient(180deg, #fff3cf 0%, #f3cd7c 42%, #c8822f 78%, #8f5219 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #2a1707) drop-shadow(0 0 28px rgba(255, 160, 60, .32));
}
.tagline { font: 600 clamp(1.15rem, 2.6vw, 1.6rem)/1.4 var(--head); color: var(--gold-3); margin-bottom: .7em; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.lede { max-width: 620px; margin: 0 auto 1.8em; color: var(--text); font-size: clamp(1rem, 1.6vw, 1.12rem); text-shadow: 0 1px 10px rgba(0, 0, 0, .9); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; list-style: none; padding: 0; margin: 1.6em 0 0; font-size: .92rem; color: var(--muted); text-shadow: 0 1px 8px rgba(0, 0, 0, .9); }
.facts li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 9px; vertical-align: .18em; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 8px rgba(226, 179, 95, .7); }

/* scene animations */
.scene .fog1 { animation: drift 46s ease-in-out infinite alternate; }
.scene .fog2 { animation: drift 34s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translateX(-70px); } to { transform: translateX(70px); } }
.scene .tw { animation: twinkle 4s ease-in-out infinite; }
.scene .tw1 { animation-delay: -1.3s; } .scene .tw2 { animation-delay: -2.6s; }
@keyframes twinkle { 50% { opacity: .15; } }
.scene .win { animation: flicker 3.4s steps(1) infinite; }
.scene .w1 { animation-duration: 4.1s; } .scene .w2 { animation-duration: 2.7s; animation-delay: -1s; } .scene .w3 { animation: none; }
@keyframes flicker { 0%, 100% { opacity: 1; } 41% { opacity: .78; } 44% { opacity: .95; } 70% { opacity: .85; } }
.scene .fire { transform-box: fill-box; transform-origin: center; animation: fire 1.4s ease-in-out infinite alternate; }
.scene .f1 { animation-duration: 1.1s; } .scene .f2 { animation-duration: 1.7s; }
@keyframes fire { from { transform: scale(.82); opacity: .75; } to { transform: scale(1.18); opacity: 1; } }
.scene .smoke { opacity: 1; }
.scene .puff { opacity: 0; transform-box: fill-box; transform-origin: center; animation: puff 7s linear infinite; }
.scene .p1 { animation-delay: -2.3s; } .scene .p2 { animation-delay: -4.6s; }
@keyframes puff { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 12% { opacity: .28; } 100% { transform: translate(14px, -52px) scale(2.8); opacity: 0; } }

.embers { position: absolute; left: 50%; bottom: 14%; width: min(760px, 92vw); height: 70%; transform: translateX(-50%); pointer-events: none; z-index: -1; }
.embers i { position: absolute; bottom: 0; width: 3px; height: 3px; border-radius: 50%; background: #ffb357; box-shadow: 0 0 6px 1px rgba(255, 140, 40, .8); opacity: 0; animation: ember linear infinite; }
@keyframes ember {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: .95; }
  100% { transform: translate(var(--dx, 20px), -60vh); opacity: 0; }
}

/* ---------- sections ---------- */
.section { position: relative; padding: clamp(72px, 10vw, 128px) 16px; }
.section.alt { background: linear-gradient(180deg, rgba(255, 190, 110, .025), rgba(255, 190, 110, .045) 50%, rgba(255, 190, 110, .025)), var(--bg-2); border-block: 1px solid rgba(226, 179, 95, .08); }
.section.stone { background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(159, 195, 214, .08), rgba(159, 195, 214, 0) 70%), #0d0e0e; border-block: 1px solid rgba(159, 195, 214, .08); }
.section.glow-top { background: radial-gradient(ellipse 70% 42% at 50% 42%, rgba(255, 130, 40, .1), rgba(255, 130, 40, 0) 100%); }
.section.community { background: radial-gradient(ellipse 60% 70% at 50% 100%, rgba(255, 140, 50, .12), rgba(255, 140, 50, 0) 70%); }
.wrap { max-width: 1160px; margin: 0 auto; }
.wrap.narrow { max-width: 860px; }

.head { text-align: center; margin-bottom: clamp(36px, 5vw, 56px); }
.kicker { margin: 0 0 .9rem; font: 600 .78rem/1 var(--head); letter-spacing: .3em; text-transform: uppercase; color: var(--ember); }
h2 {
  font-size: clamp(1.85rem, 4.4vw, 3rem); font-weight: 800; letter-spacing: .02em;
  background-image: linear-gradient(180deg, #fff0c8 10%, #e9b85f 70%, #b77a2f 100%);
  background-size: 100% calc(100% - 30px); background-repeat: no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 30px; margin-bottom: 18px;
  position: relative;
}
h2::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 240px; height: 18px; transform: translateX(-50%); background: url("ornament.svg") center / contain no-repeat; }
h2.left { text-align: left; }
h2.left::after { left: 0; transform: none; background-position: left center; }
.intro { max-width: 680px; margin: 0 auto; color: var(--muted); font-size: 1.08rem; }

/* wood panel with rivets */
.panel {
  position: relative;
  background: var(--wood), linear-gradient(180deg, #251a10 0%, #18110b 100%);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 215, 150, .07), 0 0 0 1px rgba(0, 0, 0, .6), 0 22px 40px -22px rgba(0, 0, 0, .9);
}
.panel::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(226, 179, 95, .14); border-radius: 3px; pointer-events: none; }
.panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  --r: #f1d08c 0 1.1px, #a87a3c 1.6px 2.4px, #2a1c0e 3px, rgba(0, 0, 0, 0) 3.6px;
  background:
    radial-gradient(circle at 13px 13px, var(--r)),
    radial-gradient(circle at calc(100% - 13px) 13px, var(--r)),
    radial-gradient(circle at 13px calc(100% - 13px), var(--r)),
    radial-gradient(circle at calc(100% - 13px) calc(100% - 13px), var(--r));
}

/* ---------- video ---------- */
.video { aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 0 0 1px #000, 0 0 0 7px #1a120b, 0 0 0 8px var(--line), 0 30px 60px -20px rgba(0, 0, 0, .9); background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-facade { position: relative; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: radial-gradient(ellipse at 50% 60%, #3a2414, #0b0806 75%); overflow: hidden; color: inherit; font: inherit; }
.video-facade img { position: absolute; inset: -10%; width: 120%; height: 120%; max-width: none; object-fit: cover; filter: blur(14px) saturate(1.1) brightness(.55); transform: scale(1.05); }
.video-facade::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .7)); }
.play {
  position: absolute; left: 50%; top: 50%; z-index: 1; width: 96px; height: 96px; transform: translate(-50%, -50%);
  border-radius: 50%; border: 2px solid var(--gold-2);
  background: radial-gradient(circle at 50% 35%, #ffd889, #d98a32 60%, #8d4d16);
  box-shadow: 0 0 0 6px rgba(20, 12, 6, .65), 0 0 0 7px rgba(226, 179, 95, .5), 0 0 40px rgba(255, 150, 50, .6);
  transition: transform .2s ease, box-shadow .2s ease;
}
.play::before { content: ""; position: absolute; left: 39px; top: 29px; border-style: solid; border-width: 19px 0 19px 30px; border-color: transparent transparent transparent #2a1505; }
.video-facade:hover .play { transform: translate(-50%, -50%) scale(1.07); box-shadow: 0 0 0 6px rgba(20, 12, 6, .65), 0 0 0 7px var(--gold-2), 0 0 60px rgba(255, 150, 50, .85); }
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 28px; }
.videos figure { margin: 0; }
.videos figcaption { margin-top: 16px; text-align: center; font: 700 1.02rem/1.35 var(--head); color: var(--gold-2); }
.video-note { margin: 26px 0 0; text-align: center; font-size: .86rem; color: var(--dim); }

/* ---------- town tiers ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: tier; }
.tier { padding: 30px 28px 26px; text-align: center; }
.tier-art { width: 150px; height: 100px; margin: 0 auto 14px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 10px rgba(226, 179, 95, .25)); }
.tier-art .ground { stroke: var(--line-2); }
.tier-art .glow { fill: #ffb347; stroke: none; filter: drop-shadow(0 0 4px #ff9a3c); }
.tier h3 { font-size: 1.45rem; color: var(--gold-2); margin-bottom: 14px; }
.need-label { margin: 0 0 6px; font: 600 .7rem/1 var(--head); letter-spacing: .25em; text-transform: uppercase; color: var(--dim); }
.needs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; }
.needs li { padding: .3em .7em; font-size: .9rem; color: var(--gold-3); background: rgba(0, 0, 0, .3); border: 1px solid rgba(226, 179, 95, .3); border-radius: 3px; }
.tier p:last-child { margin: 0; color: var(--muted); font-size: .98rem; }

/* ---------- feature cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card { padding: 28px 26px 24px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: inset 0 1px 0 rgba(255, 215, 150, .09), 0 0 0 1px rgba(0, 0, 0, .6), 0 26px 44px -20px rgba(0, 0, 0, .95), 0 0 30px -10px rgba(255, 150, 50, .25); }
.card h3 { font-size: 1.18rem; color: var(--gold-2); margin: 18px 0 10px; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }
.ico {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  color: var(--gold-2);
  background: radial-gradient(circle at 50% 30%, #3d2c19, #160f08 75%);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 0 0 3px #120c07, inset 0 0 0 4px rgba(226, 179, 95, .25), 0 0 0 1px #000;
  transition: box-shadow .2s ease, color .2s ease;
}
.ico svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico svg .fill { fill: currentColor; stroke: none; }
.ico svg .thick { stroke-width: 3.2; }
.ico svg .knob { fill: #1b130b; }
.card:hover .ico { color: var(--gold-3); box-shadow: inset 0 0 0 3px #120c07, inset 0 0 0 4px rgba(226, 179, 95, .45), 0 0 0 1px #000, 0 0 22px rgba(255, 160, 60, .45); }
.card.link { display: block; text-decoration: none; color: inherit; }
.card .more { display: inline-block; margin-top: 16px; font: 700 .82rem/1 var(--head); letter-spacing: .08em; color: var(--ember); }
.card .more::after { content: " \2192"; transition: margin-left .2s ease; }
.card.link:hover .more::after { margin-left: 4px; }

/* ---------- ages ---------- */
.ages { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; position: relative; }
.ages::before { content: ""; position: absolute; left: 7%; right: 7%; top: 44px; height: 2px; background: linear-gradient(90deg, rgba(226, 179, 95, 0), rgba(226, 179, 95, .45) 10%, rgba(226, 179, 95, .45) 90%, rgba(226, 179, 95, 0)); }
.age { position: relative; text-align: center; padding: 0 4px; }
.age { --c: #9bbf6a; }
.a2 { --c: #5f9a6b; } .a3 { --c: #a2a35a; } .a4 { --c: #b8d6e6; } .a5 { --c: #e3bb5c; } .a6 { --c: #a68bd6; } .a7 { --c: #ff6b3d; }
.stone-n {
  position: relative; display: grid; place-items: center; width: 74px; height: 88px; margin: 0 auto 16px;
  font: 800 1.45rem/1 var(--head); color: var(--c);
  text-shadow: 0 0 14px var(--c), 0 1px 0 #000;
  background: radial-gradient(ellipse at 40% 25%, #4a4c4b, #262827 60%, #171818);
  border: 1px solid #555a59;
  border-radius: 46% 46% 14% 14% / 38% 38% 12% 12%;
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, .55), inset 0 2px 0 rgba(255, 255, 255, .08), 0 8px 18px -6px #000, 0 0 0 4px #0d0e0e, 0 0 26px -6px var(--c);
}
.age h3 { font-size: 1.02rem; color: var(--gold-2); margin-bottom: 4px; }
.age .when { margin: 0 0 6px; font-size: .86rem; color: var(--c); font-style: italic; }
.age p:last-child { margin: 0; font-size: .88rem; color: var(--muted); }

/* ---------- multiplayer ---------- */
.split { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.split .kicker { text-align: left; }
.runes { list-style: none; padding: 0; margin: 8px 0 0; }
.runes li { position: relative; padding-left: 30px; margin-bottom: 14px; color: var(--muted); }
.runes li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px; border: 1.5px solid var(--gold); transform: rotate(45deg); box-shadow: 0 0 8px rgba(226, 179, 95, .4); }
.mp { padding: 34px 32px 28px; }
.mp-row { display: flex; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px dashed rgba(226, 179, 95, .18); }
.mp-big { min-width: 3.2em; font: 800 2rem/1 var(--head); color: var(--gold-2); text-shadow: 0 0 18px rgba(255, 160, 60, .35); }
.mp-row span:last-child { color: var(--text); }
.mp-note { margin: 18px 0 0; font-size: .92rem; color: var(--dim); font-style: italic; }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { padding: 44px 26px 26px; text-align: center; margin-top: 26px; }
.step-n {
  position: absolute; left: 50%; top: -28px; transform: translateX(-50%);
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  font: 800 1.5rem/1 var(--head); color: #2a1505;
  background: radial-gradient(circle at 50% 30%, #ffe0a0, #e2a245 60%, #9a5a1c);
  border: 2px solid #ffe6b0; box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line-2), 0 0 24px rgba(255, 150, 50, .45);
}
.step h3 { font-size: 1.25rem; color: var(--gold-2); margin-bottom: 10px; }
.step p { margin: 0; color: var(--muted); }
.callout { max-width: 640px; margin: 36px auto 0; padding: 14px 20px; text-align: center; color: var(--text); border: 1px solid rgba(255, 154, 60, .4); border-left-width: 4px; border-radius: 4px; background: rgba(255, 120, 30, .07); }

/* ---------- controls ---------- */
.keys { margin: 0; padding: 18px 30px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.keys div { display: grid; grid-template-columns: 9.5em 1fr; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px dashed rgba(226, 179, 95, .14); }
.keys dt { white-space: nowrap; }
.keys dd { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.4; }
.keys .or { color: var(--dim); margin: 0 2px; }

/* ---------- faq ---------- */
.faq details { border: 1px solid var(--line); border-radius: 5px; margin-bottom: 10px; background: linear-gradient(180deg, rgba(37, 26, 16, .7), rgba(24, 17, 11, .7)); transition: border-color .2s ease; }
.faq details[open] { border-color: var(--line-2); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 54px 18px 22px; position: relative; font: 700 1.05rem/1.35 var(--head); color: var(--gold-2); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); transition: transform .2s ease, margin-top .2s ease; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { color: var(--gold-3); }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--muted); }

/* ---------- footer ---------- */
.footer { padding: 56px 16px 40px; border-top: 1px solid rgba(226, 179, 95, .14); background: #080706; color: var(--dim); font-size: .92rem; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 26px; padding-bottom: 26px; border-bottom: 1px solid rgba(226, 179, 95, .08); }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer nav a { color: var(--muted); text-decoration: none; font: 600 .85rem/1.6 var(--head); letter-spacing: .06em; }
.footer nav a:hover { color: var(--gold-2); }
.footer p { margin: 0 0 .5em; }
.footer .fine { font-size: .82rem; color: #6d6455; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .ages { grid-template-columns: 1fr 1fr; gap: 18px 24px; max-width: 640px; margin: 0 auto; }
  .ages::before { display: none; }
  .age { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto 1fr; column-gap: 16px; text-align: left; align-items: start; }
  .stone-n { grid-row: 1 / 4; width: 58px; height: 70px; margin: 0; font-size: 1.2rem; }
  .age h3 { margin-top: 8px; }
}
@media (max-width: 900px) {
  .tiers, .steps { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .steps { gap: 40px; }
  .split { grid-template-columns: 1fr; }
  .keys { grid-template-columns: 1fr; }
  .menu-btn { display: flex; }
  .nav nav {
    position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 18px; background: rgba(12, 9, 6, .97); border-bottom: 1px solid rgba(226, 179, 95, .2);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, .8);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.open nav { visibility: visible; opacity: 1; transform: none; }
  .nav.open { background: rgba(12, 9, 6, .97); }
  .nav nav a:not(.btn) { padding: 14px 6px; font-size: .95rem; border-bottom: 1px solid rgba(226, 179, 95, .08); }
  .nav nav .btn { margin: 14px 0 0; padding: .9em; }
}
@media (max-width: 560px) {
  .ages { grid-template-columns: 1fr; max-width: 360px; }
  .hero-in { padding-bottom: 290px; }
  .cta .btn-primary { flex: 1 1 100%; }
  .cta .btn-ghost { flex: 1 1 40%; padding-inline: .8em; font-size: .85rem; }
  .facts { flex-direction: column; align-items: center; }
  .keys { padding: 8px 18px; }
  .keys div { grid-template-columns: 7.8em 1fr; gap: 10px; }
  .keys dt { white-space: normal; }
  .h1-top { letter-spacing: .45em; margin-right: -.45em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scene .smoke, .embers { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- 404 ---------- */
.lost { min-height: 100svh; display: grid; place-items: center; padding: 40px 16px; text-align: center; background: radial-gradient(ellipse 70% 50% at 50% 60%, rgba(207, 214, 216, .08), rgba(207, 214, 216, 0) 70%), radial-gradient(ellipse 50% 30% at 50% 100%, rgba(255, 140, 50, .14), rgba(255, 140, 50, 0) 70%), var(--noise), var(--bg); }
.lost .intro { margin-bottom: 2em; }

/* ---------- beta status page ---------- */
.nav nav a[aria-current="page"] { color: var(--gold-2); box-shadow: inset 0 -2px 0 var(--ember); }
.page-head {
  position: relative; padding: calc(var(--nav-h) + clamp(48px, 8vw, 96px)) 16px clamp(40px, 6vw, 64px); text-align: center;
  background: radial-gradient(ellipse 60% 70% at 50% 110%, rgba(255, 130, 40, .2), rgba(255, 130, 40, 0) 70%),
              radial-gradient(ellipse 80% 60% at 50% 0%, rgba(159, 195, 214, .07), rgba(159, 195, 214, 0) 70%),
              linear-gradient(180deg, #070a0e, var(--bg));
  border-bottom: 1px solid rgba(226, 179, 95, .1);
}
.page-title {
  font-size: clamp(2.3rem, 7vw, 4.4rem); font-weight: 800; margin-bottom: .35em;
  background: linear-gradient(180deg, #fff3cf 0%, #f3cd7c 45%, #c8822f 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #2a1707) drop-shadow(0 0 24px rgba(255, 160, 60, .28));
}
.page-head .intro { margin-bottom: 1.8em; }
.section.tight { padding-top: clamp(36px, 5vw, 56px); }

.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 34px; }
.stat { position: relative; padding: 18px 14px 16px; text-align: center; border: 1px solid var(--line); border-radius: 6px; background: var(--wood), linear-gradient(180deg, #251a10, #18110b); box-shadow: inset 0 1px 0 rgba(255, 215, 150, .07), 0 16px 30px -20px #000; }
.stat b { display: block; font: 800 clamp(1.6rem, 3vw, 2.1rem)/1.1 var(--head); color: var(--gold-2); text-shadow: 0 0 18px rgba(255, 160, 60, .3); }
.stat span { display: block; margin-top: 6px; font-size: .86rem; line-height: 1.3; color: var(--muted); }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.toolbar input {
  flex: 1 1 260px; min-width: 0; padding: .7em 1em; border-radius: 4px; border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, .35); color: var(--text); font: 1rem/1.3 var(--body);
}
.toolbar input::placeholder { color: var(--dim); }
.toolbar input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226, 179, 95, .18); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; }
.seg button, .lang, .chip { cursor: pointer; font: 700 .8rem/1 var(--head); letter-spacing: .06em; color: var(--muted); background: rgba(16, 11, 7, .7); border: 0; padding: .85em 1.05em; transition: color .15s ease, background-color .15s ease; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover, .lang:hover, .chip:hover { color: var(--gold-2); }
.seg button[aria-pressed="true"] { color: #221204; background: linear-gradient(180deg, #ffd889, #d99a42); }
.lang { border: 1px solid var(--line-2); border-radius: 4px; margin-left: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { padding: .6em .9em; border: 1px solid var(--line); border-radius: 99px; }
.chip[aria-pressed="true"] { color: var(--gold-3); border-color: var(--gold); background: rgba(226, 179, 95, .12); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 8px; font-size: .88rem; color: var(--dim); }

.mode { display: inline-block; padding: .3em .7em; border-radius: 99px; border: 1px solid; font: 700 .74rem/1 var(--head); letter-spacing: .06em; white-space: nowrap; }
.m-ok { color: #a9e39f; background: rgba(90, 170, 80, .14); border-color: rgba(140, 210, 120, .45); }
.m-old { color: #f0c46a; background: rgba(226, 170, 60, .12); border-color: rgba(240, 196, 106, .4); }
.m-bad { color: #ff9c86; background: rgba(220, 80, 50, .15); border-color: rgba(255, 140, 110, .5); }
.m-none { color: #8a8274; background: rgba(255, 255, 255, .03); border-color: rgba(138, 130, 116, .3); }

h2.area { text-align: left; font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 44px 0 18px; padding-bottom: 18px; background-size: 100% calc(100% - 18px); scroll-margin-top: calc(var(--nav-h) + 16px); }
h2.area::after { left: 0; transform: none; width: 160px; background-position: left center; }
h2.area span { font-size: .6em; color: var(--dim); -webkit-text-fill-color: var(--dim); vertical-align: .2em; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.fcard {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 16px;
  background: var(--wood), linear-gradient(180deg, #221810, #17100a); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 215, 150, .06), 0 14px 26px -18px #000;
}
.fcard h3 { font-size: 1.02rem; line-height: 1.3; color: var(--gold-2); }
.kind { display: inline-block; margin-left: 8px; padding: .25em .5em; vertical-align: .15em; border-radius: 3px; font: 700 .6rem/1 var(--head); letter-spacing: .12em; text-transform: uppercase; }
.k-new { color: #ffd2a1; border: 1px solid rgba(255, 154, 60, .45); }
.k-fix { color: #9fc3d6; border: 1px solid rgba(159, 195, 214, .45); }
.fcard .meta { margin: 0; font-size: .8rem; color: var(--dim); font-style: italic; }
.fcard .desc { margin: 0; font-size: .94rem; line-height: 1.5; color: var(--muted); }
.modes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; }
.votes { margin-left: auto; font-size: .82rem; color: var(--dim); }
.fcard details { font-size: .86rem; color: var(--muted); border-top: 1px dashed rgba(226, 179, 95, .14); padding-top: 6px; }
.fcard summary { cursor: pointer; color: var(--gold); font-family: var(--head); font-weight: 700; font-size: .78rem; letter-spacing: .06em; }
.fcard summary:hover { color: var(--gold-2); }
.fcard ul { margin: 6px 0 0; padding-left: 18px; }
.fcard li { margin: 3px 0; word-break: break-word; }
.empty { padding: 50px 0; text-align: center; color: var(--muted); font-style: italic; }
.updated { margin: 28px 0 0; text-align: right; font-size: .85rem; color: var(--dim); }

@media (max-width: 1080px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding-inline: .4em; }
  .lang { margin-left: 0; }
}

/* ---------- hero news, what's new ---------- */
.news {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin: 0 0 1.4rem; padding: 6px 16px 6px 6px;
  border: 1px solid rgba(255, 154, 60, .5); border-radius: 99px; background: rgba(20, 12, 6, .7); backdrop-filter: blur(4px);
  color: var(--text); text-decoration: none; font-size: .92rem; transition: border-color .2s ease, box-shadow .2s ease;
}
.news b { padding: .35em .8em; border-radius: 99px; font: 700 .7rem/1 var(--head); letter-spacing: .1em; text-transform: uppercase; color: #221204; background: linear-gradient(180deg, #ffd889, #e09a42); white-space: nowrap; }
.news span { text-align: left; }
.news:hover { color: var(--gold-3); border-color: var(--gold-2); box-shadow: 0 0 24px rgba(255, 150, 50, .35); }
#new .callout { margin: 30px auto; }
.fixes { max-width: 960px; margin: 0 auto; padding: 30px 34px 18px; }
.fixes h3 { margin-bottom: 16px; font-size: 1.15rem; color: var(--gold-2); text-align: center; }
.fixes .runes { columns: 2; column-gap: 40px; }
.fixes .runes li { break-inside: avoid; margin-bottom: 12px; font-size: .96rem; }
@media (max-width: 700px) { .fixes .runes { columns: 1; } .fixes { padding: 26px 20px 12px; } }
