/*
 * Main theme styles for StokeCore by Stoke.
 * Provides a clean baseline without Elementor dependencies.
 */

:root {
        color-scheme: light dark;
        --stokecore-spacing: 1.5rem;
        --stokecore-max-width: min(70rem, 90vw);
        --stokecore-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        --stokecore-border-radius: 0.5rem;
        --stokecore-base-font-size: 1rem;
        --stokecore-base-font-weight: 400;
}

html {
        font-size: 100%;
        -webkit-text-size-adjust: 100%;
}

body:not(.elementor-editor-active) {
        margin: 0;
        font-family: var(--stokecore-font-family);
        font-size: var(--stokecore-base-font-size);
        font-weight: var(--stokecore-base-font-weight);
        line-height: 1.6;
        background-color: var(--wp--preset--color--background, #ffffff);
        color: var(--wp--preset--color--foreground, #1f2933);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        font-kerning: normal;
        text-rendering: optimizeLegibility;
}

body:not(.elementor-editor-active) *,
body:not(.elementor-editor-active) *::before,
body:not(.elementor-editor-active) *::after {
        box-sizing: border-box;
}

body.elementor-editor-active .elementor-panel,
body.elementor-editor-active .elementor-panel * {
        font-family: inherit;
        font-weight: inherit;
        line-height: inherit;
}

a {
        color: var(--wp--preset--color--primary, #0057ff);
        text-decoration: none;
}

a:hover,
a:focus {
        text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
        outline: 3px solid currentColor;
        outline-offset: 3px;
}

.skip-link {
        position: absolute;
        inset-inline-start: 0;
        inset-block-start: -40px;
        background: #000;
        color: #fff;
        padding: 0.75rem 1rem;
        z-index: 100;
        transition: inset-block-start 0.3s ease;
}

.skip-link:focus {
        inset-block-start: 0;
}

.site-header {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(12px);
}

.site-header__inner,
.site-main,
.site-footer__inner {
        margin: 0 auto;
        max-width: var(--stokecore-max-width);
        padding: var(--stokecore-spacing);
}

.site-branding {
        display: flex;
        align-items: center;
        gap: 1rem;
}

.site-title {
        font-size: clamp(1.25rem, 1.1rem + 1vw, 2rem);
        margin: 0;
}

.site-title a {
        color: inherit;
        font-weight: 600;
}

.site-description {
        margin: 0;
        font-size: 0.95rem;
        color: rgba(0, 0, 0, 0.65);
}

.primary-navigation {
        margin-block-start: 1rem;
}

html:not(.has-js) .nav-toggle {
        display: none;
}

.has-js .nav-toggle {
        display: inline-flex;
}

.has-js .primary-navigation {
        display: none;
}

.has-js .primary-navigation[aria-expanded="true"],
.has-js .primary-navigation.is-open {
        display: block;
}

.primary-navigation ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: grid;
        gap: 0.75rem;
}

.primary-navigation a {
        font-weight: 500;
        display: inline-flex;
        align-items: center;
        padding: 0.25rem 0;
}

.nav-toggle {
        appearance: none;
        border: 1px solid rgba(0, 0, 0, 0.2);
        background: transparent;
        color: inherit;
        padding: 0.5rem 0.75rem;
        border-radius: var(--stokecore-border-radius);
        font: inherit;
        cursor: pointer;
        align-items: center;
        gap: 0.5rem;
}

.nav-toggle-icon {
        display: inline-flex;
        flex-direction: column;
        gap: 0.25rem;
}

.nav-toggle-icon span {
        display: block;
        width: 1.25rem;
        height: 2px;
        background: currentColor;
        border-radius: 999px;
}

.site-main > * + * {
        margin-block-start: var(--stokecore-spacing);
}

.entry-title {
        margin: 0 0 0.5rem 0;
        font-size: clamp(1.25rem, 1.1rem + 0.8vw, 2rem);
}

.entry-meta {
        font-size: 0.875rem;
        color: rgba(0, 0, 0, 0.6);
        margin-block-end: 1rem;
}

.post {
        border-block-end: 1px solid rgba(0, 0, 0, 0.08);
        padding-block-end: var(--stokecore-spacing);
        margin-block-end: var(--stokecore-spacing);
}

.post:last-of-type {
        border-block-end: none;
}

.pagination {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        border-block-start: 1px solid rgba(0, 0, 0, 0.08);
        padding-block-start: var(--stokecore-spacing);
}

.site-footer {
        margin-block-start: var(--stokecore-spacing);
        border-block-start: 1px solid rgba(0, 0, 0, 0.08);
        background: rgba(0, 0, 0, 0.02);
}

.site-footer__inner {
        display: grid;
        gap: 1rem;
        text-align: center;
}

.site-footer nav ul {
        list-style: none;
        display: inline-flex;
        gap: 1rem;
        margin: 0;
        padding: 0;
}

.screen-reader-text {
        border: 0;
        clip: rect(1px, 1px, 1px, 1px);
        clip-path: inset(50%);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
        word-wrap: normal !important;
}

.screen-reader-text:focus {
        clip: auto;
        clip-path: none;
        height: auto;
        margin: 0;
        overflow: visible;
        padding: 0.75rem 1rem;
        position: static;
        width: auto;
}

@media (min-width: 48rem) {
        .site-header__inner {
                display: grid;
                grid-template-columns: auto 1fr;
                align-items: center;
                gap: 2rem;
        }

        .primary-navigation,
        .has-js .primary-navigation {
                display: block;
                margin: 0;
        }

        .nav-toggle {
                display: none;
        }

        .primary-navigation ul {
                display: inline-flex;
                gap: 1.5rem;
        }
}

@media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
        }
}
