/*
Theme Name: schroepel.net
Theme URI: https://www.schroepel.net
Author: Thorsten Schröpel
Description: Persönliches Block-Theme für schroepel.net / schroepel.eu – dunkel, ruhig, bildlastig. Mit Beitragstyp „Projekt“, Projektarten und Steckbrief.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: schroepel
*/

:root { --sn-edge: clamp(20px, 5vw, 72px); --sn-divider: color-mix(in srgb, var(--wp--preset--color--contrast) 16%, transparent); }
body { -webkit-font-smoothing: antialiased; text-wrap: pretty; background:
  radial-gradient(1200px 720px at 82% -160px, color-mix(in srgb, var(--wp--preset--color--accent-900) 75%, transparent), transparent 60%),
  var(--wp--preset--color--base) no-repeat; }
::selection { background: color-mix(in srgb, var(--wp--preset--color--accent) 35%, transparent); }
:where(a, button, input, select, textarea, .wp-element-button):focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 2px; }

/* Header */
.sn-header { padding-block: 28px; position: relative; z-index: 10; }
.home .sn-header, .single-projekt .sn-header { position: absolute; top: 0; left: 0; right: 0; }
.admin-bar.home .sn-header, .admin-bar.single-projekt .sn-header { top: 32px; }
.sn-wordmark { color: var(--wp--preset--color--contrast) !important; font-weight: 500; font-size: 17px; letter-spacing: -.01em; text-decoration: none; }
.sn-wordmark { display: inline-flex; align-items: center; gap: 10px; }
.sn-wordmark span { color: var(--wp--preset--color--accent); }
.sn-mark { display: block; flex: none; }
.sn-header .wp-block-navigation a { text-decoration: none; }
.sn-header .wp-block-navigation .current-menu-item > a, .sn-header .wp-block-navigation a[aria-current] { color: var(--wp--preset--color--accent); }

/* Kicker – Domain als Pfad */
.sn-kicker { font-size: 13px; line-height: 1; letter-spacing: .06em; text-transform: uppercase; color: var(--wp--preset--color--accent); margin: 0; }

/* Hero (Cover) */
.sn-hero { padding-inline: var(--sn-edge) !important; padding-bottom: clamp(40px, 7vw, 80px) !important; }
.sn-hero .wp-block-cover__image-background { mix-blend-mode: lighten; }
.sn-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(to top, var(--wp--preset--color--base) 0%, transparent 55%), linear-gradient(to bottom, color-mix(in srgb, var(--wp--preset--color--base) 70%, transparent), transparent 25%); }
.sn-hero .wp-block-cover__inner-container { z-index: 1; }
.sn-display { margin-left: -.05em; }
.sn-lead { color: var(--wp--preset--color--neutral-200); max-width: 52ch; }

/* Bilder blenden in den Grund */
.sn-lighten img, .sn-card-img img, .wp-block-post-featured-image img { mix-blend-mode: lighten; }
.sn-card-img, .wp-block-post-featured-image { background: var(--wp--preset--color--surface); border-radius: 8px; overflow: hidden; }

/* Fluides Projektraster: 7/5 – 5/7 */
.sn-fluid-grid { display: flex !important; flex-wrap: wrap; gap: 48px 24px; list-style: none; padding: 0; margin: 0; }
.sn-fluid-grid > li { flex: 1 1 360px; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.sn-fluid-grid > li:nth-child(4n+1), .sn-fluid-grid > li:nth-child(4n+4) { flex: 7 1 480px; }
.sn-fluid-grid > li:nth-child(4n+2), .sn-fluid-grid > li:nth-child(4n+3) { flex: 5 1 340px; }
.sn-fluid-grid > li:nth-child(4n+1) :is(.sn-card-img, .wp-block-post-featured-image), .sn-fluid-grid > li:nth-child(4n+4) :is(.sn-card-img, .wp-block-post-featured-image) { aspect-ratio: 16/10; }
.sn-fluid-grid :is(.sn-card-img, .wp-block-post-featured-image) { aspect-ratio: 4/3; margin: 0; }
.sn-fluid-grid :is(.sn-card-img, .wp-block-post-featured-image) img { width: 100%; height: 100%; object-fit: cover; }
.sn-card-body { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.sn-card-title { font-size: 20px; font-weight: 500; margin: 0; }
.sn-card-title a, a.sn-card { color: var(--wp--preset--color--contrast); text-decoration: none; }
.sn-card-text { font-size: 14px; line-height: 1.5; color: var(--wp--preset--color--muted); margin: 4px 0 0; }
.sn-card-meta { display: flex; gap: 8px; align-items: center; white-space: nowrap; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--wp--preset--color--subtle); }
.sn-card-meta a { color: inherit; text-decoration: none; }

/* Tags */
.sn-tag, .sn-tags a { display: inline-flex; align-items: center; font-size: 11px; letter-spacing: .02em; padding: 3px 10px; border-radius: 6px; text-transform: none;
  background: var(--wp--preset--color--neutral-800); color: var(--wp--preset--color--neutral-100); text-decoration: none; }
.sn-tag--accent { background: var(--wp--preset--color--accent-800); color: var(--wp--preset--color--accent-100); }
.sn-tags .wp-block-post-terms__separator { display: none; }
.sn-tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* Filter (Projektart / Kategorien) */
.sn-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.sn-filter a { font-size: 13px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--sn-divider); color: var(--wp--preset--color--contrast); text-decoration: none; }
.sn-filter a:hover { background: color-mix(in srgb, var(--wp--preset--color--contrast) 7%, transparent); }
.sn-filter a[aria-current] { color: var(--wp--preset--color--accent); box-shadow: inset 0 0 0 1px var(--wp--preset--color--accent); border-color: transparent; }

