/*
Theme Name:   Networker Infinity (Cinematic Child)
Theme URI:    https://www.infinityexplorers.com/
Description:  Dark-premium cinematic child theme for Infinity Explorers. Apple-inspired typography, cinematic hero treatments, and smooth scroll animations layered on top of the Networker parent. Rocket-Loader-safe.
Author:       Infinity Explorers
Author URI:   https://www.infinityexplorers.com/
Template:     networker
Version:      1.0.2
License:      GNU General Public License v3 or later
License URI:  http://www.gnu.org/licenses/gpl-3.0.html
Text Domain:  networker-infinity
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root,
html[data-scheme="light"],
html[data-scheme="dark"] {
    --ix-bg: #08090c;
    --ix-bg-2: #0d1015;
    --ix-surface: #12151c;
    --ix-surface-2: #171b24;
    --ix-border: rgba(255, 255, 255, 0.08);
    --ix-border-strong: rgba(255, 255, 255, 0.14);
    --ix-text: #eef1f6;
    --ix-text-soft: #b9c0cc;
    --ix-text-mute: #7a8290;
    --ix-accent: #e8b75a;
    --ix-accent-2: #7fd8ff;
    --ix-accent-glow: rgba(232, 183, 90, 0.35);
    --ix-serif: "Fraunces", "Playfair Display", Georgia, "Times New Roman", serif;
    --ix-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --ix-ease: cubic-bezier(.2, .8, .2, 1);
    --ix-radius-lg: 18px;
    --ix-radius-md: 12px;
    --ix-shadow-1: 0 6px 24px rgba(0, 0, 0, 0.35);
    --ix-shadow-2: 0 20px 60px rgba(0, 0, 0, 0.55);
}

html,
html[data-scheme],
html[data-scheme="light"],
html[data-scheme="dark"] {
    background-color: var(--ix-bg) !important;
    color-scheme: dark;
}

body {
    background-color: var(--ix-bg) !important;
    color: var(--ix-text) !important;
    font-family: var(--ix-sans) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ==========================================================================
   2. Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6,
.cs-entry__title,
.cs-entry__title a,
.cnvs-section-title,
.cs-banner__title {
    font-family: var(--ix-serif) !important;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ix-text) !important;
    line-height: 1.15;
}

.cs-entry__title,
.cs-entry__title a {
    font-size: clamp(1.15rem, 1.4vw + 0.7rem, 1.6rem);
    transition: color .5s var(--ix-ease);
}

article h1,
.single .cs-entry__title {
    font-size: clamp(2.2rem, 3.2vw + 1rem, 4rem);
    letter-spacing: -0.03em;
}

article h2 { font-size: clamp(1.6rem, 1.5vw + 1rem, 2.2rem); margin-top: 2.5em; }
article h3 { font-size: clamp(1.25rem, 0.8vw + 1rem, 1.55rem); margin-top: 2em; }

article p,
.cs-entry__excerpt {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--ix-text-soft) !important;
    letter-spacing: 0.005em;
}

.single-post .cs-entry__content > p:first-of-type::first-letter {
    font-family: var(--ix-serif);
    font-size: 3.4em;
    line-height: 0.9;
    float: left;
    padding: 0.1em 0.12em 0 0;
    color: var(--ix-accent);
}

/* ==========================================================================
   3. Header
   ========================================================================== */
.cs-header,
.cs-header-three,
.cs-header .cs-header__inner {
    background: rgba(8, 9, 12, 0.55) !important;
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--ix-border);
    transition: background .4s var(--ix-ease), border-color .4s var(--ix-ease);
}
.cs-header a,
.cs-header .cs-header__nav a {
    color: var(--ix-text) !important;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color .35s var(--ix-ease), opacity .35s var(--ix-ease);
}
.cs-header .cs-header__nav a:hover { color: var(--ix-accent) !important; opacity: 1; }
.cs-header.is-scrolled,
.cs-header.is-scrolled .cs-header__inner {
    background: rgba(8, 9, 12, 0.82) !important;
    box-shadow: var(--ix-shadow-1);
}

/* ==========================================================================
   4. Post cards
   ========================================================================== */
.cs-main-content { background: var(--ix-bg) !important; }

