/*
Theme Name: BAGAT
Description: Freigegebene Schwarz-Weiss-Gestaltung mit linkem Logo und frei bearbeitbaren Gutenberg-Inhalten.
Version: 1.9.3
Requires at least: 6.6
Requires PHP: 8.2
Author: Roman Weishaupt
License: GPL-2.0-or-later
Text Domain: bagat
*/

:root{color-scheme:light;--ink:#111;--paper:#fff;--line:#d7d7d7;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-synthesis:none}
*{box-sizing:border-box}
html{scroll-behavior:smooth;background:var(--paper)}
body{margin:0;color:var(--ink);background:var(--paper);font-size:16px;line-height:1.65;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration-thickness:1px;text-underline-offset:5px}
a:focus-visible{outline:2px solid var(--ink);outline-offset:6px}
a:hover{text-decoration:underline}
button{font:inherit}
.skip{position:absolute;top:-80px;left:20px;background:white;padding:12px;z-index:10}.skip:focus{top:10px}
.preview-note{font-size:10px;line-height:1.6;letter-spacing:.08em;padding:12px 34px;border-bottom:1px solid var(--line);text-align:right}
.preview-note span{padding:0 7px}
.layout{max-width:1220px;margin:0 auto;padding:76px 54px 35px;display:grid;grid-template-columns:210px minmax(0,1fr);gap:100px;align-items:start}
.sidebar{position:sticky;top:46px}
.brand{display:block;width:219.2475px;text-decoration:none;margin:-23px 0 -6px -13px}
.brand img{width:100%;height:auto;display:block}
.brand-caption{font-size:12px;letter-spacing:.055em;margin:0 0 49px}
.sidebar nav{display:flex;flex-direction:column;gap:12px;align-items:flex-start}
.sidebar nav a{text-decoration:none;font-size:14px;line-height:1.6;position:relative}
.sidebar nav a[aria-current=page]{text-decoration:underline;text-underline-offset:7px}
.sidebar nav a[aria-current=page]:before{content:"";display:block;width:4px;height:4px;background:var(--ink);position:absolute;left:-14px;top:10px;border-radius:50%}
.languages{display:flex;flex-direction:column;gap:6px;font-size:11px;letter-spacing:.02em;margin-top:63px;align-items:flex-start}
.languages a{text-decoration:none}.languages a[aria-current=true]{text-decoration:underline;text-underline-offset:4px}
.main{min-width:0;padding-top:6px;max-width:720px}
.eyebrow{font-size:10px;letter-spacing:.12em;text-transform:uppercase;line-height:1.6;margin:0 0 16px}
h1{font-size:clamp(34px,4.3vw,54px);font-weight:350;line-height:1.12;letter-spacing:-.045em;margin:0 0 53px;overflow-wrap:break-word}
.project-list{border-top:1px solid var(--ink)}
.project-row{display:grid;grid-template-columns:25px minmax(0,1fr) 28px;gap:22px;padding:30px 0 32px;border-bottom:1px solid var(--line);align-items:start}
.number{font-size:10px;letter-spacing:.08em;padding-top:8px}
.project-row h2{font-size:clamp(23px,2.4vw,29px);font-weight:400;line-height:1.25;letter-spacing:-.025em;margin:0 0 14px;max-width:490px}
.project-row h2 a{text-decoration:none}.project-row h2 a:hover{text-decoration:underline}
.project-row p{font-size:14px;line-height:1.7;margin:0;max-width:520px}
.project-arrow{display:flex;align-items:center;justify-content:center;width:38px;height:44px;font-size:23px;line-height:1;text-decoration:none;justify-self:end;margin-top:-2px}
.project-arrow:hover{text-decoration:none;transform:translate(2px,-2px)}
.back{display:inline-block;font-size:12px;margin:0 0 32px;text-decoration:none}
.back:hover{text-decoration:underline}
.prose{max-width:650px;font-size:16px;line-height:1.8;overflow-wrap:anywhere}
.prose p{margin:0 0 24px}
.prose h1,.prose h2,.prose h3{font-size:19px;line-height:1.5;font-weight:500;letter-spacing:-.01em;margin:28px 0 12px}
.prose strong,.prose b{font-weight:600;font-synthesis:weight;color:#303030}
.prose ul,.prose ol{padding-left:22px;margin:0 0 25px}
.prose img{max-width:100%;height:auto}
.prose table{width:100%;border-collapse:collapse;font-size:14px;display:block;overflow-x:auto}
.prose th,.prose td{padding:9px 12px 9px 0;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}
.source-pages{border-top:1px solid var(--line);margin-top:45px;padding-top:22px}
.source-pages>div{display:flex;flex-wrap:wrap;gap:14px 25px;font-size:12px}
.source-pages a{text-decoration:none}.source-pages a:hover{text-decoration:underline}
.original-subpages{display:flex;flex-direction:column;gap:22px;font-size:22px;margin:12px 0 40px;align-items:flex-start}
footer{border-top:1px solid var(--ink);padding-top:25px;margin-top:76px;font-size:11px;line-height:1.6}
footer>span{font-size:11px;letter-spacing:.045em}
footer>div{display:flex;flex-wrap:wrap;gap:10px 23px;margin-top:12px}
footer>div a{text-decoration:none}footer>div a:hover{text-decoration:underline}
.draft-disclaimer{font-size:10px;line-height:1.65;margin:28px 0 0;max-width:590px}
@media(min-width:1440px){.layout{padding-top:95px;gap:115px}}
@media(max-width:1000px){.layout{gap:58px;padding:60px 35px 30px;grid-template-columns:185px minmax(0,1fr)}.brand{width:197.8575px}.project-row{gap:15px}h1{font-size:43px}}
@media(max-width:720px){.preview-note{font-size:9px;text-align:left;padding:10px 22px;letter-spacing:.035em}.layout{display:block;padding:25px 24px 28px}.sidebar{position:static;display:grid;grid-template-columns:1fr;align-items:start;padding-bottom:30px;border-bottom:1px solid var(--ink);margin-bottom:37px}.brand{width:161.4945px;margin:-12px 0 -9px -10px;grid-column:1}.brand-caption{grid-column:1;grid-row:2;margin:0;font-size:10px;letter-spacing:.04em}.languages{grid-column:1;grid-row:3;flex-direction:row;margin:12px 0 0;gap:18px;font-size:10px}.sidebar nav{grid-column:1;grid-row:4;display:flex;flex-direction:row;flex-wrap:wrap;gap:13px 22px;margin-top:18px}.sidebar nav a{font-size:13px;padding:3px 0}.sidebar nav a[aria-current=page]:before{display:none}.main{max-width:none;padding-top:0}h1{font-size:39px;margin-bottom:35px;letter-spacing:-.035em}.eyebrow{font-size:9px;margin-bottom:12px}.project-row{grid-template-columns:20px minmax(0,1fr) 25px;gap:11px;padding:25px 0}.project-row h2{font-size:23px;margin-bottom:12px}.project-row p{font-size:13px;line-height:1.75}.number{font-size:9px;padding-top:6px}.project-arrow{width:27px;min-height:44px;font-size:21px}.prose{font-size:15px;line-height:1.8}.back{margin-bottom:25px;min-height:32px}footer{margin-top:55px;padding-top:21px}.source-pages>div{gap:14px 20px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.project-arrow:hover{transform:none}}
@media(prefers-reduced-motion:no-preference){.project-arrow{transition:transform 160ms cubic-bezier(.23,1,.32,1)}}
@media print{.preview-note,.languages,.sidebar nav,.source-pages{display:none}.layout{display:block;padding:0}.sidebar{position:static;margin-bottom:30px}.brand{width:171.12px}.main{max-width:none}footer{margin-top:35px}a{color:#000}h1{font-size:30px}}

/* Native Gutenberg-Bloecke bleiben frei editierbar. */
.entry-content .alignwide{max-width:760px;width:calc(100% + 60px);margin-left:-30px}
.entry-content .alignfull{max-width:none;width:100%;margin-left:0}
.entry-content .wp-block-columns{gap:22px;align-items:flex-start}
.entry-content .wp-block-image img{height:auto;max-width:100%}
.entry-content .wp-block-gallery{margin:25px 0}
.entry-content .wp-block-table{margin:24px 0;max-width:100%;overflow:auto}
.entry-content .wp-block-table table{display:table;font-size:13px}
.entry-content .wp-block-table td,.entry-content .wp-block-table th{border-color:#d7d7d7}
.entry-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd){background:#fafafa}
.entry-content .wp-block-file{padding:12px 0;border-bottom:1px solid #ddd}
.entry-content .wp-block-file__button,.entry-content .wp-block-button__link{background:#111;color:#fff;border-radius:0;padding:9px 15px;font-size:13px}
.entry-content .wp-block-quote{border-left:1px solid #111;padding-left:22px;margin-left:0}
.entry-content .wp-block-embed{margin:28px 0}
.entry-content .wp-block-embed iframe{max-width:100%}
@media(max-width:720px){.entry-content .alignwide{width:100%;margin-left:0}.entry-content .wp-block-table table{font-size:11px}}

/* Layout-Feinschliff: kleinerer Titel, Untertitel naeher, Logo leicht groesser. */
@media screen{
    /* Logo-Ink ab x=24/321; 0.25px optischer Abgleich mit der Caption-Schriftkante. */
    .brand{width:278.07px;margin-left:calc(.25px - 278.07px * 24 / 321);margin-right:calc(278.07px * 24 / 321 - 13.25px)}
    h1{font-size:clamp(32px,3.7vw,46px)}
    .single-bagat_production .main>h1:has(+.entry-content>.bagat-production-subtitle:first-child){margin-bottom:12px}
}
@media screen and (max-width:1000px){.brand{width:251.3325px;margin-left:calc(.25px - 251.3325px * 24 / 321);margin-right:calc(251.3325px * 24 / 321 - 13.25px)}h1{font-size:38px}}
@media screen and (max-width:720px){.brand{width:203.205px;margin-left:calc(.25px - 203.205px * 24 / 321);margin-right:calc(203.205px * 24 / 321 - 10.25px)}h1{font-size:34px}}

/* Gemeinsame horizontale Bezugslinien, ohne Eingriff in gespeicherte Inhalte. */
@media screen and (min-width:721px){
    .layout.bagat-grid-ready .sidebar{padding-top:var(--bagat-brand-shift,0px)}
    .layout.bagat-grid-ready .main{position:relative;padding-top:var(--bagat-title-top,6px)}
    .layout.bagat-grid-ready .main>h1:first-of-type,
    .single-bagat_production .layout.bagat-grid-ready .main>h1:first-of-type{margin-bottom:var(--bagat-title-gap,28px)}
    .layout.bagat-grid-ready .main>.back{position:absolute;top:8px;left:0;margin:0;min-height:0}
    .layout.bagat-grid-ready .entry-content.bagat-grid-content>:first-child{margin-top:0}
    .layout.bagat-grid-ready .main>h1+.entry-content>.bagat-production-subtitle:first-child{margin-top:0}
}
@media screen and (min-width:721px) and (max-width:1000px){.layout.bagat-grid-ready .main>.back{left:14px}}

/* Derselbe Titelkopf auf allen Seiten; der Inhalt beginnt erst unter der Linie. */
.bagat-page-rule{width:100%;height:0;border:0;border-top:1px solid var(--ink);margin:0 0 30px}
.main>.bagat-page-rule:has(+.project-list){margin-bottom:0}
.bagat-page-rule+.project-list{border-top:0}
.bagat-page-rule+.prose>:first-child{margin-top:0}

/* Fusszeile unten auf kurzen Seiten, im normalen Fluss unter langen Inhalten. */
@media screen{
    .layout{min-height:100vh;min-height:100svh}
    .main{display:flex;flex-direction:column;align-self:stretch}
    .main>*{flex-shrink:0}
    .bagat-footer-space{flex:1 0 76px;min-height:76px}
    .main>footer{margin-top:0}
}
@media screen and (max-width:720px){
    .layout{display:flex;flex-direction:column;gap:0}
    .sidebar{flex-shrink:0}
    .main{flex:1;width:100%}
    .bagat-footer-space{flex-basis:55px;min-height:55px}
}
@media print{.bagat-footer-space{display:none}}

.bagat-production-subpages,.bagat-production-links{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin-top:30px;font-size:inherit}
.single-bagat_production .entry-content a{font-size:inherit}
.single-bagat_production .entry-content .bagat-download,
.single-bagat_production .entry-content .wp-block-file,
.single-bagat_production .entry-content .source-pages,
.single-bagat_production .entry-content .source-pages>div,
.single-bagat_production .entry-content .original-subpages{font-size:inherit}
.single-bagat_production .entry-content .source-pages>div,
.single-bagat_production .entry-content .original-subpages{display:flex;flex-direction:column;align-items:flex-start;gap:12px}

/* Auf Handy keine Wiederholung der vier Menü-Seitentitel; semantisch bleiben sie erhalten. */
@media screen and (max-width:720px){
    .bagat-mobile-menu-page .main>h1{position:absolute;width:1px;height:1px;padding:0;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap}
    .bagat-mobile-menu-page .main>h1+.bagat-page-rule{display:none}
}
