/* ==========================================================================
   ALC · Light Theme — para páginas de venda (home, auditoria, success-fee)
   Paleta institucional · tipografia serif nos headings · Inter no corpo
   ========================================================================== */

:root {
    --bg-page: #fafaf7;
    --bg-section: #ffffff;
    --bg-section-alt: #f4f1eb;
    --bg-card: #ffffff;
    --bg-card-raised: #ffffff;

    --text-primary: #1a1a1a;
    --text-secondary: #3d3d3d;
    --text-tertiary: #525252;
    --text-muted: #737373;

    --accent: #1a365d;         /* Navy institucional */
    --accent-dark: #0f2540;
    --accent-light: #2c5282;
    --accent-pale: #e3ecf5;

    --success: #15803d;
    --success-pale: #dcfce7;
    --danger: #b91c1c;
    --danger-pale: #fee2e2;
    --warning: #a16207;

    --border: #e5e5e5;
    --border-strong: #d4d4d4;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(26, 54, 93, 0.12);

    --radius: 10px;
    --radius-lg: 14px;
}

/* ==========================================================================
   BASE
   ========================================================================== */

* { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }

body.light-theme {
    background: var(--bg-page);
    color: var(--text-primary);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.light-theme p {
    font-size: 17px !important;
    line-height: 1.65;
    color: var(--text-secondary);
}

body.light-theme h1, body.light-theme h2 {
    font-family: 'Playfair Display', 'Tinos', Georgia, serif;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.15;
}

body.light-theme h3, body.light-theme h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.005em;
}

body.light-theme .text-white { color: var(--text-primary) !important; }
body.light-theme .text-gray-300 { color: var(--text-secondary) !important; }
body.light-theme .text-gray-400 { color: var(--text-tertiary) !important; }
body.light-theme .text-gray-500 { color: var(--text-muted) !important; }
body.light-theme strong.text-white { color: var(--text-primary) !important; }

body.light-theme .text-xl { font-size: 1.15rem !important; line-height: 1.6; color: var(--text-secondary); }

/* ==========================================================================
   HEADER (sticky, glass-on-white)
   ========================================================================== */

body.light-theme header.sticky {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(10px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(140%) !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: var(--shadow-sm);
}

body.light-theme header.sticky .glass-card { background: transparent; border: none; box-shadow: none; }

body.light-theme header img[alt*="ALC"],
body.light-theme header img[alt*="alc"] {
    filter: brightness(0) saturate(100%) invert(17%) sepia(21%) saturate(3700%) hue-rotate(191deg) brightness(92%) contrast(94%) !important;
}

body.light-theme header .h-6.w-px { background: var(--border-strong) !important; }
body.light-theme header span.font-light {
    color: var(--text-tertiary) !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em;
}

body.light-theme header nav a { color: var(--text-secondary) !important; font-weight: 500; }
body.light-theme header nav a:hover { color: var(--accent) !important; }
body.light-theme header nav a[style*="color: #2d8fb8"] { color: var(--accent) !important; font-weight: 600 !important; }

body.light-theme .hamburger span { background: var(--accent) !important; }

/* Mobile menu stays dark — better visibility overlay when open */
body.light-theme .mobile-menu { background: rgba(15, 30, 50, 0.98); }

/* ==========================================================================
   CARDS / SURFACES
   ========================================================================== */

body.light-theme .data-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden;
}
body.light-theme .data-card::before { display: none !important; }

body.light-theme .glass-card,
body.light-theme .glass-card-strong {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: var(--shadow-sm) !important;
}

body.light-theme .discover-card,
body.light-theme .case-card,
body.light-theme .expertise-card,
body.light-theme .included-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}
body.light-theme .discover-card::before,
body.light-theme .expertise-card::before,
body.light-theme .included-card::before { display: none !important; }

body.light-theme .discover-card:hover,
body.light-theme .case-card:hover,
body.light-theme .expertise-card:hover,
body.light-theme .included-card:hover {
    border-color: var(--accent-light) !important;
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-2px);
}

body.light-theme .case-card::after { display: none !important; }

/* ==========================================================================
   METRIC DISPLAYS
   ========================================================================== */

