/**
 * SYSWP Blog — Child theme CSS (self-contained)
 *
 * Bundles the design-system from the landing's /assets/css/custom.css
 * + blog-specific tweaks (prose, pagination, reading progress bar).
 *
 * Mantém o blog 100% self-contained: não depende de paths cross-site.
 */

/* ════════════════════════════════════════════════════════════════
   1. BASE
   ════════════════════════════════════════════════════════════════ */
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ════════════════════════════════════════════════════════════════
   2. DESIGN SYSTEM (mirror landing)
   ════════════════════════════════════════════════════════════════ */

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.gradient-text-blue {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Mesh gradient backgrounds */
.bg-mesh-dark {
    background:
        radial-gradient(at 20% 20%, rgba(37, 99, 235, 0.30) 0px, transparent 50%),
        radial-gradient(at 80% 0%,  rgba(124, 58, 237, 0.30) 0px, transparent 50%),
        radial-gradient(at 0% 80%,  rgba(236, 72, 153, 0.20) 0px, transparent 50%),
        #0f172a;
}
.bg-mesh-light {
    background:
        radial-gradient(at 20% 20%, rgba(37, 99, 235, 0.08) 0px, transparent 50%),
        radial-gradient(at 80% 0%,  rgba(124, 58, 237, 0.08) 0px, transparent 50%),
        #ffffff;
}
.bg-dot-grid {
    background-image: radial-gradient(rgba(15, 23, 42, 0.07) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Glass cards */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}
.glass-dark {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal[data-delay="100"] { transition-delay: 100ms; }
.reveal[data-delay="200"] { transition-delay: 200ms; }
.reveal[data-delay="300"] { transition-delay: 300ms; }
.reveal[data-delay="400"] { transition-delay: 400ms; }
.reveal[data-delay="500"] { transition-delay: 500ms; }

/* Animated blobs */
.blob {
    position: absolute;
    border-radius: 9999px;
    filter: blur(80px);
    opacity: 0.5;
    animation: blobMove 16s ease-in-out infinite;
    pointer-events: none;
}
@keyframes blobMove {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(40px, -50px) scale(1.1); }
    66%      { transform: translate(-30px, 30px) scale(0.95); }
}

/* Card hover lift */
.lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
}

/* Cursor spotlight (hero) */
.spotlight { position: relative; overflow: hidden; }
.spotlight::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        600px circle at var(--mx, 50%) var(--my, 50%),
        rgba(99, 102, 241, 0.18),
        transparent 40%
    );
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1;
}
.spotlight > * { position: relative; z-index: 2; }

/* Magnetic + tilt */
.magnetic {
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}
.tilt {
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
    will-change: transform;
}

/* Animated gradient shimmer */
.gradient-shimmer {
    background: linear-gradient(90deg, #2563eb, #7c3aed, #ec4899, #2563eb);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: shimmer 6s linear infinite;
}
@keyframes shimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Shine on hover */
.shine { position: relative; overflow: hidden; }
.shine::after {
    content: "";
    position: absolute;
    top: 0; left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.18) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: left 0.7s;
    pointer-events: none;
}
.shine:hover::after { left: 130%; }

/* Animated grid background (hero) */
.grid-bg {
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.07) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 100%);
}

/* Floating particles */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.5);
    animation: floatUp 10s linear infinite;
    pointer-events: none;
}
@keyframes floatUp {
    from { transform: translateY(100vh); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    to   { transform: translateY(-10vh); opacity: 0; }
}

/* Glow effects */
.glow-blue   { box-shadow: 0 0 50px -10px rgba(37, 99, 235, 0.5); }
.glow-violet { box-shadow: 0 0 50px -10px rgba(124, 58, 237, 0.5); }

/* Mock code (used in some posts) */
.mock-code {
    font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
    font-size: 13px;
    line-height: 1.6;
}

/* FAQ accordion */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary .icon-plus { transform: rotate(45deg); }
.icon-plus { transition: transform 0.2s ease; }

/* Underline link animation */
.link-underline { position: relative; }
.link-underline::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 0; height: 2px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    transition: width 0.3s ease;
}
.link-underline:hover::after { width: 100%; }

/* Social proof pulse */
.proof-pulse { animation: proofPulse 2s ease-in-out infinite; }
@keyframes proofPulse {
    0%, 100% { transform: scale(1);    opacity: 1;    }
    50%      { transform: scale(1.05); opacity: 0.92; }
}

/* ════════════════════════════════════════════════════════════════
   3. ARTICLE PROSE (blog-specific)
   ════════════════════════════════════════════════════════════════ */
.prose h2 {
    margin-top: 2.4em;
    margin-bottom: 0.6em;
    font-size: 1.875rem;
    line-height: 1.25;
    color: #0f172a;
}
.prose h3 {
    margin-top: 1.8em;
    margin-bottom: 0.5em;
    font-size: 1.5rem;
    color: #1e293b;
}
.prose p {
    line-height: 1.75;
    color: #334155;
}
.prose blockquote {
    border-left: 4px solid #2563eb;
    background: #eff6ff;
    padding: 1.25rem 1.5rem;
    border-radius: 0 0.75rem 0.75rem 0;
    font-style: normal;
    color: #1e293b;
    quotes: none;
}
.prose blockquote p::before,
.prose blockquote p::after { content: none; }
.prose code {
    background: #f1f5f9;
    color: #0f172a;
    padding: 0.15rem 0.4rem;
    border-radius: 0.3rem;
    font-size: 0.875em;
    font-weight: 500;
}
.prose code::before,
.prose code::after { content: none; }
.prose pre {
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}
.prose pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}
.prose img { box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08); }
.prose ul li::marker { color: #2563eb; }
.prose ol li::marker { color: #2563eb; font-weight: 700; }
.prose hr { border: 0; border-top: 1px solid #e2e8f0; margin: 2.5em 0; }
.prose .alignwide  { max-width: 100%; }
.prose .alignfull  { max-width: 100vw; margin-left: calc(50% - 50vw); }
.prose .alignleft  { float: left;  margin: 0 1.5rem 1rem 0; }
.prose .alignright { float: right; margin: 0 0 1rem 1.5rem; }
.prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.875rem; color: #64748b; text-align: center; margin-top: 0.5rem; }
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95em;
}
.prose th {
    background: #f1f5f9;
    text-align: left;
    padding: 0.75em;
    border-bottom: 2px solid #cbd5e1;
}
.prose td {
    padding: 0.75em;
    border-bottom: 1px solid #e2e8f0;
}

/* ════════════════════════════════════════════════════════════════
   4. PAGINATION + READING PROGRESS
   ════════════════════════════════════════════════════════════════ */
.nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.nav-links a,
.nav-links span {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    color: #334155;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}
.nav-links a:hover,
.nav-links .current {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.reading-progress {
    position: fixed;
    top: 64px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    z-index: 49;
    transition: width 0.05s linear;
}

/* ════════════════════════════════════════════════════════════════
   5. REDUCED MOTION
   ════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .gradient-shimmer { animation: none; }
    .particle { display: none; }
}
div#rank-math-toc nav li a {
    font-size: 14px;
    line-height: 1.2px;
    color: #0d1b63;
    transition: all 0.2s ease;
}
div#rank-math-toc nav li a:hover {
    color: #0f5699;
}