/* Huvora Website — tokens e utilidades fora do Tailwind.
   Espelha o design system do produto (dark, brand #523ef7). */

:root {
    --bg: #08090e;
    --surface: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.07);
    --brand: #523ef7;
    --brand-hi: #a78bfa;
    --muted: #8b93a7;
    --subtle: #5c6478;
    --heading: #eef0f6;
}

html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: #cbd2e0;
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(82, 62, 247, 0.4); }

/* ---------- tipografia ---------- */
.eyebrow {
    font-size: 10px;
    letter-spacing: 0.22em;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--brand-hi);
}
.text-heading { color: var(--heading); }
.text-muted { color: var(--muted); }
.text-subtle { color: var(--subtle); }

/* ---------- superfícies ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.card-hover { transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.card-hover:hover {
    transform: translateY(-3px);
    border-color: rgba(167, 139, 250, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 16px 40px -12px rgba(0, 0, 0, 0.6);
}

/* ---------- glows decorativos ---------- */
.glow-brand { background: radial-gradient(closest-side, rgba(82, 62, 247, 0.22), transparent); }
.dots {
    background-image: radial-gradient(rgba(167, 139, 250, 0.14) 1px, transparent 1px);
    background-size: 26px 26px;
}
.grid-lines {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
}

/* ---------- orbs animados (background das seções) ---------- */
.orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(70px);
    pointer-events: none;
    will-change: transform;
}
@keyframes drift-a {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(48px, -34px) scale(1.1); }
}
@keyframes drift-b {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-56px, 30px) scale(0.92); }
}
@keyframes drift-c {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, 40px) scale(1.06); }
    66% { transform: translate(-24px, 14px) scale(0.96); }
}
.drift-a { animation: drift-a 24s ease-in-out infinite; }
.drift-b { animation: drift-b 30s ease-in-out infinite; }
.drift-c { animation: drift-c 20s ease-in-out infinite; }

/* ---------- film grain global ---------- */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    pointer-events: none;
    opacity: 0.032;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="140" height="140"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2" stitchTiles="stitch"/></filter><rect width="140" height="140" filter="url(%23n)"/></svg>');
}

/* ---------- varredura de luz no monitor do mockup ---------- */
.scanline { position: relative; overflow: hidden; }
.scanline::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.055) 48%, transparent 62%);
    transform: translateX(-130%);
    animation: sweep 8s ease-in-out infinite;
    pointer-events: none;
}
@keyframes sweep {
    0%, 55% { transform: translateX(-130%); }
    80%, 100% { transform: translateX(130%); }
}

/* ---------- cards flutuantes ao lado dos mockups ---------- */
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}
.float-slow { animation: floaty 6.5s ease-in-out infinite; }
.float-slower { animation: floaty 9s ease-in-out infinite 1.2s; }
.float-card {
    background: rgba(13, 15, 22, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.7), 0 0 40px -12px rgba(82, 62, 247, 0.3), inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(8px);
}

@media (prefers-reduced-motion: reduce) {
    .drift-a, .drift-b, .drift-c, .float-slow, .float-slower, .scanline::after { animation: none; }
}

/* ---------- frames de produto (mockups HTML) ---------- */
.frame {
    max-width: 100%;
    min-width: 0;
    background: #0b0d14;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 1px 0 rgba(0, 0, 0, 0.4),
        0 30px 80px -20px rgba(0, 0, 0, 0.75),
        0 0 120px -30px rgba(82, 62, 247, 0.35);
}
.frame-bar { background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid var(--border); }
.mini-label { font-size: 8px; letter-spacing: 0.18em; font-weight: 700; text-transform: uppercase; color: var(--subtle); }
.mini-chip {
    font-size: 8px; font-weight: 600; padding: 1px 5px; border-radius: 3px;
    letter-spacing: 0.04em; white-space: nowrap;
}
.phone-notch { width: 34%; height: 5px; border-radius: 999px; background: rgba(255,255,255,0.12); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* ---------- FAQ ---------- */
details.faq summary { cursor: pointer; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .faq-icon { transition: transform 0.2s ease; }
details.faq[open] summary .faq-icon { transform: rotate(45deg); }
details.faq[open] { border-color: rgba(167, 139, 250, 0.25); }

/* ---------- demo animada do controle remoto (seção Em rede) ---------- */
.rc-fade { transition: opacity 0.22s ease; }
#rc-next {
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
#rc-next.rc-pressed {
    transform: scale(0.9);
    background: rgba(82, 62, 247, 0.5);
    border-color: rgba(167, 139, 250, 0.7);
}
@media (prefers-reduced-motion: reduce) {
    .rc-fade, #rc-next { transition: none; }
}

/* ---------- misc ---------- */
.nav-blur { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.divider-v { width: 1px; background: var(--border); }
:focus-visible { outline: 2px solid var(--brand-hi); outline-offset: 2px; border-radius: 4px; }

/* ============ Modal de download ============ */
.dl-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.dl-modal[hidden] { display: none; }
.dl-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 10, 0.72);
    backdrop-filter: blur(6px);
    animation: dlFade 0.18s ease;
}
.dl-card {
    position: relative;
    width: 100%;
    max-width: 26rem;
    overflow: hidden;
    animation: dlPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dlFade { from { opacity: 0 } }
@keyframes dlPop {
    from { opacity: 0; transform: translateY(14px) scale(0.97) }
}
.dl-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.8rem 0.9rem;
    border-radius: 0.7rem;
    border: 1px solid transparent;
    transition: border-color 0.15s, background 0.15s;
    text-align: left;
}
.dl-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(82, 62, 247, 0.35);
}
