/* css/index.css */

/* Landing-page dark theme (intentionally distinct from the FGV palette). */
:root {
    --night-bg: #020617;
    --ink-bright: #ecfeff;
    --ink-soft: #bfdbfe;
    --accent: #60a5fa;
}

body { 
    margin: 0; 
    padding: 0; 
    background-color: var(--night-bg); 
    overflow: hidden; 
    font-family: 'Inter', sans-serif; 
}

/* Smooth transitions for the numeric data */
.fade-enter { 
    opacity: 0; 
    transform: translateY(10px); 
}

.fade-enter-active { 
    opacity: 1; 
    transform: translateY(0); 
    transition: opacity 500ms, transform 500ms; 
}

/* Dashboard entry button: built on .tech-card, with a coloured accent so it
   reads as the primary action while matching the cards' lines/dots aesthetic */
.cta-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    padding: 20px 26px;
    cursor: pointer;
    appearance: none;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-bright);
    /* Stronger cyan fill + persistent glow so the CTA stands out from the
       other cards even at rest */
    background-color: rgba(8, 145, 178, 0.42);
    border-color: rgba(103,232,249,0.85);
    box-shadow:
        0 0 0 1px rgba(2,6,23,0.4),
        0 18px 40px -20px rgba(0,0,0,0.8),
        0 0 22px -8px rgba(34,211,238,0.6),
        inset 0 0 45px -26px rgba(34,211,238,0.9);
}
.cta-card:hover {
    border-color: rgba(165,243,252,1);
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(2,6,23,0.4),
        0 22px 50px -20px rgba(0,0,0,0.85),
        0 0 32px -6px rgba(34,211,238,0.9),
        inset 0 0 60px -20px rgba(34,211,238,1);
}
.cta-text { flex: none; }
.cta-arrow {
    width: 22px; height: 22px;
    flex: none;
    color: var(--ink-bright);                       /* matches the text at rest */
    transition: transform 0.3s ease, color 0.3s ease;
}
.cta-card:hover .cta-arrow {
    color: #67e8f9;                       /* brightens to cyan on hover */
    transform: translateX(5px);
}

/* Language switch: segmented control matching the glass/circuit theme */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    border: 1px solid rgba(96,165,250,0.22);
    border-radius: 999px;
    background-color: rgba(10, 18, 35, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: inset 0 0 30px -22px rgba(96,165,250,0.9);
}
.lang-switch-icon {
    width: 15px;
    height: 15px;
    margin: 0 4px;
    color: var(--accent);
    flex: none;
}
.lang-opt {
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(148,163,184,0.85);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 5px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.lang-opt:hover { color: var(--ink-soft); }
.lang-opt.is-active {
    color: #ffffff;
    background-color: rgba(59,130,246,0.25);
    box-shadow: 0 0 12px -2px rgba(96,165,250,0.7), inset 0 0 0 1px rgba(96,165,250,0.5);
}

/* Brief fade applied to translated regions while the language changes */
.lang-fade { transition: opacity 0.2s ease, transform 0.2s ease; }
#ui-overlay.lang-switching .lang-fade {
    opacity: 0;
    transform: translateY(6px);
}

/* Cards with the "circuit / tech" look */
.info-stack {
    width: 540px;
    max-width: 46vw;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.tech-card {
    position: relative;
    background-color: rgba(10, 18, 35, 0.55);
    /* grade fina de fundo, lembrando uma placa de circuito */
    background-image:
        linear-gradient(rgba(96,165,250,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96,165,250,0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    border: 1px solid rgba(96,165,250,0.22);
    border-radius: 6px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        0 0 0 1px rgba(2, 6, 23, 0.4),
        0 18px 40px -20px rgba(0,0,0,0.8),
        inset 0 0 40px -28px rgba(96,165,250,0.6);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.hero-card {
    padding: 34px 38px 36px;
    cursor: pointer;
}
.hero-card:hover {
    border-color: rgba(96,165,250,0.55);
    box-shadow:
        0 0 0 1px rgba(2,6,23,0.4),
        0 22px 50px -20px rgba(0,0,0,0.85),
        inset 0 0 50px -24px rgba(96,165,250,0.9);
}

/* Cantos tipo colchete, com nó luminoso */
.tech-corner {
    position: absolute;
    width: 14px; height: 14px;
    border: 0 solid rgba(96,165,250,0.85);
    pointer-events: none;
}
.tech-corner::after {
    content: "";
    position: absolute;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px 1px rgba(96,165,250,0.9);
}
.tech-corner.tl { top: 7px; left: 7px; border-top-width: 1.5px; border-left-width: 1.5px; }
.tech-corner.tr { top: 7px; right: 7px; border-top-width: 1.5px; border-right-width: 1.5px; }
.tech-corner.bl { bottom: 7px; left: 7px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.tech-corner.br { bottom: 7px; right: 7px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.tech-corner.tl::after { top: -2px; left: -2px; }
.tech-corner.tr::after { top: -2px; right: -2px; }
.tech-corner.bl::after { bottom: -2px; left: -2px; }
.tech-corner.br::after { bottom: -2px; right: -2px; }

/* Linha de varredura */
.tech-scan {
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96,165,250,0.7), transparent);
    opacity: 0;
    animation: techScan 6s linear infinite;
    pointer-events: none;
}
@keyframes techScan {
    0%   { transform: translateY(0);     opacity: 0; }
    12%  { opacity: 0.5; }
    88%  { opacity: 0.5; }
    100% { transform: translateY(260px); opacity: 0; }
}

/* Card header */
.tech-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.tech-led {
    width: 8px; height: 8px; border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px 1px rgba(52,211,153,0.9);
    animation: techPulse 1.8s ease-in-out infinite;
}
@keyframes techPulse {
    0%,100% { opacity: 1; }
    50%     { opacity: 0.3; }
}
.tech-kicker {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--accent);
}
.tech-counter {
    margin-left: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: rgba(148,163,184,0.8);
}

.hero-number {
    font-size: 4.2rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
    background: linear-gradient(180deg, #ffffff 0%, var(--ink-soft) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-label {
    font-size: 1.25rem;
    font-weight: 300;
    color: #94a3b8;
    margin: 0;
}

.tech-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
}
.tech-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148,163,184,0.6);
}
.tech-hint svg { width: 13px; height: 13px; }
.tech-nodes { display: inline-flex; align-items: center; gap: 6px; }
.tech-nodes i {
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(96,165,250,0.35);
    position: relative;
}
.tech-nodes i + i::before {
    content: "";
    position: absolute;
    left: -6px; top: 50%;
    width: 6px; height: 1px;
    background: rgba(96,165,250,0.25);
}

/* Linha do tempo (countdown de 10s) */
.tech-timeline {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: rgba(96,165,250,0.1);
}
.tech-timeline-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(59,130,246,0.4), var(--accent));
    box-shadow: 0 0 10px 1px rgba(96,165,250,0.8);
}

