/*
 * Späth Inhaltsseiten – wiederverwendbares Core-Block-Design.
 * Alle Komponenten funktionieren im Frontend und im Blockeditor.
 */
:root {
    --sp-page-forest: #10251c;
    --sp-page-forest-deep: #07130e;
    --sp-page-green: #28513e;
    --sp-page-brass: #d0aa67;
    --sp-page-brass-dark: #8a642f;
    --sp-page-ivory: #f7f4ed;
    --sp-page-sand: #e8e1d4;
    --sp-page-ink: #18201c;
    --sp-page-muted: #59635d;
    --sp-page-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    --sp-page-sans: "Avenir Next", Avenir, Inter, "Helvetica Neue", Arial, sans-serif;
}

.spaeth-page-section {
    box-sizing: border-box;
    margin-block: clamp(2.5rem, 5vw, 4.75rem);
    position: relative;
}
.entry-content .spaeth-page-section > :first-child,
.editor-styles-wrapper .spaeth-page-section > :first-child { margin-top: 0; }
.entry-content .spaeth-page-section > :last-child,
.editor-styles-wrapper .spaeth-page-section > :last-child { margin-bottom: 0; }
.spaeth-page-section--intro,
.spaeth-page-section--soft {
    background:
        radial-gradient(circle at 100% 0, rgba(208,170,103,.16), transparent 26rem),
        linear-gradient(145deg, #f3eee4, #fbfaf6 72%);
    border: 1px solid rgba(16,37,28,.1);
    padding: clamp(1.5rem, 3.5vw, 3.25rem);
}
.spaeth-page-section--intro::before,
.spaeth-page-section--soft::before {
    background: var(--sp-page-brass);
    content: "";
    height: 3px;
    left: 0;
    position: absolute;
    top: 0;
    width: clamp(4rem, 12vw, 9rem);
}
.spaeth-page-section--dark {
    background:
        radial-gradient(ellipse at 85% 10%, rgba(208,170,103,.22), transparent 30rem),
        radial-gradient(ellipse at 10% 90%, rgba(208,170,103,.08), transparent 20rem),
        linear-gradient(145deg, #0a1a12 0%, var(--sp-page-forest-deep) 40%, var(--sp-page-forest) 100%);
    border: 1px solid rgba(208,170,103,.15);
    border-radius: 4px;
    color: #fff;
    overflow: hidden;
    padding: clamp(1.6rem, 3.8vw, 3.5rem);
    position: relative;
}
.spaeth-page-section--dark::before {
    background: linear-gradient(90deg, var(--sp-page-brass), rgba(208,170,103,.3), transparent);
    content: "";
    height: 2px;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}
.entry-content .spaeth-page-section--dark h2,
.entry-content .spaeth-page-section--dark h3,
.entry-content .spaeth-page-section--dark p,
.editor-styles-wrapper .spaeth-page-section--dark h2,
.editor-styles-wrapper .spaeth-page-section--dark h3,
.editor-styles-wrapper .spaeth-page-section--dark p { color: inherit; }
.entry-content .spaeth-page-section h2,
.editor-styles-wrapper .spaeth-page-section h2 {
    font-size: clamp(1.9rem, 3.1vw, 2.75rem);
    line-height: 1.08;
    margin: 0 0 1rem;
    max-width: 23ch;
}
.entry-content .spaeth-page-section h3,
.editor-styles-wrapper .spaeth-page-section h3 {
    font-size: clamp(1.2rem, 1.75vw, 1.5rem);
    line-height: 1.2;
    margin: 0 0 .65rem;
}
.spaeth-page-kicker {
    color: var(--sp-page-brass-dark) !important;
    font-family: var(--sp-page-sans);
    font-size: .64rem !important;
    font-weight: 800;
    letter-spacing: .17em;
    margin: 0 0 .85rem !important;
    text-transform: uppercase;
}
.spaeth-page-section--dark .spaeth-page-kicker { color: #e0c083 !important; }
.spaeth-page-lead {
    color: var(--sp-page-muted) !important;
    font-family: var(--sp-page-display);
    font-size: clamp(1.08rem, 1.55vw, 1.3rem) !important;
    line-height: 1.55 !important;
    margin-bottom: 1.4rem;
    max-width: 67ch;
}
.spaeth-page-section--dark .spaeth-page-lead { color: rgba(255,255,255,.78) !important; }
.spaeth-page-prose { color: var(--sp-page-muted); }
.spaeth-page-prose p { font-size: .96rem; line-height: 1.72; }

.spaeth-page-grid {
    align-items: stretch;
    display: grid;
    gap: clamp(1rem, 2.2vw, 1.6rem);
}
.spaeth-page-grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.spaeth-page-grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.spaeth-page-grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.spaeth-page-grid--auto { grid-template-columns: repeat(auto-fit, minmax(min(100%,245px),1fr)); }

.spaeth-page-card,
.spaeth-page-topic,
.spaeth-page-offer,
.spaeth-page-contact-card,
.spaeth-page-history-card {
    background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(241,237,228,.62));
    border: 1px solid rgba(255,255,255,.65);
    border-radius: clamp(1rem, 2vw, 1.6rem);
    box-shadow:
        0 1px 0 rgba(255,255,255,.9) inset,
        0 24px 60px rgba(7,19,14,.18),
        0 8px 20px rgba(7,19,14,.1);
    -webkit-backdrop-filter: blur(12px) saturate(115%);
    backdrop-filter: blur(12px) saturate(115%);
    box-sizing: border-box;
    height: 100%;
    margin: 0;
    min-height: 18rem;
    padding: clamp(1.75rem, 3.2vw, 2.75rem);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.spaeth-page-contact-card::before,
.spaeth-page-history-card::before {
    border: 1px solid rgba(138,100,47,.22);
    border-radius: 50%;
    bottom: -5.5rem;
    content: "";
    height: 12rem;
    pointer-events: none;
    position: absolute;
    right: -4.5rem;
    transform: rotate(-15deg);
    width: 12rem;
    z-index: 0;
}
.spaeth-page-contact-card::after,
.spaeth-page-history-card::after {
    border: 1px solid rgba(138,100,47,.13);
    border-radius: 50%;
    bottom: -4.2rem;
    content: "";
    height: 9.5rem;
    pointer-events: none;
    position: absolute;
    right: -3.2rem;
    transform: rotate(-15deg);
    width: 9.5rem;
    z-index: 0;
}
.spaeth-page-card::before,
.spaeth-page-topic::before,
.spaeth-page-offer::before {
    background: var(--sp-page-brass);
    content: "";
    height: 2px;
    left: 0;
    position: absolute;
    top: 0;
    width: 3.5rem;
}
.spaeth-page-card p,
.spaeth-page-topic p,
.spaeth-page-offer p,
.spaeth-page-contact-card p,
.spaeth-page-history-card p {
    color: var(--sp-page-muted);
    font-size: .9rem;
    line-height: 1.62;
}
.spaeth-page-link {
    font-size: .68rem !important;
    font-weight: 800;
    letter-spacing: .12em;
    margin-top: 1.2rem !important;
    text-transform: uppercase;
}
.spaeth-page-link a {
    border-bottom: 1px solid rgba(138,100,47,.5);
    color: var(--sp-page-green);
    padding-bottom: .2rem;
    text-decoration: none !important;
}
.spaeth-page-link a:hover { color: var(--sp-page-brass-dark); }

/* Geschichte und Zeitleiste. */
.spaeth-timeline { border-left: 1px solid rgba(138,100,47,.3); margin-left: .45rem; }
.spaeth-timeline-item { margin: 0; padding: 0 0 1.4rem 1.75rem; position: relative; }
.spaeth-timeline-item::before {
    background: var(--sp-page-brass);
    border: 4px solid var(--sp-page-ivory);
    border-radius: 50%;
    content: "";
    height: 12px;
    left: -6px;
    position: absolute;
    top: .45rem;
    width: 12px;
}
.spaeth-timeline-item p { color: var(--sp-page-muted); margin: 0; }
.spaeth-timeline-item strong {
    color: var(--sp-page-brass-dark);
    display: inline-block;
    font-family: var(--sp-page-display);
    font-size: 1.2rem;
    margin-right: .35rem;
}
.spaeth-page-history-grid { margin-top: 2rem; }
.spaeth-page-history-card { border-top: 2px solid rgba(208,170,103,.65); }

/* Methodik und technische Themen. */
.spaeth-page-process { counter-reset: spaeth-step; }
.spaeth-page-step {
    border-top: 1px solid rgba(16,37,28,.16);
    margin: 0;
    padding-top: 1rem;
}
.spaeth-page-step-number {
    color: var(--sp-page-brass-dark) !important;
    font-size: .62rem !important;
    font-weight: 800;
    letter-spacing: .15em;
    margin: 0 0 .8rem !important;
    text-transform: uppercase;
}
.spaeth-page-step p:not(.spaeth-page-step-number) { color: var(--sp-page-muted); font-size: .9rem; line-height: 1.62; }
.spaeth-page-question,
.spaeth-page-note {
    background: #fff;
    border-left: 3px solid var(--sp-page-brass);
    margin-block: 1.25rem;
    padding: clamp(1.1rem,2.5vw,1.75rem);
}
.spaeth-page-question p,
.spaeth-page-note p { margin-bottom: 0; }
.spaeth-page-topic-grid { margin-top: 1.75rem; }

/* Projekte und Jahresarchive. */
.spaeth-project-archive { border-top: 1px solid rgba(16,37,28,.15); margin-top: 1.5rem; }
.spaeth-project-year {
    border: 0;
    border-bottom: 1px solid rgba(16,37,28,.15);
    margin: 0;
    padding: 0;
}
.spaeth-project-year summary {
    align-items: center;
    color: var(--sp-page-forest);
    cursor: pointer;
    display: flex;
    font-family: var(--sp-page-display);
    font-size: clamp(1.35rem,2.2vw,1.8rem);
    font-weight: 600;
    justify-content: space-between;
    padding: 1rem 0;
}
.spaeth-project-year summary::after {
    color: var(--sp-page-brass-dark);
    content: "+";
    font-family: var(--sp-page-sans);
    font-size: 1.1rem;
}
.spaeth-project-year[open] summary::after { content: "−"; }
.spaeth-project-year .wp-block-list { margin: 0 0 1.5rem; padding-left: 1.25rem; }
.spaeth-project-year li { color: var(--sp-page-muted); font-size: .88rem; line-height: 1.62; margin-bottom: .75rem; }

/* Occasionen. */
.spaeth-page-offer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.spaeth-page-offer .wp-block-list { padding-left: 1.1rem; }
.spaeth-page-offer li { color: var(--sp-page-muted); font-size: .87rem; line-height: 1.58; }
.spaeth-page-offer p strong { color: var(--sp-page-forest); }

/* Kontakt. */
.spaeth-page-contact-grid {
    gap: clamp(1.25rem, 2.5vw, 2rem);
    margin-top: 2rem;
}
.spaeth-page-contact-card {
    border-top: 3px solid rgba(208,170,103,.85);
    transition: box-shadow .5s ease, transform .5s ease, border-color .4s ease;
}
.spaeth-page-contact-card:hover {
    border-color: rgba(255,255,255,.8);
    border-top-color: var(--sp-page-brass);
    box-shadow:
        0 1px 0 rgba(255,255,255,.95) inset,
        0 32px 80px rgba(7,19,14,.22),
        0 12px 28px rgba(7,19,14,.12);
    transform: translateY(-4px);
}
.spaeth-page-contact-label {
    background: linear-gradient(135deg, var(--sp-page-brass-dark), #a07840);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: .66rem !important;
    font-weight: 800;
    letter-spacing: .18em;
    margin-bottom: .85rem !important;
    text-transform: uppercase;
}
.spaeth-page-contact-card p {
    color: var(--sp-page-muted);
    font-size: 1rem;
    line-height: 1.75;
    position: relative;
    z-index: 1;
}
.spaeth-page-contact-card a {
    color: var(--sp-page-forest);
    font-weight: 500;
    overflow-wrap: anywhere;
    text-decoration: none;
    transition: color .2s;
}
.spaeth-page-contact-card a:hover {
    color: var(--sp-page-brass-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.spaeth-page-contact-card .spaeth-page-contact-label {
    position: relative;
    z-index: 1;
}
.spaeth-page-section--dark a { color: #e0c083; }
.spaeth-page-section--dark .spaeth-page-contact-card p {
    color: var(--sp-page-muted) !important;
}
.spaeth-page-section--dark .spaeth-page-contact-card .spaeth-page-contact-label {
    -webkit-background-clip: text;
    background-clip: text;
}
.spaeth-page-section--dark .spaeth-page-contact-card a {
    color: var(--sp-page-forest) !important;
}
.spaeth-contact-rows {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: .7rem;
    row-gap: .15rem;
}
.spaeth-contact-rows .spaeth-contact-row__label {
    white-space: nowrap;
}
.spaeth-contact-row__spacer {
    grid-column: 1 / -1;
    height: .9rem;
}

/* Datenschutz. */
.spaeth-legal-intro { max-width: 960px !important; }
.spaeth-legal-section {
    border-top: 1px solid rgba(16,37,28,.14);
    margin-block: 0;
    padding-block: clamp(1.5rem,3vw,2.5rem);
}
.spaeth-legal-section:nth-of-type(even) {
    background: rgba(232,225,212,.28);
    padding-inline: clamp(1rem,2.5vw,2rem);
}
.entry-content .spaeth-legal-section h2,
.editor-styles-wrapper .spaeth-legal-section h2 {
    font-size: clamp(1.35rem,2vw,1.7rem);
    max-width: 34ch;
}
.spaeth-legal-section p,
.spaeth-legal-section li { color: var(--sp-page-muted); font-size: .91rem; line-height: 1.7; }

/* Beitragsseite „Aktuell“: editierbarer Seiteninhalt oberhalb der Beiträge. */
.listing-intro.entry-content { padding-block: clamp(2.5rem,5vw,4.5rem) 0; }
.listing-intro + .listing { padding-top: clamp(2.5rem,5vw,4.5rem); }

@media (hover:hover) and (pointer:fine) {
    .spaeth-page-card,
    .spaeth-page-topic,
    .spaeth-page-offer,
    .spaeth-page-contact-card { transition: box-shadow .35s ease, transform .35s ease; }
    .spaeth-page-card:hover,
    .spaeth-page-topic:hover,
    .spaeth-page-offer:hover,
    .spaeth-page-contact-card:hover { box-shadow: 0 20px 45px rgba(16,37,28,.1); transform: translateY(-4px); }
}

@media (max-width:900px) {
    .spaeth-page-grid--3,
    .spaeth-page-grid--4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:650px) {
    .spaeth-page-grid--2,
    .spaeth-page-grid--3,
    .spaeth-page-grid--4,
    .spaeth-page-offer-grid { grid-template-columns: 1fr; }
    .spaeth-page-section { margin-block: 2.5rem; }
    .spaeth-page-section--intro,
    .spaeth-page-section--soft,
    .spaeth-page-section--dark { padding: 1.25rem; }
    .spaeth-legal-section:nth-of-type(even) { padding-inline: .75rem; }
}

/* Ausgewählte Arbeiten – soa-Design. */
.soa-projects-section {
    background:
        radial-gradient(circle at 100% 0, rgba(208, 170, 103, .15), transparent 25rem),
        linear-gradient(145deg, #f3eee4, #fbfaf6 72%);
    border: 1px solid rgba(16, 37, 28, .1);
    margin-block: clamp(2.5rem, 5vw, 4.75rem);
    padding: clamp(1.5rem, 3.5vw, 3.25rem);
    position: relative;
}
.soa-projects-section::before {
    background: var(--sp-page-brass, #d0aa67);
    content: "";
    height: 3px;
    left: 0;
    position: absolute;
    top: 0;
    width: clamp(4rem, 12vw, 9rem);
}
.soa-projects-section > :first-child { margin-top: 0; }
.soa-projects-section > :last-child { margin-bottom: 0; }
.soa-projects-section .spaeth-page-kicker {
    color: #8a642f;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .17em;
    text-transform: uppercase;
}
.soa-projects-section h2 {
    color: var(--sp-page-forest);
    font-family: var(--sp-page-display);
    font-size: clamp(1.9rem, 3.1vw, 2.75rem);
    font-weight: 400;
    line-height: 1.08;
    margin: 0 0 1rem;
    max-width: 24ch;
}
.soa-projects-archive {
    border-top: 1px solid rgba(16, 37, 28, .13);
    margin-top: 1.75rem;
}
.soa-projects-year {
    border: 0;
    border-bottom: 1px solid rgba(16, 37, 28, .13);
    margin: 0;
    padding: 0;
}
.soa-projects-year summary {
    align-items: center;
    color: var(--sp-page-forest);
    cursor: pointer;
    display: flex;
    font-family: var(--sp-page-display);
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 600;
    justify-content: space-between;
    padding: .9rem 0;
}
.soa-projects-year summary::after {
    color: #8a642f;
    content: "+";
    font-family: var(--sp-page-sans);
    font-size: 1.15rem;
    font-weight: 400;
}
.soa-projects-year[open] summary::after { content: "\2212"; }
.soa-projects-year .wp-block-list {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0 0 0 1.1rem;
    border-left: 2px solid rgba(208, 170, 103, .35);
}
.soa-projects-year li {
    color: var(--sp-page-muted);
    font-size: .9rem;
    line-height: 1.68;
    margin-bottom: .85rem;
    padding-left: .5rem;
}
.soa-projects-year li strong {
    color: var(--sp-page-forest);
    font-weight: 600;
}
.soa-projects-year li a {
    color: var(--sp-page-forest);
    text-decoration: underline;
    text-decoration-color: rgba(208, 170, 103, .6);
    text-underline-offset: 2px;
    transition: text-decoration-color .2s;
}
.soa-projects-year li a:hover {
    text-decoration-color: #8a642f;
}
@media (max-width: 650px) {
    .soa-projects-section { padding: 1.25rem; }
    .soa-projects-year .wp-block-list { padding-left: .75rem; }
}

/* ============================================
   Blocksatz für Fließtext (nur Desktop: auf
   schmalen Spalten erzeugt Blocksatz „Flüsse").
   ============================================ */
@media (min-width: 651px) {
    .entry-content p,
    .post-card__excerpt {
        hyphens: auto;
        text-align: justify;
    }
    /* Schmale Boxen und Karten bleiben linksbündig. */
    .spaeth-page-card p,
    .spaeth-page-topic p,
    .spaeth-page-offer p,
    .spaeth-page-contact-card p,
    .spaeth-page-history-card p,
    .spaeth-sidebar-box p,
    .spaeth-design-cta p,
    .soa-organ-cta p {
        text-align: left;
    }
}
