/* ═══════════════════════════════════════════════
   EVOLUTION — SHARED STYLESHEET  v2.0
   Dark editorial aesthetic, Cormorant + Cinzel
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --gold:         #c5a059;
    --gold-light:   #e8c97a;
    --gold-dark:    #8a6a2e;
    --bg:           #080808;
    --bg-2:         #0f0f0f;
    --bg-3:         #141414;
    --bg-card:      #111111;
    --text:         #d0c8bc;
    --text-dim:     #6a635a;
    --white:        #f0ece5;
    --border:       rgba(197,160,89,0.14);
    --border-2:     rgba(255,255,255,0.05);
    --red-accent:   #8b2020;
    --shadow:       0 30px 80px rgba(0,0,0,0.7);
    --radius:       2px;
    --transition:   all 0.4s cubic-bezier(0.4,0,0.2,1);
}

*  { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.75;
    overflow-x: hidden;
    font-size: 16px;
}

body.menu-open {
    overflow: hidden;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 16px;
    z-index: 2000;
    padding: 10px 14px;
    background: var(--gold);
    color: var(--bg);
    text-decoration: none;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transform: translateY(-140%);
    transition: transform 0.25s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

/* ── NAVIGATION ────────────────────────────────── */
.evo-nav {
    position: fixed;
    top:0; left:0; right:0;
    z-index: 1000;
    padding: 22px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}
.evo-nav.scrolled {
    padding: 14px 60px;
    background: rgba(8,8,8,0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}
.nav-logo {
    font-family: 'Cinzel', serif;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--gold);
    text-decoration: none;
    text-transform: uppercase;
}
.nav-links {
    display: flex;
    gap: 4px;
    list-style: none;
    align-items: center;
}
.nav-links a {
    color: rgba(208,200,188,0.6);
    text-decoration: none;
    font-size: 0.6rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.3s, background 0.3s;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 2px;
}
.nav-links a:hover {
    color: var(--gold);
    background: rgba(197,160,89,0.07);
}
.nav-links a.active { color: var(--gold); }
.nav-links a[aria-current="page"] { color: var(--gold); }
.nav-tl a,
.nav-cta {
    color: var(--gold) !important;
    border: 1px solid rgba(197,160,89,0.3) !important;
    padding: 5px 12px !important;
}
.nav-tl a:hover,
.nav-cta:hover {
    background: rgba(197,160,89,0.12) !important;
}
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    border: 0;
    background: transparent;
    padding: 6px;
}
.hamburger span {
    display: block;
    width: 22px; height: 1.5px;
    background: var(--gold);
    transition: var(--transition);
}
.hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ── PAGE HERO BANNER ──────────────────────────── */
.page-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 60px 70px;
    overflow: hidden;
}
.page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.62) sepia(0.1);
    transform: scale(1.03);
    transition: transform 8s ease-out;
}
.page-hero-bg.loaded { transform: scale(1); }
.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8,8,8,1) 0%, rgba(8,8,8,0.5) 50%, rgba(8,8,8,0.2) 100%);
}
.page-hero-content { position: relative; z-index: 2; max-width: 900px; }
.page-hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.65rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 20px;
}
.page-hero-breadcrumb a {
    color: var(--gold);
    text-decoration: none;
    transition: opacity 0.3s;
}
.page-hero-breadcrumb a:hover { opacity: 0.7; }
.page-hero-breadcrumb span { opacity: 0.4; }
.page-hero-tag {
    font-size: 0.65rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
    display: block;
}
.page-hero h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 300;
    line-height: 1.05;
    color: var(--white);
    letter-spacing: -1px;
    margin-bottom: 20px;
}
.page-hero h1 em { font-style: italic; color: var(--gold-light); }
.page-hero-lead {
    font-size: 1.05rem;
    color: rgba(208,200,188,0.7);
    max-width: 600px;
    line-height: 1.7;
    font-weight: 300;
}
.page-hero-scroll {
    position: absolute;
    bottom: 24px; right: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.6rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-dim);
    z-index: 2;
}
.page-hero-scroll::after {
    content: '';
    width: 40px; height: 1px;
    background: var(--gold-dark);
}

/* ── MAIN CONTENT ───────────────────────────────── */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 60px 100px;
}

/* ── SECTION BLOCK ──────────────────────────────── */
.content-section {
    margin-bottom: 70px;
}
.section-label {
    font-size: 0.62rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
    display: block;
}
.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 300;
    color: var(--white);
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.section-title em { font-style: italic; color: var(--gold-light); }