body.light-theme .metric-display {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
    color: var(--accent) !important;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

body.light-theme .metric-label {
    color: var(--text-muted) !important;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Progress bars (Problema Metrics) */
body.light-theme .progress-bar {
    background: var(--border) !important;
}
body.light-theme .progress-fill {
    background: var(--danger) !important;
}

/* ==========================================================================
   BUTTONS / CTAs
   ========================================================================== */

body.light-theme a[style*="background: linear-gradient(135deg, #1f6580, #2d8fb8)"] {
    background: var(--accent) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(26, 54, 93, 0.25);
    transition: all 0.2s ease;
}
body.light-theme a[style*="background: linear-gradient(135deg, #1f6580, #2d8fb8)"]:hover {
    background: var(--accent-dark) !important;
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.35);
    transform: translateY(-1px);
}

/* Secondary button (was .glass-card-strong) */
body.light-theme a.glass-card-strong[style*="color: #2d8fb8"] {
    background: #ffffff !important;
    border: 1.5px solid var(--accent) !important;
    color: var(--accent) !important;
    font-weight: 600 !important;
    box-shadow: var(--shadow-sm);
}
body.light-theme a.glass-card-strong[style*="color: #2d8fb8"]:hover {
    background: var(--accent-pale) !important;
}

/* Generic teal accent link/text → navy */
body.light-theme [style*="color: #1f6580"] { color: var(--accent) !important; }
body.light-theme [style*="color: #2d8fb8"] { color: var(--accent) !important; }

/* Gradient text in headings → solid navy */
body.light-theme .bg-gradient-to-r.from-teal-400,
body.light-theme span.bg-gradient-to-r {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
    color: var(--accent) !important;
}

/* ==========================================================================
   SECTIONS / BACKGROUNDS
   ========================================================================== */

body.light-theme section {
    position: relative;
}

/* Alternated subtle cream sections */
body.light-theme section[style*="rgba(31, 101, 128, 0.03)"],
body.light-theme section[style*="rgba(31, 101, 128, 0.04)"],
body.light-theme section[style*="rgba(31, 101, 128, 0.05)"] {
    background: var(--bg-section-alt) !important;
}

body.light-theme .dashboard-grid {
    background: none !important;
}

/* Alternative: very subtle dot grid for visual rhythm without dark teal lines */
body.light-theme section.dashboard-grid {
    background-image: radial-gradient(circle, rgba(26, 54, 93, 0.06) 1px, transparent 1px) !important;
    background-size: 32px 32px !important;
}

/* ==========================================================================
   BADGES & PILLS
   ========================================================================== */

body.light-theme .inline-block.px-4.py-2.rounded-full.glass-card,
body.light-theme .inline-block.px-4.py-2.rounded-full.glass-card-strong {
    background: var(--accent-pale) !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
}
body.light-theme .inline-block.px-4.py-2.rounded-full span[style*="color: #1f6580"],
body.light-theme .inline-block.px-4.py-2.rounded-full span[style*="color: #2d8fb8"] {
    color: var(--accent) !important;
    font-weight: 600;
    letter-spacing: 0.08em;
}

/* Selo circular "100%" de garantia etc */
body.light-theme .rounded-full.bg-green-950\/50,
body.light-theme .rounded-full[class*="bg-green"] {
    background: var(--success-pale) !important;
    border-color: var(--success) !important;
}
body.light-theme .rounded-full.bg-red-950\/50,
body.light-theme .rounded-full[class*="bg-red"] {
    background: var(--danger-pale) !important;
    border-color: var(--danger) !important;
}
body.light-theme .rounded-full.bg-teal-950\/50,
body.light-theme .rounded-full[class*="bg-teal"] {
    background: var(--accent-pale) !important;
    border-color: var(--accent) !important;
}

body.light-theme .rounded-lg.bg-teal-950\/50,
body.light-theme div[class*="bg-teal-950"] {
    background: var(--accent-pale) !important;
    border: 1px solid var(--accent-light) !important;
    color: var(--accent) !important;
}

body.light-theme svg.text-teal-400,
body.light-theme [class*="text-teal"] { color: var(--accent) !important; }
body.light-theme svg.text-green-500 { color: var(--success) !important; }
body.light-theme svg.text-red-500 { color: var(--danger) !important; }

/* Problem section red metrics */
body.light-theme .text-red-500 { color: var(--danger) !important; }
body.light-theme .text-orange-500 { color: #c2410c !important; }
body.light-theme .text-yellow-500 { color: var(--warning) !important; }

/* ==========================================================================
   TIMELINE (Como Entregamos / Fases)
   ========================================================================== */

body.light-theme .timeline-number {
    background: var(--bg-card) !important;
    border: 3px solid var(--accent) !important;
}
body.light-theme .timeline-number span { color: var(--accent) !important; }

body.light-theme .bg-gradient-to-b.from-teal-600\/50 {
    background: var(--border-strong) !important;
}

/* ==========================================================================
   FOOTER (light — combina com o tema claro das páginas de venda)
   ========================================================================== */

body.light-theme footer.border-t.border-gray-800 {
    background: var(--bg-section-alt) !important;
    border-top: 1px solid var(--border) !important;
    color: var(--text-secondary);
}

body.light-theme footer img[alt*="ALC"],
body.light-theme footer img[alt*="alc"] {
    filter: brightness(0) saturate(100%) invert(17%) sepia(21%) saturate(3700%) hue-rotate(191deg) brightness(92%) contrast(94%) !important;
}

body.light-theme footer h4.text-white,
body.light-theme footer .text-white {
    color: var(--text-primary) !important;
}

body.light-theme footer p,
body.light-theme footer .text-gray-400,
body.light-theme footer .text-gray-500 {
    color: var(--text-secondary) !important;
}

body.light-theme footer a {
    color: var(--text-secondary) !important;
    transition: color 0.15s ease;
}
body.light-theme footer a:hover,
body.light-theme footer .hover\:text-teal-400:hover {
    color: var(--accent) !important;
}

body.light-theme footer .border-t.border-gray-800,
body.light-theme footer .border-gray-800 {
    border-color: var(--border) !important;
}

/* ==========================================================================
   EXTRA — case card specifics
   ========================================================================== */

body.light-theme .sector-icon {
    background: var(--accent-pale) !important;
    border: 1px solid var(--accent-light) !important;
    color: var(--accent) !important;
}

body.light-theme .sector-icon svg { color: var(--accent); }

body.light-theme .case-expanded .border-t {
    border-top-color: var(--border) !important;
}

body.light-theme .border-gray-800 { border-color: var(--border) !important; }

/* Example highlight (success-fee page) */
body.light-theme .example-highlight {
    background: var(--accent-pale) !important;
    border-left-color: var(--accent) !important;
    color: var(--text-secondary);
}
body.light-theme .example-highlight p,
body.light-theme .example-highlight div { color: var(--text-secondary); }

/* Chip/tag pills (expertise PCI-DSS, SOX etc) */
body.light-theme .bg-gray-800 {
    background: var(--accent-pale) !important;
}
body.light-theme .bg-gray-800.text-gray-400 {
    color: var(--accent-dark) !important;
    font-weight: 500;
}

/* ==========================================================================
   FORMS (27-riscos, diagnostico) — inputs claros
   ========================================================================== */

body.light-theme input[type="text"],
body.light-theme input[type="email"],
body.light-theme input[type="tel"],
body.light-theme input[type="number"],
body.light-theme select,
body.light-theme textarea {
    background-color: #ffffff !important;
    border: 1px solid var(--border-strong) !important;
    color: var(--text-primary) !important;
    font-size: 0.95rem !important;
}

body.light-theme input[type="text"]:hover,
body.light-theme input[type="email"]:hover,
body.light-theme input[type="tel"]:hover,
body.light-theme input[type="number"]:hover,
body.light-theme select:hover,
body.light-theme textarea:hover {
    background-color: #fafafa !important;
    border-color: var(--accent-light) !important;
}

body.light-theme input[type="text"]:focus,
body.light-theme input[type="email"]:focus,
body.light-theme input[type="tel"]:focus,
body.light-theme input[type="number"]:focus,
body.light-theme select:focus,
body.light-theme textarea:focus {
    outline: none !important;
    background-color: #ffffff !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.12) !important;
}

body.light-theme input::placeholder,
body.light-theme textarea::placeholder {
    color: #9ca3af !important;
    opacity: 1;
}

body.light-theme label {
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
}

body.light-theme label .required {
    color: var(--danger) !important;
}

body.light-theme .help-text {
    color: var(--text-muted) !important;
}

body.light-theme select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%231a365d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    padding-right: 2.5rem !important;
}

body.light-theme select option {
    background: #ffffff !important;
    color: var(--text-primary) !important;
}

/* Form submit button — ensure navy consistency */
body.light-theme button[type="submit"] {
    background: var(--accent) !important;
    color: #ffffff !important;
    border: none !important;
}
body.light-theme button[type="submit"]:hover {
    background: var(--accent-dark) !important;
}

/* ==========================================================================
   FIELD VALIDATION (client-side)
   ========================================================================== */

.field-error {
    display: none;
    color: #b91c1c;
    font-size: 0.8rem;
    margin-top: 0.4rem;
    line-height: 1.4;
}

.field-invalid {
    border-color: #b91c1c !important;
    background-color: #fef2f2 !important;
}
.field-invalid:focus {
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12) !important;
    border-color: #b91c1c !important;
}