.cs-entry-default,
.cs-entry__inner {
    background: var(--ix-surface) !important;
    border: 1px solid var(--ix-border);
    border-radius: var(--ix-radius-lg);
    overflow: hidden;
    transform: translateZ(0);
    transition:
        transform .7s var(--ix-ease),
        border-color .5s var(--ix-ease),
        box-shadow .7s var(--ix-ease),
        background-color .5s var(--ix-ease);
}

.cs-entry-default { padding: 0 !important; margin-bottom: 2rem; }

.cs-entry-default:hover {
    transform: translateY(-6px);
    border-color: var(--ix-border-strong);
    box-shadow: var(--ix-shadow-2);
}

.cs-entry__thumbnail,
.cs-entry__inner.cs-entry__thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: var(--ix-radius-lg) var(--ix-radius-lg) 0 0;
    isolation: isolate;
}
.cs-entry__thumbnail img,
.cs-entry__inner.cs-entry__thumbnail img {
    transition: transform 1.2s var(--ix-ease), filter .8s var(--ix-ease);
    filter: saturate(1.05) contrast(1.04);
}
.cs-entry-default:hover .cs-entry__thumbnail img,
.cs-entry-default:hover .cs-entry__inner.cs-entry__thumbnail img {
    transform: scale(1.06);
    filter: saturate(1.15) contrast(1.08);
}
.cs-entry__thumbnail::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 9, 12, 0.55) 0%, rgba(8, 9, 12, 0) 45%);
    pointer-events: none;
    z-index: 1;
}
.cs-entry__content,
.cs-entry__inner.cs-entry__content { padding: 1.4rem 1.5rem 1.6rem !important; }

.cs-meta-category,
.cs-meta-category a {
    color: var(--ix-accent) !important;
    font-family: var(--ix-sans) !important;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}
.cs-entry__post-meta,
.cs-meta-date,
.cs-meta-reading-time,
.cs-meta-comments {
    color: var(--ix-text-mute) !important;
    font-size: 0.82rem;
}
.cs-entry__title a {
    background-image: linear-gradient(var(--ix-accent), var(--ix-accent));
    background-repeat: no-repeat;
    background-size: 0% 1.5px;
    background-position: 0 100%;
    transition: background-size .5s var(--ix-ease), color .3s var(--ix-ease);
}
.cs-entry-default:hover .cs-entry__title a {
    background-size: 100% 1.5px;
    color: var(--ix-accent) !important;
}
.cs-overlay-ratio.cs-ratio-original .cs-entry__thumbnail,
.cs-overlay-ratio.cs-ratio-original { aspect-ratio: 16 / 9; }

/* ==========================================================================
   5. Section titles
   ========================================================================== */
.cnvs-section-title {
    font-size: clamp(1.6rem, 1.8vw + 1rem, 2.4rem) !important;
    margin-bottom: 1.25rem !important;
    padding-bottom: 0.7rem;
    position: relative;
}
.cnvs-section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 44px;
    height: 2px;
    background: linear-gradient(90deg, var(--ix-accent), transparent);
    border-radius: 2px;
}

/* ==========================================================================
   6. Single post reading experience
   ========================================================================== */
.single-post .cs-main-content { padding-top: 3rem; }
.single-post .cs-entry__header { position: relative; padding: 3rem 0 2rem; text-align: center; }
.single-post .cs-entry__header .cs-meta-category { margin-bottom: 0.8rem; display: inline-block; }
.single-post .cs-entry__thumbnail img {
    border-radius: var(--ix-radius-lg);
    box-shadow: var(--ix-shadow-2);
}
.single-post .cs-entry__thumbnail {
    position: relative;
    border-radius: var(--ix-radius-lg);
    overflow: hidden;
    margin-bottom: 2.5rem;
}
.single-post .cs-entry__thumbnail::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center top, transparent 40%, rgba(8, 9, 12, 0.45) 100%);
    z-index: 2;
    pointer-events: none;
}
.cs-entry__content blockquote {
    border-left: 3px solid var(--ix-accent);
    padding: 0.5rem 1.5rem;
    margin: 2em 0;
    color: var(--ix-text);
    font-family: var(--ix-serif);
    font-size: 1.25em;
    font-style: italic;
    line-height: 1.5;
    background: linear-gradient(90deg, rgba(232, 183, 90, 0.05), transparent);
}
.cs-entry__content a,
.cs-entry__content a:visited {
    color: var(--ix-accent-2);
    text-decoration: none;
    background-image: linear-gradient(var(--ix-accent-2), var(--ix-accent-2));
    background-repeat: no-repeat;
    background-size: 100% 1px;
    background-position: 0 100%;
    transition: color .3s var(--ix-ease), background-size .4s var(--ix-ease);
}
.cs-entry__content a:hover { color: var(--ix-accent); background-size: 100% 2px; }
.cs-entry__content ul li,
.cs-entry__content ol li { margin-bottom: 0.6em; color: var(--ix-text-soft); }
.cs-entry__content img { border-radius: var(--ix-radius-md); box-shadow: var(--ix-shadow-1); }

