/*
Theme Name: Newada
Theme URI: https://newada.de
Author: Newada
Description: Dark, gritty theme for the Newada book universe. Grunge aesthetics with blood-red accents.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newada
Tags: dark, one-column, custom-menu, featured-images, translation-ready
*/

/* ============================================
   LOCAL FONTS (DSGVO-konform, kein Google CDN)
   ============================================ */
@font-face {
    font-family: 'Bebas Neue';
    src: url('./assets/fonts/bebas-neue-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('./assets/fonts/inter-light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('./assets/fonts/inter-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('./assets/fonts/inter-semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   RESET & BASE
   ============================================ */
:root {
    --nw-black: #0a0a0a;
    --nw-dark: #111111;
    --nw-dark-mid: #1a1a1a;
    --nw-gray: #2a2a2a;
    --nw-gray-mid: #555555;
    --nw-gray-light: #999999;
    --nw-white: #e0ddd5;
    --nw-red: #8b1a1a;
    --nw-red-bright: #a52a2a;
    --nw-red-glow: rgba(139, 26, 26, 0.3);
    --nw-font-body: 'Inter', 'Segoe UI', sans-serif;
    --nw-font-heading: 'Bebas Neue', 'Impact', sans-serif;
    --nw-max-width: 1200px;
    --nw-transition: 0.3s ease;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--nw-font-body);
    background-color: var(--nw-black);
    color: var(--nw-white);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Grain overlay on body */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--nw-font-heading);
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nw-white);
    line-height: 1.1;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.4rem; }

p {
    margin-bottom: 1.2em;
    color: var(--nw-gray-light);
}

a {
    color: var(--nw-red-bright);
    text-decoration: none;
    transition: color var(--nw-transition);
}

a:hover {
    color: var(--nw-white);
}

/* ============================================
   LAYOUT
   ============================================ */
.nw-container {
    max-width: var(--nw-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.nw-section {
    padding: 5rem 0;
}

.nw-section--bordered {
    border-top: 1px solid var(--nw-gray);
}

/* ============================================
   HEADER
   ============================================ */
.nw-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--nw-gray);
    transition: background var(--nw-transition);
}

.nw-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--nw-max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
}

.nw-header__logo {
    font-family: var(--nw-font-heading);
    font-size: 1.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--nw-white);
    text-decoration: none;
}

.nw-header__logo:hover {
    color: var(--nw-red-bright);
}

/* Navigation */
.nw-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nw-nav a {
    font-family: var(--nw-font-heading);
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--nw-gray-light);
    text-decoration: none;
    transition: color var(--nw-transition);
    position: relative;
}

.nw-nav a:hover,
.nw-nav .current-menu-item a {
    color: var(--nw-white);
}

.nw-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--nw-red);
    transition: width var(--nw-transition);
}

.nw-nav a:hover::after,
.nw-nav .current-menu-item a::after {
    width: 100%;
}

/* Mobile menu toggle */
.nw-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nw-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--nw-white);
    margin: 5px 0;
    transition: var(--nw-transition);
}

/* ============================================
   HERO (Front Page)
   ============================================ */
.nw-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-top: 4rem;
}

.nw-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 40%, var(--nw-black) 100%);
    z-index: 1;
}

.nw-hero__content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 2rem;
}

.nw-hero__cover {
    max-width: 320px;
    width: 100%;
    margin: 0 auto 2.5rem;
    box-shadow:
        0 0 40px var(--nw-red-glow),
        0 20px 60px rgba(0, 0, 0, 0.8);
    transition: transform var(--nw-transition), box-shadow var(--nw-transition);
}

.nw-hero__cover:hover {
    transform: scale(1.02);
    box-shadow:
        0 0 60px var(--nw-red-glow),
        0 25px 70px rgba(0, 0, 0, 0.9);
}

.nw-hero__title {
    margin-bottom: 1rem;
    text-shadow: 0 0 30px var(--nw-red-glow);
}

