@import url('https://fonts.googleapis.com/css2?family=Cardo:wght@400;700&family=Cinzel:wght@500;700&display=swap');

:root {
    --bg-primary: #0b0f16;
    --bg-secondary: #141b26;
    --accent-gold: #cfa75f;
    --accent-brass: #a4793b;
    --text-primary: #f4ead5;
    --text-muted: #c9bca2;
    --danger: #d55f5f;
    --success: #59b37d;
    --shadow-elevated: 0 24px 60px rgba(0, 0, 0, 0.45);
    --max-width: 1100px;
    --transition-slow: 600ms ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Cardo', serif;
    color: var(--text-primary);
    background: radial-gradient(circle at top, rgba(51, 67, 85, 0.35), transparent 55%),
        radial-gradient(circle at bottom, rgba(27, 31, 43, 0.65), transparent 60%),
        var(--bg-primary);
    min-height: 100vh;
    line-height: 1.65;
}

body.intro-active {
    overflow: hidden;
}

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: color 200ms ease;
}

a:hover,
a:focus {
    color: #f2d58b;
}

header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    background: rgba(11, 15, 22, 0.75);
    border-bottom: 1px solid rgba(207, 167, 95, 0.2);
}

.nav-bar {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
}

.nav-bar h1 {
    font-family: 'Cinzel', serif;
    letter-spacing: 0.08em;
    font-size: 1.1rem;
    margin: 0;
    color: var(--accent-gold);
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.nav-links a.active {
    color: #f2d58b;
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.4rem;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(207, 167, 95, 0.7), transparent);
}

.hero {
    position: relative;
    padding: 6rem 1.5rem 5rem;
    display: grid;
    place-items: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(20, 25, 36, 0.9) 0%, rgba(11, 15, 22, 0.95) 70%, rgba(11, 15, 22, 1) 100%);
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle, rgba(207, 167, 95, 0.08), transparent 55%);
    animation: rotateGlow 28s linear infinite;
    pointer-events: none;
}

.hero::after {
    animation-direction: reverse;
    opacity: 0.6;
}

@keyframes rotateGlow {
    from {
        transform: rotate(0deg) scale(1.1);
    }
    to {
        transform: rotate(360deg) scale(1.1);
    }
}

.hero h2 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    margin: 0;
    text-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.hero p {
    max-width: 650px;
    font-size: 1.05rem;
    margin: 1.5rem auto;
    color: var(--text-muted);
}

.library-hero {
    padding: 5rem 1.5rem 4rem;
}

.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

.btn {
    border: 1px solid rgba(207, 167, 95, 0.6);
    padding: 0.75rem 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: rgba(20, 25, 36, 0.6);
    border-radius: 999px;
    transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.btn:hover,
.btn:focus {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    background: rgba(207, 167, 95, 0.15);
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3.5rem 1.5rem 5rem;
    display: grid;
    gap: 3.5rem;
}

section {
    background: linear-gradient(135deg, rgba(20, 25, 36, 0.95), rgba(11, 15, 22, 0.9));
    border: 1px solid rgba(207, 167, 95, 0.2);
    border-radius: 18px;
    padding: 2.5rem 2.2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-elevated);
}

section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(207, 167, 95, 0.16), transparent 55%);
    pointer-events: none;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.section-title svg {
    width: 28px;
    height: 28px;
    fill: var(--accent-gold);
}

.section-content {
    color: var(--text-muted);
}

.cards-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
    background: rgba(10, 14, 20, 0.6);
    border: 1px solid rgba(207, 167, 95, 0.12);
    padding: 1.4rem;
    border-radius: 16px;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 240ms ease, border-color 240ms ease;
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(207, 167, 95, 0.35);
}