/* Conector tipo trilha de circuito entre os cards */
.circuit-link {
    position: relative;
    height: 26px;
    width: 1.5px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(96,165,250,0.5), rgba(96,165,250,0.15));
}
.circuit-node {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #0a1223;
    border: 1.5px solid var(--accent);
    box-shadow: 0 0 8px 1px rgba(96,165,250,0.7);
}

/* Mini cards (novas caixas de indicadores) */
.mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.mini-card {
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.mini-card:hover {
    border-color: rgba(96,165,250,0.5);
    transform: translateY(-2px);
}
.mini-label {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(96,165,250,0.85);
}
.mini-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.1;
}
.mini-unit {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--accent);
}
.mini-sub {
    font-size: 0.78rem;
    color: rgba(148,163,184,0.7);
}

/* Responsive tiers (mirrors the dashboard: 1024 / 768 / 480) */

/* Tier 1 — tablet / large phone: bring the stack in from the right edge */
@media (max-width: 1024px) {
    #ui-overlay > main {
        justify-content: center;
    }
    .info-stack {
        width: min(560px, 90vw);
        max-width: 90vw;
    }
    .hero-number {
        font-size: 3.6rem;
    }
}

/* Tier 2 — phones: centered single column that SCROLLS (content no longer
   fits one screen, and body:overflow:hidden was clipping the CTA/footer).
   The globe becomes a fixed, non-interactive background behind the scroll. */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }
    #globeViz {
        position: fixed;
        height: 100vh;
        pointer-events: none;   /* let touches scroll the page, not spin the globe */
        opacity: 0.75;
    }
    #ui-overlay {
        position: relative;
        inset: auto;
        min-height: 100vh;
        height: auto;
        padding: 18px 16px 26px;
        gap: 16px;
    }
    #ui-overlay > main {
        justify-content: center;
        padding: 6px 0;
    }
    .info-stack {
        width: 80%;
        max-width: 330px;
        margin: 0 auto;     /* narrower column so the globe background shows around it */
    }
    .mini-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .hero-card {
        padding: 16px 18px 18px;
    }
    .tech-head {
        margin-bottom: 10px;
    }
    .hero-number {
        font-size: 2.5rem;
    }
    .hero-label {
        font-size: 0.95rem;
    }
    .tech-foot {
        margin-top: 12px;
    }
    .mini-card {
        padding: 11px 13px 12px;
        gap: 3px;
    }
    .mini-value {
        font-size: 1.55rem;
    }
    .circuit-link {
        height: 14px;
    }
    .cta-card {
        font-size: 0.92rem;
        padding: 13px 16px;
        gap: 10px;
        letter-spacing: 0.04em;
    }
}

/* Tier 3 — small phones: tighten type and declutter */
@media (max-width: 480px) {
    #ui-overlay {
        padding: 14px 12px 22px;
    }
    header h1 {
        font-size: 1.05rem;
    }
    .info-stack {
        width: 82%;
        max-width: 290px;
    }
    .hero-card {
        padding: 14px 16px 16px;
    }
    .hero-number {
        font-size: 2.2rem;
    }
    .hero-label {
        font-size: 0.88rem;
    }
    .mini-card {
        padding: 10px 12px;
    }
    .mini-value {
        font-size: 1.4rem;
    }
    .cta-card {
        font-size: 0.85rem;
        padding: 12px 14px;
        letter-spacing: 0.02em;
    }
    .tech-counter {
        display: none;
    }
    footer {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        align-items: center;
    }
}