/**
 * Whey Indicação — Estilos
 * Instituto AlphaPró — Curadoria de Suplementos
 *
 * Página pública standalone: o :root abaixo é um ESPELHO local dos tokens --alpha-*
 * (fonte única: areadoprofissional…/css/theme-alphapro.css). Não importa CSS de outro
 * host de propósito — consolidar na migração é copy-paste dos valores.
 */

/* ========================================
   TOKENS (espelho --alpha-*)
   ======================================== */
:root {
    --alpha-navy: #1a365b;
    --alpha-navy-borda: #2c4a73;
    --alpha-gold: #d4a574;
    --alpha-gold-dark: #b38d67;
    --alpha-fundo: #020617;
    --alpha-superficie: #0f172a;
    --alpha-elevada: #1e293b;
    --alpha-borda: rgba(51, 65, 85, 0.7);
    --alpha-borda-plena: #334155;
    --alpha-titulo: #f1f5f9;
    --alpha-texto: #e2e8f0;
    --alpha-texto-2: #94a3b8;
    --alpha-texto-3: #64748b;
    --alpha-superficie-foto: rgba(255, 255, 255, 0.05);
    --alpha-filete-gold: linear-gradient(90deg, transparent 0%, #d4a574 50%, transparent 100%);
    --sombra-md: 0 10px 15px -3px rgba(0, 0, 0, 0.35), 0 4px 6px -4px rgba(0, 0, 0, 0.25);
    --halo-foco: 0 0 0 3px rgba(212, 165, 116, 0.16);
    /* Categóricas de tier (canal = filete lateral, nunca fundo) —
       todas a ≥10% de distância RGB das 4 cores semânticas */
    --tier-whey-cor: #d4a574;
    --tier-lactea-cor: #7db9b7;
    --tier-ovo-cor: #cb9e87;
    --tier-vegetal-cor: #2d6a4f;
    --tier-colageno-cor: #d55e00;
}

/* ========================================
   RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(26, 54, 91, 0.35), transparent 70%),
        var(--alpha-fundo);
    color: var(--alpha-texto);
    min-height: 100vh;
    line-height: 1.6;
}

strong {
    font-weight: 600; /* Inter carregada até 600 — evita faux-bold */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.kicker {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--alpha-gold);
}

a:focus-visible,
button:focus-visible {
    outline: none;
    box-shadow: var(--halo-foco), 0 0 0 1.5px var(--alpha-gold);
}

/* ========================================
   HERO
   ======================================== */
.hero {
    position: relative;
    isolation: isolate;
    text-align: center;
    padding: 3.5rem 1.5rem 0;
    background:
        radial-gradient(ellipse 70% 42% at 50% 100%, rgba(212, 165, 116, 0.13), transparent 70%),
        linear-gradient(160deg, #0d1b2e 0%, #12253f 55%, #1a365b 100%);
    overflow: hidden;
}

.hero::before {
    /* arcos concêntricos fer.a como arte de fundo, lado direito */
    content: "";
    position: absolute;
    top: -3rem;
    right: -4rem;
    width: min(420px, 45vw);
    height: 120%;
    z-index: -1;
    background: url("../brand/arco-linhas.svg") no-repeat right center / contain;
    opacity: 0.14;
    pointer-events: none;
}

.hero-logotipo {
    width: min(240px, 60vw);
    height: auto;
    margin-bottom: 1.5rem;
}

.hero-titulo {
    font-family: 'EB Garamond', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--alpha-titulo);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.hero-subtitulo {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: clamp(1.05rem, 0.95rem + 1vw, 1.3rem);
    color: var(--alpha-gold);
    margin: 0 auto 1.5rem;
    max-width: 600px;
}

.hero-texto {
    max-width: 720px;
    margin: 0 auto 1.5rem;
    font-size: 1.05rem;
    color: var(--alpha-texto);
    line-height: 1.8;
}

.professional-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(179, 141, 103, 0.14);
    border: 1px solid rgba(179, 141, 103, 0.3);
    border-radius: 50px;
    padding: 0.5rem 1.4rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--alpha-texto);
    backdrop-filter: blur(10px);
}

