/* ========== GLOBAL THEME VARIABLES ========== */
:root {
    --color-background: #050508;
    --color-text-primary: #e6e0d4;
    --color-text-secondary: #a39c8e;
    --color-accent-gold: #b08a57;
    --color-accent-crimson: #7a3e2f;

    --color-paper: #e6dfd0;
    --color-paper-dark: #ddd0b8;
    --color-ink: #3e3529;
    --color-ink-soft: #6e6252;
    --color-paper-border: #c7b79c;
    --color-paper-quote: #fff4e2;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --glass-bg: rgba(5, 5, 8, 0.6);
    --glass-border: rgba(176, 138, 87, 0.2);
    --glass-blur: blur(12px);
}

/* ========== BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-background);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--color-accent-gold);
    margin-bottom: 1rem;
}

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

a:hover {
    color: #fff;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 2s ease-out forwards;
}

/* ========== GLASSMORPHISM UTILITIES ========== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    background: transparent;
    color: var(--color-text-primary);
    border: 1px solid var(--color-accent-gold);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--color-accent-gold);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.btn:hover {
    color: var(--color-background);
    box-shadow: 0 0 20px rgba(207, 170, 103, 0.5);
}

.btn:hover::before {
    transform: scaleX(1);
}

/* ========== GATEWAY (INDEX) STYLES ========== */
.gateway-body {
    overflow: hidden; /* Prevent scrolling on the landing page */
}

.gateway-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.background-trailer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    filter: brightness(0.4) saturate(1.2);
}

.gateway-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
}

.epic-title {
    font-size: 4rem;
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.epic-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    font-style: italic;
}

.hint-text {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    opacity: 0.7;
}

/* ========== CHRONICLE (CHAPTER) STYLES ========== */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    z-index: 100;
    border-radius: 0;
    border-left: none; border-right: none; border-top: none;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.nav-controls button, button#mute-toggle {
    background: none;
    border: none;
    color: var(--color-accent-gold);
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--font-body);
}

.nav-controls button:hover {
    text-decoration: underline;
}

.chapter-container {
    width: 80%;
    min-width: 760px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem 2rem;
}

.chapter-header {
    text-align: center;
    margin-bottom: 4rem;
}

.chapter-number {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-accent-crimson);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
}

.chapter-title {
    font-size: 3rem;
}

article.story-content {
    border-radius: 2em;
    background: linear-gradient(180deg, var(--color-paper) 0%, #e2d6c2 100%);
    padding: 2.5rem 12%;
    color: var(--color-ink);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    border: 1px solid var(--color-paper-border);
}

article.story-content.poetry {
    width: 53%;
    min-width: 350px;
    padding: 1rem 2rem;
    margin: auto;
}

.story-content p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    text-align: justify;
    opacity: 1;
    color: var(--color-ink);
}

.story-content > p {
    text-indent: 5em;
}

.story-content > p.first {
    text-indent: 0em;
}

/*Medieval style first letter */
.drop-cap, .story-content > p.first::first-letter {  
    float: left;
    font-family: "UnifrakturCook", "Cinzel Decorative", "Times New Roman", serif;
    font-size: 4.5rem;
    line-height: 0.9;
    font-weight: 700;
    color: #7a4a32;
    margin-right: 0.18em;
    margin-top: 0.08em;
    padding: 0.05em 0.12em;   
}

.story-content h1,
.story-content h2,
.story-content h3,
.story-content h4,
.story-content h5,
.story-content h6 {
    color: orangered;
}

.story-content a {
    color: #8a673d;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.story-content a:hover {
    color: #5c4328;
}

.scene {  /* Scene: Multimedia enriched content */
    margin: 4rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(120, 98, 70, 0.05);
    border: 1px solid rgba(122, 94, 58, 0.12);
    border-radius: 18px;
    padding: 1.5rem;
    min-width: 450px;
    max-width: 800px;
    width: 80%;
}

.image,
.story-content video,
.story-content iframe,
.story-content audio {
    width: 96%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(122, 94, 58, 0.18);
    background-color: #d8ccb8;
}

.scene-caption {
    margin-top: 1rem;
    font-style: italic;
    color: var(--color-ink-soft);
    font-size: 0.95rem;
}

/* Adding an interactive audio cue button */
.interactive-cue {
    display: block;
    width: 100%;
    text-align: center;
    margin: 2rem 0;
}

.cue-btn {
    background: rgba(122, 62, 47, 0.08);
    border: 1px solid rgba(122, 62, 47, 0.28);
    color: var(--color-ink);
    padding: 0.65rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.cue-btn:hover {
    background: rgba(122, 62, 47, 0.16);
}

/* Estilos para el Cronista (autor ficticio y narrador de la historia) */

.chronicle {
    font-style: italic;
    color: #5e6b4a;
    font-family: "Woodcut", serif;
    font-weight: 300;
    font-size: 1.15em;
    padding: 2em 4em 1em 3em;
}

.story-content blockquote {
    width: 60%;
    min-width: 508px;
    margin: 2.5rem auto;
    padding: 1.5rem 2rem;
    background: var(--color-paper-quote);    
    border-radius: 16px;
}

article.story-content.poetry blockquote {
    width: 96%;
    min-width: 300px;
}

.story-content blockquote > p {
    text-align: center;
    font-size: 1.6em;
    font-family: "Imperial Script", cursive;
    font-weight: bold;
    color: firebrick;
    background: transparent;
    border-radius: 0;
    margin-top: 2em;
    margin-bottom: 1em;
}

.story-content blockquote > p > strong {
    font-weight: 600;
    color: darkgoldenrod;
}

.story-content blockquote.sign {
    width: 50%; 
    min-width: 150px;
    margin: 0 auto 0 50%;    
    padding: 1.5rem 2rem;
    background: none;
    border-radius: 0px;
}


.story-content blockquote.sign > p {
    text-align: right;
    font-size: 1em;
    font-family: monospace;
    font-style: italic;
    font-weight: normal;
    color: var(--color-ink-soft);
}