/* =========================================================
   ZSCAPE — RSPS landing page
   Dark ember + gold theme, atmospheric CSS hero, ornate UI
   ========================================================= */

:root {
    --bg:        #0a0806;
    --bg-2:      #100b07;
    --bg-3:      #17100a;
    --panel:     #191007;
    --panel-2:   #221606;
    --line:      #3a2913;
    --line-2:    #5a3f1c;
    --text:      #efe4d2;
    --muted:     #b3a284;
    --muted-2:   #7d6f5a;
    --gold:      #f2a63a;
    --gold-2:    #ffd680;
    --gold-3:    #fff0cf;
    --gold-deep: #a9701c;
    --ember:     #ff6a1f;
    --ember-2:   #ff9147;
    --maxw:      1180px;
    --nav-h:     66px;
    --gold-grad: linear-gradient(180deg, var(--gold-3) 0%, var(--gold) 48%, var(--gold-deep) 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}
/* subtle film-grain / noise for texture */
body::before {
    content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
strong { color: var(--gold-2); font-weight: 700; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

h1, h2, h3, h4 { line-height: 1.12; font-weight: 800; }

/* metallic gold display heading */
.gold-type {
    font-family: 'Cinzel', serif; font-weight: 900;
    background: var(--gold-grad);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 2px 0 rgba(0,0,0,.35);
    filter: drop-shadow(0 3px 8px rgba(0,0,0,.5));
}

/* =========================================================
   Ornate buttons
   ========================================================= */
.rs-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    font-size: 1rem; padding: 15px 34px; border-radius: 3px; cursor: pointer;
    border: 1px solid transparent; transition: transform .15s ease, box-shadow .25s ease, filter .2s ease;
}
.rs-btn::after { /* inner bevel line */
    content: ""; position: absolute; inset: 3px; border-radius: 2px; pointer-events: none;
    border: 1px solid rgba(255,255,255,.12);
}
.rs-btn:active { transform: translateY(1px); }
.rs-btn--sm { padding: 11px 22px; font-size: .85rem; }

.rs-btn--gold {
    color: #35210a;
    background: linear-gradient(180deg, #ffe6ab 0%, var(--gold) 45%, var(--gold-deep) 100%);
    border-color: #ffedbf;
    box-shadow: 0 0 0 1px var(--gold-deep), 0 10px 26px -8px rgba(242,166,58,.75),
                inset 0 1px 0 rgba(255,255,255,.6);
    text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.rs-btn--gold:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--gold-deep), 0 16px 34px -8px rgba(242,166,58,.95), inset 0 1px 0 rgba(255,255,255,.6); filter: brightness(1.05); }

.rs-btn--dark {
    color: var(--gold-2);
    background: linear-gradient(180deg, #241708 0%, #140d06 100%);
    border-color: var(--line-2);
    box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 10px 24px -10px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,214,128,.12);
}
.rs-btn--dark::after { border-color: rgba(242,166,58,.22); }
.rs-btn--dark:hover { transform: translateY(-2px); border-color: var(--gold); color: var(--gold-3); box-shadow: 0 0 18px -2px rgba(242,166,58,.5), inset 0 1px 0 rgba(255,214,128,.2); }

/* =========================================================
   Top bar + centered crest
   ========================================================= */
.topbar {
    position: fixed; inset: 0 0 auto 0; z-index: 200; height: var(--nav-h);
    background: linear-gradient(180deg, rgba(12,8,5,.96), rgba(12,8,5,.72));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 0 rgba(242,166,58,.14), 0 10px 30px -10px rgba(0,0,0,.8);
    backdrop-filter: blur(6px);
}
.topbar-inner {
    max-width: var(--maxw); margin-inline: auto; height: 100%;
    display: flex; align-items: center; gap: 18px; padding-inline: 24px;
}
.nav-side { flex: 1; display: flex; gap: 8px; }
.nav-left { justify-content: flex-end; padding-right: 46px; }
.nav-right { justify-content: flex-start; padding-left: 46px; }
.nav-side a {
    font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    font-size: .82rem; color: var(--muted); padding: 10px 14px; border-radius: 4px;
    position: relative; transition: color .2s;
}
.nav-side a::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
    background: var(--gold); transform: scaleX(0); transform-origin: center; transition: transform .22s ease;
}
.nav-side a:hover, .nav-side a.active { color: var(--gold-2); }
.nav-side a:hover::after, .nav-side a.active::after { transform: scaleX(1); }

.crest {
    position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center;
    transform: translateY(14px); filter: drop-shadow(0 6px 14px rgba(0,0,0,.6));
}
.crest svg { filter: drop-shadow(0 0 12px rgba(242,166,58,.35)); }
.crest-word {
    font-family: 'Cinzel Decorative', serif; font-weight: 900; letter-spacing: .18em;
    font-size: .8rem; margin-top: 2px;
    background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
.nav-toggle span { width: 24px; height: 2px; background: var(--gold-2); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
    position: relative; min-height: 100vh; display: grid; place-items: center;
    padding: calc(var(--nav-h) + 40px) 24px 120px; overflow: hidden; text-align: center;
}
.hero-scene { position: absolute; inset: 0; z-index: 0; }

/* CSS-generated atmospheric scene. Drop a real image in assets/ and set
   background-image on .hero-photo to use key-art instead (see README). */
.hero-photo {
    position: absolute; inset: 0;
    background:
        radial-gradient(120% 90% at 50% 8%, rgba(255,120,40,.20), transparent 42%),
        radial-gradient(70% 55% at 22% 78%, rgba(255,90,20,.30), transparent 60%),
        radial-gradient(70% 55% at 82% 82%, rgba(210,70,15,.26), transparent 60%),
        radial-gradient(90% 70% at 50% 120%, rgba(255,140,40,.35), transparent 55%),
        linear-gradient(180deg, #1a0f07 0%, #120a05 45%, #0a0603 100%);
    background-size: cover; background-position: center;
}
/* faint ridge silhouette at the horizon */
.hero-photo::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
    background:
        radial-gradient(60% 100% at 20% 100%, #0b0704 40%, transparent 70%),
        radial-gradient(50% 100% at 55% 100%, #0d0805 45%, transparent 72%),
        radial-gradient(60% 100% at 85% 100%, #0b0704 40%, transparent 70%);
}

.hero-fog {
    position: absolute; inset: -10% -20%; opacity: .5; mix-blend-mode: screen; pointer-events: none;
    background: radial-gradient(closest-side, rgba(255,150,60,.12), transparent 70%);
    background-size: 55% 55%; background-repeat: no-repeat;
}
.fog-a { background-position: 15% 70%; animation: drift 26s ease-in-out infinite alternate; }
.fog-b { background-position: 80% 60%; animation: drift 34s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translateX(-4%); } to { transform: translateX(6%); } }

.hero-vignette {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(120% 90% at 50% 40%, transparent 45%, rgba(0,0,0,.55) 100%),
        linear-gradient(180deg, rgba(0,0,0,.35), transparent 25%, transparent 60%, var(--bg) 99%);
}

/* rising embers (spans injected by JS) */
.hero-embers { position: absolute; inset: 0; overflow: hidden; }
.ember {
    position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%;
    background: var(--ember-2); box-shadow: 0 0 6px 1px rgba(255,120,40,.8);
    animation: rise linear infinite;
}
@keyframes rise {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: .9; }
    100% { transform: translateY(-102vh) translateX(var(--drift, 20px)); opacity: 0; }
}

.hero-content { position: relative; z-index: 2; max-width: 820px; }
.hero-over {
    font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: .34em; text-transform: uppercase;
    font-size: .82rem; color: var(--gold-2); margin-bottom: 14px;
    text-shadow: 0 2px 10px rgba(0,0,0,.8);
}
.hero-title {
    font-family: 'Cinzel Decorative', serif; font-weight: 900;
    font-size: clamp(2.8rem, 8vw, 6rem); line-height: 1; letter-spacing: .01em;
    background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 3px 0 rgba(0,0,0,.4);
    filter: drop-shadow(0 6px 18px rgba(255,120,40,.35));
}
.hero-sub { color: #e9dcc6; font-size: clamp(1.02rem, 2vw, 1.22rem); margin: 22px auto 0; max-width: 560px; text-shadow: 0 2px 8px rgba(0,0,0,.9); }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.hero-online {
    display: inline-flex; align-items: center; gap: 9px; margin-top: 26px;
    font-size: .9rem; color: var(--muted); text-shadow: 0 1px 6px rgba(0,0,0,.9);
}
.hero-online strong { color: var(--gold-2); }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #57d07a; box-shadow: 0 0 0 0 rgba(87,208,122,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(87,208,122,.55); } 70% { box-shadow: 0 0 0 8px rgba(87,208,122,0); } 100% { box-shadow: 0 0 0 0 rgba(87,208,122,0); } }

.hero-edge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; z-index: 1; display: block; }
.hero-edge path { fill: var(--bg); }

/* =========================================================
   Quick-link panels
   ========================================================= */
.quicklinks { background: var(--bg); padding: 8px 0 64px; }
.ql-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: -30px; position: relative; z-index: 5; }
.ql-card {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
    padding: 34px 22px; border-radius: 6px;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,214,128,.08), 0 16px 40px -20px rgba(0,0,0,.9);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.ql-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 0 26px -6px rgba(242,166,58,.4); }
