/* ==========================================================================
   Zest Studios site styles (the "Refined Dark" design).
   One stylesheet for every page; no framework.
   ========================================================================== */

:root {
    --bg: #0b0b0d;
    --panel: #141418;
    --panel-2: #1b1b21;
    --line: #26262d;
    --text: #f2f0f7;
    --muted: #a19cae;
    --p1: #dac1ff;
    --p2: #c095ff;
    --grad: linear-gradient(45deg, var(--p1) 15%, var(--p2) 65%);
    --nav-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.65 Poppins, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--p1); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0; }
p + p { margin-top: 1em; }
:focus-visible { outline: 2px solid var(--p1); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--p1); margin-bottom: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 14px; line-height: 1.2; transition: transform .15s, background-color .15s; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-p { background: var(--grad); color: #16101f; }
.btn-g { border: 1px solid var(--line); color: var(--text); }
.btn-g:hover { background: #1c1c22; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* --------------------------------------------------------------------------
   Nav (rendered by assets/components/header.js)
   -------------------------------------------------------------------------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 20; background: rgba(11,11,13,.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 32px; height: var(--nav-h); }
.nav a { color: inherit; }
.nav a:hover { text-decoration: none; }
.brand { font-weight: 800; letter-spacing: .04em; color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; padding: 0; margin: 0 0 0 auto; font-size: 14px; color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav .btn { padding: 8px 16px; }
.nav-menu { display: none; margin-left: auto; position: relative; }
.nav-menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu ul { position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; list-style: none; margin: 0; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.nav-menu li a { display: block; padding: 10px 12px; border-radius: 8px; }
.nav-menu li a:hover { background: var(--panel-2); }
.page { padding-top: var(--nav-h); }

/* --------------------------------------------------------------------------
   Footer (rendered by assets/components/footer.js)
   -------------------------------------------------------------------------- */
.foot { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.ico { width: 1.15em; height: 1.15em; flex: none; }
.foot a:hover { color: var(--text); text-decoration: none; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
section { padding: 96px 0; }
section.tight { padding-top: 0; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.head p { color: var(--muted); max-width: 40ch; }
h1 { font-size: clamp(40px, 7vw, 84px); line-height: 1.02; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; }
.lead { color: var(--muted); font-size: 18px; max-width: 52ch; }

/* Hero: full-bleed image with the text sitting low on the left */
.hero { position: relative; min-height: 88vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero.short { min-height: 56vh; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,13,.1) 30%, var(--bg) 95%); }
.hero .wrap { position: relative; z-index: 1; padding-bottom: 96px; width: 100%; }
.hero h1 { max-width: 14ch; }
.hero .lead { margin: 24px 0 36px; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s; }
.card:hover { border-color: #4a3d63; }
.card > a > img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
.card .body { padding: 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 20px; font-weight: 600; }
.card h3 a { color: var(--text); }
.card p { color: var(--muted); font-size: 14px; flex: 1; }
.card .links { display: flex; gap: 16px; margin-top: 14px; font-size: 14px; font-weight: 600; }
.card .links a:first-child { color: var(--text); }
.tag { font-size: 12px; color: var(--p1); letter-spacing: .06em; text-transform: uppercase; }

/* Game teaser banner */
.teaser { position: relative; display: flex; align-items: center; min-height: 420px; border-radius: 20px; overflow: hidden; }
.teaser > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.teaser::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,11,13,.95) 30%, rgba(11,11,13,.15)); }
.teaser .in { position: relative; z-index: 1; padding: 48px; max-width: 520px; }
.year { font-size: clamp(56px, 9vw, 112px); font-weight: 800; line-height: 1; }
.year-sub { font-size: clamp(28px, 4vw, 48px); margin-top: 10px; }
.teaser p { color: var(--muted); margin: 12px 0 28px; }

/* Two-column text split (about blurbs) */
.split { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; border-top: 1px solid var(--line); padding-top: 64px; }
.split p { color: var(--muted); font-size: 18px; }

/* --------------------------------------------------------------------------
   Product pages
   -------------------------------------------------------------------------- */
.product { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; align-items: start; padding-top: 48px; padding-bottom: 72px; }
.product h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; }
.product .lead { font-size: 16px; margin: 14px 0 0; }
.product .cta { flex-direction: column; margin-top: 24px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.pills li { border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 12px; color: var(--muted); }
.meta { color: var(--muted); font-size: 13px; margin-top: 20px; }
media-gallery .mg-stage, media-gallery .mg-thumb { background: var(--panel); }

/* Long-form text (product descriptions, docs) */
.prose { color: #d9d5e2; }
.prose h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 20px; color: var(--text); }
.prose h3 { font-size: 20px; margin: 48px 0 12px; color: var(--text); }
.prose h4 { font-size: 16px; margin: 28px 0 8px; color: var(--text); }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose p + p { margin-top: 0; }
.prose li { margin: .25em 0; }
.prose strong { color: var(--text); }
.prose code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: .05rem .35rem; font-size: .88em; color: var(--p1); }
.features { list-style: none; padding: 0; margin: 0; }
.features li { position: relative; padding: 14px 0 14px 28px; border-top: 1px solid var(--line); margin: 0; }
.features li:last-child { border-bottom: 1px solid var(--line); }
.features li::before { content: ""; position: absolute; left: 0; top: 22px; width: 10px; height: 10px; border-radius: 3px; background: var(--grad); }
.features strong { display: block; }

/* Docs */
.docs-title { font-size: clamp(32px, 4vw, 44px); margin-bottom: 8px; }
.docs-sub { color: var(--muted); }
.docs-toc { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; margin: 32px 0 8px; }
.docs-toc h3 { margin: 0 0 10px; font-size: 16px; }
.docs-toc ol { margin: 0; padding-left: 1.2rem; }
.prose .docs-toc + h2, .prose h2[id] { margin-top: 56px; }
.docs-code { background: #08080a; border: 1px solid var(--line); color: #e8e8e8; border-radius: 10px; padding: 14px 18px; font-family: Consolas, Menlo, monospace; font-size: 14px; line-height: 1.6; overflow-x: auto; margin: 12px 0 20px; }
.docs-code .k { color: #7ec3f0; } .docs-code .s { color: #e8b571; } .docs-code .c { color: #8a8f98; } .docs-code .g { color: #59d75b; }
.docs-note { background: rgba(192,149,255,.08); border: 1px solid rgba(192,149,255,.28); border-radius: 10px; padding: 14px 18px; margin: 16px 0 24px; }
.docs-steps { padding-left: 1.3rem; }
.docs-table { width: 100%; border-collapse: collapse; margin: 12px 0 24px; font-size: 15px; }
.docs-table th, .docs-table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.docs-table th { background: var(--panel); color: var(--text); }
.docs-backlink { margin-top: 40px; }

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
    .nav-links { display: none; }
    .nav-menu { display: block; }
    .grid, .grid-2, .split, .product { grid-template-columns: 1fr; }
    .head { flex-direction: column; align-items: flex-start; }
    .teaser .in { padding: 32px; }
    section { padding: 72px 0; }
    .hero .wrap { padding-bottom: 72px; }
    .product { gap: 28px; padding-top: 32px; }
}
