/*
Theme Name: ZERO
Theme URI: https://levelnoon.com/zero
Author: Walter Ivaldo — LevelNoon
Author URI: https://levelnoon.com
Description: ZERO is a clean, minimalist WordPress theme designed for total control. Built-in white-label engine lets you hide every CMS trace, mask system URLs, toggle page components on/off, and apply your own branding — all from a single secure config panel. No plugins needed. By LevelNoon.
Version: 0.2.4
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zero
Tags: custom-logo, custom-menu, featured-images, full-width-template, theme-options, translation-ready
*/

/* ==========================================================================
   Design Tokens
   ========================================================================== */

:root {
    --zero-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --zero-mono: 'SF Mono', 'Fira Code', monospace;

    /* Colors — Slate palette (Tailwind-inspired) */
    --zero-50:  #f8fafc;
    --zero-100: #f1f5f9;
    --zero-200: #e2e8f0;
    --zero-300: #cbd5e1;
    --zero-400: #94a3b8;
    --zero-500: #64748b;
    --zero-600: #475569;
    --zero-700: #334155;
    --zero-800: #1e293b;
    --zero-900: #0f172a;
    --zero-950: #020617;

    /* Semantic */
    --zero-text:       var(--zero-900);
    --zero-text-light: var(--zero-500);
    --zero-text-muted: var(--zero-400);
    --zero-bg:         #ffffff;
    --zero-bg-alt:     var(--zero-50);
    --zero-border:     var(--zero-200);
    --zero-primary:    var(--zero-900);
    --zero-accent:     #3b82f6;
    --zero-accent-hover: #2563eb;

    /* Layout */
    --zero-max-w: 1200px;
    --zero-content-w: 780px;
    --zero-gap: 2rem;
    --zero-radius: 8px;
    --zero-radius-lg: 12px;

    /* Transitions */
    --zero-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --zero-duration: 0.2s;
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--zero-font);
    color: var(--zero-text);
    background-color: var(--zero-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: var(--zero-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1.5em; }

a {
    color: var(--zero-accent);
    text-decoration: none;
    transition: color var(--zero-duration) var(--zero-ease);
}
a:hover { color: var(--zero-accent-hover); }

img { max-width: 100%; height: auto; display: block; }

/* ==========================================================================
   Layout
   ========================================================================== */

.zero-container {
    max-width: var(--zero-max-w);
    margin: 0 auto;
    padding: 0 var(--zero-gap);
}

.zero-content-area {
    max-width: var(--zero-content-w);
    margin: 0 auto;
}

.zero-site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.zero-site-content {
    flex: 1;
    padding: var(--zero-gap) 0;
}

/* ==========================================================================
   Header — Glassmorphism sticky navbar
   ========================================================================== */

.zero-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--zero-border);
    padding: 0;
    transition: box-shadow var(--zero-duration) var(--zero-ease);
}

.zero-header:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.zero-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

/* Logo / Brand */
.zero-site-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.zero-logo {
    max-height: 36px;
    width: auto;
}

.zero-logo-link {
    display: flex;
    align-items: center;
}

.zero-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--zero-primary);
    text-decoration: none;
    letter-spacing: -0.03em;
}

.zero-logo-text:hover {
    color: var(--zero-accent);
}

.zero-site-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.zero-site-title a {
    color: var(--zero-primary);
    text-decoration: none;
}

.zero-site-description {
    font-size: 0.8rem;
    color: var(--zero-text-muted);
    margin: 0;
}

/* ==========================================================================
   Navigation — Clean horizontal with hover effects
   ========================================================================== */

.zero-nav {
    display: flex;
    align-items: center;
}

.zero-nav ul,
.zero-nav .zero-menu {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.zero-nav li {
    position: relative;
}

.zero-nav a {
    display: block;
    color: var(--zero-600);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    transition: all var(--zero-duration) var(--zero-ease);
    white-space: nowrap;
}

.zero-nav a:hover {
    color: var(--zero-900);
    background: var(--zero-100);
}

.zero-nav .current-menu-item > a,
.zero-nav .current_page_item > a {
    color: var(--zero-accent);
    background: rgba(59, 130, 246, 0.08);
    font-weight: 600;
}

/* Dropdown (submenu) */
.zero-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--zero-200);
    border-radius: var(--zero-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    min-width: 200px;
    padding: 0.375rem;
    z-index: 999;
    margin-top: 4px;
}