/* Beitragslisten */
.sn-postrow { padding-block: 22px; border-top: 1px solid var(--sn-divider); gap: 8px !important; }
.sn-postrow .wp-block-post-title { font-size: 22px; letter-spacing: -.01em; margin: 0; }
.sn-postrow .wp-block-post-title a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.sn-postrow .wp-block-post-excerpt { margin: 0; color: var(--wp--preset--color--muted); font-size: 15px; }
.sn-postrow .wp-block-post-excerpt__more-text { display: none; }
.sn-postrow--compact { flex-direction: row !important; flex-wrap: wrap; align-items: baseline !important; gap: 6px 24px !important; }
.sn-postrow--compact .wp-block-post-date { width: 110px; }
.sn-postrow--compact .wp-block-post-title { flex: 1 1 280px; font-size: 18px; }
.wp-block-post-date { font-size: 14px; color: var(--wp--preset--color--subtle); font-feature-settings: "tnum" 1; }

/* Steckbrief */
.sn-steckbrief { margin: 0; }
.sn-steckbrief > div { display: flex; flex-direction: column; gap: 6px; padding: 16px 0; border-top: 1px solid var(--sn-divider); }
.sn-steckbrief dt { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--wp--preset--color--subtle); }
.sn-steckbrief dd { margin: 0; font-size: 16px; line-height: 1.5; }
.sn-links { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 20px; border-top: 1px solid var(--sn-divider); }

/* Projektinhalt: Galerie & Diagramm */
.single-projekt .wp-block-gallery img { mix-blend-mode: lighten; border-radius: 8px; }
.sn-diagram img { border-radius: 14px; box-shadow: 0 0 0 1px var(--wp--preset--color--neutral-800); background: var(--wp--preset--color--surface); }

/* Verwandte Beiträge / Nächstes Projekt / Projektkarte im Beitrag */
.sn-related { display: flex; flex-direction: column; }
.sn-related a { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--sn-divider); color: var(--wp--preset--color--contrast); text-decoration: none; }
.sn-related time { width: 110px; font-size: 14px; color: var(--wp--preset--color--subtle); }
.sn-related strong { flex: 1 1 280px; font-size: 18px; font-weight: 500; }
.sn-related span { font-size: 14px; color: var(--wp--preset--color--accent-soft); }
.sn-next { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; padding: 40px 0; border-top: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--contrast) !important; text-decoration: none; }
.sn-next small { display: block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--wp--preset--color--subtle); margin-bottom: 10px; }
.sn-next strong { font-size: clamp(32px, 4vw, 52px); font-weight: 500; letter-spacing: -.02em; }
.sn-next > span { font-size: 28px; color: var(--wp--preset--color--accent); }
.sn-projectcard { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 8px; background: var(--wp--preset--color--surface); color: var(--wp--preset--color--contrast) !important; text-decoration: none; }
.sn-projectcard small { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--wp--preset--color--accent); }
.sn-projectcard strong { font-size: 17px; font-weight: 500; }

/* Fading rules */
.wp-block-separator { border: 0 !important; height: 1px !important; background: linear-gradient(to right, transparent, var(--sn-divider) 48px calc(100% - 48px), transparent) !important; opacity: 1; }

/* Kontaktband + Footer */
.sn-band { background: radial-gradient(900px 420px at 85% -40%, color-mix(in srgb, var(--wp--preset--color--section-glow) 70%, transparent), transparent 64%), var(--wp--preset--color--section); padding-block: clamp(48px, 6vw, 72px); }
.sn-band p { color: color-mix(in srgb, var(--wp--preset--color--contrast) 78%, transparent); }
.sn-footer { padding-block: 32px; font-size: 13px; color: var(--wp--preset--color--subtle); }
.sn-footer a { color: var(--wp--preset--color--muted); text-decoration: none; }
.sn-monogram { width: 28px; height: 28px; border-radius: 6px; box-shadow: 0 0 0 1px var(--wp--preset--color--neutral-800); display: inline-grid; place-items: center; color: var(--wp--preset--color--contrast); vertical-align: middle; margin-right: 12px; }
.sn-monogram .sn-mark { width: 18px; height: 18px; }

/* Buttons: Varianten */
.wp-block-button__link:hover { background: color-mix(in srgb, var(--wp--preset--color--accent) 12%, transparent) !important; }
.wp-block-button__link:active { background: color-mix(in srgb, var(--wp--preset--color--accent) 22%, transparent) !important; }
.is-style-ghost .wp-block-button__link { border-color: transparent !important; padding-inline: 4px !important; }
.is-style-secondary .wp-block-button__link { border-color: var(--sn-divider) !important; color: var(--wp--preset--color--contrast) !important; }
.is-style-secondary .wp-block-button__link:hover { background: color-mix(in srgb, var(--wp--preset--color--contrast) 7%, transparent) !important; }
.sn-btn { display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid var(--wp--preset--color--accent); border-radius: 8px; color: var(--wp--preset--color--accent) !important; font-size: 14px; text-decoration: none; }
.sn-btn:hover { background: color-mix(in srgb, var(--wp--preset--color--accent) 12%, transparent); }

@media (max-width: 781px) { .sn-steckbrief-col { flex-basis: 100% !important; } }
