/* divisions.css — TIMBUKTU LLC */

@font-face {
    font-family: 'Cinzel';
    src: url('/assets/fonts/Cinzel-VariableFont_wght.ttf') format('truetype');
}

:root {
    --gold:      #FFD700;
    --gold-d:    #B8860B;
    --ink:       #070810;
    --silver:    #C0C0C0;
    --white:     #fff;
    --header-h:  84px;
    --footer-h:  36px;
    --ease:      cubic-bezier(0.4, 0, 0.2, 1);
    --accent-rgb: 255,215,0;
    --accent:     rgba(255,215,0,1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Cinzel', serif; }
html, body { height: 100%; overflow: hidden; background: var(--ink); color: var(--white); }
::-webkit-scrollbar { display: none; }
html { scrollbar-width: none; }

/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
header { position: fixed; inset: 0 0 auto; z-index: 200; animation: slideDown 1s ease 0.1s both; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: none; }
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    padding: 10px 28px;
    gap: 16px;
    background: rgba(7,8,16,0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,215,0,0.14);
}

.logo-images { position: relative; width: 60px; height: 60px; flex: 0 0 60px; }
.logo-images img { position: absolute; opacity: 0; animation: switchImg 9s steps(1) infinite; }
.logo-rock { width: 60px; height: 60px; }
.logo-coin { width: 34px; height: 34px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.logo-bar  { width: 60px; height: 60px; }
.logo-images img:nth-child(1) { animation-delay: 0s; }
.logo-images img:nth-child(2) { animation-delay: 3s; }
.logo-images img:nth-child(3) { animation-delay: 6s; }
@keyframes switchImg { 0% { opacity:1; } 33.5% { opacity:0; } 100% { opacity:0; } }

.header-logo {
    flex: 1; text-align: center;
    font-size: 24px; font-weight: 700;
    letter-spacing: 6px; color: var(--gold);
    text-shadow: 0 0 18px rgba(255,215,0,0.4);
    white-space: nowrap;
}

.nav-toggle-input { display: none; }
.hamburger {
    display: none; flex-direction: column; gap: 5px;
    cursor: pointer; padding: 8px;
    border: 1px solid rgba(255,215,0,0.3); border-radius: 8px;
    transition: border-color .2s;
}
.hamburger:hover { border-color: var(--gold); }
.hamburger .bar { display: block; width: 22px; height: 2px; background: var(--gold); border-radius: 2px; }

.header-links { display: flex; align-items: center; }
.nav-list { display: flex; list-style: none; align-items: center; gap: 4px; }

.nav-item a {
    display: block; position: relative;
    color: rgba(255,255,255,0.75); text-decoration: none;
    padding: 8px 13px; font-size: 13px;
    letter-spacing: 1px; border-radius: 6px; white-space: nowrap;
    transition: color .2s, background .2s;
}
.nav-item a::after {
    content: ''; position: absolute;
    bottom: 3px; left: 50%; width: 0; height: 2px;
    background: var(--gold); border-radius: 2px;
    transform: translateX(-50%); transition: width .25s;
}
.nav-item a:hover        { color: var(--gold); background: rgba(255,215,0,0.07); }
.nav-item a:hover::after { width: calc(100% - 26px); }

/* ══════════════════════════════════════════════
   BACKGROUND LAYERS
══════════════════════════════════════════════ */
.bg-layer {
    position: fixed; inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--ink);
    transition: opacity 1.4s ease;
    z-index: 0;
}

.vignette {
    position: fixed; inset: 0;
    pointer-events: none; z-index: 1;
    background:
        linear-gradient(to top,  rgba(5,5,18,0.94) 0%, rgba(5,5,18,0.50) 30%, transparent 55%),
        linear-gradient(to bottom, rgba(5,5,18,0.60) 0%, transparent 22%),
        radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,0.52) 100%);
}

.accent-tint {
    position: fixed; inset: 0;
    pointer-events: none; z-index: 2;
    background: radial-gradient(ellipse at 80% 90%, rgba(var(--accent-rgb),0.06) 0%, transparent 60%);
    transition: background 1.2s ease;
}

