/**
 * Auditajus — Camada de polish CSS premium
 *
 * Complementa o design system definido em theme.json.
 * Não sobrescreve tokens — apenas adiciona refinamento que
 * o Gutenberg não consegue entregar via theme.json.
 *
 * Enqueue via functions.php:
 * wp_enqueue_style('auditajus-custom', get_stylesheet_directory_uri() . '/assets/css/auditajus.css', array(), '1.0.0');
 *
 * @package Auditajus
 * @version 1.0.0
 */


/* ==========================================================================
   1. Reset e base refinada
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

::selection {
    background: var(--wp--preset--color--accent);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--wp--preset--color--accent);
    outline-offset: 3px;
    border-radius: 2px;
}


/* ==========================================================================
   2. Tipografia refinada
   ========================================================================== */

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}


/* ==========================================================================
   3. Botões — micro-interactions
   ========================================================================== */

.wp-element-button,
.wp-block-button__link {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.wp-element-button:hover,
.wp-block-button__link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(11, 30, 63, 0.2);
}

.wp-element-button:active,
.wp-block-button__link:active {
    transform: translateY(0);
}


/* ==========================================================================
   4. Links de navegação
   ========================================================================== */

.wp-block-navigation a {
    transition: color 0.15s ease;
    text-decoration: none !important;
}

.wp-block-navigation a:hover {
    color: var(--wp--preset--color--accent) !important;
}


/* ==========================================================================
   5. Cards e grupos com hover sutil
   ========================================================================== */

.wp-block-group.is-style-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wp-block-group.is-style-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(11, 30, 63, 0.12);
}


/* ==========================================================================
   6. Accordion FAQ — estilo premium
   ========================================================================== */

.wp-block-details {
    border-bottom: 1px solid #E5E7EB;
    padding: 20px 0;
}

.wp-block-details summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--wp--preset--font-size--md);
    color: var(--wp--preset--color--ink);
    transition: color 0.15s ease;
}

.wp-block-details summary::-webkit-details-marker {
    display: none;
}

.wp-block-details summary::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--wp--preset--color--accent);
    transition: transform 0.2s ease;
}

.wp-block-details[open] summary::after {
    transform: rotate(45deg);
}

.wp-block-details[open] summary {
    color: var(--wp--preset--color--accent);
}

.wp-block-details > *:not(summary) {
    padding-top: 12px;
    color: var(--wp--preset--color--muted);
    line-height: 1.65;
}


/* ==========================================================================
   7. Separadores elegantes
   ========================================================================== */

.wp-block-separator {
    border: none;
    border-top: 1px solid #E5E7EB;
    opacity: 1;
}


/* ==========================================================================
   8. Header sticky refinado
   ========================================================================== */

/*
 * IMPORTANTE: Adicionar ao functions.php via wp_footer hook (já incluído).
 * Script que aplica a classe .is-scrolled quando page scrollY > 10px.
 */

.site-header {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95) !important;
    z-index: 100;
    transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 1px 20px rgba(11, 30, 63, 0.08);
}


/* ==========================================================================
   10. Painel de auditoria (hero right panel)
   ========================================================================== */

.audit-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 24px;
    font-family: 'Fira Code', monospace;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    line-height: 1.6;
}

.audit-panel .metric-good { color: #34D399; }
.audit-panel .metric-bad  { color: #F87171; }
.audit-panel .metric-warn { color: #FBBF24; }


/* ==========================================================================
   11. Responsividade — mobile fixes
   ========================================================================== */

@media (max-width: 768px) {
    h1 { font-size: clamp(1.75rem, 6vw, 2.5rem) !important; }
    h2 { font-size: clamp(1.5rem, 5vw, 2rem) !important; }

    .wp-block-group {
        padding-left: var(--wp--preset--spacing--lg) !important;
        padding-right: var(--wp--preset--spacing--lg) !important;
    }

    .wp-block-buttons {
        flex-direction: column;
    }

    .wp-block-buttons .wp-block-button {
        width: 100%;
    }

    .wp-block-buttons .wp-block-button .wp-block-button__link {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}
