/**
 * Seções reutilizáveis — ritmo claro/escuro (home, Cadu, institucional)
 */

/* ── Superfícies ── */
.cc-section-light {
    background: var(--light-1);
    color: var(--text-on-light-secondary);
}

.cc-section-light--white {
    background: var(--light-0);
}

.cc-section-light--muted {
    background: var(--light-2);
}

.cc-section-dark {
    background: var(--preto);
    color: var(--c300);
}

.cc-section-dark--elevated {
    background: var(--dark-1);
}

/* Tipografia em seções claras */
.cc-section-light :is(h1, h2, h3, h4, h5, h6),
.cc-section-light--white :is(h1, h2, h3, h4, h5, h6),
.cc-section-light--muted :is(h1, h2, h3, h4, h5, h6) {
    color: var(--text-on-light);
}

.cc-section-light p,
.cc-section-light--white p,
.cc-section-light--muted p {
    color: var(--text-on-light-secondary);
}

/* Tipografia em seções escuras */
.cc-section-dark :is(h1, h2, h3, h4, h5, h6),
.cc-section-dark--elevated :is(h1, h2, h3, h4, h5, h6) {
    color: var(--branco);
}

/* ── Blocos de seção ── */
.cc-page-section {
    padding: 5rem 0;
}

@media (max-width: 767px) {
    .cc-page-section {
        padding: 3.5rem 0;
    }
}

/* Eyebrow unificado — escuro por padrão; seções claras sobrescrevem abaixo */
.cc-eyebrow {
    display: block;
    margin-bottom: 0.75rem;
    font-family: var(--body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--verde);
}

/* Intro de seção — centralizada e mais larga */
.cc-section-header {
    max-width: 840px;
    margin: 0 auto 3rem;
    text-align: center;
}

.cc-section-header .cc-eyebrow {
    text-align: center;
}

.cc-section-title {
    margin: 0 0 1rem;
    font-family: var(--display);
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.12;
    max-width: none;
}

.cc-section-title--center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 840px;
}

.cc-section-lead {
    margin: 0 auto;
    max-width: 840px;
    font-family: var(--body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
}

.cc-section-lead--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Contraste — leads em seções claras */
.cc-section-light .cc-section-lead,
.cc-section-light--white .cc-section-lead,
.cc-section-light--muted .cc-section-lead {
    color: #3a3a37;
}

/* Contraste — leads em seções escuras */
.cc-section-dark .cc-section-lead,
.cc-section-dark--elevated .cc-section-lead {
    color: #d6d6d2;
}

/* CTAs padronizados */
.cc-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 14px 24px;
    font-family: var(--display);
    font-size: 14px;
    font-weight: 800;
    color: #04120c;
    text-decoration: none;
    background: var(--verde);
    border: 1px solid rgba(74, 255, 107, 0.65);
    border-radius: var(--rfull);
    box-shadow: 0 0 28px rgba(79, 255, 130, 0.22);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cc-btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 0 38px rgba(79, 255, 130, 0.34);
    transform: translateY(-1px);
}

.cc-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 14px 24px;
    font-family: var(--display);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--rfull);
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.cc-section-light .cc-btn-secondary,
.cc-section-light--white .cc-btn-secondary {
    color: var(--text-on-light);
    background: transparent;
    border: 1.5px solid var(--border-on-light);
}

.cc-section-light .cc-btn-secondary:hover,
.cc-section-light--white .cc-btn-secondary:hover {
    border-color: var(--text-on-light);
    color: var(--text-on-light);
}

.cc-section-dark .cc-btn-secondary,
.cc-section-dark--elevated .cc-btn-secondary {
    color: var(--branco);
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid var(--borda);
}

.cc-section-dark .cc-btn-secondary:hover,
.cc-section-dark--elevated .cc-btn-secondary:hover {
    border-color: var(--branco);
}

/* Cards em seção clara */
.cc-section-light .cc-card-surface,
.cc-section-light--white .cc-card-surface {
    background: var(--light-0);
    border: 1px solid var(--border-on-light);
    border-radius: var(--r16);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

/* ── Accent legível em seções claras ── */
:is(.cc-section-light, .cc-section-light--white, .cc-section-light--muted) {
    --accent-text: var(--verde-on-light);
    --accent-text-strong: var(--verde-on-light-strong);
    --accent-border: var(--border-accent-on-light);
    --accent-bg-soft: var(--accent-bg-on-light);
    --accent-border-soft: var(--accent-border-on-light);
}

/* Cards escuros dentro de seção clara — não herdar tipografia on-light */
:is(.cc-section-light, .cc-section-light--white, .cc-section-light--muted)
:is(.home-vert__card, .home-vert__card *) {
    --text-on-light: #fff;
    --text-on-light-secondary: rgba(255, 255, 255, 0.82);
}

:is(.cc-section-light, .cc-section-light--white, .cc-section-light--muted)
:is(.cc-eyebrow, .label-eyebrow, .brand-eyebrow, .ts-lbl) {
    color: var(--accent-text);
}

:is(.cc-section-light, .cc-section-light--white, .cc-section-light--muted) .text-accent-verde {
    color: var(--accent-text);
}

:is(.cc-section-light, .cc-section-light--white, .cc-section-light--muted)
.text-primary:not(.bg-primary):not(.text-black):not([class*="bg-primary"]) {
    color: var(--accent-text) !important;
}

:is(.cc-section-light, .cc-section-light--white, .cc-section-light--muted) .text-primary-dark {
    color: var(--accent-text-strong) !important;
}

:is(.cc-section-light, .cc-section-light--white, .cc-section-light--muted) a:not([class]) {
    color: var(--accent-text-strong);
}

:is(.cc-section-light, .cc-section-light--white, .cc-section-light--muted) a:not([class]):hover {
    color: var(--verde-on-light-hover);
}

:is(.cc-section-light, .cc-section-light--white, .cc-section-light--muted)
:is(
    .home-cadu__flow-icon,
    .home-cadu__card i,
    .home-ops__step-num,
    .home-ops__step > i,
    .cadu-tool-row__icon,
    .cadu-tool-row__bullets i
) {
    color: var(--accent-text);
}

:is(.cc-section-light, .cc-section-light--white, .cc-section-light--muted) .home-cadu__flow-icon {
    border-color: rgba(22, 163, 74, 0.85);
    color: var(--accent-text-strong, #0f5c2e);
}

:is(.cc-section-light, .cc-section-light--white, .cc-section-light--muted) .cadu-badge--green {
    color: var(--accent-text-strong);
    background: var(--accent-bg-soft);
    border-color: var(--accent-border-soft);
}

:is(.cc-section-light, .cc-section-light--white, .cc-section-light--muted) .cadu-tool-row__icon {
    background: var(--accent-bg-soft);
    color: var(--accent-text);
}

/* Reduced motion — reveal */
@media (prefers-reduced-motion: reduce) {
    .page-home .home-reveal,
    .page-home [data-reveal-child] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }

    .home-reveal {
        opacity: 1 !important;
        animation: none !important;
        transform: none !important;
    }
}