/* ── CARD GRID ──────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2px;
}
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.info-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 0;
    background: var(--gold);
    transition: height 0.4s ease;
}
.info-card:hover::before { height: 100%; }
.info-card:hover {
    border-color: rgba(197,160,89,0.2);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.card-date {
    font-size: 0.68rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}
.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 12px;
    line-height: 1.3;
}
.card-body {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.75;
    font-weight: 300;
}

/* ── FEATURE IMAGE ──────────────────────────────── */
.feature-image {
    position: relative;
    overflow: hidden;
    margin: 50px 0;
}
.feature-image::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--border);
    z-index: 2;
    pointer-events: none;
}
.feature-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    filter: brightness(0.9) sepia(0.05);
    transition: all 0.8s ease;
}
.feature-image:hover img {
    filter: brightness(1) sepia(0);
    transform: scale(1.02);
}
.feature-caption {
    padding: 16px 24px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    text-transform: uppercase;
}

/* ── IMAGE + TEXT SPLIT ─────────────────────────── */
.split-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin: 50px 0;
}
.split-block.reverse { direction: rtl; }
.split-block.reverse > * { direction: ltr; }
.split-img {
    position: relative;
    overflow: hidden;
}
.split-img::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--border);
    z-index: 2;
    pointer-events: none;
}
.split-img img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
    filter: brightness(0.9) sepia(0.05);
    transition: all 0.7s ease;
}
.split-img:hover img {
    filter: brightness(1) sepia(0);
    transform: scale(1.03);
}
.split-text { display: flex; flex-direction: column; gap: 16px; }
.split-text p { font-size: 0.95rem; color: var(--text); line-height: 1.8; font-weight: 300; }

/* ── TIMELINE ───────────────────────────────────── */
.evo-timeline {
    padding-left: 32px;
    border-left: 1px solid var(--border);
    margin: 30px 0;
}
.evo-timeline-item {
    position: relative;
    padding: 0 0 40px 32px;
}
.evo-timeline-item:last-child { padding-bottom: 0; }
.evo-timeline-item::before {
    content: '';
    position: absolute;
    left: -5px; top: 4px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(197,160,89,0.15);
}
.evo-tl-date {
    font-size: 0.65rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 6px;
}
.evo-tl-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 8px;
    font-weight: 400;
}
.evo-tl-body {
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.75;
    font-weight: 300;
}

/* ── STAT BAR ───────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2px;
    margin: 30px 0;
}
.stat-item {
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    padding: 28px 24px;
    text-align: center;
}
.stat-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.4rem;
    font-weight: 300;
    color: var(--gold-light);
    line-height: 1;
    margin-bottom: 8px;
}
.stat-label {
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* ── COMPARISON TABLE ──────────────────────────── */
.evo-table-wrap {
    overflow-x: auto;
    margin: 30px 0;
}
.evo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.evo-table thead tr {
    background: var(--bg-card);
    border-bottom: 2px solid var(--gold-dark);
}
.evo-table th {
    padding: 16px 20px;
    text-align: left;
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
}
.evo-table td {
    padding: 14px 20px;
    color: var(--text);
    border-bottom: 1px solid var(--border-2);
    font-weight: 300;
}
.evo-table td:first-child {
    font-weight: 500;
    color: var(--white);
}
.evo-table tbody tr:hover td {
    background: rgba(197,160,89,0.04);
}

/* ── PULLQUOTE ──────────────────────────────────── */
.pullquote {
    border-left: 3px solid var(--gold);
    padding: 20px 32px;
    margin: 40px 0;
    background: rgba(197,160,89,0.04);
}
.pullquote p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-style: italic;
    font-weight: 300;
    color: var(--white);
    line-height: 1.6;
}
.pullquote cite {
    font-size: 0.68rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    margin-top: 12px;
    font-style: normal;
}

/* ── NAVIGATION FOOTER ──────────────────────────── */
.page-nav-footer {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    padding: 60px;
}
.page-nav-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.pnf-label {
    font-size: 0.62rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 28px;
    display: block;
}
.pnf-grid {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}
.pnf-link {
    flex: 1;
    min-width: 160px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pnf-link:hover {
    border-color: rgba(197,160,89,0.25);
    background: rgba(197,160,89,0.04);
    transform: translateY(-3px);
}
.pnf-link-num {
    font-size: 0.6rem;
    letter-spacing: 3px;
    color: var(--text-dim);
    text-transform: uppercase;
}
.pnf-link-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--white);
    font-weight: 400;
}
.pnf-link-arrow {
    font-size: 0.8rem;
    color: var(--gold);
    margin-top: 4px;
    transition: transform 0.3s;
}
.pnf-link:hover .pnf-link-arrow { transform: translateX(4px); }