.zero-nav li:hover > .sub-menu {
    display: block;
    animation: zeroFadeDown 0.15s var(--zero-ease);
}

@keyframes zeroFadeDown {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.zero-nav .sub-menu a {
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}

.zero-nav .sub-menu a:hover {
    background: var(--zero-50);
}

/* Hamburger button */
.zero-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background var(--zero-duration) var(--zero-ease);
}

.zero-menu-toggle:hover {
    background: var(--zero-100);
}

.zero-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 20px;
}

.zero-hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--zero-700);
    border-radius: 2px;
    transition: all 0.3s var(--zero-ease);
}

/* Hamburger → X animation */
.zero-menu-toggle.active .zero-hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.zero-menu-toggle.active .zero-hamburger span:nth-child(2) {
    opacity: 0;
}
.zero-menu-toggle.active .zero-hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================================================
   Footer — Modern dark footer
   ========================================================================== */

.zero-footer {
    background: var(--zero-900);
    color: var(--zero-400);
    padding: 0;
    font-size: 0.875rem;
}

.zero-footer a {
    color: var(--zero-300);
    transition: color var(--zero-duration) var(--zero-ease);
}

.zero-footer a:hover {
    color: #fff;
}

/* Footer top: brand + menu */
.zero-footer__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 3rem 0 2rem;
    gap: 2rem;
    flex-wrap: wrap;
}

.zero-footer__brand {
    max-width: 300px;
}

.zero-footer__logo {
    max-height: 32px;
    width: auto;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.zero-footer__name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.zero-footer__desc {
    font-size: 0.8125rem;
    color: var(--zero-500);
    margin: 0.5rem 0 0;
    line-height: 1.6;
}

/* Footer nav */
.zero-footer__nav {
    display: flex;
    align-items: flex-start;
}

.zero-footer__menu {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.zero-footer__menu a {
    display: block;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: var(--zero-400);
}

.zero-footer__menu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* Footer divider */
.zero-footer__divider {
    height: 1px;
    background: var(--zero-800);
}

/* Footer bottom: copyright */
.zero-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.zero-footer__copy {
    font-size: 0.8125rem;
    color: var(--zero-600);
    margin: 0;
}

.zero-footer__links {
    display: flex;
    gap: 1.25rem;
}

.zero-footer__links a {
    font-size: 0.8125rem;
    color: var(--zero-600);
}

.zero-footer__links a:hover {
    color: var(--zero-300);
}

/* ==========================================================================
   Posts & Content
   ========================================================================== */

.zero-entry {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--zero-border);
}

.zero-entry:last-child { border-bottom: none; }

.zero-entry__title { margin-bottom: 0.5rem; }
.zero-entry__title a { color: var(--zero-primary); }
.zero-entry__title a:hover { color: var(--zero-accent); }

.zero-entry__meta {
    font-size: 0.8125rem;
    color: var(--zero-text-light);
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.zero-entry__meta a { color: var(--zero-text-light); }

.zero-entry__thumbnail {
    margin-bottom: 1.5rem;
    border-radius: var(--zero-radius-lg);
    overflow: hidden;
}

.zero-entry__content {
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.zero-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

.zero-sidebar .widget {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--zero-bg-alt);
    border-radius: var(--zero-radius);
    border: 1px solid var(--zero-border);
}

.zero-sidebar .widget-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--zero-text-light);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--zero-border);
}

/* ==========================================================================
   Comments
   ========================================================================== */

.zero-comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--zero-border);
}

