:root {
    --bg-obsidian: #07080d;
    --bg-abyss: #0d111d;
    --bg-surface: rgba(17, 23, 39, 0.78);
    --bg-surface-strong: rgba(15, 20, 35, 0.94);

    --cyan: #00d4ff;
    --teal: #14b8a6;
    --magenta: #b938ff;
    --amber: #f5a623;
    --gold: #d4953a;
    --coral: #c73e1d;
    --salt: #e6e9f2;
    --muted: #9aa6be;

    --border-subtle: rgba(148, 178, 214, 0.18);
    --border-glow: rgba(0, 212, 255, 0.42);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-pill: 999px;

    --font-display: 'Cinzel', Georgia, serif;
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg-obsidian);
    color: var(--salt);
    font-family: var(--font-sans);
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 55% at 15% 0%, rgba(0, 212, 255, 0.11), transparent 60%),
        radial-gradient(ellipse 70% 50% at 88% 12%, rgba(185, 56, 255, 0.11), transparent 60%),
        radial-gradient(ellipse 65% 45% at 50% 100%, rgba(245, 166, 35, 0.09), transparent 65%),
        var(--bg-obsidian);
    color: var(--salt);
    overflow-x: hidden;
    line-height: 1.65;
}

#titan-particles {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

.site-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== NAVBAR ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: rgba(7, 8, 13, 0.8);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 0.96rem;
    white-space: nowrap;
}

.brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(245, 166, 35, 0.45));
    transition: transform 0.35s ease;
}

.brand-link:hover .brand-logo {
    transform: scale(1.08) rotate(-2deg);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.nav-link {
    padding: 0.45rem 0.82rem;
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--salt);
    background: rgba(0, 212, 255, 0.12);
}

.nav-link.active {
    box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.35);
}

.nav-link-ext {
    color: var(--amber);
    border: 1px solid rgba(245, 166, 35, 0.3);
}

.nav-link-ext:hover {
    background: rgba(245, 166, 35, 0.14);
    color: #fff;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn,
.audio-btn,
.mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.82rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    background: rgba(20, 27, 45, 0.75);
    color: var(--salt);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.lang-btn:hover,
.audio-btn:hover {
    border-color: var(--border-glow);
    transform: translateY(-1px);
}

.audio-btn.is-on {
    border-color: rgba(245, 166, 35, 0.65);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.16), rgba(185, 56, 255, 0.18));
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.25);
}

.audio-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.audio-bars span {
    width: 2.5px;
    background: var(--cyan);
    border-radius: 2px;
    height: 4px;
}

.audio-btn.is-on .audio-bars span:nth-child(1) { animation: eq 0.9s infinite ease-in-out; }
.audio-btn.is-on .audio-bars span:nth-child(2) { animation: eq 0.7s infinite ease-in-out 0.15s; background: var(--magenta); }
.audio-btn.is-on .audio-bars span:nth-child(3) { animation: eq 1.05s infinite ease-in-out 0.3s; background: var(--amber); }

@keyframes eq {
    0%, 100% { height: 4px; }
    50% { height: 12px; }
}

.mobile-toggle {
    display: none;
}

