/* =========================================================
   NAUE 2030 — editorial.css
   Direção "blueprint vivo": tipografia monumental,
   anotações técnicas, grid de prancheta, índice de projetos
   com preview no cursor e marca em escala arquitetônica
   ========================================================= */

/* ===== GRID BLUEPRINT (textura de prancheta nas seções escuras) ===== */
.hero::before,
.page-hero .bp-grid,
.section-dark .bp-grid {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(53, 194, 133, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(53, 194, 133, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(53, 194, 133, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(53, 194, 133, 0.028) 1px, transparent 1px);
    background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
    z-index: 0;
}

.hero::before { z-index: -1; }

.page-hero .bp-grid,
.section-dark { position: relative; }

/* ===== TIPOGRAFIA MONUMENTAL DO HERO (Unbounded) ===== */
.hero-title {
    font-size: clamp(1.9rem, 5.6vw, 4.2rem);
    line-height: 1.08;
    letter-spacing: 0;
    text-transform: uppercase;
    font-weight: 700;
    color: #fff;
    max-width: none;
    margin-bottom: var(--sp-4);
}

.hero-title .line { display: block; }

.hero-title .outline {
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(53, 194, 133, 0.9);
    text-stroke: 1.5px rgba(53, 194, 133, 0.9);
}

.hero-title .accent { color: var(--green-bright); }

/* ===== ANOTAÇÕES TÉCNICAS (mono de prancheta) ===== */
.annot {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(238, 244, 240, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
}

.annot::before {
    content: "+";
    color: var(--green-bright);
    font-size: 0.9rem;
}

.hero-meta {
    display: flex;
    justify-content: space-between;
    gap: var(--sp-3);
    flex-wrap: wrap;
    padding-top: var(--sp-4);
    margin-top: var(--sp-6);
    border-top: 1px solid rgba(238, 244, 240, 0.14);
}

/* Texto vertical lateral */
.hero-side {
    position: absolute;
    right: max(18px, 2.5vw);
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(238, 244, 240, 0.4);
    z-index: 2;
}

@media (max-width: 920px) {
    .hero-side { display: none; }
}

/* Indicador de scroll */
.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    width: 26px;
    height: 42px;
    border: 1.5px solid rgba(238, 244, 240, 0.35);
    border-radius: 14px;
    z-index: 2;
}

.scroll-cue::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 8px;
    width: 3px;
    height: 8px;
    border-radius: 2px;
    background: var(--green-bright);
    transform: translateX(-50%);
    animation: cue 1.8s ease-in-out infinite;
}

@keyframes cue {
    0%, 100% { transform: translate(-50%, 0); opacity: 1; }
    70% { transform: translate(-50%, 14px); opacity: 0; }
}

.reduced-motion .scroll-cue::after { animation: none; }

/* ===== NÚMERO DE SEÇÃO EDITORIAL ===== */
.sec-index {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--green);
    display: inline-block;
    margin-right: 10px;
}

.section-dark .sec-index { color: var(--green-bright); }

/* ===== MARCA TRIANGULAR EM ESCALA ARQUITETÔNICA ===== */
.brand-mark {
    position: absolute;
    pointer-events: none;
    opacity: 0.1;
    z-index: 0;
    max-width: none;
}

.brand-mark.right {
    right: -8%;
    top: 50%;
    transform: translateY(-50%);
    width: min(52vw, 760px);
}

.section-dark > .container,
.hero .container { position: relative; z-index: 1; }

/* ===== ÍNDICE DE PROJETOS — cards compactos horizontais (2 por linha) ===== */
.project-index { position: relative; }

.pi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4) var(--sp-6);
}

.pi-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-3);
    text-decoration: none;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    position: relative;
    transition: padding-left 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.3s ease;
}

.pi-card:hover {
    padding-left: 10px;
    border-color: var(--green);
}

/* Mini miniatura à esquerda */
.pi-thumb {
    position: relative;
    flex: 0 0 auto;
    width: 84px;
    height: 60px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: #0a0f0c;
}

.pi-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pi-card:hover .pi-thumb img { transform: scale(1.1); }

/* Número no canto da mini miniatura */
.pi-num {
    position: absolute;
    top: 4px;
    left: 5px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    color: #fff;
    background: rgba(6, 10, 8, 0.6);
    padding: 1px 5px;
    border-radius: 999px;
}

.pi-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
    padding-right: var(--sp-5);
}

/* Datas: fonte um pouco maior e em negrito */
.pi-year {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: var(--green);
    transition: color 0.3s ease;
}

.pi-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    letter-spacing: 0;
    line-height: 1.1;
    color: var(--ink);
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.pi-fact {
    font-size: 0.86rem;
    color: var(--text-muted);
}

.pi-fact strong {
    font-family: var(--font-display);
    font-size: 1.03em;
    color: var(--ink);
}

