/*
Theme Name: SL Feed
Theme URI: https://scannerlicker.net/
Author: Scannerlicker
Author URI: https://scannerlicker.net/
Description: A classic WordPress theme boilerplate for SL Feed.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sl-feed
*/

:root {
    --white: #f5f5f5;
    --black: #231f20;
    --accent: #ff2600;
}

@font-face {
    font-family: 'Sebenta';
    src: url('assets/fonts/Sebenta-Regular.woff2') format('woff2'),
         url('assets/fonts/Sebenta-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Sebenta', sans-serif;
    background-color: var(--white);
    color: var(--black);
    font-size: 20px;
}

.site-header {
    width: 100%;
    overflow: hidden;
    position: fixed;
    top: -4.05vw;
    left: 0;
    z-index: 1000;
    filter: blur(0.2vw);
    color: var(--black);
    transition: filter 0.4s ease, color 0.4s ease;
}

#site-menu-toggle,
#site-subheader-toggle,
#site-subheader-back {
    all: unset;
    width: 100%;
    cursor: pointer;
    display: block;
}

.site-header h1 {
    margin: 0;
    padding: 0;
    width: 100%;
    font-size: 16.2vw;
    line-height: 1;
    white-space: nowrap;
    display: block;
    transition: color 0.4s ease;
}

.site-subheader {
    width: 100%;
    overflow: hidden;
    position: fixed;
    top: 10vw;
    left: 0;
    z-index: 1;
    filter: blur(0.4vw);
    color: var(--black);
    transition: filter 0.4s ease, color 0.4s ease;
}

.site-subheader h1 {
    margin: 0;
    padding: 0;
    width: 100%;
    font-size: 16.2vw;
    line-height: 1;
    white-space: nowrap;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none; /* Text is non-pointer-interactive, but button parent is */
    transition: color 0.4s ease;
}

.site-main {
    margin-top: 28.35vw;
    position: relative;
    z-index: 10;
    background-color: var(--white);
    transition: filter 0.4s ease;
}

.site-description {
    padding: 8vw 4.05vw;
    color: var(--black);
    font-size: 2.5rem;
    line-height: 1.1;
}

@media (min-width: 768px) {
    .site-description {
        font-size: 4rem;
        padding: 6vw 4.05vw;
    }
}

@media (min-width: 1024px) {
    .site-description {
        font-size: 6rem;
        padding: 4vw 4.05vw;
    }
}

@media (orientation: landscape) {
    .site-description {
        grid-column: span 2;
    }
}

/* Navigation Overlay */
.site-navigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 5000;
    display: block; /* Reverting to block for inline children */
    padding: 4rem; /* Aligned with the subheader start */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.site-navigation.is-active {
    opacity: 1;
    pointer-events: auto;
}

.site-navigation ul,
.site-navigation li {
    display: inline;
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-navigation a,
#site-menu-close {
    display: inline-block;
    font-size: 8vw;
    text-decoration: none;
    color: var(--black);
    line-height: 1;
    white-space: nowrap;
    padding-right: 1em; /* This is the em space between elements */
}

#site-menu-close {
    all: unset;
    display: inline-block;
    font-size: 8vw;
    cursor: pointer;
    color: var(--black);
    line-height: 1;
}

.site-navigation a:hover,
#site-menu-close:hover {
    color: var(--accent);
}

/* Enhanced blur when menu is active */
body:has(.site-navigation.is-active) .site-header,
body:has(.site-navigation.is-active) .site-subheader,
body:has(.site-navigation.is-active) .site-main,
body:has(.site-navigation.is-active) .site-footer {
    filter: blur(5vw) !important;
}

/* Interactive Focus Blur Logic */
body:has(.site-header:hover) .site-main,
body:has(.site-header:hover) .site-footer { filter: blur(1vw); }
body:has(.site-header:hover) .site-subheader { filter: blur(2vw); }

body:has(.site-main:hover) .site-header,
body:has(.site-main:hover) .site-subheader,
body:has(.site-footer:hover) .site-header,
body:has(.site-footer:hover) .site-subheader { filter: blur(1vw); }

body:has(.site-subheader:hover) .site-main,
body:has(.site-subheader:hover) .site-footer { filter: blur(1vw); }
body:has(.site-subheader:hover) .site-header { filter: blur(2vw); }

.site-header:hover,
.site-subheader:hover,
.site-main:hover,
.site-main:has(+ .site-footer:hover), /* Targets main when footer is hovered */
.site-footer:hover {
    filter: blur(0) !important;
}

/* Ensure Main and Footer unblur together */
body:has(.site-main:hover) .site-footer,
body:has(.site-footer:hover) .site-main {
    filter: blur(0) !important;
}

.site-header:hover h1,
.site-subheader:hover h1 {
    color: var(--accent);
}

.feed-item {
    position: relative;
}

.feed-item img {
    width: 100%;
    height: auto;
    display: block;
}

@media (orientation: landscape) {
    .site-main {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
    .single .site-main {
        display: block;
    }
    #feed-sentinel {
        grid-column: span 2;
    }
}

.feed-item-content img {
    width: 100%;
    height: auto;
    margin: 1rem 0;
}

.site-footer {
    padding: 2rem;
    text-align: left;
    font-size: 1rem;
    background-color: var(--black);
    color: var(--white);
    transition: filter 0.4s ease;
}

.feed-item-meta {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    z-index: 5;
}

.feed-item-title {
    display: inline-block;
    font-size: 2rem;
    line-height: 1;
    margin: 0;
    margin-bottom: 8px;
}

.feed-item-title a {
    text-decoration: none;
    pointer-events: auto;
    background-color: var(--black);
    color: var(--white);
    padding: 0.5rem 0.6rem 0.3rem 0.6rem;
    border-radius: 5px;
}

.feed-item-title a:hover {
    color: var(--white);
    background-color: var(--accent);
    cursor: pointer;
}

.feed-item-date {
    display: block;
    background-color: var(--black);
    color: var(--white);
    padding: 0.4rem 0.5rem;
    font-size: 1rem;
    line-height: 1;
    margin-top: 0.2rem;
    text-transform: uppercase;
    border-radius: 5px;
}

.feed-item-link {
    display: inline-block;
    background-color: var(--black);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    font-size: 1rem;
    line-height: 1;
    margin-top: 0.2rem;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.feed-item-link:hover {
    background-color: var(--accent);
    color: var(--white);
}

.feed-item-tags {
    margin-top: 1vw;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag-button {
    display: inline-block;
    padding: 0.2em 0.6em;
    background-color: var(--black);
    backdrop-filter: blur(5px);
    border-radius: 1em;
    font-size: 1rem;
    text-decoration: none;
    color: var(--white);
    transition: background 0.3s ease;
    pointer-events: auto; /* Ensure buttons are clickable */
}

.tag-button:hover {
    background-color: var(--accent);
    cursor: pointer;
}

/* Loading Progress Bar */
.loading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 100vh;
    background-color: var(--accent);
    z-index: 9999;
    mix-blend-mode: multiply;
    pointer-events: none;
    transition: width 0.2s ease-in;
}

.loading-progress.is-loading {
    width: 100%;
}