.professional-badge svg {
    flex: none;
    width: 24px;
    height: 24px;
    padding: 4px;
    color: var(--alpha-gold);
    background: rgba(212, 165, 116, 0.14);
    border: 1px solid rgba(212, 165, 116, 0.4);
    border-radius: 50%;
}

/* ========================================
   VINHETA DO SELO
   Duas camadas do MESMO svg separadas por máscaras radiais complementares
   (moldura ≥55% do raio, lettering ≤52%). Sem JS as camadas se completam e
   o selo aparece inteiro e estático — fallback natural. A varredura cônica
   da moldura é dirigida por rAF no JS (body.selo-anima).
   ======================================== */
.selo-vinheta {
    position: relative;
    width: clamp(150px, 20vw, 210px);
    aspect-ratio: 1;
    margin: 0.25rem auto 1.5rem;
}

.selo-camada {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.selo-varredura {
    position: absolute;
    inset: 0;
}

.selo-varredura .selo-camada {
    /* só a moldura (greca + aros) */
    -webkit-mask-image: radial-gradient(circle, transparent 0 52%, #000 55% 100%);
            mask-image: radial-gradient(circle, transparent 0 52%, #000 55% 100%);
}

.selo-lettering {
    /* só o centro (a.pró) */
    -webkit-mask-image: radial-gradient(circle, #000 0 52%, transparent 55% 100%);
            mask-image: radial-gradient(circle, #000 0 52%, transparent 55% 100%);
}

body.selo-anima .selo-vinheta {
    animation: seloDeriva 3s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

body.selo-anima .selo-lettering {
    opacity: 0;
    transform: scale(0.9);
    animation: seloLetreiro 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

@keyframes seloLetreiro {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes seloDeriva {
    from { transform: scale(1.045); }
    to   { transform: scale(1); }
}

/* ========================================
   DIVISOR GRECA (meandro fer.a via mask — a cor vem do CSS)
   ======================================== */
.divisor-greca {
    height: 12px;
    max-width: 420px;
    margin: 2.5rem auto 2rem;
    background: var(--alpha-gold-dark);
    opacity: 0.55;
    -webkit-mask: url("../brand/meandro-linear.svg") center / auto 100% repeat-x;
            mask: url("../brand/meandro-linear.svg") center / auto 100% repeat-x;
}

@supports not ((mask-repeat: repeat-x) or (-webkit-mask-repeat: repeat-x)) {
    .divisor-greca { display: none; }
}

/* ========================================
   ABAS (tablist)
   ======================================== */
.tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 0 1rem;
}

.tab {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--alpha-texto-2);
    background: var(--alpha-elevada);
    border: 1px solid var(--alpha-borda-plena);
    border-radius: 999px;
    padding: 0 1.2rem;
    min-height: 44px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tab:hover {
    border-color: rgba(212, 165, 116, 0.5);
    color: var(--alpha-texto);
    transform: translateY(-2px);
}

.tab[aria-selected="true"] {
    background: var(--alpha-navy);
    border-color: var(--alpha-navy-borda);
    color: #ffffff;
}

/* ========================================
   PAINÉIS DE CATEGORIA
   ======================================== */
.tab-panel {
    margin: 3rem 0;
}

.tab-panel[hidden] {
    display: none;
}

.painel-cabecalho {
    text-align: center;
    margin-bottom: 2.5rem;
}

.painel-cabecalho .kicker {
    margin-bottom: 0.4rem;
}

.painel-titulo {
    font-family: 'EB Garamond', serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--alpha-titulo);
    margin-bottom: 0.5rem;
}

.painel-descricao {
    font-size: 1rem;
    color: var(--alpha-texto);
    max-width: 620px;
    margin: 0 auto;
}

/* ========================================
   GRID DE PRODUTOS
   ======================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background:
        linear-gradient(160deg, rgba(30, 41, 59, 0.35) 0%, rgba(2, 6, 23, 0.6) 55%, rgba(26, 54, 91, 0.18) 100%),
        var(--alpha-superficie);
    border: 1px solid var(--alpha-borda);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-card::before {
    /* filete dourado permanente no topo — assinatura do sistema */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--alpha-filete-gold);
    opacity: 0.75;
}

.product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 165, 116, 0.5);
    box-shadow: var(--sombra-md);
}

/* Filete lateral = canal da cor CATEGÓRICA (tier); o fundo nunca é do tier */
.tier-whey     { --tier-cor: var(--tier-whey-cor); }
.tier-lactea   { --tier-cor: var(--tier-lactea-cor); }
.tier-ovo      { --tier-cor: var(--tier-ovo-cor); }
.tier-vegetal  { --tier-cor: var(--tier-vegetal-cor); }
.tier-colageno { --tier-cor: var(--tier-colageno-cor); }
/* Ômega-3: tier pela forma química */
.tier-tg       { --tier-cor: var(--tier-whey-cor); }
.tier-ee       { --tier-cor: var(--tier-lactea-cor); }
.tier-algaceo  { --tier-cor: var(--tier-vegetal-cor); }
.tier-krill    { --tier-cor: var(--tier-ovo-cor); }

.product-card[class*="tier-"] {
    border-left: 3px solid var(--tier-cor);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: var(--alpha-superficie-foto);
    border-radius: 12px;
    overflow: hidden;
}

.product-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.product-card:hover .product-image {
    transform: scale(1.04);
}

/* Badge translúcido (padrão do sistema) — nunca fundo sólido saturado */
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(100, 116, 139, 0.4);
    border-radius: 4px;
    padding: 2px 8px;
    backdrop-filter: blur(4px);
}

.product-badge.badge-gold {
    color: var(--alpha-gold);
    background: rgba(212, 165, 116, 0.12);
    border-color: rgba(212, 165, 116, 0.35);
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-brand {
    font-size: 0.85rem;
    color: var(--alpha-gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.product-name {
    font-family: 'EB Garamond', serif;
    font-size: 1.5rem;
    color: var(--alpha-titulo);
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-nota {
    font-size: 0.9rem;
    color: var(--alpha-texto-2);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

/* Mini-tabela de grandezas: label à esquerda, número à DIREITA com tabular-nums */
.product-specs {
    display: grid;
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(51, 65, 85, 0.45);
}

.product-specs > div {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 12px;
}

.product-specs dt {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--alpha-texto-2);
}

.product-specs dd {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--alpha-texto);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* ========================================
   RANKING (rank-flag + critérios)
   ======================================== */
.rank-flag {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    min-width: 3rem;
    padding: 0.4rem 0.9rem;
    background: linear-gradient(135deg, var(--alpha-navy) 0%, var(--alpha-superficie) 100%);
    border-right: 1px solid var(--alpha-borda);
    border-bottom: 1px solid var(--alpha-borda);
    border-radius: 12px 0 12px 0;
    color: var(--alpha-gold);
    font-family: 'EB Garamond', serif;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* todos os painéis são ranqueados — o rank-flag pede respiro no topo */
.tab-panel .product-card {
    padding-top: 2.4rem;
}

.criteria-box {
    max-width: 900px;
    margin: 0 auto 3rem;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, rgba(179, 141, 103, 0.12) 0%, rgba(26, 54, 91, 0.5) 100%);
    border: 1px solid var(--alpha-borda);
    border-left: 3px solid var(--alpha-gold-dark);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.criteria-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'EB Garamond', serif;
    font-size: 1.6rem;
    color: var(--alpha-gold);
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.criteria-title::before {
    /* símbolo "a" fer.a como ornamento, via mask (cor do CSS) */
    content: "";
    flex: none;
    width: 20px;
    height: 21px;
    background: var(--alpha-gold);
    -webkit-mask: url("../brand/simbolo-a.svg") center / contain no-repeat;
            mask: url("../brand/simbolo-a.svg") center / contain no-repeat;
}

.criteria-list {
    list-style: none;
    counter-reset: criterio;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.criteria-list li {
    counter-increment: criterio;
    position: relative;
    padding-left: 3rem;
    color: var(--alpha-texto);
    font-size: 0.98rem;
    line-height: 1.7;
}

.criteria-list li strong {
    color: var(--alpha-titulo);
    font-weight: 600;
}

.criteria-list li::before {
    content: counter(criterio);
    position: absolute;
    left: 0;
    top: 0.15rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(179, 141, 103, 0.2);
    border: 1px solid rgba(179, 141, 103, 0.3);
    border-radius: 50%;
    color: var(--alpha-gold);
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Empty state canônico (painel aguardando dados) */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 13px;
    color: var(--alpha-texto-3);
    padding: 3rem 1.5rem;
    border: 1px dashed var(--alpha-borda);
    border-radius: 12px;
}

/* ========================================
   CTA
   ======================================== */
.cta-section {
    text-align: center;
    padding: 4rem 2rem;
    margin: 4rem 0 2rem;
    background: linear-gradient(135deg, rgba(179, 141, 103, 0.16) 0%, rgba(26, 54, 91, 0.4) 100%);
    border: 1px solid var(--alpha-borda);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.cta-titulo {
    font-family: 'EB Garamond', serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--alpha-titulo);
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.05rem;
    color: var(--alpha-texto);
    margin: 0 auto 2rem;
    max-width: 600px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'EB Garamond', serif;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--alpha-navy);
    background: var(--alpha-gold);
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--sombra-md);
}

.cta-button svg {
    transition: transform 0.2s ease;
}

.cta-button:hover svg {
    transform: translateX(4px);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--alpha-texto-2);
    font-size: 0.9rem;
    border-top: 1px solid rgba(179, 141, 103, 0.2);
    margin-top: 4rem;
}

footer p {
    margin-bottom: 0.5rem;
}

.footer-team {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.team-member {
    font-size: 0.85rem;
    color: var(--alpha-gold);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.25rem;
    font-size: 0.85rem;
}

.footer-links a {
    color: var(--alpha-gold);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* ========================================
   MOTION — um momento coreografado; reveal por troca de aba
   Sem .revela nada anima (fallback no-JS: tudo visível).
   ======================================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-panel.revela .product-card {
    opacity: 0;
    animation: fadeUp 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.tab-panel.revela .product-card:nth-child(1)  { animation-delay: 0ms; }
.tab-panel.revela .product-card:nth-child(2)  { animation-delay: 55ms; }
.tab-panel.revela .product-card:nth-child(3)  { animation-delay: 110ms; }
.tab-panel.revela .product-card:nth-child(4)  { animation-delay: 165ms; }
.tab-panel.revela .product-card:nth-child(5)  { animation-delay: 220ms; }
.tab-panel.revela .product-card:nth-child(6)  { animation-delay: 275ms; }
.tab-panel.revela .product-card:nth-child(7)  { animation-delay: 330ms; }
.tab-panel.revela .product-card:nth-child(8)  { animation-delay: 385ms; }
.tab-panel.revela .product-card:nth-child(9)  { animation-delay: 440ms; }
.tab-panel.revela .product-card:nth-child(10) { animation-delay: 495ms; }
.tab-panel.revela .product-card:nth-child(11) { animation-delay: 550ms; }
.tab-panel.revela .product-card:nth-child(12) { animation-delay: 605ms; }
.tab-panel.revela .product-card:nth-child(n+13) { animation-delay: 660ms; } /* teto */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ========================================
   RESPONSIVE — MOBILE
   ======================================== */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.5rem;
    }

    .hero {
        padding: 2.5rem 1rem 0;
    }

    .tabs {
        gap: 0.5rem;
        padding: 0 0.5rem;
    }

    .tab {
        padding: 0 1rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .tab-panel {
        margin: 2rem 0;
    }

    .criteria-box {
        padding: 1.5rem 1.25rem;
    }

    .criteria-list li {
        padding-left: 2.5rem;
        font-size: 0.92rem;
    }

    .cta-section {
        padding: 2rem 1rem;
        margin: 2rem 0 1rem;
    }

    .footer-team {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ========================================
   RESPONSIVE — TABLET
   ======================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