/* ===== CONTAINERS & SECTIONS ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.section {
    padding: 4.2rem 0;
}

.section-header {
    max-width: 780px;
    margin-bottom: 2.4rem;
}

.section-header.centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.kicker {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--amber), var(--cyan), var(--magenta));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.7rem;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    margin: 0 0 0.75rem;
    line-height: 1.18;
    letter-spacing: 0.03em;
}

h1 { font-size: clamp(2.15rem, 4.8vw, 3.85rem); }
h2 { font-size: clamp(1.6rem, 3.1vw, 2.45rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.42rem); }

.lead {
    color: var(--muted);
    font-size: clamp(0.98rem, 1.3vw, 1.12rem);
    margin: 0;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 4rem 0 4.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(180deg, rgba(7, 8, 13, 0.5) 0%, rgba(7, 8, 13, 0.82) 65%, var(--bg-obsidian) 100%),
        url('/images/games/prologo-losa.jpg');
    background-size: cover;
    background-position: center 35%;
    transform: scale(1.04);
    animation: heroBreathe 22s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes heroBreathe {
    from { transform: scale(1.03); }
    to { transform: scale(1.1); }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 2.5rem;
    align-items: center;
}

.hero-crest-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-crest {
    width: min(350px, 78vw);
    border-radius: 24px;
    box-shadow:
        0 0 55px rgba(245, 166, 35, 0.2),
        0 0 95px rgba(0, 212, 255, 0.18);
    animation: floatCrest 6s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes floatCrest {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
}

.latin-whisper {
    margin-top: 1.7rem;
    font-style: italic;
    color: rgba(245, 166, 35, 0.9);
    font-size: 0.94rem;
    letter-spacing: 0.03em;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.78rem 1.4rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.22s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.2s ease;
    font-family: inherit;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-sm {
    padding: 0.52rem 1rem;
    font-size: 0.84rem;
}

.btn-primary {
    background: linear-gradient(135deg, #00b8e6, #8f2fff 55%, #e38f1c);
    color: #fff;
    box-shadow: 0 8px 28px rgba(0, 212, 255, 0.26);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 12px 34px rgba(185, 56, 255, 0.42);
}

.btn-secondary {
    background: rgba(19, 27, 46, 0.82);
    color: var(--salt);
    border-color: var(--border-glow);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(0, 212, 255, 0.14);
}

.btn-amber {
    background: linear-gradient(135deg, #c73e1d, #f5a623);
    color: #090a0f;
    font-weight: 700;
}

.btn-ghost {
    background: transparent;
    color: var(--salt);
    border-color: var(--border-subtle);
}

.btn-ghost:hover:not(:disabled) {
    border-color: var(--amber);
    color: var(--amber);
}

/* ===== CARDS & GRIDS ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.35rem; }

.card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-interactive:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 255, 0.48);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48), 0 0 24px rgba(0, 212, 255, 0.12);
}

.card-pad {
    padding: 1.5rem;
}

.card-media {
    aspect-ratio: 16 / 10;
    width: 100%;
    overflow: hidden;
    background: #0b0e17;
    position: relative;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card-interactive:hover .card-media img {
    transform: scale(1.06);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.72rem;
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    border: 1px solid var(--border-subtle);
    background: rgba(12, 16, 28, 0.88);
    color: var(--cyan);
}

.badge-primordial {
    color: #f3c6ff;
    border-color: rgba(185, 56, 255, 0.55);
    background: rgba(185, 56, 255, 0.16);
}

.badge-amber {
    color: var(--amber);
    border-color: rgba(245, 166, 35, 0.45);
    background: rgba(245, 166, 35, 0.12);
}

.badge-teal {
    color: #5eead4;
    border-color: rgba(20, 184, 166, 0.5);
    background: rgba(20, 184, 166, 0.14);
}

.pill-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.filter-pill {
    padding: 0.5rem 1.05rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    background: rgba(17, 23, 39, 0.72);
    color: var(--muted);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-pill:hover,
.filter-pill.is-active {
    color: var(--salt);
    border-color: var(--cyan);
    background: rgba(0, 212, 255, 0.15);
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.meta-chip {
    font-size: 0.78rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.25rem 0.6rem;
}

/* ===== GODOT & INTERACTIVE GAME STAGE ===== */
.acoustic-band {
    background:
        linear-gradient(125deg, rgba(0, 212, 255, 0.09), rgba(185, 56, 255, 0.11), rgba(245, 166, 35, 0.09));
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.game-stage {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-glow);
    background: radial-gradient(circle at 50% 35%, rgba(20, 30, 52, 0.9), rgba(5, 6, 10, 0.98));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.game-stage-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.9rem 1.25rem;
    background: rgba(7, 9, 15, 0.9);
    border-bottom: 1px solid var(--border-subtle);
}

.godot-frame-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #040508;
}

