/* ==========================================================================
   pages.css — layouts específicos de página (home, diretório, perfil, sobre)
   ========================================================================== */

/* ---------- HERO conceitual (home) — grid suíço + mural de retratos ---------- */
.hero2 { padding-top: clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.masthead {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding-bottom: clamp(28px, 5vw, 48px); border-bottom: 1px solid var(--line);
}
.masthead span { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.hero2__head {
    display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(28px, 5vw, 72px);
    align-items: end; padding: clamp(40px, 6vw, 64px) 0 clamp(36px, 5vw, 56px);
}
.hero2__title { font-size: clamp(44px, 8.5vw, 104px); line-height: .94; letter-spacing: -.04em; font-weight: 600; margin: 0; }
.hero2__lead { font-size: clamp(15px, 1.6vw, 17px); line-height: 1.55; color: var(--muted); margin: 0 0 24px; }
@media (max-width: 820px) { .hero2__head { grid-template-columns: 1fr; align-items: start; gap: 24px; } }

/* Mural: número FIXO de colunas por faixa + exibe exatamente colunas×3,
   garantindo sempre 3 linhas completas, sem células vazias na borda.
   (36 retratos disponíveis = 12 colunas × 3 no desktop.) */
.portrait-wall {
    display: grid; grid-template-columns: repeat(12, 1fr);
    gap: 1px; background: var(--line);
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.portrait-wall .portrait:nth-child(n+37) { display: none; }   /* 12 × 3 = 36 */

@media (max-width: 1080px) {
    .portrait-wall { grid-template-columns: repeat(10, 1fr); }
    .portrait-wall .portrait:nth-child(n+31) { display: none; }   /* 10 × 3 = 30 */
}
@media (max-width: 880px) {   /* iPad retrato */
    .portrait-wall { grid-template-columns: repeat(8, 1fr); }
    .portrait-wall .portrait:nth-child(n+25) { display: none; }   /* 8 × 3 = 24 */
}
@media (max-width: 680px) {
    .portrait-wall { grid-template-columns: repeat(6, 1fr); }
    .portrait-wall .portrait:nth-child(n+19) { display: none; }   /* 6 × 3 = 18 */
}
@media (max-width: 480px) {   /* celular */
    .portrait-wall { grid-template-columns: repeat(5, 1fr); }
    .portrait-wall .portrait:nth-child(n+16) { display: none; }   /* 5 × 3 = 15 */
}
.portrait { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.portrait img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    filter: grayscale(100%) contrast(1.04); transition: filter .55s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}
.portrait:hover img, .portrait:focus-visible img { filter: grayscale(0); transform: scale(1.07); }
/* "aceso" pelo efeito React (um retrato colorido por vez, aleatório) */
.portrait.is-lit img { filter: grayscale(0); transform: scale(1.045); }
.portrait.is-lit::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    box-shadow: inset 0 0 0 2px var(--accent); opacity: .55;
    animation: portrait-pulse 1.4s ease;
}
@keyframes portrait-pulse { 0% { opacity: 0; } 30% { opacity: .6; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .portrait.is-lit img { filter: grayscale(100%); transform: none; } .portrait.is-lit::after { display: none; } }
.portrait__name {
    position: absolute; inset: auto 0 0 0; padding: 16px 8px 7px;
    font-family: var(--mono); font-size: 9px; letter-spacing: .03em; color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,.78), transparent);
    opacity: 0; transition: opacity .35s ease; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.portrait:hover .portrait__name, .portrait:focus-visible .portrait__name { opacity: 1; }
.wall-caption { padding: 16px 0 0; }

/* ---------- HERO (home) ---------- */
.hero { padding: clamp(64px, 9vw, 96px) 0 76px; border-bottom: 1px solid var(--line); }
.hero__title { max-width: 14ch; margin: 26px 0 28px; }
.hero__lead { font-size: clamp(17px, 2.4vw, 20px); line-height: 1.5; color: var(--muted); max-width: 600px; margin-bottom: 38px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__media {
    margin-top: clamp(40px, 6vw, 64px); border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--line); box-shadow: 0 30px 70px -40px var(--shadow);
}
.hero__media img { width: 100%; height: auto; display: block; }

/* ---------- seções genéricas ---------- */
.section-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 34px;
}
.section-title {
    font-size: 13px; font-family: var(--mono); letter-spacing: .16em; text-transform: uppercase;
    color: var(--faint); font-weight: 500; margin: 0;
}

/* ---------- grade home (contribuições + aside) ---------- */
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- DIRETÓRIO: toolbar ---------- */
.toolbar { display: flex; flex-direction: column; gap: 18px; padding: 32px 0 22px; }
.toolbar__controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.result-label { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: .03em; }
.empty { padding: 80px 0; text-align: center; color: var(--muted); }
.empty__title { font-size: 18px; font-weight: 500; margin-bottom: 6px; }

/* ---------- PERFIL ---------- */
.profile-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 28px; justify-content: space-between; }
.profile-head__id { display: flex; align-items: center; gap: 22px; min-width: 0; }
.profile-head__name { font-size: clamp(30px, 5vw, 38px); font-weight: 600; letter-spacing: -.025em; line-height: 1.05; margin-bottom: 8px; }
.profile-head__role { font-size: 17px; color: var(--muted); }
.profile-head__meta { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); margin-top: 9px; }
.profile-quote { font-size: clamp(22px, 3.4vw, 27px); line-height: 1.32; font-weight: 500; letter-spacing: -.015em; max-width: 720px; }
.profile-body { display: grid; grid-template-columns: 1.55fr 1fr; gap: 56px; align-items: start; padding-top: 48px; }
@media (max-width: 820px) { .profile-body { grid-template-columns: 1fr; gap: 40px; } }
.profile-aside { display: flex; flex-direction: column; gap: 36px; }
.label-block { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.bio { font-size: 16px; line-height: 1.62; color: var(--text); opacity: .92; }
.passage { display: flex; align-items: baseline; gap: 10px; }
.passage__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; transform: translateY(-2px); }
.award { font-size: 14px; line-height: 1.45; color: var(--muted); border-left: 2px solid var(--line-strong); padding-left: 12px; }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

