/* ═══════════════════════════════════════════
   FluxWillow v2.0 — Custom Styles
   Tailwind CDN handles utility classes.
   This file handles: nav state transitions,
   scroll-reveal, rotating verb, accessibility.
   ═══════════════════════════════════════════ */

/* ── Base ────────────────────────────────── */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
html {
    scroll-behavior: smooth;
}
::selection {
    background: #f92672;
    color: #fff;
}
:target {
    scroll-margin-top: 90px;
}

/* ── Scroll-reveal ───────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.55s cubic-bezier(.16, 1, .3, 1),
        transform 0.55s cubic-bezier(.16, 1, .3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ── Navbar — transparent over dark hero, solid when scrolled ── */
#site-nav {
    background: rgba(39, 40, 34, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(73, 72, 62, 0.4);
}
#site-nav.scrolled-light {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid #e8e4dc;
}
#site-nav.scrolled-light .nav-logo-text,
#site-nav.scrolled-light .nav-link-text {
    color: #2d2a25 !important;
}
#site-nav.scrolled-light .nav-link-text:hover {
    color: #f92672 !important;
}
#site-nav.scrolled-light .nav-divider {
    background: #e8e4dc !important;
}
#site-nav.scrolled-light #mobile-toggle {
    color: #2d2a25 !important;
}

/* ── Blinking cursor ─────────────────────── */
@keyframes blink { 50% { opacity: 0; } }
.cursor-blink {
    animation: blink 1.1s infinite;
}

/* ── Hero grid background ────────────────── */
.hero-grid {
    background-image:
        linear-gradient(rgba(249, 38, 114, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(249, 38, 114, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ── Rotating verb ───────────────────────── */
#rotator-wrap {
    position: relative;
    display: inline-block;
    vertical-align: baseline;
}
#rotator {
    display: inline-block;
    color: #f92672;
    min-width: 4ch;
}
.rotator-char {
    display: inline-block;
    will-change: transform, opacity;
}
#rotator-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 3px;
    background: linear-gradient(90deg, #f92672 0%, #fd971f 50%, #e6db74 100%);
    border-radius: 2px;
    opacity: 0.4;
    transform: scaleX(0);
    transform-origin: left;
    animation: underline-grow 0.8s cubic-bezier(.16, 1, .3, 1) forwards;
    animation-delay: 0.6s;
}
@keyframes underline-grow {
    to { transform: scaleX(1); }
}

/* ── Legal page content typography ───────── */
.legal-content h3 {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    color: #1c1b17;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e8e4dc;
}
.legal-content p {
    font-size: 0.9375rem;
    line-height: 1.85;
    color: #615b4f;
    margin-bottom: 1rem;
}
.legal-content strong {
    color: #2d2a25;
    font-weight: 600;
}

/* ── Focus styles ────────────────────────── */
*:focus-visible {
    outline: 2px solid #f92672;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Reduced motion ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .cursor-blink {
        animation: none;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
