/* Vastheim – additions on top of the Valheim City Builder design system (site.css)
   VOICE   loud and proud: a war camp announcing the biggest Valheim server ever
   IDEA    the same carved-wood and gold world as the City Builder site, colder at the edges
   PICTURE the live server itself: real clips of all eight places running at once
   COLOUR  City Builder ink, gold and ember; frost blue for the server and its numbers
   TYPE    Cinzel for heads and numbers, Averia Serif Libre for text
   LAYOUT  full-bleed hero video, then bands that alternate clip and text */

:root { --frost: #9fc3d6; --frost-2: #cfe6f2; --blood: #d0503a; --leaf: #9be3b0; }

/* 10 -> 1,000 */
.limit { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 4vw, 54px); margin: 0 auto clamp(34px, 5vw, 54px); flex-wrap: wrap; }
.limit figure { margin: 0; text-align: center; }
.limit b { display: block; font: 800 clamp(3rem, 9vw, 6.4rem)/1 var(--head); }
.limit .old b { position: relative; color: #8a7e69; }
.limit .old b::after { content: ""; position: absolute; left: -10%; right: -10%; top: 50%; height: .08em; background: var(--blood); transform: rotate(-9deg); box-shadow: 0 0 16px rgba(208, 80, 58, .7); border-radius: 4px; }
.limit .new b { font-size: clamp(3.6rem, 12.5vw, 8.6rem); 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 30px rgba(255, 160, 60, .35)); }
.limit figcaption { margin-top: 10px; font: 600 .8rem/1.3 var(--head); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.limit .arrow { width: clamp(46px, 8vw, 110px); height: 28px; flex: none; }
.limit .arrow path { fill: none; stroke: var(--gold); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 8px rgba(255, 160, 60, .5)); }
.stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 0; }
.stat b.frost { color: var(--frost-2); text-shadow: 0 0 18px rgba(159, 195, 214, .35); }
.source { margin: 18px 0 0; text-align: center; font-size: .86rem; color: var(--dim); }

