/* The Realm Unbound: carved wood and gold leaf on a slate-blue night, after the wooden-sign logo. */

:root {
    --slate-1: #34414e;          /* the sign's background, top */
    --slate-2: #222c36;          /* and bottom */
    --slate-3: #171e25;
    --gold-hi: #f7e4a3;
    --gold: #d8ad55;
    --gold-lo: #8c6425;
    --wood-hi: #a77a4a;
    --wood: #7d5733;
    --wood-lo: #4e3420;
    --parchment: #efe3c6;
    --parchment-lo: #ddc89c;
    --ink: #3a2a1a;
    --text: #e7e2d6;
    --muted: #b6ad9b;
    --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
html, body { overflow-x: clip; }
body {
    margin: 0;
    font: 18px/1.65 "Alegreya", Georgia, serif;
    color: var(--text);
    background:
        radial-gradient(1200px 700px at 50% 0%, var(--slate-1), transparent 70%),
        linear-gradient(var(--slate-2), var(--slate-3));
    background-color: var(--slate-3);
    background-repeat: no-repeat;
    min-height: 100vh;
}
html { background: var(--slate-3); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
code, kbd {
    font: 0.85em/1 ui-monospace, "DejaVu Sans Mono", monospace;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    padding: 0.15em 0.4em;
}
kbd { box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.small { font-size: 0.9rem; color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 auto 2rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- gold lettering */
.gold, .notice h3, .dl h3 {
    font-family: "Uncial Antiqua", "Alegreya", serif;
    font-weight: 400;
    letter-spacing: 0.01em;
}
.gold {
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.15;
    margin: 0 0 1rem;
    background: linear-gradient(180deg, var(--gold-hi) 10%, var(--gold) 55%, var(--gold-lo) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.6));
}

/* ---------------------------------------------------------------- wood */
.plank {
    --grain: repeating-linear-gradient(92deg, rgba(0, 0, 0, 0.08) 0 2px, transparent 2px 9px, rgba(255, 255, 255, 0.04) 9px 11px, transparent 11px 23px);
    display: inline-block;
    position: relative;
    padding: 0.7em 1.6em;
    font: 700 1rem/1.2 "Alegreya Sans", sans-serif;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--gold-hi);
    text-shadow: 0 1px 0 #2a1a0c, 0 0 8px rgba(0, 0, 0, 0.4);
    background: var(--grain), linear-gradient(180deg, var(--wood-hi), var(--wood) 45%, var(--wood-lo));
    border: 1px solid #2c1c0e;
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(255, 230, 180, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.25), 0 6px 14px rgba(0, 0, 0, 0.45);
    transition: transform 0.12s, filter 0.12s;
}
.plank::before, .plank::after { /* brass nails */
    content: "";
    position: absolute;
    top: 50%;
    width: 6px; height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #f6e1a0, #9b7631 70%);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
}
.plank::before { left: 9px; }
.plank::after { right: 9px; }
.plank:hover { filter: brightness(1.12); transform: translateY(-1px); }
.plank:active { transform: translateY(1px); }
.plank:focus-visible, .plank-ghost:focus-visible, .thumb:focus-visible, .arrow:focus-visible, summary:focus-visible {
    outline: 2px solid var(--gold-hi);
    outline-offset: 3px;
}
.plank-big { font-size: 1.1rem; padding: 0.85em 2em; }
.plank-ghost {
    display: inline-block;
    padding: 0.85em 1.4em;
    font: 500 1.05rem/1.2 "Alegreya Sans", sans-serif;
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(216, 173, 85, 0.4);
}
.plank-ghost:hover { color: var(--gold-hi); }

/* The board: dark planks behind the notices and sections that sit "on the wall" */
.board {
    background:
        repeating-linear-gradient(180deg, transparent 0 118px, rgba(0, 0, 0, 0.45) 118px 121px, rgba(255, 220, 170, 0.05) 121px 122px),
        repeating-linear-gradient(92deg, rgba(0, 0, 0, 0.1) 0 3px, transparent 3px 14px, rgba(255, 255, 255, 0.025) 14px 16px, transparent 16px 37px),
        linear-gradient(180deg, #3b291b, #2c1f15);
    box-shadow: inset 0 12px 24px rgba(0, 0, 0, 0.5), inset 0 -12px 24px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------------------- nav */
.nav {
    position: sticky; top: 0; z-index: 10;
    background: rgba(18, 23, 29, 0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(216, 173, 85, 0.25);
}
.nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 60px; }
.nav-brand {
    display: flex; align-items: center; gap: 0.6rem; min-width: 0;
    font-family: "Uncial Antiqua", serif; font-size: 1.1rem;
    color: var(--gold-hi); text-decoration: none; white-space: nowrap;
}
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; }
.nav-links a {
    font: 500 0.98rem "Alegreya Sans", sans-serif; color: var(--text); text-decoration: none; opacity: 0.85;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-hi); opacity: 1; }
.nav-cta {
    font: 700 0.95rem "Alegreya Sans", sans-serif; color: #2a1a0c; text-decoration: none;
    background: linear-gradient(var(--gold-hi), var(--gold)); padding: 0.45em 1em; border-radius: 5px; flex-shrink: 0;
}

/* ---------------------------------------------------------------- hero */
.hero { padding: 40px 0 70px; text-align: center; }
.hero { position: relative; }
.hero::before { /* lantern light behind the sign */
    content: "";
    position: absolute; left: 50%; top: 40px;
    width: min(760px, 100%); height: 380px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(255, 200, 120, 0.14), transparent 65%);
    pointer-events: none;
}
.hero-logo {
    position: relative;
    width: min(620px, 100%);
    margin: 0 auto;
}
.hero-tagline {
    font-family: "Uncial Antiqua", serif;
    font-size: clamp(1.15rem, 2.6vw, 1.6rem);
    color: var(--gold-hi);
    margin: 0.4rem 0 0.8rem;
}
.hero-lede { max-width: 680px; margin: 0 auto 2rem; color: var(--text); font-size: 1.12rem; }
.hero-buttons { display: flex; justify-content: center; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.hero-note { margin-top: 1.2rem; font: 0.95rem "Alegreya Sans", sans-serif; color: var(--muted); }

/* ---------------------------------------------------------------- sections */
.section { padding: 84px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3rem; align-items: center; }
.two-col.reverse > :first-child { order: 2; }
.aside { font-style: italic; color: var(--muted); }

/* A gilded picture frame for screenshots */
.frame { margin: 0; }
.frame img {
    width: 100%;
    image-rendering: pixelated;   /* keep the pixel art crisp */
    border: 10px solid transparent;
    border-image: linear-gradient(145deg, var(--gold-hi), var(--gold-lo) 30%, var(--gold) 55%, var(--gold-lo) 80%, var(--gold-hi)) 1;
    box-shadow: 0 0 0 2px #2a1d0e, 0 18px 40px rgba(0, 0, 0, 0.55);
    background: #111;
}
.frame figcaption {
    margin-top: 0.8rem; text-align: center; font-style: italic; color: var(--muted);
}

/* ---------------------------------------------------------------- notices */
.notices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 28px;
    margin-top: 2.5rem;
}
.notice {
    position: relative;
    padding: 1.6rem 1.5rem 1.3rem;
    color: var(--ink);
    background:
        radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.35), transparent 60%),
        linear-gradient(170deg, var(--parchment), var(--parchment-lo));
    border-radius: 3px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(120, 80, 30, 0.18);
}
.notice:nth-child(3n + 1) { transform: rotate(-0.8deg); }
.notice:nth-child(3n + 2) { transform: rotate(0.6deg); }
.notice:nth-child(3n) { transform: rotate(-0.3deg); }
.notice::before { /* the pin */
    content: "";
    position: absolute; top: 9px; left: 50%;
    width: 14px; height: 14px; margin-left: -7px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e98b6d, #8c2b18 70%);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
}
.notice h3 { margin: 0.4rem 0 0.5rem; font-size: 1.35rem; color: #6b3b14; }
.notice p { margin: 0; font-size: 1.02rem; }
.notice-soon { opacity: 0.92; }
.soon {
    position: absolute; top: 12px; right: -6px;
    font: 700 0.75rem "Alegreya Sans", sans-serif; letter-spacing: 0.06em; text-transform: uppercase;
    color: #fff4d8; background: #8c2b18; padding: 0.25em 0.7em; border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* ---------------------------------------------------------------- gallery */
.gallery { max-width: 900px; margin: 2.5rem auto 0; position: relative; }
.gallery-main figcaption { min-height: 3.3em; }
.thumbs {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 0.6rem;
}
.thumb {
    padding: 0; border: 2px solid rgba(216, 173, 85, 0.25); border-radius: 3px; background: #111;
    cursor: pointer; opacity: 0.65; transition: opacity 0.15s, border-color 0.15s;
}
.thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; image-rendering: pixelated; }
.thumb:hover { opacity: 1; }
.thumb[aria-current="true"] { opacity: 1; border-color: var(--gold); }
.gallery-arrows { display: flex; justify-content: space-between; position: absolute; left: -64px; right: -64px; top: 34%; pointer-events: none; }
.arrow {
    pointer-events: auto;
    width: 46px; height: 46px; border-radius: 50%;
    font: 400 2rem/1 "Alegreya", serif; color: var(--gold-hi);
    background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(216, 173, 85, 0.45); cursor: pointer;
}
.arrow:hover { background: rgba(0, 0, 0, 0.55); }

/* ---------------------------------------------------------------- builder list */
.ticks { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.ticks li { position: relative; padding-left: 1.8rem; margin: 0.45rem 0; }
.ticks li::before {
    content: "\2756"; position: absolute; left: 0; top: 0.05em; color: var(--gold);
}

/* ---------------------------------------------------------------- downloads */
.downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin: 0 auto 2rem; max-width: 960px; }
.dl {
    text-align: center;
    padding: 2rem 1.8rem 1.6rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.15));
    border: 1px solid rgba(216, 173, 85, 0.3);
    border-radius: 8px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
    min-width: 0;
}
.os { width: 48px; height: 48px; color: var(--gold); }
.dl h3 { margin: 0.4rem 0 0.2rem; font-size: 1.7rem; color: var(--gold-hi); }
.dl-meta { margin: 0 0 1.2rem; color: var(--muted); font: 0.98rem "Alegreya Sans", sans-serif; }
.steps { text-align: left; margin: 1.5rem 0 0; padding-left: 1.3rem; font-size: 0.98rem; color: var(--text); }
.steps li { margin: 0.45rem 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- faq */
details {
    border-bottom: 1px solid rgba(216, 173, 85, 0.22);
    padding: 0.4rem 0;
}
summary {
    cursor: pointer;
    list-style: none;
    padding: 0.7rem 2rem 0.7rem 0;
    position: relative;
    font: 700 1.12rem "Alegreya", serif;
    color: var(--gold-hi);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0.3rem; top: 0.55rem; font-size: 1.4rem; color: var(--gold); }
details[open] summary::after { content: "\2212"; }
details p { margin: 0 0 1rem; }

/* ---------------------------------------------------------------- footer */
.footer { padding: 48px 0 60px; text-align: center; border-top: 1px solid rgba(216, 173, 85, 0.2); }
.footer img { margin: 0 auto 0.6rem; }
.footer p { margin: 0.2rem auto; max-width: 620px; }

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 1100px) {
    .gallery-arrows { left: -8px; right: -8px; }
}
@media (max-width: 860px) {
    .nav-links { display: none; }
    .nav-cta { margin-left: auto; }
    .two-col, .two-col.reverse { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .two-col.reverse > :first-child { order: 0; }
    .downloads { grid-template-columns: minmax(0, 1fr); }
    .thumbs { grid-template-columns: repeat(3, 1fr); }
    .section { padding: 64px 0; }
}
@media (max-width: 480px) {
    body { font-size: 17px; }
    .nav-brand span { overflow: hidden; text-overflow: ellipsis; }
    .wrap { padding: 0 16px; }
    .gallery-arrows { top: 26%; }
    .arrow { width: 38px; height: 38px; font-size: 1.6rem; }
    .notice { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .plank { transition: none; }
}

/* ---------------------------------------------------------------- alpha */
.alpha-banner {
    position: relative; z-index: 11;
    padding: 0.75rem 20px;
    text-align: center;
    font: 500 1rem/1.45 "Alegreya Sans", sans-serif;
    color: #2a1505;
    background:
        repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.06) 0 14px, transparent 14px 28px),
        linear-gradient(180deg, #f2c75c, #d99a2b);
    border-bottom: 2px solid #8c5a12;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.alpha-banner strong {
    display: inline-block;
    margin-right: 0.6rem;
    padding: 0.05em 0.6em;
    font: 400 1.05rem "Uncial Antiqua", serif;
    letter-spacing: 0.06em;
    color: #fff3d6;
    background: #8c2b18;
    border-radius: 3px;
    vertical-align: 0.05em;
}
.plank.is-disabled {
    cursor: not-allowed;
    filter: grayscale(0.85) brightness(0.7);
    opacity: 0.75;
    transform: none;
}
.plank.is-disabled:hover { filter: grayscale(0.85) brightness(0.7); transform: none; }
.dl-status { margin: 0.6rem 0 0; font: 700 0.85rem "Alegreya Sans", sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: #e2a24a; }
.dev-callout {
    max-width: 640px; margin: 2.5rem auto 0; text-align: center;
    padding: 1.6rem 1.5rem; border: 1px dashed rgba(216, 173, 85, 0.5); border-radius: 8px;
}
.dev-callout h3 { margin: 0 0 0.4rem; font: 400 1.4rem "Uncial Antiqua", serif; color: var(--gold-hi); }
.dev-callout p { margin: 0 0 1.1rem; color: var(--muted); }