.ql-icon {
    width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-2);
    background: radial-gradient(circle at 50% 35%, rgba(242,166,58,.18), rgba(0,0,0,.2));
    border: 1px solid var(--line-2); margin-bottom: 8px;
}
.ql-card h3 { font-family: 'Cinzel', serif; font-size: 1.15rem; color: var(--gold-2); letter-spacing: .04em; }
.ql-card p { color: var(--muted); font-size: .92rem; }

/* =========================================================
   Slab sections
   ========================================================= */
.slab { padding: 92px 0; position: relative; }
.slab--alt {
    background:
        radial-gradient(80% 60% at 50% 0%, rgba(242,166,58,.06), transparent 60%),
        var(--bg-2);
    border-block: 1px solid var(--line);
}
.slab-head { text-align: center; max-width: 660px; margin: 0 auto 54px; }
.ornament { display: block; color: var(--gold); font-size: 1.1rem; margin-bottom: 8px; position: relative; }
.ornament::before, .ornament::after {
    content: ""; position: absolute; top: 50%; width: 90px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-2));
}
.ornament::before { right: calc(50% + 18px); }
.ornament::after { left: calc(50% + 18px); background: linear-gradient(270deg, transparent, var(--line-2)); }
.ornament--left { text-align: left; }
.ornament--left::before { display: none; }
.ornament--left::after { left: 22px; }
.slab-head h2 { font-family: 'Cinzel', serif; font-size: clamp(1.9rem, 4vw, 2.8rem);
    background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.slab-head p { color: var(--muted); margin-top: 14px; font-size: 1.05rem; }

/* feature panels */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.panel {
    position: relative; padding: 30px 26px 30px; border-radius: 6px;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255,214,128,.06);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.panel::before { /* corner brackets */
    content: ""; position: absolute; inset: 8px; border-radius: 3px; pointer-events: none;
    border: 1px solid transparent;
    background:
        linear-gradient(var(--gold), var(--gold)) left top / 14px 1px no-repeat,
        linear-gradient(var(--gold), var(--gold)) left top / 1px 14px no-repeat,
        linear-gradient(var(--gold), var(--gold)) right bottom / 14px 1px no-repeat,
        linear-gradient(var(--gold), var(--gold)) right bottom / 1px 14px no-repeat;
    opacity: .0; transition: opacity .25s;
}
.panel:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: 0 20px 44px -22px rgba(0,0,0,.9), 0 0 24px -8px rgba(242,166,58,.3); }
.panel:hover::before { opacity: .5; }
.panel-glyph {
    display: grid; place-items: center; width: 54px; height: 54px; border-radius: 8px; font-size: 1.5rem;
    color: var(--gold-2); background: radial-gradient(circle at 50% 35%, rgba(242,166,58,.16), rgba(0,0,0,.15));
    border: 1px solid var(--line-2); margin-bottom: 18px;
}
.panel h3 { font-family: 'Cinzel', serif; font-size: 1.22rem; color: var(--gold-2); margin-bottom: 8px; letter-spacing: .02em; }
.panel p { color: var(--muted); font-size: .96rem; }

