/* VAREN landing — tokens taken from the game's own HUD (parchment/ink/brass) on the deep indigo of Pluvia's rain cloth */
:root {
  --night: #141a2e; --night2: #1c2440; --night3: #0d1120;
  --paper: #efe2c4; --paper2: #e2cfa6; --paper3: #d6bf8e; --ink: #2b2118; --ink2: #6b5640;
  --brass: #d8a640; --brass2: #f2cf6b; --brass3: #8a6a1f; --lac: #b9382c; --celadon: #7fb9a3;
  --font: "Mitr", system-ui, sans-serif; --display: "Chonburi", "Mitr", serif; --mark: "Marcellus", "Times New Roman", serif;
  --wrap: 1120px; --gutter: 20px; --r: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: 400 16px/1.7 var(--font); color: var(--paper); background: var(--night); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brass); color: var(--ink); padding: 6px 12px; border-radius: 6px; z-index: 99; } .skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--brass2); outline-offset: 3px; }

/* wordmark: Roman inscription caps, tracked wide; Thai headings in Chonburi */
.wordmark { font: 400 1em var(--mark); letter-spacing: .28em; text-transform: uppercase; color: var(--brass2); text-shadow: 0 1px 0 var(--brass3), 0 0 24px #d8a64055; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; line-height: 1.25; }
h2 { font-size: clamp(24px, 3.2vw, 34px); color: var(--paper); display: grid; gap: 6px; margin-bottom: 14px; }
h2 .k { font: 500 13px/1 var(--font); letter-spacing: .3em; color: var(--brass); text-transform: uppercase; }
.sub { max-width: 720px; color: #cfc3a8; margin: 0 0 28px; }

/* header */
.top { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 12px var(--gutter); transition: background .3s, box-shadow .3s; }
body.scrolled .top { background: #0d1120e6; backdrop-filter: blur(10px); box-shadow: 0 1px 0 #d8a64033; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #2a3558, var(--night3)); border: 1px solid var(--brass); color: var(--brass2); font: 400 20px var(--mark); }
.brand .word { font: 400 18px var(--mark); letter-spacing: .3em; color: var(--paper); }
.top nav { display: flex; align-items: center; gap: 4px 18px; font-size: 14.5px; }
.top nav a { text-decoration: none; color: #e6dcc3; opacity: .9; } .top nav a:hover { color: var(--brass2); }
.top nav .nav-wiki { color: var(--celadon); }
@media (max-width: 720px) { .top nav a:not(.btn) { display: none; } }

/* buttons: lacquer for the main action, brass outline for the second */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 10px; text-decoration: none; font-weight: 500; line-height: 1.2; color: #fff6dc; background: linear-gradient(180deg, #d0483a, var(--lac) 55%, #8f2b21); border: 1px solid #f0a08c66; box-shadow: 0 6px 18px #0008, inset 0 1px 0 #ffd0c055; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px #000a, inset 0 1px 0 #ffd0c055; }
.btn.big { font-size: 19px; padding: 16px 32px; }
.btn.small { font-size: 14px; padding: 8px 16px; }
.btn.ghost { background: #0003; border-color: var(--brass); color: var(--brass2); box-shadow: none; }

/* HERO */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 96px var(--gutter) 60px; overflow: hidden; isolation: isolate; }
.hero-map { position: absolute; inset: -6%; background: url(assets/world.jpg) center / cover no-repeat; z-index: -2; animation: drift 48s ease-in-out infinite alternate; filter: saturate(1.05); }
@keyframes drift { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.08) translate(-2%, 1.5%); } }
@media (prefers-reduced-motion: reduce) { .hero-map { animation: none; } }
.hero-veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #0d1120e8 0%, #141a2eb8 42%, #141a2e33 70%, #141a2e00 100%), linear-gradient(180deg, #0d112099, transparent 30%, transparent 70%, var(--night) 100%); }

/* parchment scroll — the game's paper window with rolled ends */
.scroll { position: relative; width: min(600px, 100%); padding: 34px 38px 30px; color: var(--ink); background: linear-gradient(180deg, var(--paper), var(--paper2)); border-radius: 6px; box-shadow: 0 30px 60px #000a, 0 0 0 1px #fff7 inset, 0 0 0 5px var(--paper3), 0 0 0 6px var(--brass3); }
.scroll::before, .scroll::after { content: ""; position: absolute; left: -14px; right: -14px; height: 14px; border-radius: 7px; background: linear-gradient(180deg, #f5ead2, #c9b287 60%, #8a7047); box-shadow: 0 4px 10px #0007; }
.scroll::before { top: -10px; } .scroll::after { bottom: -10px; }
.eyebrow { margin: 0 0 8px; font-size: 12.5px; letter-spacing: .25em; text-transform: uppercase; color: var(--lac); font-weight: 500; }
.scroll h1 { display: grid; gap: 4px; }
.scroll h1 .wordmark { font-size: clamp(44px, 7vw, 72px); line-height: 1; color: var(--ink); text-shadow: 0 1px 0 #fff8, 0 2px 0 var(--brass3); }
.scroll h1 .th { font-size: clamp(18px, 2.4vw, 24px); color: var(--ink2); }
.lede { margin: 16px 0 20px; font-size: 16px; color: #4a3b2a; font-weight: 300; } .lede b { font-weight: 500; color: var(--ink); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.cta .ghost { background: transparent; border-color: var(--brass3); color: var(--brass3); }
.proof { list-style: none; margin: 22px 0 0; padding: 16px 0 0; border-top: 1px dashed #8a704788; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.proof li { display: grid; line-height: 1.15; } .proof b { font: 400 26px var(--mark); color: var(--lac); } .proof span { font-size: 11.5px; color: var(--ink2); }
.status { margin: 14px 0 0; font-size: 12.5px; color: var(--ink2); display: flex; align-items: center; gap: 8px; }
.status i { width: 9px; height: 9px; border-radius: 50%; background: #2f8a3a; box-shadow: 0 0 0 3px #2f8a3a33; animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px #2f8a3a11; } }
@media (max-width: 560px) { .scroll { padding: 26px 22px 24px; } .proof { grid-template-columns: repeat(2, 1fr); } }

/* sections */
section.world, section.systems, section.jobs, section.shots { padding: 84px 0; }
section.world { background: radial-gradient(1200px 500px at 50% 0%, #223058 0%, var(--night) 60%); }

/* COMPASS: realms placed as on the world map (rain W, cold N, desert E, hot S) around the black centre */
.compass { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-areas: ". cold ." "rain center desert" ". hot ."; gap: 14px; margin: 8px 0 32px; }
.realm { position: relative; padding: 20px 20px 18px 22px; border-radius: var(--r); background: linear-gradient(160deg, var(--night2), var(--night3)); border: 1px solid #ffffff14; box-shadow: inset 4px 0 0 var(--c), 0 10px 30px #0006; transition: transform .2s, border-color .2s; }
.realm:hover { transform: translateY(-3px); border-color: var(--c); }
.realm h3 { font-size: 21px; color: var(--c); margin-bottom: 4px; } .realm p { margin: 0 0 8px; font-size: 14.5px; color: #d9d0b8; font-weight: 300; } .realm small { color: #9aa3c0; font-size: 12.5px; }
.realm .pin { position: absolute; right: 16px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }
.realm.rain { grid-area: rain; } .realm.cold { grid-area: cold; } .realm.hot { grid-area: hot; } .realm.desert { grid-area: desert; }
.realm.center { grid-area: center; background: radial-gradient(circle at 50% 30%, #2a1a3a, #0a0710 75%); border-color: #b48cf055; text-align: center; box-shadow: 0 0 40px #b48cf022, inset 0 0 0 1px #b48cf022; }
.realm.center .pin { display: none; } .realm.center h3 { font-size: 26px; }
@media (max-width: 760px) { .compass { grid-template-columns: 1fr 1fr; grid-template-areas: "rain cold" "center center" "hot desert"; } }
@media (max-width: 460px) { .compass { grid-template-columns: 1fr; grid-template-areas: "rain" "cold" "center" "hot" "desert"; } }
.zones { width: 100%; border-collapse: collapse; font-size: 14px; background: #0d112088; border: 1px solid #ffffff14; border-radius: 10px; overflow: hidden; }
.zones th, .zones td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #ffffff10; } .zones th { color: var(--brass); font-weight: 500; font-size: 12.5px; letter-spacing: .1em; }
.zones td i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 8px; vertical-align: -1px; box-shadow: 0 0 0 1px #fff8; }
@media (max-width: 600px) { .zones th:nth-child(4), .zones td:nth-child(4) { display: none; } }

/* SYSTEMS: parchment cards on the night */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid article { padding: 22px 22px 20px; border-radius: var(--r); color: var(--ink); background: linear-gradient(180deg, var(--paper), var(--paper2)); box-shadow: 0 0 0 1px #fff8 inset, 0 0 0 3px var(--paper3), 0 14px 30px #0007; }
.grid .ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--night); color: var(--brass2); font-size: 20px; margin-bottom: 12px; }
.grid h3 { font-size: 19px; margin-bottom: 6px; } .grid p { margin: 0; font-size: 14.5px; color: #4a3b2a; font-weight: 300; }

/* JOBS: real idle sprites (2 frames) animated with steps() */
.jobrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.jobrow article { text-align: center; padding: 22px 18px 18px; border-radius: var(--r); background: linear-gradient(160deg, var(--night2), var(--night3)); border: 1px solid #ffffff14; }
.jobrow article.soon { opacity: .75; border-style: dashed; }
.sprite { width: 96px; height: 96px; margin: 0 auto 10px; background: var(--img) 0 0 / 192px 96px no-repeat; image-rendering: pixelated; transform: scale(1.4); transform-origin: 50% 100%; animation: idle 1s steps(2) infinite; }
@keyframes idle { to { background-position: -192px 0; } }
@media (prefers-reduced-motion: reduce) { .sprite { animation: none; } }
.sprite.mage { background: radial-gradient(circle at 50% 40%, #b48cf088, transparent 60%); border-radius: 50%; animation: none; }
.jobrow h3 { font-size: 20px; color: var(--brass2); } .jobrow p { margin: 4px 0 0; font-size: 14px; color: #cfc3a8; font-weight: 300; }
.note { margin: 18px 0 0; font-size: 13.5px; color: #9aa3c0; } .note a { color: var(--celadon); }

/* GALLERY */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gallery figure { margin: 0; border-radius: 10px; overflow: hidden; background: var(--night3); border: 1px solid #ffffff14; box-shadow: 0 10px 30px #0006; }
.gallery img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; } .gallery .wide img { aspect-ratio: 3 / 2; }
.gallery figcaption { padding: 10px 14px; font-size: 13.5px; color: #cfc3a8; }
@media (max-width: 640px) { .gallery { grid-template-columns: 1fr; } }

/* LAST CTA + FOOTER */
.last { padding: 40px var(--gutter) 90px; display: grid; place-items: center; background: radial-gradient(900px 400px at 50% 100%, #223058 0%, var(--night) 70%); }
.scroll.small { text-align: center; }
.scroll.small h2 { display: grid; gap: 2px; margin-bottom: 8px; } .scroll.small h2 .wordmark { font-size: 40px; color: var(--ink); text-shadow: 0 1px 0 #fff8, 0 2px 0 var(--brass3); } .scroll.small h2 .th { font-size: 20px; color: var(--ink2); }
.scroll.small p { color: #4a3b2a; font-weight: 300; margin: 0 0 16px; }
footer { border-top: 1px solid #d8a64033; background: var(--night3); padding: 40px 0 30px; font-size: 14px; color: #b7b0a0; }
footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; margin-bottom: 24px; }
footer b { display: block; color: var(--paper); margin-bottom: 8px; font-weight: 500; } footer b.wordmark { font-size: 20px; color: var(--brass2); }
footer a { display: block; text-decoration: none; color: #cfc3a8; margin: 4px 0; } footer a:hover { color: var(--brass2); } footer p { margin: 0; font-weight: 300; }
footer small { display: block; color: #6f7690; font-size: 12.5px; }
@media (max-width: 720px) { footer .cols { grid-template-columns: 1fr; } }

/* reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