.godot-frame-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===== ME'NSHI PROTOTYPE BOARD ===== */
.menshi-slab {
    position: relative;
    width: 100%;
    max-width: 680px;
    aspect-ratio: 16 / 10;
    margin: 0 auto;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 212, 255, 0.35);
    background:
        radial-gradient(circle at 50% 50%, rgba(185, 56, 255, 0.12), transparent 58%),
        linear-gradient(145deg, #0b0d14, #141826 55%, #090b10);
    overflow: hidden;
    box-shadow: inset 0 0 45px rgba(0, 0, 0, 0.75);
}

.menshi-axis {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 34%;
    height: 10px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: linear-gradient(90deg, #8b5a2b, #d4953a, #8b5a2b);
    box-shadow: 0 0 18px rgba(245, 166, 35, 0.45);
    pointer-events: none;
}

.menshi-arc-guide {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 44%;
    height: 62%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px dashed rgba(0, 212, 255, 0.25);
    pointer-events: none;
}

.menshi-stone {
    position: absolute;
    width: 44px;
    height: 30px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(230, 233, 242, 0.55);
    background: radial-gradient(circle at 35% 30%, #9fb3c8, #3d4f66 65%, #1d2633);
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.28s ease, top 0.28s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.65);
}

.menshi-stone.is-selected {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.3), 0 0 22px rgba(245, 166, 35, 0.6);
}

.menshi-stone.is-exiled {
    border-color: var(--magenta);
    box-shadow: 0 0 18px rgba(185, 56, 255, 0.75);
}

.menshi-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

/* ===== ME'NEITO RITUAL STAGE ===== */
.vessel-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 1rem;
}

.vessel-orb {
    width: 190px;
    height: 190px;
    border-radius: 44% 44% 50% 50% / 36% 36% 64% 64%;
    background:
        radial-gradient(circle at 35% 28%, rgba(20, 184, 166, 0.85), rgba(0, 212, 255, 0.45) 38%, rgba(16, 32, 54, 0.95) 80%);
    border: 2px solid rgba(94, 234, 212, 0.6);
    box-shadow:
        inset 0 -18px 34px rgba(0, 0, 0, 0.65),
        0 0 42px rgba(20, 184, 166, 0.28);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.65s ease, box-shadow 0.4s ease;
    position: relative;
}

.vessel-orb.is-swirling {
    animation: vesselSwirl 1.1s linear infinite;
    box-shadow: 0 0 55px rgba(245, 166, 35, 0.45), inset 0 0 28px rgba(0, 212, 255, 0.4);
}

.vessel-orb.is-listening {
    box-shadow: 0 0 48px rgba(185, 56, 255, 0.45), inset 0 0 32px rgba(20, 184, 166, 0.35);
}

@keyframes vesselSwirl {
    0%   { transform: rotate(-18deg) translateX(-6px); }
    25%  { transform: rotate(-10deg) translateY(-5px); }
    50%  { transform: rotate(-2deg) translateX(6px); }
    75%  { transform: rotate(-10deg) translateY(5px); }
    100% { transform: rotate(-18deg) translateX(-6px); }
}

.status-banner {
    padding: 0.95rem 1.2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(11, 16, 28, 0.85);
    font-size: 0.92rem;
    color: var(--salt);
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}

.status-banner.is-win {
    border-color: rgba(20, 184, 166, 0.65);
    background: rgba(20, 184, 166, 0.16);
    color: #99f6e4;
}

.status-banner.is-warn {
    border-color: rgba(245, 166, 35, 0.65);
    background: rgba(245, 166, 35, 0.14);
    color: #fde68a;
}

/* ===== REVEAL ANIMATIONS ===== */
[data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== FOOTER ===== */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    background: rgba(6, 7, 12, 0.92);
    padding: 3.5rem 0 2rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.2rem;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.footer-list a {
    color: var(--muted);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-list a:hover {
    color: var(--cyan);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.35rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.83rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-actions { justify-content: center; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
    .mobile-toggle { display: inline-flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(7, 8, 13, 0.97);
        border-bottom: 1px solid var(--border-subtle);
        padding: 1rem 1.25rem;
        flex-direction: column;
        align-items: stretch;
    }
    .nav-links.is-open { display: flex; }
    .grid-4, .grid-3, .grid-2, .footer-grid { grid-template-columns: 1fr; }
}
