:root {
    color-scheme: dark;
    --ink: #f1eee3;
    --muted: #b9c2b2;
    --forest: #101b17;
    --deep: #0d1713;
    --line: #384439;
    --gold: #f1c589;
    --gold-bright: #ffdaa6;
    --serif: Georgia, "Times New Roman", serif;
    --sans: "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--forest); color: var(--ink); font-family: var(--sans); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { display: block; }
p, h1, h2, h3 { margin: 0; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 5px; }

.wrap { width: min(100% - 96px, 1224px); margin-inline: auto; }
.skip { position: fixed; z-index: 5; top: 16px; left: 16px; padding: 10px 16px; background: var(--gold); color: var(--deep); border-radius: 8px; transform: translateY(-180%); }
.skip:focus { transform: none; }

.masthead { position: relative; }
.topbar { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 18px; position: relative; z-index: 2; border-bottom: 1px solid #d1d8bf29; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: .91rem; font-weight: 750; letter-spacing: .15em; white-space: nowrap; }
.topbar nav { display: flex; align-items: center; gap: 28px; color: #e0e3d6; font-size: .9rem; font-weight: 600; }
.topbar nav a:hover, .footer a:hover { color: var(--gold-bright); }
.top-link { border: 1px solid #f0d2a753; border-radius: 999px; padding: 7px 13px; }
.top-link span { margin-left: 2px; color: var(--gold); }

.hero { min-height: 660px; display: grid; grid-template-rows: 1fr auto; position: relative; isolation: isolate; margin-top: -80px; padding-top: 80px; }
.hero-art { position: absolute; inset: 0; z-index: -2; background: #263d34 url("./valheim-dawn.svg") center 55% / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #0b1714 0%, #0d1916ed 19%, #0d1916a6 44%, #0d191608 75%), linear-gradient(180deg, #101b1770 0%, transparent 28%, transparent 70%, var(--forest) 100%); }
.hero-copy { align-self: center; padding-block: 64px 24px; }
.eyebrow { display: flex; align-items: center; gap: 11px; color: var(--gold); font-size: .73rem; font-weight: 750; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow span { display: block; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 15px #e9ad5c54; }
.hero h1 { margin: 23px 0 23px; font: 400 clamp(4.4rem, 8.1vw, 8rem)/.93 var(--serif); letter-spacing: -.068em; }
.hero h1 em { color: var(--gold); font-weight: 400; letter-spacing: -.075em; }
.hero-description { max-width: 440px; color: #e0e3d5; font-size: clamp(1rem, 1.65vw, 1.18rem); line-height: 1.65; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 11px 17px; border-radius: 9px; font-size: .9rem; font-weight: 750; line-height: 1.3; transition: background-color .16s ease, color .16s ease, border-color .16s ease; }
.button span, .project-link span { font-size: 1.05em; }
.button-primary { background: var(--gold); color: #221b12; border: 1px solid var(--gold); }
.button-primary:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.button-secondary { color: var(--ink); background: #131f19a8; border: 1px solid #adb39c5c; }
.button-secondary:hover { border-color: var(--gold); background: #1d2a21; }
.hero-caption { padding-bottom: 24px; display: flex; align-items: center; justify-content: flex-end; gap: 11px; color: #d5d3bf; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; }
.hero-caption-line { width: 42px; height: 1px; background: #d5d3bf7a; }

.worlds { padding-block: 68px 0; scroll-margin-top: 20px; }
.section-intro { margin-bottom: 30px; }
.section-intro h2, .community h2 { font: 400 clamp(2.45rem, 5vw, 4.15rem)/1.07 var(--serif); letter-spacing: -.045em; margin-top: 12px; }
.section-intro > p:last-child, .community h2 + p { color: var(--muted); margin-top: 11px; font-size: 1rem; }
.project-grid { display: grid; grid-template-columns: 1fr; }
.project { min-height: 274px; padding: clamp(22px, 3.8vw, 42px); display: flex; align-items: flex-end; position: relative; isolation: isolate; border: 1px solid #9aa88e36; border-radius: 16px; overflow: hidden; background: #1b2b22; }
.project-valheim { background: linear-gradient(90deg, #14241de8, #17251deb 44%, #15251c82), url("./valheim-dawn.svg") right 52% / cover no-repeat; }
.project-body { position: relative; width: 100%; }
.project-label { display: flex; align-items: center; gap: 9px; color: var(--gold); font-size: .7rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.project-label span { color: #d1d8c6; }
.project h3 { font: 400 clamp(2.6rem, 5.4vw, 4.65rem)/1.03 var(--serif); letter-spacing: -.045em; margin: 12px 0 10px; }
.project-body > p:not(.project-label) { max-width: 420px; color: #d3d9cb; line-height: 1.62; }
.project-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: .9rem; font-weight: 750; color: var(--gold); }
.project-link:hover { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 4px; }

.community { padding-block: 24px 68px; }
.community-panel { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: clamp(23px, 4.4vw, 47px); background: radial-gradient(ellipse at 85% 80%, #3b3926, #1a2a21 57%); border: 1px solid #a8a37b40; border-radius: 16px; }
.community h2 { font-size: clamp(2.05rem, 4vw, 3.1rem); }
.community .actions { margin-top: 0; }
.community .button { flex: 0 0 auto; }
.footer { min-height: 87px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted); font-size: .85rem; }
.footer { flex-wrap: wrap; padding-top: 23px; }
.footer-about { flex: 0 0 100%; max-width: 850px; margin: 0 0 5px; line-height: 1.75; }
.footer-about a { text-decoration: underline; text-underline-offset: 3px; }
.footer-about a:hover { color: var(--gold); }
.footer .brand { font-size: .78rem; color: var(--ink); }

@media (max-width: 900px) {
    .wrap { width: min(100% - 56px, 1224px); }
    .hero { min-height: 620px; }
    .hero-art { background-position: 61% center; }
}

@media (max-width: 640px) {
    .wrap { width: calc(100% - 36px); }
    .topbar { min-height: 65px; gap: 8px; }
    .topbar nav { gap: 11px; font-size: .78rem; }
    .topbar .brand { gap: 7px; font-size: .79rem; letter-spacing: .1em; }
    .topbar .brand img { width: 33px; height: 33px; }
    .top-link { padding: 6px 8px; }
    .hero { margin-top: -65px; min-height: 640px; padding-top: 65px; }
    .hero-art { background-position: 68% center; }
    .hero::after { background: linear-gradient(90deg, #0d1916df 0%, #0d191694 65%, #0d191656), linear-gradient(180deg, #101b176e 0%, transparent 34%, transparent 63%, var(--forest)); }
    .hero h1 { font-size: clamp(3.1rem, 12.4vw, 4.7rem); }
    .hero-copy { padding-block: 44px 12px; }
    .hero-description { max-width: 340px; }
    .hero-caption { padding-bottom: 21px; }
    .worlds { padding-top: 39px; }
    .project-grid { grid-template-columns: 1fr; gap: 12px; }
    .project { min-height: 232px; }
    .community { padding-block: 14px 42px; }
    .community-panel { align-items: flex-start; flex-direction: column; gap: 18px; }
    .footer { min-height: 78px; flex-wrap: wrap; padding-block: 12px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
