/*
Theme Name: f-foerster.digital Theme
Theme URI: https://www.foerster.digital/
Author: foerster.digital
Author URI: https://www.foerster.digital/
Description: Schlankes Gutenberg-Theme für foerster.digital mit zentralen Design-, Text-, SEO/GEO- und Performance-Einstellungen.
Version: 1.0.3
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: f-foerster-digital-theme
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

@font-face {
    font-family: "Nunito Sans";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("assets/fonts/nunito-sans-latin-variable.woff2") format("woff2");
}

:root {
    --ffd-primary: #e7b521;
    --ffd-accent: #171717;
    --ffd-text: #252525;
    --ffd-heading: #111111;
    --ffd-muted: #6b6b6b;
    --ffd-bg: #ffffff;
    --ffd-surface: #f5f5f2;
    --ffd-header-bg: #171717;
    --ffd-header-text: #ffffff;
    --ffd-footer-bg: #171717;
    --ffd-footer-text: #ffffff;
    --ffd-border: color-mix(in srgb, var(--ffd-text) 14%, transparent);
    --ffd-content: 820px;
    --ffd-wide: 1280px;
    --ffd-radius: 10px;
    --ffd-logo-width: 230px;
    --ffd-shadow: 0 16px 45px rgba(0,0,0,.08);
    --ffd-font: "Nunito Sans", "Avenir Next", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--ffd-bg);
    color: var(--ffd-text);
    font-family: var(--ffd-font);
    font-size: 18px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body.ffd-menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0 0 1.6rem; }
a { color: inherit; text-underline-offset: .16em; text-decoration-thickness: 1px; }
a:hover, a:focus { color: var(--ffd-primary); }
button, input, textarea, select { font: inherit; }
button, .button, .wp-element-button, .wp-block-button__link, input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 46px;
    border: 1px solid var(--ffd-accent);
    border-radius: var(--ffd-radius);
    background: var(--ffd-accent);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    line-height: 1.15;
    padding: .75rem 1.15rem;
    text-decoration: none;
    transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
button:hover, button:focus, .button:hover, .button:focus, .wp-element-button:hover, .wp-element-button:focus,
.wp-block-button__link:hover, .wp-block-button__link:focus, input[type="submit"]:hover, input[type="submit"]:focus {
    border-color: var(--ffd-primary);
    background: var(--ffd-primary);
    color: var(--ffd-accent);
    transform: translateY(-1px);
}
input[type="text"], input[type="search"], input[type="email"], input[type="url"], textarea, select {
    width: 100%;
    border: 1px solid var(--ffd-border);
    border-radius: var(--ffd-radius);
    background: #fff;
    color: var(--ffd-text);
    padding: .75rem .85rem;
}
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    color: var(--ffd-heading);
    font-family: var(--ffd-font);
    font-weight: 700;
    line-height: 1.12;
    text-wrap: balance;
}
h1 { font-size: clamp(2.35rem, 6vw, 4.8rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.025em; }
h3 { font-size: clamp(1.35rem, 2.5vw, 1.85rem); }
p, ul, ol { margin-top: 0; margin-bottom: 1.25rem; }
hr { border: 0; border-top: 1px solid var(--ffd-border); margin: 2.5rem 0; }
blockquote { margin: 2rem 0; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
    top: .5rem; left: .5rem; z-index: 100000;
    width: auto; height: auto; margin: 0;
    clip: auto; overflow: visible;
    background: #fff; color: #111;
    padding: .8rem 1rem; box-shadow: var(--ffd-shadow);
}

.ffd-container { width: min(calc(100% - 2.4rem), var(--ffd-wide)); margin-inline: auto; }
.site-main { min-height: 55vh; }
.entry-shell { width: min(calc(100% - 2.4rem), var(--ffd-content)); margin-inline: auto; padding: clamp(3rem, 7vw, 6rem) 0; }
.entry-content > :where(:not(.alignwide):not(.alignfull)) { max-width: var(--ffd-content); margin-inline: auto; }
.entry-content > .alignwide { width: min(calc(100% - 2.4rem), var(--ffd-wide)); max-width: none; margin-inline: auto; }
.entry-content > .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-right: calc(50% - 50vw);
    margin-left: calc(50% - 50vw);
}
.page.ffd-page-layout-wide .entry-content > :where(:not(.alignfull)),
.page-template-page-full-width .entry-content > :where(:not(.alignfull)) {
    width: min(calc(100% - 2.4rem), var(--ffd-wide));
    max-width: none;
    margin-inline: auto;
}
.page.ffd-page-layout-full .entry-content > :where(:not(.alignwide):not(.alignfull)) {
    width: 100%;
    max-width: none;
    padding-inline: 1.2rem;
}
.page.ffd-page-layout-full .entry-content > .alignwide {
    width: 100%;
    max-width: none;
    padding-inline: 1.2rem;
}
.entry-content::after { content: ""; display: table; clear: both; }
.front-page-content { margin: 0; padding: 0; }
.front-page-content > :first-child { margin-top: 0 !important; margin-block-start: 0 !important; }
.front-page-content > :last-child { margin-bottom: 0; }

.site-header {
    position: relative;
    z-index: 1000;
    background: var(--ffd-header-bg);
    color: var(--ffd-header-text);
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.ffd-sticky-header .site-header { position: sticky; top: 0; }
.admin-bar.ffd-sticky-header .site-header { top: 32px; }
.ffd-header-shadow .site-header { box-shadow: 0 8px 30px rgba(0,0,0,.05); }
.header-inner { display: flex; align-items: center; min-height: 86px; gap: 1.8rem; }
.site-branding { flex: 0 0 auto; min-width: 0; }
.custom-logo-link { display: block; }
.custom-logo { width: auto; max-width: var(--ffd-logo-width); max-height: 62px; object-fit: contain; }
.site-title { margin: 0; font-size: 1.35rem; font-weight: 700; line-height: 1; }
.site-title a { text-decoration: none; }
.site-description { margin: .25rem 0 0; color: var(--ffd-muted); font-size: .82rem; line-height: 1.2; }
.primary-navigation { margin-left: auto; }
.primary-navigation ul { display: flex; align-items: center; gap: 1.55rem; margin: 0; padding: 0; list-style: none; }
.primary-navigation a { display: block; color: var(--ffd-header-text); font-size: 1.08rem; font-weight: 700; text-decoration: none; }
.primary-navigation a:hover,
.primary-navigation a:focus { color: var(--ffd-primary); }
.primary-navigation .current-menu-item > a {
    color: var(--ffd-header-text);
    box-shadow: inset 0 -2px 0 var(--ffd-primary);
}
.header-cta { flex: 0 0 auto; }
.header-cta .button {
    min-height: 44px;
    border-color: var(--ffd-primary);
    background: var(--ffd-primary);
    color: var(--ffd-accent);
    padding: .7rem 1.05rem;
}
.header-cta .button:hover,
.header-cta .button:focus {
    border-color: #fff;
    background: #fff;
    color: var(--ffd-accent);
}
.menu-toggle { color: #fff; }
.menu-toggle { display: none; min-width: 44px; min-height: 44px; padding: .6rem; }
.menu-toggle-icon, .menu-toggle-icon::before, .menu-toggle-icon::after {
    display: block; width: 21px; height: 2px; background: currentColor; content: ""; transition: transform .15s ease, opacity .15s ease;
}
.menu-toggle-icon { position: relative; }
.menu-toggle-icon::before { position: absolute; top: -6px; }
.menu-toggle-icon::after { position: absolute; top: 6px; }
.ffd-menu-open .menu-toggle-icon { background: transparent; }
.ffd-menu-open .menu-toggle-icon::before { top: 0; transform: rotate(45deg); }
.ffd-menu-open .menu-toggle-icon::after { top: 0; transform: rotate(-45deg); }

/* Gutenberg helper styles: intentionally few, reusable and content-agnostic. */
.ffd-hero { padding: clamp(4.5rem, 10vw, 9rem) 0; }
.ffd-hero h1 { max-width: 1050px; margin-bottom: 1.4rem; }
.ffd-hero p { max-width: 780px; font-size: clamp(1.15rem, 2vw, 1.45rem); }
.ffd-eyebrow { margin-bottom: .75rem !important; color: var(--ffd-muted); font-size: .78rem !important; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ffd-section { padding: clamp(3.8rem, 8vw, 7rem) 0; }
.ffd-section-soft { background: var(--ffd-surface); }
.ffd-section-dark { background: var(--ffd-accent); color: #fff; }
.ffd-section-dark h1, .ffd-section-dark h2, .ffd-section-dark h3, .ffd-section-dark h4 { color: #fff; }
.ffd-section-dark a:not(.wp-element-button) { color: var(--ffd-primary); }
.ffd-card, .is-style-ffd-card {
    border: 1px solid var(--ffd-border);
    border-radius: var(--ffd-radius);
    background: #fff;
    padding: clamp(1.25rem, 3vw, 2rem);
}
.ffd-card-shadow { box-shadow: var(--ffd-shadow); }
.ffd-accent-line { border-left: 5px solid var(--ffd-primary); padding-left: 1.25rem; }
.ffd-pill { display: inline-block; border-radius: 999px; background: var(--ffd-primary); color: var(--ffd-accent); font-size: .78rem; font-weight: 700; padding: .3rem .7rem; }
.ffd-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.25rem; }
.ffd-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.5rem; }

/* Testimonial speech bubble. Works with Quote block style or class .ffd-bubble. */
.wp-block-quote.is-style-ffd-bubble, .ffd-bubble {
    position: relative;
    border: 0;
    border-radius: calc(var(--ffd-radius) + 4px);
    background: #fff;
    color: var(--ffd-text);
    box-shadow: var(--ffd-shadow);
    padding: clamp(1.35rem, 3vw, 2rem);
}
.wp-block-quote.is-style-ffd-bubble::after, .ffd-bubble::after {
    content: "";
    position: absolute;
    left: 2.1rem;
    bottom: -16px;
    width: 0; height: 0;
    border-top: 17px solid #fff;
    border-right: 19px solid transparent;
}
.wp-block-quote.is-style-ffd-bubble p:last-of-type, .ffd-bubble p:last-of-type { margin-bottom: .6rem; }
.wp-block-quote.is-style-ffd-bubble cite, .ffd-bubble cite { color: var(--ffd-muted); font-size: .9rem; font-style: normal; }

.wp-block-button.is-style-ffd-outline .wp-block-button__link {
    border-color: var(--ffd-accent);
    background: transparent;
    color: var(--ffd-accent);
}
.wp-block-button.is-style-ffd-outline .wp-block-button__link:hover,
.wp-block-button.is-style-ffd-outline .wp-block-button__link:focus {
    border-color: var(--ffd-accent);
    background: var(--ffd-accent);
    color: #fff;
}

.entry-header { margin-bottom: 2rem; }
.entry-title { margin-bottom: .65rem; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .55rem 1rem; color: var(--ffd-muted); font-size: .88rem; }
.entry-meta a { color: inherit; }
.entry-thumbnail { margin: 0 auto 2.2rem; width: min(calc(100% - 2.4rem), var(--ffd-wide)); }
.entry-thumbnail img { width: 100%; border-radius: var(--ffd-radius); }
.entry-thumbnail figcaption { margin-top: .55rem; color: var(--ffd-muted); font-size: .8rem; }
.entry-content :where(h2,h3,h4) { margin-top: 2.4rem; margin-bottom: .9rem; }
.entry-content :where(ul,ol) { padding-left: 1.25rem; }
.entry-footer { width: min(calc(100% - 2.4rem), var(--ffd-content)); margin: 0 auto clamp(3rem,7vw,6rem); padding-top: 1.4rem; border-top: 1px solid var(--ffd-border); color: var(--ffd-muted); font-size: .9rem; }

.archive-shell { width: min(calc(100% - 2.4rem), var(--ffd-wide)); margin-inline: auto; padding: clamp(3.5rem,7vw,6rem) 0; }
.archive-header { max-width: var(--ffd-content); margin-bottom: 2rem; }
.archive-description { color: var(--ffd-muted); }
.post-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.35rem; }
.post-card { overflow: hidden; border: 1px solid var(--ffd-border); border-radius: var(--ffd-radius); background: #fff; }
.post-card-link { display: flex; height: 100%; flex-direction: column; color: inherit; text-decoration: none; }
.post-card-thumbnail { overflow: hidden; aspect-ratio: 3 / 2; background: var(--ffd-surface); }
.post-card-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.post-card-link:hover .post-card-thumbnail img { transform: scale(1.025); }
.post-card-content { display: flex; flex: 1; flex-direction: column; padding: 1.2rem; }
.post-card-kicker { margin-bottom: .5rem; color: var(--ffd-muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.post-card-title { margin-bottom: .65rem; font-size: 1.35rem; }
.post-card-excerpt { color: var(--ffd-muted); font-size: .95rem; }
.post-card-excerpt p { margin-bottom: .8rem; }
.post-card-footer { margin-top: auto; padding-top: .6rem; color: var(--ffd-muted); font-size: .78rem; }
.pagination, .nav-links { margin-top: 2.2rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.page-numbers { display: inline-flex; min-width: 40px; min-height: 40px; align-items: center; justify-content: center; border: 1px solid var(--ffd-border); border-radius: 7px; padding: .35rem .65rem; text-decoration: none; }
.page-numbers.current, a.page-numbers:hover { border-color: var(--ffd-accent); background: var(--ffd-accent); color: #fff; }

.not-found { text-align: center; }
.not-found .search-form { max-width: 600px; margin: 1.5rem auto; }
.search-form { display: flex; gap: .5rem; }
.search-form label { flex: 1; }

.site-footer { background: var(--ffd-footer-bg); color: var(--ffd-footer-text); }
.footer-main { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(260px,.75fr); gap: 3rem; padding: clamp(3.5rem,7vw,6rem) 0 2.4rem; }
.footer-brand h2 { color: var(--ffd-footer-text); margin-bottom: .75rem; font-size: clamp(1.7rem,3vw,2.4rem); }
.footer-brand > p { max-width: 680px; color: color-mix(in srgb, var(--ffd-footer-text) 76%, transparent); }
.footer-contact { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-top: 1.4rem; }
.footer-contact a { color: var(--ffd-footer-text); }
.footer-side { display: flex; justify-content: flex-end; }
.footer-navigation ul { margin: 0; padding: 0; list-style: none; }
.footer-navigation li + li { margin-top: .5rem; }
.footer-navigation a { color: var(--ffd-footer-text); text-decoration: none; }
.footer-navigation a:hover, .footer-navigation a:focus { color: var(--ffd-primary); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid color-mix(in srgb, var(--ffd-footer-text) 20%, transparent); padding: 1.2rem 0 1.6rem; color: color-mix(in srgb, var(--ffd-footer-text) 68%, transparent); font-size: .8rem; }
.footer-bottom a { color: inherit; }

@media (max-width: 900px) {
    .admin-bar.ffd-sticky-header .site-header { top: 46px; }
    .header-inner { min-height: 76px; gap: .8rem; }
    .primary-navigation {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        margin: 0;
        border-top: 1px solid var(--ffd-border);
        background: var(--ffd-header-bg);
        box-shadow: 0 18px 30px rgba(0,0,0,.08);
        padding: 1.2rem;
    }
    .primary-navigation.is-open { display: block; }
    .primary-navigation ul { display: block; }
    .primary-navigation li + li { border-top: 1px solid var(--ffd-border); }
    .primary-navigation a { padding: .85rem .25rem; font-size: 1.05rem; }
    .header-cta { margin-left: auto; }
    .menu-toggle { display: inline-flex; }
    .ffd-grid-3, .post-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .footer-main { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-side { justify-content: flex-start; }
}
@media (max-width: 640px) {
    body { font-size: 17px; }
    .ffd-container, .entry-shell, .archive-shell, .entry-thumbnail { width: min(calc(100% - 1.5rem), var(--ffd-wide)); }
    .custom-logo { max-width: min(var(--ffd-logo-width), 190px); max-height: 52px; }
    .header-cta { display: none; }
    .ffd-grid-2, .ffd-grid-3, .post-grid { grid-template-columns: 1fr; }
    .search-form { display: grid; }
    .footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