.zero-comments .comment {
    margin-bottom: 1rem;
    padding: 1.25rem;
    background: var(--zero-bg-alt);
    border-radius: var(--zero-radius);
    border: 1px solid var(--zero-border);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.zero-breadcrumbs {
    font-size: 0.8125rem;
    color: var(--zero-text-muted);
    margin-bottom: 1.5rem;
}

.zero-breadcrumbs a { color: var(--zero-text-light); }
.zero-breadcrumbs a:hover { color: var(--zero-accent); }
.zero-breadcrumbs span.separator { margin: 0 0.5rem; color: var(--zero-300); }

/* ==========================================================================
   Post Navigation
   ========================================================================== */

.zero-post-nav {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 0;
    border-top: 1px solid var(--zero-border);
    margin-top: 2rem;
    gap: 1rem;
}

.zero-post-nav a {
    font-weight: 500;
    font-size: 0.875rem;
}

/* ==========================================================================
   404 & Search
   ========================================================================== */

.zero-404, .zero-search-results {
    text-align: center;
    padding: 4rem 0;
}

.zero-404 h1 {
    font-size: 6rem;
    color: var(--zero-200);
    letter-spacing: -0.05em;
}

.zero-search-form {
    display: flex;
    max-width: 480px;
    margin: 2rem auto;
}

.zero-search-form input[type="search"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--zero-border);
    border-right: none;
    border-radius: var(--zero-radius) 0 0 var(--zero-radius);
    font-size: 0.875rem;
    font-family: var(--zero-font);
    outline: none;
    transition: border-color var(--zero-duration) var(--zero-ease);
}

.zero-search-form input[type="search"]:focus {
    border-color: var(--zero-accent);
}

.zero-search-form button {
    padding: 0.75rem 1.5rem;
    background: var(--zero-primary);
    color: white;
    border: none;
    border-radius: 0 var(--zero-radius) var(--zero-radius) 0;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: var(--zero-font);
    font-weight: 500;
    transition: background var(--zero-duration) var(--zero-ease);
}

.zero-search-form button:hover {
    background: var(--zero-accent);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --zero-gap: 1rem;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

    /* Mobile nav */
    .zero-menu-toggle {
        display: flex;
    }

    .zero-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--zero-200);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
        padding: 0.5rem 1rem 1rem;
    }

    .zero-nav.open {
        display: block;
        animation: zeroFadeDown 0.2s var(--zero-ease);
    }

    .zero-nav ul,
    .zero-nav .zero-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .zero-nav a {
        padding: 0.75rem 1rem;
        border-radius: var(--zero-radius);
        font-size: 0.9375rem;
    }

    .zero-nav .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 0 0 1rem;
        margin-top: 0;
        min-width: auto;
    }

    .zero-nav li:hover > .sub-menu {
        animation: none;
    }

    .zero-header__inner {
        position: relative;
    }

    /* Sidebar stacks */
    .zero-with-sidebar {
        grid-template-columns: 1fr;
    }

    /* Footer stacks */
    .zero-footer__top {
        flex-direction: column;
        padding: 2rem 0 1.5rem;
    }

    .zero-footer__bottom {
        flex-direction: column;
        text-align: center;
    }

    .zero-footer__menu {
        flex-direction: column;
        gap: 0;
    }
}

/* ==========================================================================
   Utility — Component Visibility (Customizer / AdminConfig controlled)
   ========================================================================== */

body.zero-hide-header .zero-header { display: none !important; }
body.zero-hide-footer .zero-footer { display: none !important; }
body.zero-hide-sidebar .zero-sidebar { display: none !important; }
body.zero-hide-sidebar .zero-with-sidebar { grid-template-columns: 1fr; }
body.zero-hide-page-title .zero-entry__title { display: none !important; }
body.zero-hide-post-nav .zero-post-nav { display: none !important; }
body.zero-hide-comments .zero-comments { display: none !important; }
body.zero-hide-post-meta .zero-entry__meta { display: none !important; }
body.zero-hide-breadcrumbs .zero-breadcrumbs { display: none !important; }
body.zero-hide-featured-image .zero-entry__thumbnail { display: none !important; }

/* ==========================================================================
   Back to Top Button
   ========================================================================== */

.zero-btt {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--zero-900);
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s var(--zero-ease);
    text-decoration: none;
    cursor: pointer;
}

.zero-btt.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.zero-btt:hover {
    background: var(--zero-accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

@media (max-width: 768px) {
    .zero-btt {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 40px;
        height: 40px;
    }
}

