/* ═══════════════════════════════════════════════
   styles.css — Lucas Salgado | Portfólio
   ═══════════════════════════════════════════════ */

/* ── Design Tokens ───────────────────────────── */
:root {
    --bg-dark: #191717;
    --bg-light: #2a2828;
    --text-light: #f1efef;
    --text-muted: #a1a1aa;
    --accent: #d2bfa1;
}

/* ── Base ─────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Josefin Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

/* ── Acessibilidade: foco por teclado (WCAG 2.4.7) ── */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Remove outline para cliques com mouse */
:focus:not(:focus-visible) {
    outline: none;
}

/* ── Sections ─────────────────────────────────── */
.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 8rem;
    padding-bottom: 4rem;
}

/* ── Tipografia ───────────────────────────────── */
.brand-gradient-text {
    color: var(--accent);
}

.font-extralight {
    font-weight: 200;
}

/* ── CTA Button ───────────────────────────────── */
.cta-button {
    background-color: var(--accent);
    color: var(--bg-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Touch target mínimo de 44px (WCAG 2.5.5) */
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px -10px rgba(210, 191, 161, 0.3);
}

/* ── Cards ────────────────────────────────────── */
.card {
    background-color: rgba(25, 23, 23, 0.5);
    border: 1px solid #27272a;
    backdrop-filter: blur(10px);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

/* ── Formulário ───────────────────────────────── */
.input-field {
    background-color: var(--bg-light);
    border: 1px solid #3f3f46;
    color: var(--text-light);
}

.input-field:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(210, 191, 161, 0.5);
}

/* ── Animações de entrada ─────────────────────── */
.animated-text {
    animation: fadeIn 1s ease-out forwards;
    opacity: 0;
    /* Define will-change apenas nas propriedades seguras para GPU */
    will-change: transform, opacity;
}

.animated-text-delay-1 { animation-delay: 0.2s; }
.animated-text-delay-2 { animation-delay: 0.4s; }
.animated-text-delay-3 { animation-delay: 0.6s; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Acordeões (Planos e FAQ) ─────────────────── */
.details-content,
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Navegação ────────────────────────────────── */
/* Substitui 'hidden lg:flex' para evitar conflito com .hidden { display:none !important } */
.nav-desktop {
    display: none;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
}
@media (min-width: 1024px) {
    .nav-desktop {
        display: flex;
    }
}

.header-nav a {
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Touch target mínimo (WCAG 2.5.5) */
    min-height: 44px;
}

.header-nav a:hover {
    color: var(--accent);
}

/* ── Rodapé — nav espelha o estilo do header ──── */
.footer-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.footer-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: inherit;      /* mesma fonte do body = header-nav */
    font-weight: 300;
    transition: color 0.3s ease;
    min-height: 44px;
}

.footer-nav a:hover {
    color: var(--accent);
}


/* ── Dropdown de Navegação ────────────────────── */
.nav-dropdown-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    color: var(--text-light);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Josefin Sans', sans-serif;
    font-size: inherit;
    font-weight: inherit;
    padding: 0;
    transition: color 0.3s ease;
}

.nav-dropdown-trigger:hover,
.nav-dropdown-trigger[aria-expanded="true"] {
    color: var(--accent);
}

.nav-dropdown-chevron {
    transition: transform 0.25s ease;
}

.nav-dropdown-trigger[aria-expanded="true"] .nav-dropdown-chevron {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: rgba(18, 16, 16, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(210, 191, 161, 0.15);
    border-radius: 10px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-6px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    z-index: 200;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.6);
}

.nav-dropdown-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Seta decorativa acima do dropdown */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: rgba(18, 16, 16, 0.85);
    border-top: 1px solid rgba(210, 191, 161, 0.15);
    border-left: 1px solid rgba(210, 191, 161, 0.15);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.9rem;
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.nav-dropdown-item:hover {
    color: var(--accent);
    background: rgba(210, 191, 161, 0.08);
}

/* ── Dropdown Mobile ──────────────────────────── */
.mobile-dropdown-trigger {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Josefin Sans', sans-serif;
    font-size: inherit;
    font-weight: inherit;
    color: var(--text-light);
    transition: color 0.3s ease;
    padding: 0;
    min-height: 44px;
}

.mobile-dropdown-trigger:hover {
    color: var(--accent);
}

.mobile-dropdown-chevron {
    transition: transform 0.25s ease;
}

.mobile-dropdown-trigger[aria-expanded="true"] .mobile-dropdown-chevron {
    transform: rotate(180deg);
}

/* ── Ícones Sociais ───────────────────────────── */
.social-icon {
    /* Touch target 44×44px */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon:hover {
    border-color: var(--accent);
}

/* SVG ícones sociais — cor base */
.social-icon .fil0 {
    fill: #7d7c7c;
    fill-rule: nonzero;
    transition: fill 0.3s ease;
}

.social-icon:hover .fil0 {
    fill: var(--accent);
}

/* SVG logo — usa a cor de destaque */
.logo-svg .fil0 {
    fill: var(--accent);
    fill-rule: nonzero;
}

/* ── Botões de detalhes ───────────────────────── */
.details-toggle {
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* ── FAQ ──────────────────────────────────────── */
.faq-question-button {
    min-height: 44px;
}

.faq-question-button .lucide-chevron-down {
    transition: transform 0.3s ease-in-out;
}

.faq-question-button.open .lucide-chevron-down {
    transform: rotate(180deg);
}

/* ── Foto de perfil ───────────────────────────── */
.profile-photo {
    width: 320px;
    height: 320px;
    object-fit: cover;
}

/* ── iFrames do Portfólio ─────────────────────── */
.iframe-wrapper {
    position: relative;
    /* aspect-ratio reserva o espaço antes do carregamento, evitando CLS */
    aspect-ratio: 782 / 611;
    overflow: hidden;
    background-color: var(--bg-light);
}

.iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

/* ── Fallback para iFrames com erro ───────────── */
.iframe-fallback {
    display: none;
    position: absolute;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem;
}

/* ── Utilitários ──────────────────────────────── */
.hidden { display: none !important; }

/* ══════════════════════════════════════════════
   Fallback para navegadores sem JavaScript
   A classe .no-js é removida pelo main.js
   ao inicializar, revelando animações
   ══════════════════════════════════════════════ */
.no-js .animated-text {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

.no-js [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* ══════════════════════════════════════════════
   @media: Redução de movimento (WCAG 2.3.3)
   Respeita configuração de acessibilidade do SO
   ══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .animated-text {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        will-change: auto;
    }

    .cta-button,
    .card,
    .social-icon,
    .social-icon .fil0,
    .faq-question-button .lucide-chevron-down,
    .details-content,
    .faq-answer,
    .header-nav a {
        transition: none !important;
    }

    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
