/* ═══════════════════════════════════════════════════
   DESABAFO V5 — Processamento Emocional por IA
   CSS Principal | ondaled.com/desabafo
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg: hsl(260 25% 7%);
    --bg-alt: hsl(260 22% 8.5%);
    --bg-card: hsl(260 20% 10%);
    --bg-elevated: hsl(260 18% 13%);
    --surface: hsl(260 15% 16%);
    --border: hsl(260 15% 16%);
    --border-hover: hsl(260 25% 25%);
    --text: hsl(0 0% 95%);
    --text-muted: hsl(260 8% 58%);
    --text-dim: hsl(260 8% 35%);
    --accent: hsl(271 91% 65%);
    --accent-bright: hsl(271 95% 72%);
    --accent-dark: hsl(271 60% 35%);
    --accent2: hsl(320 90% 60%);
    --purple: hsl(265 80% 65%);
    --red: hsl(0 72% 55%);
    --green: hsl(145 65% 45%);
    --orange: hsl(25 95% 55%);
    --yellow: hsl(45 95% 55%);
    --blue: hsl(210 85% 55%);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

/* ═══ CURSOR GLOW ═══ */
.cursor-glow {
    width: 28px;
    height: 28px;
    background: radial-gradient(circle, hsla(210, 80%, 60%, 0.45) 0%, hsla(210, 80%, 60%, 0.12) 50%, transparent 70%);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    mix-blend-mode: screen;
    will-change: transform;
    display: none;
    transition: width 0.15s, height 0.15s, opacity 0.15s, border-radius 0.15s, background 0.15s;
}

.cursor-glow.active {
    display: block;
}

.cursor-glow.on-link {
    width: 22px;
    height: 28px;
    border-radius: 2px;
    background: none;
    mix-blend-mode: normal;
}

.cursor-glow.on-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 28px;
    background: white;
    clip-path: polygon(0% 0%, 0% 85%, 18% 68%, 35% 95%, 48% 88%, 32% 62%, 55% 62%, 0% 0%);
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.cursor-glow:not(.on-link)::after {
    content: none;
}

@media (pointer: fine) and (min-width: 1024px) {
    body {
        cursor: none;
    }

    a,
    button,
    [role="button"],
    .accordion-trigger,
    .audio-player,
    .card,
    .modo-card,
    .estado-card {
        cursor: none;
    }
}

@media (pointer: coarse) {
    .cursor-glow {
        display: none !important;
    }
}

/* ═══ SECTION ALTERNATION ═══ */
.section-dark {
    background: var(--bg);
}

.section-light {
    background: var(--bg-alt);
}

/* ═══ NOISE ═══ */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9998;
}

/* ═══ ANIMATIONS ═══ */
@keyframes pulse-dot {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 hsla(168, 85%, 42%, 0.5);
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 8px hsla(168, 85%, 42%, 0);
    }
}

@keyframes shimmer-sweep {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes scroll-bounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.3;
    }

    50% {
        transform: translateY(10px);
        opacity: 0.7;
    }
}

@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 8px hsla(168, 85%, 42%, 0.1);
    }

    50% {
        box-shadow: 0 0 20px hsla(168, 85%, 42%, 0.25);
    }
}

@keyframes typing-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* ═══ REVEAL ═══ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-d1 {
    transition-delay: 0.1s;
}

.reveal-d2 {
    transition-delay: 0.2s;
}

.reveal-d3 {
    transition-delay: 0.3s;
}

/* ═══ SHIMMER HOVER ═══ */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.shimmer:hover::after {
    opacity: 1;
    transform: rotate(45deg) translate(20%, 20%);
}

/* ═══ SEPARATOR ═══ */
.sep {
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, hsla(168, 85%, 42%, 0.12) 50%, transparent 95%);
    border: none;
    margin: 0;
}