/* ══════════════════════════════════════════════
   STAGE
══════════════════════════════════════════════ */
.stage {
    position: fixed;
    top: var(--header-h);
    bottom: var(--footer-h);
    left: 0; right: 0;
    z-index: 10;
    pointer-events: none;
}

/* ── TOP BAR ─────────────────────────────────── */
.stage-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px 0;
    pointer-events: auto;
    animation: fadeIn .9s ease 0.6s both;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.dot-row { display: flex; gap: 7px; align-items: center; }

.dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    cursor: pointer; pointer-events: auto;
    transition: background 0.35s, width 0.35s, border-radius 0.35s;
}
.dot.active {
    background: rgba(var(--accent-rgb),1);
    width: 18px; border-radius: 3px;
}
.dot:hover { background: rgba(255,255,255,0.45); }

.stage-counter {
    display: flex; align-items: baseline; gap: 4px;
    font-size: 11px; letter-spacing: 2px;
    color: rgba(255,255,255,0.3);
}
.counter-current {
    font-size: 14px; font-weight: 700;
    color: rgba(var(--accent-rgb),0.8);
    transition: color 0.5s ease;
}
.counter-sep { color: rgba(255,255,255,0.18); }

/* ── LEFT PANEL — absolute, fixed size, top-left ── */
.info-left {
    position: absolute;
    top: 56px;
    left: 64px;          /* matches stage-bottom left edge */
    width: 200px;
    height: 200px;       /* fixed — never grows with content */
    overflow: hidden;
    pointer-events: auto;
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    border-left: 2px solid rgba(var(--accent-rgb),0.45);
    transition: border-color 0.5s, border-left-color 0.5s;
}

/* ── BOTTOM GRID — center + right ─────────────────── */
.stage-bottom {
    position: absolute;
    bottom: 16px;
    left: 64px;          /* aligns left edge with info-left */
    right: 64px;
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 12px;
    align-items: end;
    pointer-events: auto;
    animation: slideUp .9s ease 0.4s both;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
}

.stage-bottom.fading { opacity: 0; transform: translateY(8px); }

/* ── NAV ARROWS ─────────────────────────────── */
.nav-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center;
    width: 46px; height: 46px;
    background: rgba(5,5,18,0.40);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(var(--accent-rgb),0.22);
    border-radius: 50%;
    cursor: pointer; pointer-events: auto;
    transition: background 0.25s, border-color 0.3s, transform 0.2s;
    animation: fadeIn .9s ease 0.8s both;
    z-index: 20;
}
.nav-arrow:hover {
    background: rgba(var(--accent-rgb),0.16);
    border-color: rgba(var(--accent-rgb),0.55);
    transform: translateY(-50%) scale(1.08);
}
.nav-arrow:active { transform: translateY(-50%) scale(0.95); }
.nav-arrow svg { width: 22px; height: 22px; fill: rgba(var(--accent-rgb),0.9); transition: fill 0.3s; }

.nav-arrow-left  { left: 12px; }
.nav-arrow-right { right: 12px; }

/* ══════════════════════════════════════════════
   INFO PANELS — frosted glass
══════════════════════════════════════════════ */
.info-panel {
    background: rgba(4,4,16,0.38);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--accent-rgb),0.16);
    border-radius: 10px;
    transition: border-color 0.6s ease;
}

/* LEFT */
.info-left {
    padding: 18px 18px 16px;
    display: flex; flex-direction: column; gap: 9px;
    border-left: 2px solid rgba(var(--accent-rgb),0.45);
    transition: border-color 0.5s, border-left-color 0.5s;
    align-self: end;
}

.panel-roman {
    font-size: 44px; font-weight: 700;
    color: rgba(var(--accent-rgb),0.14);
    line-height: 1; letter-spacing: 2px;
    transition: color 0.5s;
}
.panel-divname {
    font-size: 14px; font-weight: 700;
    color: var(--white); letter-spacing: 0.5px; line-height: 1.2;
}
.panel-category {
    font-size: 8px; letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(var(--accent-rgb),0.7);
    transition: color 0.5s;
}
.panel-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.tag-pill {
    font-size: 7px; letter-spacing: 1.5px; text-transform: uppercase;
    padding: 3px 8px; border-radius: 20px;
    border: 1px solid rgba(var(--accent-rgb),0.28);
    color: rgba(var(--accent-rgb),0.65);
    transition: border-color 0.5s, color 0.5s;
}

