/* ==========================================================================
   Embers of Olympus — marketing site
   Dark, atmospheric Greek theme. Images degrade gracefully to gradients.
   ========================================================================== */

:root {
    --bg:        #0c0a09;
    --bg-2:      #131010;
    --panel:     #1a1513;
    --panel-2:   #221a16;
    --line:      rgba(201, 162, 39, 0.16);

    --ink:       #ece4d7;
    --ink-soft:  #b7a993;
    --ink-mute:  #8a7d6b;

    --gold:      #c9a227;
    --gold-soft: #e0c56b;
    --ember:     #e2703a;
    --ember-2:   #b64a24;

    --maxw: 1120px;
    --radius: 14px;
    --shadow: 0 18px 50px rgba(0,0,0,0.55);

    --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: var(--ember); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: 0.5px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
    position: absolute; left: -9999px; top: 0; background: var(--gold); color: #1a1206;
    padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Header / nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(12, 10, 9, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { max-height: 40px; width: auto; }
.brand-text {
    font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
    color: var(--ink); letter-spacing: 1px;
}
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
    color: var(--ink-soft); font-size: 0.95rem; font-weight: 500;
    padding: 8px 12px; border-radius: 8px; transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.site-nav a.is-active { color: var(--gold-soft); }

/* Submenu (Home -> Changes history). CSS-only: opens on hover, and on
   :focus-within so it is reachable by keyboard. No gap between the parent link
   and the panel, or the pointer would lose the hover on the way down. */
.nav-item { position: relative; display: inline-flex; align-items: center; }
.nav-sub {
    position: absolute; top: 100%; left: 0; min-width: 190px; z-index: 60;
    display: flex; flex-direction: column;
    padding: 6px; border: 1px solid var(--line); border-radius: 10px;
    background: rgba(12, 10, 9, 0.97); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .15s, transform .15s, visibility .15s;
}
.nav-item:hover > .nav-sub,
.nav-item:focus-within > .nav-sub { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-sub a { white-space: nowrap; font-size: 0.9rem; }

.nav-toggle, .nav-burger { display: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block; padding: 13px 26px; border-radius: 10px; font-weight: 600;
    font-size: 0.98rem; letter-spacing: .3px; cursor: pointer; transition: transform .12s, box-shadow .15s, background .15s;
    border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: linear-gradient(135deg, var(--ember), var(--ember-2));
    color: #fff; box-shadow: 0 10px 30px rgba(182, 74, 36, 0.35);
}
.btn-primary:hover { color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { color: var(--ink); border-color: var(--gold); }

.eyebrow {
    text-transform: uppercase; letter-spacing: 3px; font-size: 0.78rem; font-weight: 600;
    color: var(--gold); margin: 0 0 14px;
}

/* ---------- Hero ---------- */
.hero {
    position: relative; min-height: 84vh; display: flex; align-items: center;
    background-image: var(--hero-img), radial-gradient(120% 90% at 70% 20%, #2a1a10 0%, #0c0a09 60%);
    background-size: cover; background-position: center; background-repeat: no-repeat;
    border-bottom: 1px solid var(--line);
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(12,10,9,0.35) 0%, rgba(12,10,9,0.7) 55%, var(--bg) 100%),
                linear-gradient(90deg, rgba(12,10,9,0.75) 0%, rgba(12,10,9,0.15) 60%);
}
.hero-inner { position: relative; padding: 90px 20px; max-width: 760px; }
.hero-title { font-size: clamp(2.6rem, 7vw, 5rem); margin: 0 0 20px; color: #fff; text-shadow: 0 4px 30px rgba(0,0,0,0.6); }
.hero-pitch { font-size: clamp(1.05rem, 2.2vw, 1.35rem); color: var(--ink); max-width: 620px; }
.hero-pitch strong { color: var(--gold-soft); font-weight: 600; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-note { margin-top: 24px; color: var(--ink-mute); font-size: 0.9rem; }

/* ---------- Bands ---------- */
.band { background: var(--bg-2); padding: 70px 0; border-bottom: 1px solid var(--line); }
.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px;
}
.feature h3 { margin: 0 0 10px; font-size: 1.15rem; color: var(--gold-soft); }
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Split ---------- */
.split { padding: 84px 0; background: var(--bg); }
.split-ai { background: linear-gradient(180deg, var(--bg), var(--bg-2)); }
.split-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split-media {
    min-height: 340px; border-radius: var(--radius); border: 1px solid var(--line);
    background-image: var(--img), linear-gradient(135deg, #2a1a10, #120d0a);
    background-size: cover; background-position: center; box-shadow: var(--shadow);
}
.split-body h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 8px 0 18px; }
.split-body p { color: var(--ink-soft); }

/* ---------- CTA ---------- */
.cta {
    padding: 80px 0; text-align: center;
    background: radial-gradient(90% 120% at 50% 0%, #2a1810 0%, var(--bg) 60%);
    border-top: 1px solid var(--line);
}
.cta-inner { max-width: 680px; margin: 0 auto; }
.cta h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin: 0 0 14px; }
.cta p { color: var(--ink-soft); margin: 0 0 28px; }
.cta .hero-actions { justify-content: center; }

/* ---------- Page head (interior pages) ---------- */
.page-head {
    position: relative; padding: 96px 0 64px; border-bottom: 1px solid var(--line);
    background-image: var(--head-img, none), linear-gradient(180deg, #1a1109, var(--bg));
    background-size: cover; background-position: center;
}
.page-head-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,10,9,0.55), var(--bg) 96%); }
.page-head .wrap { position: relative; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 18px; color: #fff; max-width: 15ch; }
.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-soft); max-width: 65ch; }
.ai-head h1 { max-width: 22ch; }

/* ---------- Content bands ---------- */
.content-band { padding: 66px 0; }
.content-band.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin: 0 0 8px; text-align: center; }
.section-sub { text-align: center; color: var(--ink-mute); margin: 0 auto 40px; max-width: 60ch; }

.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin: 0 0 18px; color: var(--gold-soft); }
.prose p { color: var(--ink-soft); margin: 0 0 18px; }
.prose strong { color: var(--ink); }