/* ═══ TYPOGRAPHY (Apple-grade) ═══ */
.h-hero {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.h-section {
    font-size: clamp(1.65rem, 3.2vw, 2.5rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.01em;
}

.h-sub {
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    font-weight: 700;
    line-height: 1.3;
}

.t-body {
    font-size: clamp(0.92rem, 1.1vw, 1.05rem);
    line-height: 1.75;
}

.t-sm {
    font-size: 0.85rem;
    line-height: 1.7;
}

.t-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.t-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* ═══ CARD ═══ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.25s ease;
}

.card:hover {
    border-color: var(--border-hover);
    transform: scale(1.02);
    box-shadow: 0 0 25px hsla(168, 85%, 42%, 0.05);
}

/* ═══ BUTTONS ═══ */
.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1.15rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    border-radius: 0.85rem;
    text-decoration: none;
    border: none;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-primary {
    background: linear-gradient(135deg, #a855f7, hsl(271, 76%, 53%));
    color: #fff;
    box-shadow: 0 4px 0 hsl(271, 60%, 30%), 0 8px 25px hsla(271, 85%, 55%, 0.3);
    border: 2px solid hsla(0, 0%, 100%, 0.1);
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, hsla(0, 0%, 100%, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer-sweep 3s infinite;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 0 hsl(271, 60%, 30%), 0 14px 35px hsla(271, 85%, 55%, 0.4);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 hsl(271, 60%, 30%), 0 4px 12px hsla(271, 85%, 55%, 0.2);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.8rem 1.4rem;
    border: 1px solid var(--border);
    border-radius: 0.7rem;
    transition: all 0.3s;
}

.btn-ghost:hover {
    color: var(--accent);
    border-color: hsla(168, 85%, 42%, 0.3);
}

.btn-ghost.copied {
    color: var(--green);
    border-color: hsla(145, 65%, 45%, 0.3);
}

/* ═══ AUDIO PLAYER ═══ */
.audio-player {
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.1rem 1.4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    user-select: none;
    transition: all 0.3s;
}

.audio-player:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.play-btn {
    width: 46px;
    height: 46px;
    background: #a855f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 12px hsla(271, 91%, 65%, 0.3);
    transition: transform 0.2s;
}

.play-btn:hover {
    transform: scale(1.06);
}

.audio-info {
    flex: 1;
    min-width: 0;
}

.progress-container {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin-top: 0.45rem;
}

.progress-bar {
    height: 100%;
    background: #a855f7;
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 2px;
}

/* ═══ ACCORDION ═══ */
.accordion-item {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    margin-bottom: 0.4rem;
    overflow: hidden;
    background: var(--bg-card);
    transition: border-color 0.3s;
}

.accordion-item:hover {
    border-color: var(--border-hover);
}

.accordion-trigger {
    width: 100%;
    padding: 1.15rem 1.4rem;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    transition: color 0.3s;
    gap: 1rem;
}

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

.accordion-content {
    padding: 0 1.4rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
    color: var(--text-muted);
    line-height: 1.75;
    font-size: 0.9rem;
}

.accordion-content.active {
    max-height: 300px;
    padding: 0.4rem 1.4rem 1.25rem;
}

.accordion-icon {
    transition: transform 0.3s;
    color: var(--accent);
    flex-shrink: 0;
}

.accordion-icon.active {
    transform: rotate(180deg);
}

/* ═══ DIAGNOSTIC PREVIEW ═══ */
.diagnostic-preview {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
}

.diagnostic-header {
    background: linear-gradient(135deg, hsla(168, 85%, 42%, 0.06), hsla(265, 80%, 65%, 0.03));
    border-bottom: 1px solid var(--border);
    padding: 0.9rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.diagnostic-body {
    padding: 1.4rem 1.5rem;
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.diagnostic-body .block-label {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.2rem;
}

.diagnostic-body .block-content {
    margin-bottom: 0.9rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid hsla(260, 15%, 16%, 0.5);
}

.diagnostic-body .block-content:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--accent);
    animation: typing-blink 1s infinite;
    vertical-align: text-bottom;
    margin-left: 2px;
}

/* ═══ ESTADO CARD ═══ */
.estado-card {
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid transparent;
    background: var(--bg-card);
    transition: all 0.25s;
    text-align: center;
}

.estado-card:hover {
    transform: scale(1.02) translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.estado-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.4rem;
}

/* ═══ MODO CARD ═══ */
.modo-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.25s;
}

.modo-card:hover {
    border-color: var(--border-hover);
    transform: scale(1.02);
    box-shadow: 0 0 20px hsla(168, 85%, 42%, 0.05);
}

.modo-tag {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    background: hsla(168, 85%, 42%, 0.08);
    color: var(--accent);
}

/* ═══ STAT BAR ═══ */
.stat-bar {
    height: 4px;
    border-radius: 2px;
    background: hsla(168, 85%, 42%, 0.08);
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--accent);
    width: 0%;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══ PULSE DOT ═══ */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

/* ═══ TEXT GLOW ═══ */
.text-glow {
    text-shadow: 0 0 25px hsla(168, 85%, 42%, 0.3), 0 0 50px hsla(168, 85%, 42%, 0.08);
}

/* ═══ SCROLL CUE ═══ */
.scroll-cue {
    animation: scroll-bounce 2.5s ease-in-out infinite;
}

/* ═══ CTA INLINE ═══ */
.cta-inline {
    padding: 3.5rem 0;
    text-align: center;
}

/* ═══ BADGE ═══ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    background: hsla(168, 85%, 42%, 0.1);
    border: 1px solid hsla(168, 85%, 42%, 0.2);
    border-radius: 999px;
    box-shadow: inset 0 1px 2px hsla(168, 85%, 42%, 0.06);
}

/* ═══ STICKY CTA MOBILE ═══ */
.sticky-cta-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0.6rem 0.75rem;
    background: linear-gradient(to top, var(--bg), hsla(260, 25%, 7%, 0.97));
    border-top: 1px solid hsla(260, 15%, 16%, 0.4);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.sticky-cta-mobile.visible {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .sticky-cta-mobile {
        display: none !important;
    }
}

/* ═══ MOBILE ═══ */
@media (max-width: 767px) {
    .audio-player {
        padding: 0.85rem;
        gap: 0.7rem;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--bg-card) !important;
    }

    .play-btn {
        width: 40px;
        height: 40px;
    }

    .btn-cta {
        padding: 0.85rem 1.4rem;
        font-size: 0.95rem;
    }

    body {
        padding-bottom: 62px;
    }

    .card {
        padding: 1.25rem;
    }

    .grid-2col {
        grid-template-columns: 1fr !important;
    }

    .grid-3col {
        grid-template-columns: 1fr 1fr !important;
    }

    .grid-4col {
        grid-template-columns: 1fr 1fr !important;
    }

    .nav-links {
        display: none !important;
    }

    .hero-inner {
        gap: 2.5rem !important;
    }

    #hero {
        padding-top: 4rem !important;
        padding-bottom: 5rem !important;
    }
}

@media (max-width: 480px) {
    .grid-3col {
        grid-template-columns: 1fr !important;
    }

    .sticky-cta-mobile .btn-cta {
        font-size: 0.85rem;
    }
}

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar {
    width: 5px;
}

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

::-webkit-scrollbar-thumb {
    background: hsla(168, 85%, 42%, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsla(168, 85%, 42%, 0.35);
}

/* ═══ SELECTION ═══ */
::selection {
    background: hsla(168, 85%, 42%, 0.2);
    color: white;
}

/* BACKGROUND HERO MAGNÍFICO – VERSÃO DEFINITIVA */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, hsla(260, 25%, 7%, 0.68) 0%, transparent 35%, transparent 65%, hsla(260, 25%, 7%, 0.68) 100%);
    z-index: 1;
    pointer-events: none;
}

@keyframes orb-float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(45px, -45px);
    }
}

@keyframes particle-drift {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 300px 300px;
    }
}