/* ── MAIN FOOTER ────────────────────────────────── */
.evo-footer {
    padding: 50px 60px;
    background: #050505;
    border-top: 1px solid var(--border);
}
.evo-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}
.footer-logo {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 4px;
    color: var(--gold);
    text-decoration: none;
}
.footer-nav-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.3s;
}
.footer-nav-links a:hover { color: var(--gold); }
.footer-copy {
    width: 100%;
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-dim);
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
    margin-top: 8px;
}

/* ── REVEAL ANIMATION ───────────────────────────── */
.reveal { opacity:0; transform:translateY(36px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.active { opacity:1; transform:translateY(0); }
.reveal-l { opacity:0; transform:translateX(-36px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-l.active { opacity:1; transform:translateX(0); }
.reveal-r { opacity:0; transform:translateX(36px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-r.active { opacity:1; transform:translateX(0); }

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width:1200px) {
    .evo-nav { padding:18px 32px; }
    .evo-nav.scrolled { padding:12px 32px; }
    .nav-links { gap:3px; }
    .nav-links a { font-size:0.57rem; letter-spacing:0.8px; padding:5px 8px; }
}
@media (max-width:960px) {
    .evo-nav { padding:16px 24px; }
    .evo-nav.scrolled { padding:12px 24px; }
    .nav-links { display:none; }
    .nav-links.open {
        display:flex;
        flex-direction:column;
        position:fixed;
        top:56px; left:0; right:0;
        background:rgba(8,8,8,0.99);
        border-bottom:1px solid var(--border);
        padding:24px 28px;
        gap:2px;
        z-index:999;
    }
    .nav-links.open::before {
        content: '';
        position: absolute;
        inset: 0;
        background:
            linear-gradient(180deg, rgba(197,160,89,0.08), transparent 28%),
            rgba(8,8,8,0.99);
        z-index: -1;
    }
    .nav-links.open li { width:100%; }
    .nav-links.open a {
        font-size:0.68rem;
        letter-spacing:2px;
        padding:10px 0;
        display:block;
        border-bottom:1px solid rgba(255,255,255,0.04);
        border-radius:0;
    }
    .nav-links.open .nav-tl a,
    .nav-links.open .nav-cta { border:none; padding:10px 0 !important; }
    .hamburger { display:flex; }
    .page-hero { padding:0 24px 50px; }
    .page-content { padding:50px 24px 70px; }
    .split-block { grid-template-columns:1fr; gap:28px; }
    .split-block.reverse { direction:ltr; }
    .page-nav-footer { padding:40px 24px; }
    .evo-footer { padding:36px 24px; }
    .card-grid { grid-template-columns:1fr; }
    .stat-grid { grid-template-columns:1fr 1fr; }
    .pnf-grid { flex-direction:column; }
    .page-hero-scroll { display:none; }
}
@media (max-width:600px) {
    .stat-grid { grid-template-columns:1fr; }
    .page-hero h1 { font-size:clamp(2rem,10vw,3.5rem); }
    .skip-link {
        left: 12px;
        right: 12px;
        text-align: center;
    }
}
@media (prefers-reduced-motion:reduce) {
    *, ::before, ::after { animation-duration:0.01ms !important; transition-duration:0.01ms !important; }
}

/* ── IMAGE FALLBACK BACKGROUNDS ────────────────── */
/* Show thematic gradient if img fails to load */
.era-img-wrap,
.feature-image,
.split-img,
.chapter-card,
.tl-visual {
    background: linear-gradient(135deg, #0d0a06 0%, #1a1208 100%);
}
.era-img-wrap img,
.feature-image img,
.split-img img,
.chapter-card img,
.tl-visual img {
    background: inherit;
}
/* Specific thematic fallbacks by data-theme attr */
[data-theme="fogo"]      { background: linear-gradient(135deg, #140805 0%, #200f05 100%); }
[data-theme="glaciar"]   { background: linear-gradient(135deg, #060c14 0%, #0c1828 100%); }
[data-theme="rupestre"]  { background: linear-gradient(135deg, #100a06 0%, #1a100a 100%); }
[data-theme="piramides"] { background: linear-gradient(135deg, #100d05 0%, #1a1608 100%); }
[data-theme="primatas"]  { background: linear-gradient(135deg, #080d06 0%, #0f1408 100%); }
[data-theme="sapiens"]   { background: linear-gradient(135deg, #0a0810 0%, #100a14 100%); }
[data-theme="pedras"]    { background: linear-gradient(135deg, #0a0a0a 0%, #141414 100%); }
[data-theme="caverna"]   { background: linear-gradient(135deg, #060608 0%, #0d0d12 100%); }
[data-theme="adn"]       { background: linear-gradient(135deg, #060a10 0%, #0a1018 100%); }
[data-theme="trigo"]     { background: linear-gradient(135deg, #0f0d05 0%, #1a1808 100%); }