/* showcase */
.showcase { display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; }
.frame {
    aspect-ratio: 16/10; border-radius: 6px; display: grid; place-items: center; position: relative; overflow: hidden;
    background:
        radial-gradient(400px 200px at 30% 20%, rgba(242,166,58,.12), transparent 60%),
        linear-gradient(180deg, var(--panel-2), #0d0805);
    border: 1px solid var(--line-2);
    box-shadow: inset 0 0 0 3px rgba(0,0,0,.5), inset 0 0 40px rgba(0,0,0,.7), 0 24px 60px -24px rgba(0,0,0,.9);
}
.frame::after {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
    background-size: 30px 30px;
}
.frame-label { color: var(--muted-2); font-weight: 600; text-align: center; z-index: 1; }
.frame-label code { color: var(--gold-2); }
.frame-label small { font-weight: 400; }
.showcase-body h2 { font-family: 'Cinzel', serif; font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-top: 10px;
    background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.runes { list-style: none; margin: 24px 0 30px; display: grid; gap: 13px; }
.runes li { position: relative; padding-left: 34px; color: var(--text); }
.runes li::before {
    content: "◆"; position: absolute; left: 0; top: 0; color: var(--gold); font-size: .9rem;
    filter: drop-shadow(0 0 6px rgba(242,166,58,.6));
}

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.step {
    text-align: center; padding: 34px 26px; border-radius: 6px;
    background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255,214,128,.06);
}
.step-num {
    display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%;
    font-family: 'Cinzel', serif; font-weight: 900; font-size: 1.35rem; color: var(--gold-2);
    background: radial-gradient(circle at 50% 35%, rgba(242,166,58,.2), rgba(0,0,0,.25));
    border: 2px solid var(--line-2); box-shadow: 0 0 18px -4px rgba(242,166,58,.4);
}
.step h3 { font-family: 'Cinzel', serif; font-size: 1.15rem; color: var(--gold-2); margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .95rem; margin-bottom: 16px; }

/* cta banner */
.cta-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap;
    padding: 36px 40px; border-radius: 8px;
    background:
        radial-gradient(600px 240px at 100% 0%, rgba(255,120,40,.18), transparent 60%),
        linear-gradient(180deg, var(--panel-2), #0d0805);
    border: 1px solid var(--line-2);
    box-shadow: inset 0 1px 0 rgba(255,214,128,.1), 0 24px 60px -26px rgba(0,0,0,.9);
}
.cta-banner h3 { font-family: 'Cinzel', serif; font-size: 1.6rem; color: var(--gold-2); }
.cta-banner p { color: var(--muted); }
.cta-banner-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); box-shadow: 0 -1px 0 rgba(242,166,58,.12); padding-top: 54px; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 2fr; gap: 40px; padding-bottom: 38px; }
.footer-brand .crest-word { font-size: 1.4rem; display: inline-block; }
.footer-brand p { color: var(--muted); font-size: .95rem; margin: 12px 0 16px; max-width: 300px; }
.footer-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col h4 { font-family: 'Cinzel', serif; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--muted); padding: 5px 0; font-size: .95rem; transition: color .2s; }
.footer-col a:hover { color: var(--gold-2); }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 22px; color: var(--muted-2); font-size: .85rem; text-align: center; }