/* Dark theme fallback for validation (improbable — forms são light, mas por segurança) */
body:not(.light-theme) .field-error {
    color: #fca5a5;
}
body:not(.light-theme) .field-invalid {
    border-color: #fca5a5 !important;
    background-color: rgba(185, 28, 28, 0.12) !important;
}

/* ==========================================================================
   PHOTO FRAME (sobre.html) — placeholder claro até foto ser enviada
   ========================================================================== */

body.light-theme .photo-frame {
    background: linear-gradient(135deg, #e3ecf5 0%, #c7d8ec 100%) !important;
    border: 1px solid var(--border) !important;
    color: var(--accent) !important;
    box-shadow: var(--shadow-md);
}
body.light-theme .photo-frame .placeholder-label {
    color: rgba(26, 54, 93, 0.5) !important;
}

/* ==========================================================================
   ANIMATIONS (keep subtle, no pulse/scan)
   ========================================================================== */

body.light-theme .animate-ping { display: none !important; }
body.light-theme .float-slow,
body.light-theme .float-medium,
body.light-theme .float-fast { display: none !important; }

/* ==========================================================================
   RESPONSIVE TWEAKS
   ========================================================================== */

@media (max-width: 768px) {
    body.light-theme h1 { font-size: 2.25rem !important; letter-spacing: -0.02em; }
    body.light-theme h2 { font-size: 1.75rem !important; }
    body.light-theme .metric-display { font-size: 2.5rem !important; }
    body.light-theme p { font-size: 16px !important; }
}
