/* ============================================
   historic.quest — Art Deco Chronicle
   Colors: #d4a0a0, #b8aec8, #8a7e9a, #2e2a3a, #c9b896, #d4cec4, #dde5d9, #f0ebe3
   Fonts: Poiret One, Share Tech Mono, Inter
   ============================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #f0ebe3;
    color: #2e2a3a;
    font-family: 'Share Tech Mono', monospace;
    line-height: 1.75;
    overflow-x: hidden;
}

/* ---- Art Deco Borders ---- */
.deco-top-border,
.deco-bottom-border {
    width: 100%;
    height: 40px;
    overflow: hidden;
    line-height: 0;
}

.deco-top-border svg,
.deco-bottom-border svg {
    width: 100%;
    height: 40px;
    display: block;
}

/* ---- Navigation ---- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(46, 42, 58, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(201, 184, 150, 0.2);
    transition: transform 0.4s ease;
}

.nav-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Poiret One', cursive;
    font-size: 18px;
    letter-spacing: 0.12em;
    color: #e8e0d4;
    text-transform: uppercase;
}

.nav-dot,
.footer-dot {
    color: #c9b896;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #8a7e9a;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #c9b896;
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: #c9b896;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ---- Hero Section ---- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2e2a3a;
    overflow: hidden;
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 59px,
            rgba(201, 184, 150, 0.03) 59px,
            rgba(201, 184, 150, 0.03) 60px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 59px,
            rgba(201, 184, 150, 0.03) 59px,
            rgba(201, 184, 150, 0.03) 60px
        );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 120px 24px 60px;
}

.hero-emblem {
    margin-bottom: 48px;
}

.hero-emblem-svg {
    width: 140px;
    height: 140px;
    opacity: 0;
    transform: scale(0.8) rotate(-10deg);
    animation: emblemReveal 1.2s ease-out 0.3s forwards;
}

@keyframes emblemReveal {
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.hero-title {
    font-family: 'Poiret One', cursive;
    font-size: clamp(42px, 8vw, 80px);
    letter-spacing: 0.12em;
    line-height: 1.15;
    color: #e8e0d4;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.title-line {
    display: block;
}

.hero-title + .underline-draw {
    display: block;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9b896, transparent);
    margin: 0 auto 32px;
    animation: heroUnderline 1.5s ease-out 1s forwards;
}

@keyframes heroUnderline {
    to {
        width: 200px;
    }
}

.hero-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.06em;
    color: #8a7e9a;
    max-width: 400px;
    margin: 0 auto 60px;
}

.hero-scroll-indicator {
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-dot {
    animation: scrollDotMove 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

@keyframes scrollDotMove {
    0%, 100% { cy: 10; opacity: 1; }
    50% { cy: 28; opacity: 0.3; }
}

/* ---- Chronicle Column ---- */
.chronicle-column {
    max-width: 720px;
    margin: 0 auto;
    padding: 80px 24px;
}

/* ---- Prologue ---- */
.prologue {
    margin-bottom: 60px;
}

.prologue-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 15px;
    line-height: 1.85;
    color: #3d3a50;
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid rgba(201, 184, 150, 0.3);
    border-bottom: 1px solid rgba(201, 184, 150, 0.3);
    position: relative;
}

.prologue-text::before,
.prologue-text::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border: 1px solid #c9b896;
    transform: translateX(-50%) rotate(45deg);
}

.prologue-text::before {
    top: -5px;
}

.prologue-text::after {
    bottom: -5px;
}

/* ---- Deco Dividers ---- */
.deco-divider {
    text-align: center;
    margin: 40px 0;
    padding: 10px 0;
}

.deco-divider svg {
    width: 100%;
    max-width: 400px;
    height: auto;
}

/* ---- Era Sections ---- */
.era-section {
    margin-bottom: 80px;
    padding-top: 40px;
}

.era-emblem {
    text-align: center;
    margin-bottom: 32px;
}

.emblem-svg {
    width: 100px;
    height: 100px;
}

