/* ════════════════════════════════════════════════
   services.css — TIMBUKTU LLC Services Hub

   PANEL ACCENT COLORS  (nth-child sets --pr/--pg/--pb)
     1 → Gold    255,215,0
     2 → Blue    100,181,246
     3 → Violet  206,147,216
     4 → Green   102,187,106
     5 → Orange  255,112,67
     6 → White   255,255,255

   ADD A PANEL: copy HTML block, add nth-child color
   vars below, update PANEL_COUNT + PANEL_NAMES in JS.
════════════════════════════════════════════════ */


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


/* ─── TOKENS ───────────────────────────────────── */
:root {
    --gold:     #FFD700;
    --ink:      #070810;
    --silver:   #C0C0C0;
    --white:    #fff;
    --header-h: 84px;
    --label-h:  72px;
    --footer-h: 44px;
    --strip:    64px;
    --ease:     cubic-bezier(0.4, 0, 0.2, 1);
    --speed:    0.45s;
}


/* ─── RESET ────────────────────────────────────── */
*, *::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; }


/* ─── CANVAS ───────────────────────────────────── */
#bgCanvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}


/* ════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════ */
header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    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,.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,215,0,.18);
}

.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,.4);
    white-space: nowrap;
}

/* Hamburger */
.nav-toggle-input { display: none; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border: 1px solid rgba(255,215,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; }

/* Nav */
.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,.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,.07); }
.nav-item a:hover::after { width: calc(100% - 26px); }


/* ════════════════════════════════════════════════
   LABEL BAR
════════════════════════════════════════════════ */
.label-bar {
    position: fixed;
    top: var(--header-h);
    inset-inline: 0;
    height: var(--label-h);
    z-index: 100;
    display: flex;
    align-items: center;
    background: rgba(7,8,16,.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,.05);
    animation: fadeIn .8s ease .5s both;
}

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

.nav-arrow {
    width: 110px;
    height: var(--label-h);
    flex-shrink: 0;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    /* Color set dynamically via JS inline style */
    color: rgba(255,255,255,.35);
    transition: background .3s, color .3s;
}

.nav-arrow:active { opacity: .6; }

.label-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.label-title {
    font-size: clamp(14px, 1.8vw, 22px);
    font-weight: 700;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--white);
    transition: opacity .18s;
}
.label-title.fading { opacity: 0; }

.label-dots { display: flex; gap: 8px; align-items: center; }

.dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    cursor: pointer;
    transition: background .3s, transform .3s;
}
.dot:hover { background: rgba(255,255,255,.5) !important; }


/* ════════════════════════════════════════════════
   PANELS
════════════════════════════════════════════════ */
.panels {
    position: fixed;
    top: calc(var(--header-h) + var(--label-h));
    inset-inline: 0;
    bottom: var(--footer-h);
    display: flex;
    overflow: hidden;
    z-index: 10;
}

/* Accent colors per panel */
.panel:nth-child(1) { --pr:255; --pg:215; --pb:0;   }
.panel:nth-child(2) { --pr:100; --pg:181; --pb:246;  }
.panel:nth-child(3) { --pr:206; --pg:147; --pb:216;  }
.panel:nth-child(4) { --pr:102; --pg:187; --pb:106;  }
.panel:nth-child(5) { --pr:255; --pg:112; --pb:67;   }
.panel:nth-child(6) { --pr:255; --pg:255; --pb:255;  }


/* ─── PANEL BASE ───────────────────────────────── */
.panel {
    flex: 0 0 var(--strip);
    position: relative;
    overflow: hidden;
    border-right: 1px solid rgba(255,255,255,.05);
    transition: flex var(--speed) var(--ease);
}
.panel:last-child { border-right: none; }
.panel.is-active  { flex: 1; }

/* Bottom accent line */
.panel::after {
    content: '';
    position: absolute;
    bottom: 0; inset-inline: 0;
    height: 2px;
    background: rgba(var(--pr),var(--pg),var(--pb),.7);
    box-shadow: 0 0 12px rgba(var(--pr),var(--pg),var(--pb),.4);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--speed) var(--ease);
}
.panel.is-active::after { transform: scaleX(1); }

/* Color glow overlay */
.panel-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(var(--pr),var(--pg),var(--pb),.14) 0%,
        rgba(var(--pr),var(--pg),var(--pb),.04) 45%,
        transparent 75%
    );
    opacity: 0;
    transition: opacity var(--speed);
}
.panel.is-active .panel-glow { opacity: 1; }

/* Decorative number */
.panel::before {
    content: attr(data-index);
    position: absolute;
    bottom: -12px; right: -4px;
    font-size: clamp(80px, 13vw, 180px);
    font-weight: 700;
    color: rgba(var(--pr),var(--pg),var(--pb),.04);
    pointer-events: none;
    user-select: none;
    line-height: 1;
    transition: color var(--speed);
}
.panel.is-active::before { color: rgba(var(--pr),var(--pg),var(--pb),.08); }


/* ─── COLLAPSED STRIP ──────────────────────────── */
.panel-strip {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 8px 4px;
    pointer-events: none;
    transition: opacity .2s;
}
.panel.is-active .panel-strip { opacity: 0; }

.strip-icon  { font-size: 24px; }

.strip-label {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,.4);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    line-height: 1.5;
}


/* ─── EXPANDED BODY ────────────────────────────── */
.panel-body {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
    transition: opacity .28s ease .1s, transform .35s var(--ease) .1s;
}
.panel.is-active .panel-body { opacity: 1; pointer-events: auto; transform: none; }