.nw-hero__subtitle {
    font-size: 1.1rem;
    color: var(--nw-gray-light);
    font-style: italic;
    margin-bottom: 2rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.nw-btn {
    display: inline-block;
    font-family: var(--nw-font-heading);
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.9rem 2.5rem;
    border: 1px solid var(--nw-red);
    color: var(--nw-white);
    background: transparent;
    cursor: pointer;
    transition: all var(--nw-transition);
    text-decoration: none;
}

.nw-btn:hover {
    background: var(--nw-red);
    color: var(--nw-white);
    box-shadow: 0 0 20px var(--nw-red-glow);
}

.nw-btn--filled {
    background: var(--nw-red);
}

.nw-btn--filled:hover {
    background: var(--nw-red-bright);
}

/* ============================================
   CARDS (Books, Fanart, News)
   ============================================ */
.nw-grid {
    display: grid;
    gap: 2rem;
}

.nw-grid--2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.nw-grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.nw-card {
    background: var(--nw-dark);
    border: 1px solid var(--nw-gray);
    overflow: hidden;
    transition: border-color var(--nw-transition), transform var(--nw-transition);
}

.nw-card:hover {
    border-color: var(--nw-red);
    transform: translateY(-3px);
}

.nw-card__image {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}

.nw-card__image--landscape {
    aspect-ratio: 16/9;
}

.nw-card__body {
    padding: 1.5rem;
}

.nw-card__title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.nw-card__title a {
    color: var(--nw-white);
}

.nw-card__title a:hover {
    color: var(--nw-red-bright);
}

.nw-card__meta {
    font-size: 0.8rem;
    color: var(--nw-gray-mid);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.8rem;
}

.nw-card__excerpt {
    font-size: 0.95rem;
    color: var(--nw-gray-light);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.nw-section__header {
    margin-bottom: 3rem;
}

.nw-section__title {
    display: inline-block;
    position: relative;
    padding-bottom: 0.5rem;
}

.nw-section__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--nw-red);
}

/* ============================================
   SINGLE POST / PAGE
   ============================================ */
.nw-content {
    padding-top: 7rem;
    padding-bottom: 4rem;
}

.nw-content__article {
    max-width: 750px;
    margin: 0 auto;
}

.nw-content__article h1 {
    margin-bottom: 0.5rem;
}

.nw-content__article .nw-card__meta {
    margin-bottom: 2rem;
}

.nw-content__article p,
.nw-content__article li {
    font-size: 1.05rem;
    line-height: 1.8;
}

.nw-content__article img {
    max-width: 100%;
    height: auto;
}

.nw-content__article blockquote {
    border-left: 3px solid var(--nw-red);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--nw-dark);
    font-style: italic;
    color: var(--nw-gray-light);
}

/* ============================================
   FOOTER
   ============================================ */
.nw-footer {
    background: var(--nw-dark);
    border-top: 1px solid var(--nw-gray);
    padding: 3rem 0 2rem;
}

.nw-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: start;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: var(--nw-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.nw-footer__brand {
    font-family: var(--nw-font-heading);
    font-size: 1.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--nw-gray-mid);
}

.nw-footer__copy {
    width: 100%;
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--nw-gray);
    font-size: 0.8rem;
    color: var(--nw-gray-mid);
}

.nw-footer__nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nw-footer__nav a {
    color: var(--nw-gray-mid);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nw-footer__nav a:hover {
    color: var(--nw-white);
}

/* ============================================
   PAGINATION
   ============================================ */
.nw-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.nw-pagination a,
.nw-pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--nw-gray);
    color: var(--nw-gray-light);
    font-family: var(--nw-font-heading);
    letter-spacing: 0.05em;
    transition: all var(--nw-transition);
}

.nw-pagination a:hover {
    border-color: var(--nw-red);
    color: var(--nw-white);
}

.nw-pagination .current {
    background: var(--nw-red);
    border-color: var(--nw-red);
    color: var(--nw-white);
}

/* ============================================
   LIGHTBOX (Fanart)
   ============================================ */
.nw-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nw-lightbox.is-active {
    display: flex;
}

.nw-lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nw-menu-toggle {
        display: block;
    }

    .nw-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--nw-dark);
        border-left: 1px solid var(--nw-gray);
        padding: 5rem 2rem 2rem;
        transition: right var(--nw-transition);
        z-index: 999;
    }

    .nw-nav.is-open {
        right: 0;
    }

    .nw-nav ul {
        flex-direction: column;
        gap: 1.5rem;
    }

    .nw-nav a {
        font-size: 1.2rem;
    }

    .nw-hero__cover {
        max-width: 240px;
    }

    .nw-grid--2,
    .nw-grid--3 {
        grid-template-columns: 1fr;
    }

    .nw-footer__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .nw-footer__nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ============================================
   WORDPRESS ALIGNMENT CLASSES
   ============================================ */
.alignleft { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin: 1.5rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--nw-gray-mid); margin-top: 0.5rem; }

/* Screen reader text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute;
    height: 1px;
    width: 1px;
    overflow: hidden;
}