/* ---------- TOPO DA PÁGINA DE EMPRESAS ---------- */
.companies-hero { padding-top: clamp(44px, 6vw, 68px); }
.companies-hero__title {
    font-size: clamp(36px, 6vw, 64px); line-height: 1.0; letter-spacing: -.035em;
    font-weight: 600; margin: 22px 0 18px; max-width: 16ch;
}
.companies-hero__lead { font-size: clamp(16px, 2vw, 19px); line-height: 1.5; color: var(--muted); max-width: 580px; margin: 0 0 clamp(34px, 5vw, 48px); }
.companies-stats { display: flex; flex-wrap: wrap; gap: 36px 56px; padding-bottom: clamp(34px, 5vw, 48px); }

/* ---------- MAPA (traços) ---------- */
.map { position: relative; }
.map-svg {
    width: 100%; aspect-ratio: 16 / 11; display: block;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.map-land {
    fill: none; stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke;
    stroke-linejoin: round; opacity: .85;
}
.map-dot {
    fill: var(--accent); fill-opacity: .85; stroke: var(--bg); stroke-width: 1;
    vector-effect: non-scaling-stroke; cursor: pointer; transition: fill-opacity .2s;
}
.map-dot:hover { fill-opacity: 1; }
.map-dot.has-co { stroke: var(--accent); stroke-opacity: .9; }
.map-toggle {
    font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
    color: var(--accent); background: transparent; border: 1px solid var(--line-strong);
    padding: 7px 13px; border-radius: var(--radius-pill); cursor: pointer; transition: background .2s;
}
.map-toggle:hover { background: var(--surface-2); }
.map-tooltip {
    position: absolute; transform: translate(-50%, -120%); pointer-events: none;
    background: var(--text); color: var(--bg); font-size: 12px; line-height: 1.35;
    padding: 7px 11px; border-radius: 9px; white-space: nowrap; z-index: 5;
    box-shadow: 0 8px 22px -10px var(--shadow);
}
.map-tooltip strong { font-weight: 600; }
.map-legend { margin-top: 14px; font-size: 11px; color: var(--faint); }
.map--failed .map-svg { display: none; }

/* ---------- SOBRE / institucional ---------- */
.prose { max-width: 70ch; }
.prose p { font-size: 17px; line-height: 1.7; color: var(--text); opacity: .92; margin-bottom: 20px; }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fact { background: var(--surface); padding: 24px; }
.fact__value { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.fact__label { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-top: 8px; }