/* Text column */
.body-text {
    flex: 0 0 52%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 32px 28px 32px 40px;
    min-width: 0;
}

.body-num {
    font-size: 10px;
    letter-spacing: 4px;
    color: rgba(var(--pr),var(--pg),var(--pb),.55);
}

.body-title {
    font-size: clamp(18px, 2.2vw, 32px);
    font-weight: 700;
    line-height: 1.15;
}

.body-tag {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(var(--pr),var(--pg),var(--pb),.7);
}

.body-desc {
    font-size: clamp(10px, .95vw, 12px);
    color: rgba(255,255,255,.55);
    line-height: 1.85;
    max-width: 380px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.body-phases {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.phase-pill {
    font-size: 8px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(var(--pr),var(--pg),var(--pb),.35);
    color: rgba(var(--pr),var(--pg),var(--pb),.8);
    white-space: nowrap;
}

.phase-sep { font-size: 9px; color: rgba(255,255,255,.2); }

/* Explore button — text always dark (--ink) so it's readable over the fill */
.explore-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    padding: 12px 26px;
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    text-decoration: none;
    width: fit-content;
    color: rgba(var(--pr),var(--pg),var(--pb),1);
    border: 1px solid rgba(var(--pr),var(--pg),var(--pb),.5);
    background: transparent;
    position: relative;
    overflow: hidden;
    transition: color .28s, border-color .28s, box-shadow .28s;
}

.explore-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(var(--pr),var(--pg),var(--pb),1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .28s var(--ease);
    z-index: 0;
}

.explore-btn:hover {
    /* Text switches to dark ink — always readable over any accent color */
    color: var(--ink);
    border-color: rgba(var(--pr),var(--pg),var(--pb),1);
    box-shadow: 0 0 18px rgba(var(--pr),var(--pg),var(--pb),.4);
}

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

/* Keep text above the fill sweep */
.explore-btn > * { position: relative; z-index: 1; }

/* Text node inside button also needs z-index for plain text (no wrapper) */
.explore-btn { isolation: isolate; }

/* Image column */
.body-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 28px 24px 12px;
    min-width: 0;
    position: relative;
}

.body-image img {
    width: 100%;
    height: 100%;
    max-height: 340px;
    object-fit: contain;           /* No cropping — show the full image */
    object-position: center;
    border-radius: 10px;
    border: 1px solid rgba(var(--pr),var(--pg),var(--pb),.25);
    opacity: 0.85;
    display: block;
    /* No hover zoom — image is static */
}

/* Placeholder when image missing */
.img-placeholder {
    display: none;
    position: absolute;
    inset: 24px 28px 24px 12px;
    border-radius: 10px;
    border: 1px dashed rgba(var(--pr),var(--pg),var(--pb),.3);
    align-items: center;
    justify-content: center;
    font-size: 36px;
    opacity: .25;
    background: rgba(var(--pr),var(--pg),var(--pb),.04);
}

.body-image.img-missing img           { display: none; }
.body-image.img-missing .img-placeholder { display: flex; }


/* ─── CONTACT PANEL ────────────────────────────── */
.contact-qmark-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.contact-qmark {
    font-size: clamp(80px, 12vw, 160px);
    font-weight: 700;
    color: rgba(255,255,255,.1);
    filter: drop-shadow(0 0 28px rgba(255,255,255,.08));
    animation: qPulse 3.5s ease-in-out infinite;
    user-select: none;
}

@keyframes qPulse {
    0%,100% { transform: scale(1)    translateY(0px)   rotate(-4deg); }
    33%      { transform: scale(1.07) translateY(-10px) rotate(2deg); }
    66%      { transform: scale(.96)  translateY(6px)   rotate(-6deg); }
}


/* ════════════════════════════════════════════════
   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;
    flex-wrap: wrap;
    padding: 0 32px;
    gap: 10px;
    background: rgba(7,8,16,.92);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,215,0,.2);
}

.footer-copy { font-size: 11px; color: var(--silver); letter-spacing: .5px; }

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255,215,0,.4);
}

.footer-links a { color: var(--gold); text-decoration: none; transition: opacity .2s; }
.footer-links a:hover { opacity: .7; }


/* ════════════════════════════════════════════════
   RESPONSIVE  — mobile + tablet
   Column stacking, horizontal strips, compact text.
   Only overrides what actually differs on small screens.
════════════════════════════════════════════════ */
@media (max-width: 1024px) {

    .panels { flex-direction: column; }

    /* Collapsed panel = horizontal bar */
    .panel-strip {
        flex-direction: row;
        padding: 0 20px;
        gap: 12px;
    }

    .strip-label {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 11px;
    }

    /* Expanded body stacks text above image */
    .panel-body { flex-direction: column; }

    .body-text {
        flex: 0 0 auto;
        padding: 16px 20px 10px;
        gap: 8px;
    }

    /* Image fills remaining height; contain keeps it fully visible */
    .body-image {
        flex: 1;
        padding: 0 20px 16px;
        min-height: 0;
    }

    .body-image img {
        max-height: 100%;
        height: 100%;
    }

    .img-placeholder { inset: 0 20px 16px; }

    .nav-arrow { width: 70px; }
    .footer-bar { padding: 0 16px; font-size: 10px; }
}

@media (max-width: 480px) {
    :root { --label-h: 64px; --strip: 50px; }

    .label-title { letter-spacing: 4px; font-size: 13px; }
    .nav-arrow   { width: 52px; font-size: 17px; }

    .body-text  { padding: 12px 16px 8px; gap: 7px; }
    .body-image { padding: 0 16px 12px; }
}