/* back to top */
.to-top {
    position: fixed; right: 22px; bottom: 22px; z-index: 150; width: 46px; height: 46px; border-radius: 6px;
    display: grid; place-items: center; font-size: 1.3rem; color: var(--gold-2);
    background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-2);
    opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s, box-shadow .2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { box-shadow: 0 0 18px -3px rgba(242,166,58,.5); border-color: var(--gold); }

/* =========================================================
   Reveal + placeholder nudge
   ========================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.shake { animation: shake .4s ease; }
@keyframes shake { 0%,100% { transform: translateX(0);} 25% { transform: translateX(-4px);} 75% { transform: translateX(4px);} }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
    .feat-grid, .steps, .ql-grid { grid-template-columns: repeat(2, 1fr); }
    .showcase { grid-template-columns: 1fr; gap: 34px; }
    .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .nav-left, .nav-right { display: none; }
    .nav-toggle { display: flex; }
    .topbar-inner { justify-content: space-between; }
    .crest { transform: translateY(12px); margin: 0 auto; }

    .topbar.open { height: auto; }
    .topbar.open .nav-left, .topbar.open .nav-right {
        display: flex; flex-direction: column; flex-basis: 100%; padding: 8px 24px 12px; justify-content: center; align-items: stretch;
    }
    .topbar.open .topbar-inner { flex-wrap: wrap; padding-bottom: 10px; }
    .topbar.open .nav-side a { text-align: center; }

    .slab { padding: 66px 0; }
    .cta-banner { flex-direction: column; align-items: flex-start; text-align: left; }
}

@media (max-width: 460px) {
    .feat-grid, .steps, .ql-grid { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto; animation: none !important; }
    .reveal { opacity: 1; transform: none; transition: none; }
}
