/**
 * Central Comm Media Hub — Tema global
 * Base visual: dark premium, verde dominante, amarelo como acento
 */

/* ── BASE GLOBAL ── */
html {
    scroll-behavior: smooth;
    background: var(--light-1);
    color: var(--text-on-light);
    font-family: var(--body);
}

body {
    font-family: var(--body);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-on-light-secondary);
    background: var(--light-1);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ── CONTAINER GLOBAL (nav + footer + páginas) ── */
.container {
    width: 100%;
    max-width: var(--container-max, 1200px) !important;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-gutter, 64px) !important;
    padding-right: var(--container-gutter, 64px) !important;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* ── TIPOGRAFIA ── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-on-light);
    margin: 0;
}

h1 {
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.08;
}

h2 {
    font-size: clamp(28px, 3.5vw, 44px);
    line-height: 1.12;
    max-width: 18ch;
}

h3 {
    font-size: clamp(18px, 2vw, 26px);
    line-height: 1.2;
}

h4 {
    font-size: 16px;
    line-height: 1.3;
}

p {
    color: var(--text-on-light-secondary);
    font-size: 15px;
    line-height: 1.7;
}

.text-secondary,
.lead,
.subtitle {
    max-width: 560px;
    font-size: 15px;
    line-height: 1.7;
}

.text-small {
    font-size: 13px;
    line-height: 1.6;
}

.label-eyebrow {
    font-family: var(--body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--verde);
}

/* Eyebrows & labels — escuro; seções claras sobrescrevem via section-components */
.brand-eyebrow,
.ts-lbl,
.cc-eyebrow,
.section-badge.green,
.home-hero__eyebrow,
.page-hero-v2__eyebrow {
    color: var(--cc-green);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* ── LINKS ── */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--t-base);
}

a:not([class]) {
    color: var(--cc-green);
}

a:not([class]):hover {
    color: var(--cc-yellow);
}

footer a:hover,
.text-white\/70 a:hover,
.text-white\/60 a:hover {
    color: var(--cc-green);
}

/* ── SELEÇÃO ── */
::selection {
    background: rgba(79, 255, 130, 0.28);
    color: var(--cc-text-primary);
}

::-moz-selection {
    background: rgba(79, 255, 130, 0.28);
    color: var(--cc-text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: var(--cc-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--cc-green-muted);
    border-radius: var(--rfull);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cc-green);
}

/* ── COMPONENTES BASE (cc-*) ── */
.cc-container {
    width: 100%;
    max-width: var(--container-max, 1200px);
    margin-inline: auto;
    padding-left: var(--container-gutter, 64px);
    padding-right: var(--container-gutter, 64px);
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .cc-container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.cc-card {
    background: var(--light-0);
    border: 1px solid var(--border-on-light);
    border-radius: var(--cc-radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.cc-card-glow {
    box-shadow:
        var(--shadow-card),
        0 0 40px rgba(79, 255, 130, 0.08);
}

.cc-title {
    color: var(--cc-text-primary);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.95;
}

.cc-subtitle {
    color: var(--cc-text-secondary);
    line-height: 1.6;
}

.cc-btn-primary,
.btn-brand-p,
.btn-primary,
.hero-btn-primary,
.home-hero__cta-primary {
    background: var(--cc-green);
    color: #061008;
    border: 1px solid rgba(79, 255, 130, 0.65);
    border-radius: var(--rfull);
    font-weight: 800;
    box-shadow: 0 0 28px rgba(79, 255, 130, 0.22);
    transition: all 180ms ease;
}

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

.cc-btn-secondary,
.btn-brand-o,
.btn-secondary,
.hero-btn-secondary,
.home-hero__cta-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--cc-text-primary);
    border: 1px solid var(--cc-border);
    border-radius: var(--rfull);
    font-weight: 700;
    transition: all 180ms ease;
}

.cc-btn-secondary:hover,
.btn-brand-o:hover,
.btn-secondary:hover,
.hero-btn-secondary:hover,
.home-hero__cta-secondary:hover {
    border-color: var(--cc-border-strong);
    color: var(--cc-green);
    background: rgba(79, 255, 130, 0.06);
}

.cc-badge-yellow,
.badge-brand-d,
.section-badge.accent {
    background: rgba(251, 186, 7, 0.12);
    color: var(--cc-yellow);
    border: 1px solid rgba(251, 186, 7, 0.3);
    border-radius: var(--rfull);
}

.cc-divider-green {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 255, 130, 0.7), transparent);
}

/* ── BOTÕES FLOWBITE / AZUIS → VERDE ── */
.btn,
button[type='submit']:not([class*='nav-']),
.flowbite-btn {
    font-family: var(--body);
    font-weight: 600;
    border-radius: var(--rfull);
    transition: var(--t-base);
}