/* CENTER */
.info-center {
    padding: 22px 24px 20px;
    height: 210px;       /* fixed — never grows with content */
    overflow: hidden;
    margin-bottom: 14px; /* elevates above right panel bottom edge */
    display: flex; flex-direction: column; gap: 12px;
    border-top: 2px solid rgba(var(--accent-rgb),0.38);
    transition: border-color 0.5s;
}
.center-num {
    font-size: 9px; letter-spacing: 4px;
    color: rgba(var(--accent-rgb),0.4);
    transition: color 0.5s;
}
.center-title {
    font-size: clamp(18px,2.2vw,28px); font-weight: 700;
    color: var(--white); line-height: 1.15; letter-spacing: 0.5px;
}
.center-desc {
    font-size: clamp(10px,0.88vw,12px);
    color: rgba(255,255,255,0.55);
    line-height: 1.85;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.center-phases {
    display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
}
.phase-pill {
    font-size: 7px; letter-spacing: 1.5px; text-transform: uppercase;
    padding: 3px 10px; border-radius: 20px;
    border: 1px solid rgba(var(--accent-rgb),0.28);
    color: rgba(var(--accent-rgb),0.75);
    transition: border-color 0.5s, color 0.5s;
}
.phase-sep { font-size: 8px; color: rgba(255,255,255,0.18); }

/* Mobile CTA — hidden on desktop */
.center-mobile-cta {
    display: none;
    align-items: center; gap: 9px;
    text-decoration: none;
    padding: 10px 16px;
    background: rgba(var(--accent-rgb),0.10);
    border: 1px solid rgba(var(--accent-rgb),0.38);
    border-radius: 7px;
    font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
    color: rgba(var(--accent-rgb),1);
    width: fit-content; margin-top: 4px;
    position: relative; overflow: hidden; isolation: isolate;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.center-mobile-cta::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(var(--accent-rgb),1);
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.28s var(--ease); z-index: -1;
}
.center-mobile-cta:hover {
    border-color: rgba(var(--accent-rgb),0.8);
    box-shadow: 0 0 18px rgba(var(--accent-rgb),0.25);
}
.center-mobile-cta:hover::before  { transform: scaleX(1); }
.center-mobile-cta:hover .cta-text { color: var(--ink); }
.center-mobile-cta:hover svg       { fill: var(--ink); }
.center-mobile-cta svg { width: 14px; height: 14px; fill: rgba(var(--accent-rgb),1); flex-shrink: 0; transition: fill 0.25s; }

/* RIGHT */
.info-right {
    padding: 18px 18px 16px;
    height: 210px;       /* matches info-center height exactly */
    margin-bottom: 14px; /* matches info-center margin-bottom — aligns top and bottom edges */
    display: flex; flex-direction: column; gap: 14px; justify-content: center;
    border-right: 2px solid rgba(var(--accent-rgb),0.45);
    transition: border-color 0.5s, border-right-color 0.5s;
    overflow: hidden;
}
.right-label {
    font-size: 8px; letter-spacing: 3px; text-transform: uppercase;
    color: rgba(255,255,255,0.28);
}
.right-cta {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; padding: 11px 14px;
    background: rgba(var(--accent-rgb),0.10);
    border: 1px solid rgba(var(--accent-rgb),0.40);
    border-radius: 7px;
    position: relative; overflow: hidden; isolation: isolate;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}
.right-cta::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(var(--accent-rgb),1);
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.28s var(--ease); z-index: -1;
}
.right-cta:hover { border-color: rgba(var(--accent-rgb),0.9); box-shadow: 0 0 20px rgba(var(--accent-rgb),0.28); transform: translateY(-1px); }
.right-cta:hover::before            { transform: scaleX(1); }
.right-cta:hover .cta-text          { color: var(--ink); }
.right-cta:hover .cta-arrow         { fill: var(--ink); transform: translateX(2px); }

.right-cta .cta-text {
    font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
    color: rgba(var(--accent-rgb),1); flex: 1; transition: color 0.25s;
}
.cta-arrow {
    width: 16px; height: 16px;
    fill: rgba(var(--accent-rgb),1);
    flex-shrink: 0;
    transition: fill 0.25s, transform 0.25s;
}