/* eight places at once */
.places { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.place { position: relative; margin: 0; border-radius: 6px; overflow: hidden; background: #000; border: 1px solid var(--line-2); box-shadow: 0 0 0 1px #000, 0 18px 36px -18px #000; }
.place video { aspect-ratio: 16 / 9; object-fit: cover; }
.place figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 10px; font-size: .84rem; line-height: 1.3; color: var(--muted); background: linear-gradient(180deg, rgba(8, 6, 4, 0), rgba(8, 6, 4, .9) 60%); }
.place figcaption b { display: block; font: 700 .98rem/1.2 var(--head); color: var(--gold-2); letter-spacing: .03em; }
.place.counter { display: grid; place-items: center; text-align: center; padding: 18px; background: radial-gradient(ellipse at 50% 40%, #2a1b0e, #0c0906 75%); }
.place.counter b { display: block; font: 800 clamp(2.2rem, 4.6vw, 3.4rem)/1 var(--head); color: var(--gold-2); text-shadow: 0 0 22px rgba(255, 160, 60, .4); }
.place.counter span { display: block; margin-top: 8px; font: 600 .78rem/1.3 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.place.counter i { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: #ff5446; box-shadow: 0 0 10px #ff5446; animation: live 1.6s ease-in-out infinite; vertical-align: .05em; }
@keyframes live { 50% { opacity: .35; } }

/* how it works: framed graphics get a frost edge to tell them from game footage */
.show-media.gfx > .loop:first-child, .gfx-card video { border-color: rgba(159, 195, 214, .45); }
.show-text .num { display: block; font: 800 clamp(1.8rem, 3.4vw, 2.5rem)/1.1 var(--head); color: var(--frost-2); margin-top: 16px; }
.show-text .num small { font: 600 .9rem/1.3 var(--body); color: var(--muted); display: block; margin-top: 4px; }
.traps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.card.pic video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); }
.card .fix { display: block; margin-top: 12px; font: 700 .9rem/1.35 var(--head); color: var(--leaf); }
.card .fix::before { content: "\2713  "; }

/* the plan */
.road { list-style: none; padding: 0; margin: 0 0 clamp(36px, 5vw, 56px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.road .step { margin-top: 30px; }
.road .step-n { font-size: 1.15rem; }
.road .last .step-n { width: 70px; height: 70px; top: -35px; font-size: 1rem; }
.state { display: inline-block; margin-top: 14px; padding: .4em .75em; border-radius: 3px; font: 700 .72rem/1 var(--head); letter-spacing: .12em; text-transform: uppercase; }
.state.bad { color: #ffab9a; border: 1px solid rgba(255, 130, 110, .5); background: rgba(208, 80, 58, .12); }
.state.mid { color: var(--gold-2); border: 1px solid rgba(226, 179, 95, .5); background: rgba(226, 179, 95, .08); }
.state.good { color: var(--leaf); border: 1px solid rgba(155, 227, 176, .5); background: rgba(155, 227, 176, .08); }

/* event cards with a clip on top */
.grid.event { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* supporters */
.names { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.names li { padding: .65em 1.15em; font: 700 1.02rem/1 var(--head); color: var(--gold-3); border: 1px solid var(--line-2); border-radius: 4px; background: linear-gradient(180deg, #2a1d11, #18110b); box-shadow: 0 10px 20px -12px #000; }
.names li::before { content: "\2665"; margin-right: .5em; color: #ff6a5c; }
.kofi { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 4vw, 56px); align-items: center; padding: clamp(26px, 4vw, 44px); }
.kofi h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); color: var(--gold-2); margin-bottom: 12px; }
.kofi p { color: var(--muted); }
.kofi .cta { justify-content: flex-start; margin-top: 18px; }

@media (max-width: 1080px) {
  .places { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.event { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .places { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .road { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
  .traps, .kofi { grid-template-columns: 1fr; }
  .stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .road, .grid.event { grid-template-columns: 1fr; }
  .limit { gap: 10px; }
  .place figcaption { font-size: .78rem; padding: 24px 10px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .place.counter i { animation: none; }
}

/* video card that links out until the video has its own id */
.yt-link img { inset: 0; width: 100%; height: 100%; transform: none; filter: saturate(1.05) brightness(.72); transition: transform .5s ease, filter .3s ease; }
.yt-link:hover img { transform: scale(1.03); filter: saturate(1.1) brightness(.85); }
.yt-link { height: auto; }
.intro.center { text-align: center; margin-inline: auto; }
.systems-fig { max-width: 820px; margin: 0 auto clamp(32px, 4vw, 48px); border-color: rgba(159, 195, 214, .45); }
@media (max-width: 560px) { .eyebrow { line-height: 1.6; } }

/* sign-up */
.join { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 4vw, 52px); align-items: start; }
.join-side .card { display: block; margin-bottom: 26px; }
.join-side .runes { margin: 0; }
.signup { padding: clamp(26px, 3.4vw, 40px); }
.signup h3 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); color: var(--gold-2); margin: 0 0 6px; }
.signup .hint { margin: 0 0 20px; color: var(--muted); font-size: .96rem; }
.field { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; margin: 0 0 7px; padding: 0; font: 700 .78rem/1.2 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-3); }
.field label i { font-style: normal; color: var(--dim); letter-spacing: .06em; }
.field input[type="text"], .field input[type="email"], .field input[type="url"] {
  width: 100%; padding: .78em .9em; font: 400 1.05rem/1.3 var(--body); color: var(--text);
  background: rgba(8, 6, 4, .72); border: 1px solid var(--line-2); border-radius: 5px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .55);
}
.field input::placeholder { color: var(--dim); }
.field input:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; border-color: var(--gold-2); }
.field input.bad { border-color: #ff8a78; }
.pick { display: flex; flex-wrap: wrap; gap: 10px; }
.pick legend { float: left; width: 100%; }
.pick label { position: relative; margin: 0; text-transform: none; letter-spacing: 0; cursor: pointer; }
.pick input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pick span { display: block; padding: .62em 1.05em; font: 600 .98rem/1.2 var(--body); color: var(--muted); border: 1px solid var(--line-2); border-radius: 99px; background: rgba(8, 6, 4, .5); transition: color .15s ease, border-color .15s ease, background-color .15s ease; }
.pick input[type="checkbox"] + span::before { content: ""; display: inline-block; width: .8em; height: .8em; margin-right: .55em; vertical-align: -.06em; border: 1.5px solid currentColor; border-radius: 3px; }
.pick input:checked + span { color: #2a1505; border-color: #ffe6b0; background: linear-gradient(180deg, #ffe0a0, #e2a245); }
.pick input[type="checkbox"]:checked + span::before { background: #2a1505; box-shadow: inset 0 0 0 2px #f0c170; }
.pick input:focus-visible + span { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.agree { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; margin: 4px 0 18px; font-size: .95rem; line-height: 1.45; color: var(--muted); cursor: pointer; }
.agree input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: #e2a245; }
.agree a { color: var(--gold-2); }
.agree.bad span { color: #ffb3a6; }
.form-msg { margin: 0 0 16px; padding: .7em .9em; font-size: .96rem; border-radius: 5px; color: #ffd0c7; border: 1px solid rgba(255, 130, 110, .5); background: rgba(208, 80, 58, .12); }
.form-msg a { color: #ffe1da; }
.signup .btn { width: 100%; justify-content: center; }
.signup .btn[disabled] { opacity: .6; cursor: progress; }
.signup.done { text-align: center; }
.signup.done .ico { margin: 0 auto 14px; }
.signup.done p { margin: 0; color: var(--muted); }
.signup.done:focus { outline: none; }

/* legal pages */
.legal { padding: calc(var(--nav-h) + clamp(40px, 6vw, 80px)) 16px clamp(60px, 8vw, 110px); }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--gold-2); margin: 0 0 .2em; }
.legal .sub2 { margin: 0 0 2em; color: var(--dim); }
.legal h2 { font-size: 1.25rem; color: var(--gold-3); margin: 2em 0 .5em; text-align: left; }
.legal h2::after { display: none; }
.legal p, .legal li { color: var(--muted); }
.legal address { font-style: normal; color: var(--text); line-height: 1.6; }
.legal a { color: var(--gold-2); }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }

@media (max-width: 900px) { .join { grid-template-columns: 1fr; } }

/* navigation: seven links need more room than the City Builder site has */
.nav nav a { white-space: nowrap; }
@media (min-width: 1041px) and (max-width: 1240px) {
  .nav nav a:not(.btn) { padding: 8px 7px; font-size: .78rem; letter-spacing: .05em; }
  .nav nav .btn { padding: .6em .85em; }
}
@media (min-width: 901px) and (max-width: 1040px) {
  .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; }
}
.legal h1 { text-align: left; }