/* ---------- Class cards ---------- */
.class-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.class-card {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    transition: transform .15s, border-color .15s;
}
.class-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.class-art {
    height: 260px;
    background-image: var(--img), linear-gradient(160deg, #2c1c11 0%, #150e0a 100%);
    background-size: cover; background-position: center top;
}
.class-text { padding: 22px; }
.class-text h3 { margin: 0 0 4px; font-size: 1.4rem; color: var(--gold-soft); }
.class-role { margin: 0 0 12px; text-transform: uppercase; letter-spacing: 2px; font-size: 0.72rem; color: var(--ember); font-weight: 600; }
.class-text p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Feature rows ---------- */
.feature-rows { display: flex; flex-direction: column; gap: 56px; }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.feature-row.reverse .feature-row-media { order: 2; }
.feature-row-media {
    min-height: 300px; border-radius: var(--radius); border: 1px solid var(--line);
    background-image: var(--img), linear-gradient(135deg, #2a1a10, #120d0a);
    background-size: cover; background-position: center; box-shadow: var(--shadow);
}
.feature-row-text h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin: 0 0 14px; color: var(--gold-soft); }
.feature-row-text p { color: var(--ink-soft); margin: 0; }
.feature-row-text strong { color: var(--ink); }

/* ---------- Facts ---------- */
.facts { padding: 66px 0; background: var(--bg-2); border-top: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fact {
    display: flex; flex-direction: column; gap: 6px; padding: 20px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.fact-k { text-transform: uppercase; letter-spacing: 2px; font-size: 0.7rem; color: var(--gold); font-weight: 600; }
.fact-v { color: var(--ink); font-weight: 500; }

/* ---------- AI grid ---------- */
.ai-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ai-card {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line); border-left-width: 3px; border-radius: 12px; padding: 24px;
}
.ai-card h3 { margin: 0 0 10px; font-size: 1.12rem; }
.ai-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.ai-yes { border-left-color: var(--ember); }
.ai-yes h3 { color: var(--gold-soft); }
.ai-no { border-left-color: #4f6b74; }
.ai-no h3 { color: #9fc0cb; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 820px; }
.phase { display: grid; grid-template-columns: 66px 1fr; gap: 22px; padding: 0 0 34px; position: relative; }
.phase:not(:last-child)::before {
    content: ""; position: absolute; left: 32px; top: 66px; bottom: 0; width: 2px;
    background: linear-gradient(var(--gold), transparent);
}
.phase-num {
    width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center;
    font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: #1a1206;
    background: radial-gradient(circle at 35% 30%, var(--gold-soft), var(--gold));
    box-shadow: 0 8px 24px rgba(201,162,39,0.28);
}
.phase-body {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
}
.phase-body h3 { margin: 0 0 10px; font-size: 1.3rem; color: var(--gold-soft); }
.phase-body p { margin: 0 0 10px; color: var(--ink-soft); }
.phase-body .gate { margin: 0; color: var(--ink); font-size: 0.92rem; }
.phase-body .gate em { color: var(--ember); font-style: italic; }

/* ---------- Books ---------- */
.books-split { grid-template-columns: 320px 1fr; }
.book-cover {
    min-height: 440px; border-radius: var(--radius); border: 1px solid var(--line);
    background-image: var(--img), linear-gradient(160deg, #2c1c11, #120d0a);
    background-size: cover; background-position: center; box-shadow: var(--shadow);
}

/* ---------- Subscribe / Get game updates ---------- */
.subscribe {
    background: linear-gradient(180deg, var(--bg-2), var(--bg));
    border-top: 1px solid var(--line);
    padding: 64px 0;
    text-align: center;
}
.subscribe-inner { max-width: 620px; margin: 0 auto; }
.subscribe h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin: 0 0 14px; color: var(--ink); }
.subscribe-lede { color: var(--ink-soft); margin: 0 auto 26px; max-width: 52ch; }
.subscribe-form { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.subscribe-input {
    flex: 1 1 280px; min-width: 0; max-width: 360px;
    padding: 13px 16px; font: inherit; color: var(--ink);
    background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
    transition: border-color .15s, box-shadow .15s;
}
.subscribe-input::placeholder { color: var(--ink-mute); }
.subscribe-input:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
}
.subscribe-form .btn { flex: 0 0 auto; }
.subscribe-msg {
    max-width: 44ch; margin: 0 auto 22px; padding: 12px 16px;
    border-radius: 10px; font-size: 0.95rem; border: 1px solid var(--line);
}
.subscribe-msg.is-success { color: var(--gold-soft); background: rgba(201, 162, 39, 0.10); border-color: rgba(201, 162, 39, 0.35); }
.subscribe-msg.is-error   { color: #f0b7a0; background: rgba(182, 74, 36, 0.12); border-color: rgba(226, 112, 58, 0.4); }

/* Honeypot + a11y-only helpers */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Footer ---------- */
.site-footer { background: #080706; border-top: 1px solid var(--line); padding: 48px 0 40px; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.footer-title { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); margin: 0 0 6px; letter-spacing: 1px; }
.footer-tag { margin: 0; color: var(--ink-mute); font-size: 0.92rem; max-width: 42ch; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-nav a { color: var(--ink-soft); font-size: 0.92rem; }
.footer-legal { grid-column: 1 / -1; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-mute); font-size: 0.82rem; }
.footer-domain { color: var(--gold); }
.footer-version { grid-column: 1 / -1; margin: 10px 0 0; color: var(--ink-mute); opacity: 0.6; font-size: 0.74rem; letter-spacing: 0.04em; }

/* ---------- Changelog ---------- */
.changelog { list-style: none; margin: 0; padding: 0; }
.changelog-entry { display: grid; grid-template-columns: 190px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.changelog-entry:first-child { border-top: 0; padding-top: 0; }
.changelog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; align-content: start; }
.changelog-badge {
    font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600;
    padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-mute);
}
.changelog-badge.is-feature { color: var(--gold-soft); border-color: rgba(201, 162, 39, 0.45); }
.changelog-badge.is-fix     { color: var(--ink-soft); }
.changelog-badge.is-bug     { color: var(--ember); border-color: rgba(226, 112, 58, 0.45); }
.changelog-version { font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; }
.changelog-date { font-size: 0.82rem; color: var(--ink-mute); }
.changelog-body h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); letter-spacing: 0.5px; }
.changelog-body p { margin: 0; color: var(--ink-mute); }
.changelog-empty { color: var(--ink-mute); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .band-grid { grid-template-columns: repeat(2, 1fr); }
    .facts-grid { grid-template-columns: repeat(2, 1fr); }
    .ai-grid { grid-template-columns: 1fr 1fr; }
    .class-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
    .split-inner, .feature-row, .books-split { grid-template-columns: 1fr; }
    .feature-row.reverse .feature-row-media { order: 0; }
    .split-media, .feature-row-media { min-height: 240px; }

    /* Mobile nav */
    .nav-burger { display: inline-flex; flex-direction: column; gap: 5px; width: 44px; height: 40px; align-items: center; justify-content: center; cursor: pointer; }
    .nav-burger span { width: 24px; height: 2px; background: var(--ink); transition: .2s; }
    .site-nav {
        position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0;
        background: rgba(12,10,9,0.97); border-bottom: 1px solid var(--line);
        max-height: 0; overflow: hidden; transition: max-height .25s ease;
    }
    .site-nav a { padding: 14px 20px; border-top: 1px solid var(--line); border-radius: 0; }

    /* There is no hover on touch, so the submenu is laid out inline in the
       stacked menu (indented) instead of as a floating panel. */
    .nav-item { display: block; }
    .nav-sub {
        position: static; opacity: 1; visibility: visible; transform: none;
        min-width: 0; padding: 0; border: 0; border-radius: 0;
        background: transparent; box-shadow: none;
    }
    .nav-sub a { padding-left: 40px; font-size: 0.9rem; color: var(--ink-mute); }

    .nav-toggle:checked ~ .site-nav { max-height: 460px; }
    .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
    .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 560px) {
    .band-grid, .facts-grid, .ai-grid { grid-template-columns: 1fr; }
    .hero { min-height: 78vh; }
    .hero-inner { padding: 70px 20px; }
    /* The 190px meta column leaves too little room for the text on a phone;
       stack the badge/version/date above the entry instead. */
    .changelog-entry { grid-template-columns: 1fr; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn:hover, .class-card:hover { transform: none; }
}