.right-divider { height: 1px; background: rgba(255,255,255,0.06); }

.right-meta { display: flex; flex-direction: column; gap: 3px; }
.meta-label { font-size: 7px; letter-spacing: 3px; text-transform: uppercase; color: rgba(255,255,255,0.22); }
.meta-value { font-size: 12px; font-weight: 700; color: rgba(var(--accent-rgb),0.65); letter-spacing: 1px; transition: color 0.5s; }

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.footer-bar {
    position: fixed; bottom: 0; inset-inline: 0;
    height: var(--footer-h);
    z-index: 100;
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(5,5,18,0.80);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,215,0,0.10);
}
.footer-copy { font-size: 10px; color: rgba(192,192,192,0.38); letter-spacing: 0.4px; }
.footer-links {
    display: flex; align-items: center; gap: 8px;
    font-size: 10px; color: rgba(255,215,0,0.22);
    text-decoration: none; letter-spacing: 0.4px;
}
.footer-links a { color: rgba(255,215,0,0.45); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 900px) {
    .hamburger { display: flex; order: 3; }
    .logo-images { order: 1; }
    .header-logo { order: 2; flex: 1; }
    .header-links {
        position: fixed; top: var(--header-h); left: 0; right: 0;
        z-index: 999; overflow: hidden; max-height: 0;
        background: rgba(7,8,16,0.97);
        backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255,215,0,0.12);
        transition: max-height 0.4s ease;
    }
    .nav-toggle-input:checked ~ .header-links { max-height: 300px; }
    .nav-list { flex-direction: column; gap: 0; padding: 8px 0; width: 100%; align-items: stretch; }
    .nav-item { width: 100%; text-align: center; }
    .nav-item a { width: 100%; padding: 12px 0; font-size: 14px; color: rgba(255,255,255,0.85); }
    .nav-item a::after { display: none; }
    .nav-item a:hover { color: var(--gold); background: rgba(255,215,0,0.06); }

    /* Tighten layout on tablet */
    .stage-bottom {
        grid-template-columns: 1fr 170px;
        left: 54px; right: 54px; bottom: 12px; gap: 10px;
    }
    .info-left { left: 54px; width: 180px; height: 190px; }
    .nav-arrow { width: 40px; height: 40px; }
    .nav-arrow svg { width: 20px; height: 20px; }
    .nav-arrow-left  { left: 8px; }
    .nav-arrow-right { right: 8px; }
}

/* Mobile — single column, show mobile CTA */
@media (max-width: 640px) {
    /* Hide side panels on mobile */
    .info-left  { display: none; }
    .info-right { display: none; }

    /* Reveal mobile CTA inside center panel */
    .center-mobile-cta { display: flex; }

    /* Center panel takes full width, auto height on mobile */
    .stage-bottom {
        grid-template-columns: 1fr;
        left: 52px; right: 52px;
        bottom: 10px;
    }
    .info-center { margin-bottom: 0; padding: 18px 18px 16px; gap: 10px; height: auto; }

    /* Compact top bar */
    .stage-top { padding: 14px 20px 0; }

    /* Smaller arrows */
    .nav-arrow { width: 38px; height: 38px; }
    .nav-arrow svg { width: 18px; height: 18px; }
    .nav-arrow-left  { left: 6px; }
    .nav-arrow-right { right: 6px; }

    .center-title { font-size: 17px; }
    .center-desc  { -webkit-line-clamp: 3; }
}

/* Small mobile */
@media (max-width: 400px) {
    .stage-bottom { left: 46px; right: 46px; }
    .nav-arrow { width: 34px; height: 34px; }
    .nav-arrow svg { width: 16px; height: 16px; }
    .nav-arrow-left  { left: 4px; }
    .nav-arrow-right { right: 4px; }
    .footer-copy { display: none; }
}

/* HEADER FIX */
/* Add position: relative to the existing .header-container rule */
.header-container {
    position: relative;
}

/* Replace the existing .header-logo rule */
.header-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 6px;
    white-space: nowrap;
    text-shadow: 0 0 18px rgba(255,215,0,.4);
    pointer-events: none;
    z-index: 1;
}