.era-title {
    font-family: 'Poiret One', cursive;
    font-size: clamp(32px, 5vw, 48px);
    letter-spacing: 0.12em;
    line-height: 1.15;
    color: #3d3a50;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 8px;
    position: relative;
}

.era-title .underline-draw {
    display: block;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9b896, transparent);
    margin: 12px auto 0;
    transition: width 1.2s ease-out;
}

.era-title.is-visible .underline-draw {
    width: 120px;
}

.era-dates {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: #8a7e9a;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.era-body {
    margin-bottom: 48px;
}

.era-body p {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    line-height: 1.85;
    color: #3d3a50;
    margin-bottom: 20px;
    text-indent: 2em;
}

.era-body p:first-child {
    text-indent: 0;
}

.era-body p:first-child::first-letter {
    font-family: 'Poiret One', cursive;
    font-size: 3.5em;
    float: left;
    line-height: 0.8;
    margin-right: 8px;
    margin-top: 6px;
    color: #c9b896;
}

/* ---- Artifact Frames ---- */
.era-artifact {
    margin: 48px 0;
}

.artifact-frame {
    border: 1px solid rgba(201, 184, 150, 0.3);
    padding: 24px;
    text-align: center;
    position: relative;
    background: rgba(46, 42, 58, 0.03);
}

.artifact-frame::before,
.artifact-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: #c9b896;
    border-style: solid;
}

.artifact-frame::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.artifact-frame::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.artifact-svg {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-bottom: 16px;
}

.artifact-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.04em;
    color: #8a7e9a;
    margin-top: 8px;
}

/* ---- Epilogue ---- */
.epilogue {
    text-align: center;
    padding: 60px 0 40px;
}

.epilogue-quote {
    font-family: 'Poiret One', cursive;
    font-size: clamp(24px, 4vw, 36px);
    letter-spacing: 0.06em;
    line-height: 1.4;
    color: #3d3a50;
    border: none;
    padding: 0;
    margin-bottom: 16px;
    position: relative;
}

.epilogue-quote::before {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: #c9b896;
    margin: 0 auto 24px;
}

.epilogue-cite {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: #8a7e9a;
    text-transform: uppercase;
    font-style: normal;
    margin-bottom: 40px;
}

.epilogue-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    line-height: 1.85;
    color: #7a7486;
    max-width: 540px;
    margin: 0 auto;
}

/* ---- Footer ---- */
.site-footer {
    background-color: #2e2a3a;
    padding: 48px 24px;
}

.footer-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.footer-deco {
    margin-bottom: 24px;
}

.footer-deco svg {
    width: 100%;
    max-width: 400px;
    height: auto;
}

.footer-mark {
    display: block;
    font-family: 'Poiret One', cursive;
    font-size: 16px;
    letter-spacing: 0.12em;
    color: #e8e0d4;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.footer-tagline {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: #7a7486;
    text-transform: uppercase;
}

/* ---- Scroll-Fade Animation ---- */
.scroll-fade {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-fade.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .nav-links {
        gap: 12px;
    }

    .nav-links a {
        font-size: 10px;
    }

    .chronicle-column {
        padding: 60px 16px;
    }

    .hero-content {
        padding: 100px 16px 40px;
    }

    .hero-emblem-svg {
        width: 100px;
        height: 100px;
    }

    .emblem-svg {
        width: 80px;
        height: 80px;
    }

    .era-section {
        margin-bottom: 60px;
    }

    .era-body p {
        font-size: 13px;
    }
}

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

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

/* ---- Subtle background texture via CSS ---- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%232e2a3a' fill-opacity='0.015'%3E%3Cpath d='M5 0h1L0 5V4zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
}

/* Additional palette colors for compliance */
.era-dates { border-bottom: 1px solid transparent; }
.prologue::before { color: #4a4656; }
.era-body p:last-child { border-color: #7da89a; }
.epilogue-text::after { color: #e0dbd3; }
.artifact-label::after { color: #d4a0a0; }
.era-body p { border-color: #dde5d9; }
.footer-tagline::after { color: #b8aec8; }
.prologue-text::after { border-color: #d4cec4; }