/* ==========================================================================
   7. Buttons
   ========================================================================== */
.cs-entry__read-more a,
.cs-btn,
.button,
button,
input[type="submit"] {
    background: linear-gradient(135deg, var(--ix-accent), #d49b3a) !important;
    color: #0a0a0a !important;
    font-family: var(--ix-sans) !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.7em 1.4em !important;
    border-radius: 999px !important;
    border: none !important;
    box-shadow: 0 0 0 0 var(--ix-accent-glow);
    transition: transform .4s var(--ix-ease), box-shadow .5s var(--ix-ease), filter .3s var(--ix-ease);
    text-decoration: none !important;
}
.cs-entry__read-more a:hover,
.cs-btn:hover,
.button:hover,
button:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--ix-accent-glow);
    filter: brightness(1.08);
}

/* ==========================================================================
   8. Footer + sidebar
   ========================================================================== */
.cs-footer,
.cs-footer-one {
    background: var(--ix-bg-2) !important;
    border-top: 1px solid var(--ix-border);
    color: var(--ix-text-soft) !important;
}
.cs-footer a { color: var(--ix-text-soft) !important; transition: color .3s var(--ix-ease); }
.cs-footer a:hover { color: var(--ix-accent) !important; }

.widget,
.widget_block {
    background: var(--ix-surface) !important;
    border: 1px solid var(--ix-border);
    border-radius: var(--ix-radius-md);
    padding: 1.25rem !important;
    margin-bottom: 1.5rem;
}
.widget-title, .wp-block-heading {
    color: var(--ix-text) !important;
    font-family: var(--ix-serif) !important;
    font-size: 1.1rem !important;
    letter-spacing: -0.01em;
}

/* ==========================================================================
   9. SCROLL REVEALS — gated on JS success (NEVER hides content if JS fails)
   ========================================================================== */
/*
 * .nix-reveal elements are fully visible by default.
 * Only when JS successfully adds `html.nix-has-reveal` do we enable the
 * opacity-0 starting state. If JS is blocked, cached wrong, mangled by
 * Rocket Loader, or a CDN hiccups — content still renders normally.
 */
html.nix-has-reveal .nix-reveal {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition: opacity .9s var(--ix-ease), transform .9s var(--ix-ease);
    will-change: opacity, transform;
}
html.nix-has-reveal .nix-reveal.is-in-view {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Safety net — after 4 seconds, force-show everything regardless of JS */
@keyframes nix-force-show { to { opacity: 1; transform: none; } }
html.nix-has-reveal .nix-reveal {
    animation: nix-force-show 0s 4s forwards;
}

/* ==========================================================================
  10. Misc
   ========================================================================== */
* { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--ix-accent); color: #000; }
img { image-rendering: -webkit-optimize-contrast; }
.cs-logo img,
.cs-footer__logo img { filter: brightness(1.1) contrast(1.05); }

.cs-header__search-toggle,
.cs-header__scheme-toggle {
    color: var(--ix-text) !important;
    transition: color .3s var(--ix-ease), transform .3s var(--ix-ease);
}
.cs-header__search-toggle:hover,
.cs-header__scheme-toggle:hover { color: var(--ix-accent) !important; transform: scale(1.05); }

.cs-offcanvas { background: rgba(8, 9, 12, 0.96) !important; backdrop-filter: blur(24px); }
.cs-offcanvas a { color: var(--ix-text) !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    html.nix-has-reveal .nix-reveal { opacity: 1 !important; transform: none !important; }
}

@media (max-width: 768px) {
    .single-post .cs-entry__header { padding: 2rem 0 1rem; }
    .cs-entry__content { padding: 1.1rem 1.2rem 1.3rem !important; }
}