.bg-blue-700,
.bg-blue-600,
button.bg-blue-700,
a.bg-blue-700,
[class*='btn-blue'],
.flowbite-btn-primary {
    background-color: var(--cc-green) !important;
    color: #061008 !important;
    border-color: transparent !important;
}

.bg-blue-700:hover,
.bg-blue-600:hover,
.flowbite-btn-primary:hover,
.hover\:bg-blue-700:hover,
.hover\:bg-blue-600:hover {
    background-color: var(--color-primary-hover) !important;
    box-shadow: var(--shadow-verde);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent !important;
    color: var(--cc-text-primary) !important;
    border: 1px solid var(--cc-border) !important;
}

.btn-outline:hover {
    border-color: var(--cc-border-strong) !important;
    background: rgba(79, 255, 130, 0.06) !important;
    color: var(--cc-green) !important;
}

/* Focus acessível */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--cc-green);
    outline-offset: 2px;
}

/* ── CARDS SaaS PREMIUM ── */
.brand-card,
.card-dark {
    background: var(--light-0);
    border: 1px solid var(--border-on-light);
    border-radius: var(--cc-radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    transition: var(--t-base);
}

.brand-card:hover,
.card-dark:hover {
    border-color: rgba(74, 255, 107, 0.35);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 0 24px rgba(79, 255, 130, 0.06);
}

/* Cards escuros dentro de seções dark */
:is(.bg-surface-dark, .bg-gray-900, .bg-black, .cc-section-dark) .brand-card,
:is(.bg-surface-dark, .bg-gray-900, .bg-black, .cc-section-dark) .card-dark,
:is(.bg-surface-dark, .bg-gray-900, .bg-black, .cc-section-dark) .cc-card {
    background: linear-gradient(180deg, rgba(30, 32, 29, 0.96), rgba(17, 17, 17, 0.96));
    border-color: var(--cc-border);
    box-shadow: var(--shadow-card);
}

.text-gray-900,
.text-gray-800 {
    color: var(--text-on-light) !important;
}

.text-gray-700,
.text-gray-600 {
    color: var(--text-on-light-secondary) !important;
}

.text-gray-500,
.text-gray-400 {
    color: var(--text-on-light-muted) !important;
}

.bg-gray-900 {
    background-color: var(--cc-black) !important;
}

.border-gray-100,
.border-gray-200,
.border-gray-300 {
    border-color: var(--cc-graphite) !important;
}

.text-blue-500,
.text-blue-600,
.text-blue-700 {
    color: var(--cc-green) !important;
}

.bg-blue-50,
.bg-blue-500\/10 {
    background-color: var(--color-primary-light) !important;
}

.bg-blue-500 {
    background-color: var(--cc-green) !important;
}

.border-blue-500,
.ring-blue-500 {
    border-color: rgba(79, 255, 130, 0.35) !important;
}

/* Tailwind primary */
.text-primary {
    color: var(--cc-green) !important;
}

.bg-primary {
    background-color: var(--cc-green) !important;
}

.bg-primary\/10 {
    background-color: var(--color-primary-light) !important;
}

.border-primary,
.border-primary\/25 {
    border-color: rgba(79, 255, 130, 0.25) !important;
}

.hover\:bg-primary-dark:hover,
.bg-primary-dark {
    background-color: var(--cc-green-dark) !important;
}

.hover\:text-primary:hover {
    color: var(--cc-green) !important;
}

.hover\:border-primary\/40:hover {
    border-color: rgba(79, 255, 130, 0.4) !important;
}

.bg-surface-dark {
    background-color: var(--cc-black) !important;
}

/* Inputs globais */
input:not([type='hidden']):not([type='checkbox']):not([type='radio']),
textarea,
select {
    background-color: var(--color-surface-raised);
    border: 1px solid var(--color-border-light);
    border-radius: var(--cc-radius-md);
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--cc-green);
    box-shadow: 0 0 0 3px rgba(79, 255, 130, 0.12);
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--cc-text-muted);
}

/* Flowbite modals */
[role='dialog'] .bg-white {
    background-color: var(--cc-surface-soft) !important;
}

.bg-brand-grid {
    background-image:
        linear-gradient(rgba(79, 255, 130, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 255, 130, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
}

.bg-brand-hero-glow,
.bg-central-dark {
    background:
        radial-gradient(circle at 80% 10%, rgba(79, 255, 130, 0.1), transparent 32%),
        radial-gradient(circle at 20% 90%, rgba(251, 186, 7, 0.06), transparent 28%);
}

.shadow-central-green {
    box-shadow: var(--cc-glow-green);
}

.shadow-central-card {
    box-shadow: var(--shadow-card);
}

.rounded-central {
    border-radius: var(--cc-radius-lg);
}
