: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.08), 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.78);
    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.98rem;
    white-space: nowrap;
}

.brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 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.78rem;
    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-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.5rem 0;
}

.section-header {
    max-width: 760px;
    margin-bottom: 2.5rem;
}

.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(--cyan), var(--magenta), var(--amber));
    -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.2rem, 5.2vw, 4.1rem); }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.55rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.45rem); }

.lead {
    color: var(--muted);
    font-size: clamp(1rem, 1.35vw, 1.14rem);
    margin: 0;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 86vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 4rem 0 5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(180deg, rgba(7, 8, 13, 0.45) 0%, rgba(7, 8, 13, 0.78) 65%, var(--bg-obsidian) 100%),
        url('/images/saga/alev-ante-titanes.jpg');
    background-size: cover;
    background-position: center 30%;
    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(340px, 78vw);
    border-radius: 26px;
    box-shadow:
        0 0 55px rgba(0, 212, 255, 0.22),
        0 0 95px rgba(185, 56, 255, 0.18);
    animation: floatCrest 6s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

@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.8rem;
    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.55rem;
    padding: 0.82rem 1.45rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.94rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.22s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #00b8e6, #8f2fff 55%, #e38f1c);
    color: #fff;
    box-shadow: 0 8px 28px rgba(0, 212, 255, 0.28);
}

.btn-primary:hover {
    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 {
    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 {
    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: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;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card: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.85);
    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);
}

/* ===== TITAN CARD ===== */
.titan-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.titan-card .card-media {
    aspect-ratio: 4 / 3;
    position: relative;
}

.titan-card .titan-order {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
}

.titan-acoustic {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    color: var(--amber);
}

/* ===== ACOUSTIC BANNER ===== */
.acoustic-band {
    background:
        linear-gradient(125deg, rgba(0, 212, 255, 0.1), rgba(185, 56, 255, 0.12), rgba(245, 166, 35, 0.09));
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

/* ===== YOUTUBE EMBED & COMMUNITY POSTS ===== */
.video-stage {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-glow);
    background: #05060a;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.video-ratio {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.video-ratio iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.post-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--muted);
}

.post-text {
    white-space: pre-line;
    margin: 0;
    color: var(--salt);
    font-size: 0.95rem;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.15rem;
}

.form-label {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 0.42rem;
    color: var(--salt);
}

.form-control {
    width: 100%;
    padding: 0.82rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(8, 11, 20, 0.85);
    color: var(--salt);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.16);
}

.alert {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.2rem;
    font-size: 0.94rem;
}

.alert-success {
    background: rgba(20, 184, 166, 0.16);
    border: 1px solid rgba(20, 184, 166, 0.5);
    color: #99f6e4;
}

.alert-error {
    background: rgba(199, 62, 29, 0.18);
    border: 1px solid rgba(199, 62, 29, 0.55);
    color: #fecaca;
}

.validation-message {
    color: #fca5a5;
    font-size: 0.82rem;
    margin-top: 0.3rem;
}

/* ===== 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; }
}
