/*
Theme Name: Smart FX
Description: NZ Forex Intelligence -- Tailwind CSS, Space Grotesk + Inter, navy/mint/brand-blue palette.
Version: 1.0.0
Text Domain: smartfx
*/

/* -- Nav states --------------------------------------------------------- */

html { scroll-behavior: smooth; }

body { background-color: #f8fafc; }

.nav-clear { background: transparent; }
.nav-clear .nav-logo-text { color: #fff; }
.nav-clear .nav-link { color: rgba(255, 255, 255, 0.8); }
.nav-clear .nav-link:hover { color: #fff; }

.nav-filled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(15, 27, 45, 0.06), 0 4px 20px rgba(15, 27, 45, 0.04);
}
.nav-filled .nav-logo-text { color: #0f1b2d; }
.nav-filled .nav-link { color: #475569; }
.nav-filled .nav-link:hover { color: #0f1b2d; }

.nav-solid {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(15, 27, 45, 0.06), 0 4px 20px rgba(15, 27, 45, 0.04);
}
.nav-solid .nav-logo-text { color: #0f1b2d; }
.nav-solid .nav-link { color: #475569; }
.nav-solid .nav-link:hover { color: #0f1b2d; }

/* Active link underline effect */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 1.5px;
    background: currentColor;
    transition: width 0.2s ease, left 0.2s ease;
}
.nav-link:hover::after {
    width: 60%;
    left: 20%;
}

/* -- Mobile menu -------------------------------------------------------- */

#mob-menu.open {
    transform: translateX(0);
}

/* -- Grid background ---------------------------------------------------- */

.sfx-grid-bg {
    background-image:
        linear-gradient(rgba(148,163,184,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148,163,184,0.03) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 80%);
}

/* -- Scan-line sweep ---------------------------------------------------- */

.sfx-scanline::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(20,204,106,0.018) 40%,
        rgba(20,204,106,0.03) 50%,
        rgba(20,204,106,0.018) 60%,
        transparent 100%
    );
    animation: sfx-scan 8s ease-in-out infinite;
}
@keyframes sfx-scan {
    0%, 100% { top: -200px; }
    50% { top: calc(100% + 200px); }
}

/* -- Mono-style numbers ------------------------------------------------- */

.sfx-mono-num {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* -- Reveal animation --------------------------------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* -- Category cards ----------------------------------------------------- */

.sfx-cat-card {
    box-shadow: 0 1px 2px rgba(15,27,45,0.04);
    border: 1px solid rgba(226,232,240,0.8);
}
.sfx-cat-card:hover {
    box-shadow: 0 4px 24px rgba(15,27,45,0.06);
    border-color: rgba(203,213,225,0.9);
}

/* -- Category pills ----------------------------------------------------- */

.sfx-cat-pill {
    display: inline-block;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0b456e;
    background: #e0effe;
    border-radius: 3px;
    line-height: 1.6;
    font-family: 'Space Grotesk', sans-serif;
}

/* -- Lead card ---------------------------------------------------------- */

.sfx-lead-card {
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}
@media (min-width: 1024px) {
    .sfx-lead-card {
        border-bottom: none;
        padding-bottom: 0;
    }
}

/* -- Selection colour --------------------------------------------------- */

::selection {
    background: rgba(20, 204, 106, 0.15);
    color: inherit;
}

/* -- Prose typography for inner pages ----------------------------------- */

.sfx-prose {
    color: #334155;
    font-size: 1.0625rem;
    line-height: 1.8;
}
.sfx-prose p {
    margin-bottom: 1.25em;
}
.sfx-prose h2 {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #0f1b2d;
    letter-spacing: -0.01em;
    margin-top: 2.5em;
    margin-bottom: 0.75em;
    line-height: 1.3;
}
.sfx-prose h3 {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: #0f1b2d;
    letter-spacing: -0.01em;
    margin-top: 2em;
    margin-bottom: 0.6em;
    line-height: 1.35;
}
.sfx-prose ul, .sfx-prose ol {
    margin-bottom: 1.25em;
    padding-left: 1.5em;
}
.sfx-prose ul { list-style-type: disc; }
.sfx-prose ol { list-style-type: decimal; }
.sfx-prose li {
    margin-bottom: 0.4em;
}
.sfx-prose li strong {
    color: #0f1b2d;
}
.sfx-prose blockquote {
    border-left: 3px solid #14cc6a;
    padding: 1em 1.5em;
    margin: 1.75em 0;
    background: #f0f7ff;
    color: #0b456e;
    font-style: normal;
}
.sfx-prose blockquote p {
    margin-bottom: 0;
}
.sfx-prose a {
    color: #007bc7;
    text-decoration: underline;
    text-decoration-color: rgba(0, 123, 199, 0.3);
    transition: text-decoration-color 0.2s;
}
.sfx-prose a:hover {
    text-decoration-color: rgba(0, 123, 199, 0.8);
}
.sfx-prose strong {
    font-weight: 600;
}
.sfx-prose figure {
    margin: 2em 0;
}
.sfx-prose figcaption {
    margin-top: 0.5em;
    font-size: 0.875rem;
    color: #94a3b8;
    text-align: center;
}

/* -- Line clamp utility ------------------------------------------------- */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