.pi-arrow {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.15rem;
    color: var(--border);
    transition: color 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.pi-card:hover .pi-title { color: var(--green); }

.pi-card:hover .pi-arrow {
    color: var(--green);
    transform: translateY(-50%) translateX(4px) rotate(-45deg);
}

@media (max-width: 760px) {
    .pi-grid { grid-template-columns: 1fr; gap: 0; }
}

/* ===== HERO INTERNO com anotações ===== */
.page-hero .annot { margin-bottom: var(--sp-2); }

/* ===== TÍTULOS DE SEÇÃO em caixa alta editorial ===== */
.section-header h2 {
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* ===== ASSINATURA TÉCNICA DO RODAPÉ ===== */
.footer-coords {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(238, 244, 240, 0.38);
    margin-top: var(--sp-2);
}

/* ===== JORNADA INTERNACIONAL — linha do tempo (Sobre) ===== */
.jtl { position: relative; margin-top: var(--sp-3); }

.jtl-axis { position: absolute; left: 0; right: 6px; top: 132px; height: 2px; pointer-events: none; }

.jtl-axis-fill {
    position: absolute;
    inset: 0;
    background: var(--ink);
    transform-origin: left center;
}

.js-anim .jtl-axis-fill {
    transform: scaleX(0);
    transition: transform 3.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.jtl.on .jtl-axis-fill { transform: scaleX(1); }

.jtl-axis-arrow {
    position: absolute;
    right: -8px;
    top: -5px;
    width: 0;
    height: 0;
    border-left: 9px solid var(--ink);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.js-anim .jtl-axis-arrow { opacity: 0; transition: opacity 0.5s ease 3.2s; }
.jtl.on .jtl-axis-arrow { opacity: 1; }

.jtl-track { list-style: none; margin: 0; padding: 0 16px 0 0; display: flex; gap: 6px; }
.jtl-item { flex: 1; min-width: 0; }

.jtl-link { display: flex; flex-direction: column; align-items: center; text-decoration: none; width: 100%; }

.jtl-flags {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    height: 118px;
}

.jtl-item:nth-child(even) .jtl-flags { height: 98px; }

.jtl-flags svg {
    width: 27px;
    height: 18px;
    border-radius: 3px;
    display: block;
    box-shadow: 0 1px 4px rgba(13, 20, 16, 0.25);
}

.js-anim .jtl-flags svg {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.jtl.on .jtl-flags svg { opacity: 1; transform: none; }

.jtl-stem { width: 1.5px; height: 14px; background: var(--ink); }
.jtl-item:nth-child(even) .jtl-stem { height: 34px; }

.jtl-dot {
    width: 9px;
    height: 9px;
    background: var(--ink);
    transform: rotate(45deg);
    margin-top: -5px;
    position: relative;
    z-index: 1;
    transition: background 0.3s ease;
}

.js-anim .jtl-dot {
    transform: rotate(45deg) scale(0);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}

.jtl.on .jtl-dot { transform: rotate(45deg) scale(1); }

.jtl-year {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--ink);
    margin-top: 12px;
    white-space: nowrap;
}

.jtl-role {
    margin-top: 7px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--green-deep);
    background: var(--green-soft);
    padding: 3px 9px;
    border-radius: 4px;
    text-align: center;
    line-height: 1.3;
}

.jtl-client {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--ink);
    margin-top: 8px;
    text-align: center;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.js-anim .jtl-year, .js-anim .jtl-role, .js-anim .jtl-client { opacity: 0; transition: opacity 0.5s ease; }
.jtl.on .jtl-year, .jtl.on .jtl-role, .jtl.on .jtl-client { opacity: 1; }

a.jtl-link:hover .jtl-dot,
a.jtl-link:focus-visible .jtl-dot { background: var(--green-bright); }
a.jtl-link:hover .jtl-client,
a.jtl-link:focus-visible .jtl-client { color: var(--green); }
a.jtl-link:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 6px; }

/* Marco-convite 2026 */
.jtl-cta .jtl-dot { background: var(--paper); border: 2px solid var(--green-bright); width: 11px; height: 11px; margin-top: -6px; }
.jtl-cta .jtl-role { background: var(--green); color: #fff; }
.jtl-cta .jtl-year { color: var(--green); }

.jtl-legend {
    margin-top: var(--sp-4);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.jtl-legend::before { content: "+ "; color: var(--green-bright); }

.jtl-stats {
    display: flex;
    gap: clamp(24px, 5vw, 64px);
    flex-wrap: wrap;
    margin-top: var(--sp-5);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--border);
}

.jtl-stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.1;
}

.jtl-stat span {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .jtl-axis { left: 12px; right: auto; top: 0; bottom: 6px; width: 2px; height: auto; }
    .jtl-axis-fill { transform-origin: center top; }
    .js-anim .jtl-axis-fill { transform: scaleY(0); }
    .jtl.on .jtl-axis-fill { transform: scaleY(1); }
    .jtl-axis-arrow {
        left: -5px;
        right: auto;
        top: auto;
        bottom: -9px;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 9px solid var(--ink);
        border-bottom: 0;
    }
    .jtl-track { flex-direction: column; gap: var(--sp-4); padding: 4px 0 14px; }
    .jtl-item { position: relative; padding-left: 40px; }
    .jtl-link { align-items: flex-start; }
    .jtl-stem { display: none; }
    .jtl-flags { height: auto !important; flex-direction: row; gap: 6px; }
    .jtl-dot { position: absolute; left: 8.5px; top: 5px; margin: 0; }
    .jtl-cta .jtl-dot { left: 7.5px; }
    .jtl-year { margin-top: 8px; }
    .jtl-role, .jtl-client { text-align: left; }
}

/* =========================================================
   AJUSTES RESPONSIVOS (mobile/tablet)
   ========================================================= */

/* Ornamentos que sangram para fora da seção não podem gerar
   rolagem lateral — a seção corta o excesso. */
.section-dark,
.cta-band {
    overflow: hidden;
}

/* Segurança global contra qualquer vazamento horizontal no toque */
html, body { overflow-x: clip; }

@media (max-width: 900px) {
    .cta-band {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--sp-4);
    }
}

@media (max-width: 760px) {
    .hero-content {
        padding: calc(var(--header-h) + var(--sp-6)) 0 var(--sp-10);
    }

    .hero-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .brand-mark.right {
        width: min(90vw, 480px);
        right: -22%;
        opacity: 0.07;
    }

    .pi-body { padding-right: var(--sp-3); }

    .profile-card { padding: var(--sp-4); }

    .scroll-cue { bottom: 14px; }
}