.card strong {
    font-family: 'Cinzel', serif;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.manuals-summary {
    display: grid;
    gap: 1rem;
}

.manuals-summary > p {
    margin: 0;
    color: var(--text-muted);
}

.manuals-preview {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.manuals-preview li a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.manuals-preview li a::before {
    content: '➜';
    font-size: 0.75rem;
    color: var(--accent-gold);
}

.manuals-more {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.manuals-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-secondary {
    border: 1px solid rgba(207, 167, 95, 0.4);
    background: rgba(207, 167, 95, 0.12);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: rgba(207, 167, 95, 0.22);
}

.manuals-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.25rem;
}

.manuals-list li {
    border: 1px solid rgba(207, 167, 95, 0.15);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    background: rgba(10, 14, 20, 0.58);
}

.manuals-list span {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.library-content {
    display: grid;
    gap: 1.5rem;
}

.library-total {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.library-section {
    border: 1px solid rgba(207, 167, 95, 0.18);
    border-radius: 14px;
    padding: 1.4rem 1.6rem;
    background: rgba(10, 14, 20, 0.6);
    display: grid;
    gap: 0.75rem;
}

.library-section-header h2 {
    margin: 0;
    font-family: 'Cinzel', serif;
    color: var(--text-primary);
    font-size: 1.35rem;
}

.library-section-header p {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.documents-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.documents-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(207, 167, 95, 0.1);
    padding-bottom: 0.45rem;
}

.documents-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.documents-list a {
    color: var(--text-primary);
    font-weight: 600;
}

.documents-list span {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.schedule-board {
    display: grid;
    gap: 1.2rem;
}

.session-card {
    border: 1px solid rgba(207, 167, 95, 0.2);
    border-radius: 14px;
    padding: 1.2rem 1.4rem;
    background: rgba(12, 17, 23, 0.7);
    display: grid;
    gap: 0.35rem;
}

.session-card .session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.session-card .session-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.session-card strong {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.session-note {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    padding: 1rem 1.25rem;
    border-left: 3px solid rgba(207, 167, 95, 0.3);
    background: rgba(12, 17, 23, 0.55);
    border-radius: 0 12px 12px 0;
}

.status-message {
    font-size: 0.95rem;
    color: var(--text-muted);
}

footer {
    text-align: center;
    padding: 3rem 1.5rem 4rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

footer p {
    margin: 0.4rem 0;
}

.intro-screen {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(20, 25, 36, 0.92) 0%, rgba(6, 8, 12, 0.95) 70%);
    z-index: 100;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.intro-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.intro-emblem {
    font-family: 'Cinzel', serif;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    color: var(--accent-gold);
    text-align: center;
    position: relative;
}

.intro-emblem span {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.5em;
    margin-top: 0.75rem;
    color: var(--text-muted);
}

.intro-ornaments {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    transform: translateY(-30px);
}

.glyph {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    color: rgba(207, 167, 95, 0.65);
    opacity: 0;
    transform: scale(0.7);
    animation: glyphFloat 2.8s ease forwards;
}

.glyph-2 {
    animation-delay: 0.25s;
}

.glyph-3 {
    animation-delay: 0.5s;
}

@keyframes glyphFloat {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(25px);
    }
    60% {
        opacity: 1;
        transform: scale(1.05) translateY(-10px);
    }
    100% {
        opacity: 0.85;
        transform: scale(1) translateY(0);
    }
}

@keyframes introFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro-emblem {
    animation: introFadeIn 1.2s ease forwards;
}

.intro-emblem::before,
.intro-emblem::after {
    content: '';
    position: absolute;
    width: 128px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(207, 167, 95, 0.8), transparent);
    top: 50%;
    transform: translateY(-50%);
}

.intro-emblem::before {
    left: -160px;
}

.intro-emblem::after {
    right: -160px;
}

.decor-divider {
    margin: 2.5rem auto 0;
    width: 180px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(207, 167, 95, 0.65), transparent);
}

@media (max-width: 780px) {
    .nav-links {
        display: none;
    }

    .nav-bar {
        justify-content: center;
    }

    section {
        padding: 2rem 1.5rem;
    }

    .session-card .session-meta {
        flex-direction: column;
        gap: 0.35rem;
    }

    .manuals-actions {
        justify-content: center;
    }

    .documents-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
        scroll-behavior: auto !important;
    }

    body {
        scroll-behavior: auto;
    }
}
