/* ==========================================================================
   IMMOAGENTUR – Unternehmensentwicklung 2026 · Print / PDF (A4)
   Same page, printed: full-bleed cover and chapter openers, editorial
   content pages with running footer. Used by the browser print dialog
   ("Als PDF speichern") and by tools/build_pdf.py.
   ========================================================================== */

@page {
  size: A4 portrait;
  margin: 16mm 16mm 18mm 16mm;
  @bottom-left { content: "IMMOAGENTUR · Unternehmensentwicklung 2026 · ENTWURF – DEMO-DATEN"; font: 500 6.5pt "Inter Tight", sans-serif; letter-spacing: .12em; color: #74857B; }
  @bottom-right { content: counter(page); font: 300 9pt "Inter Tight", sans-serif; color: #3F9C68; }
}
@page bleed { margin: 0; @bottom-left { content: ""; } @bottom-right { content: ""; } }

html { scroll-behavior: auto; }
body { background: #fff; font-size: 9.4pt; line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.frame { padding: 0; }
.inner { max-width: none; }

/* interactive-only UI */
.rail, .mbar, .pill, .tabs, .tbtn, .hero__links, .final__ctas, .sr-only, .pm, .dtable { display: none !important; }

/* resolve motion */
.rv, .fade-num, .hero__year .d { opacity: 1 !important; transform: none !important; transition: none !important; }
.pic.rv-img::after { display: none !important; }
.pic img, .js-par { transform: none !important; transition: none !important; }

/* type scale for paper */
.t-xxl { font-size: 40pt; }
.t-xl { font-size: 30pt; }
.t-l { font-size: 22pt; }
.lbl { font-size: 7pt; }
.caps { font-size: 7.5pt; }
.body { font-size: 9.6pt; }
.note { font-size: 7pt; }
.demo { font-size: 6pt; padding: 3px 5px 2px; }
.sec { padding-block: 0 !important; }
.sec + .sec { padding-top: 10mm !important; }
.sec-head { grid-template-columns: 1.3fr 1fr; gap: 10mm; margin-bottom: 8mm; align-items: end; }
.sec-head .lbl { margin-bottom: 3mm; }
.sec--tint { background: none; }
.bleed-r, .bleed-l { margin: 0 !important; }
.pic figcaption { font-size: 6pt; left: 2.5mm; bottom: 2mm; }
figure, .kf, .card, .svc, .tl li, .pillar, .ol li, .src-list li, .demo-list li, .img-list li, .nums > div, .quote, .partners, .pair > div { break-inside: avoid; }
h2, h3, .lbl { break-after: avoid; }

/* ---- full-bleed pages: cover, openers, final ---------------------------- */
.hero, .opener, .final { page: bleed; break-before: page; break-after: page; height: 297mm; min-height: 0; max-height: none; width: 210mm; }
.hero { break-before: auto; }
.hero__img, .opener img, .final > img { inset: 0 !important; height: 100% !important; }
.hero > .frame, .opener .frame, .final .frame { padding: 14mm 16mm 18mm !important; }
.opener .frame { bottom: 0; }
.hero__logo { width: 50mm; }
.hero__kicker { font-size: 24pt; }
.hero__year { font-size: 150pt; }
.hero__claim { font-size: 11pt; max-width: 120mm; }
.hero__main { grid-template-columns: 1fr; }
.hero__cap, .opener .cap { font-size: 6pt; right: 16mm; bottom: 8mm; }
.opener h2 { font-size: 62pt; }
.opener__no { font-size: 7.5pt; }
.final__line { font-size: 48pt; }

/* ---- chapter 1 ----------------------------------------------------------- */
#k1 { break-before: page; }
.kf-top { grid-template-columns: 1fr 1.15fr; gap: 8mm; align-items: start; }
.kf-top .pic { aspect-ratio: auto; height: 70mm; }
.kf-lead { margin-top: 14mm; }
.kf-lead__num { font-size: 120pt; }
.kf-grid-wrap { grid-template-columns: 1fr; margin-top: 12mm; break-before: page; }
.kf-grid-wrap .pic { aspect-ratio: auto; height: 70mm; }
.kf-grid { grid-template-columns: repeat(3, 1fr); gap: 10mm 7mm; }
.kf__num { font-size: 36pt; }
.kf .caps { font-size: 6.8pt; margin-top: 2mm; }
.kf__delta { font-size: 7pt; margin-top: 2mm; }

/* ---- chapter 2 ----------------------------------------------------------- */
.fw { grid-template-columns: 1.4fr 1fr; gap: 10mm; }
.fw .pic { aspect-ratio: 4 / 5; }
.fw .body, .fw__ph { margin-left: 0 !important; }
.fw .body { margin-top: 5mm; }
.cmp { grid-template-columns: 1fr; }
.cmp__stage { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm 8mm; }
.panel { display: block !important; break-inside: avoid; }
.panel:first-child { grid-column: 1 / -1; }
.panel:first-child .chart { width: 75%; }
.cmp__stage h3 { font-size: 12pt; }
.chart, .card .chart { height: 62mm !important; margin-top: 3mm; }
.panel:first-child .chart { height: 88mm !important; }
.card--wide .chart { height: 72mm !important; }
.tabs__legend { display: none !important; }
.chart-foot { margin-top: 5mm; }
section[data-ch="2"]:has(.cards) { break-before: page; }
.cards { grid-template-columns: 1fr 1fr; gap: 5mm; }
.card { padding: 5mm; border-color: #D3E1D8 !important; }
.card h3 { font-size: 11.5pt; }
.card .caps { font-size: 6.5pt; margin-top: 1mm; }
.card__foot { padding-top: 2mm; }

/* ---- chapter 3 ----------------------------------------------------------- */
#k3 { break-before: page; }
.svc-top { grid-template-columns: 1fr 1fr; gap: 8mm; align-items: end; }
.svc-top .pic { aspect-ratio: auto; height: 52mm; }
.svc-list { margin-top: 8mm; break-before: avoid; }
.svc-top { break-after: avoid; }
.svc { grid-template-columns: 62mm 1fr 26mm; gap: 6mm; padding: 3mm 0; align-items: baseline; }
.svc h3 { font-size: 14pt; }
.svc p { font-size: 8.8pt; }
.gallery { grid-template-columns: 5fr 4fr 3fr; gap: 3mm; margin-top: 8mm; align-items: end; }
.gallery .pic { aspect-ratio: auto !important; }
.gallery .pic:nth-child(1) { height: 46mm; } .gallery .pic:nth-child(2) { height: 38mm; } .gallery .pic:nth-child(3) { height: 32mm; }

/* ---- chapter 4 ----------------------------------------------------------- */
.reg { grid-template-columns: 1.2fr 1fr; gap: 8mm; }
.reg .pic.team { aspect-ratio: auto; height: 66mm; }
.facts { gap: 4mm 6mm; margin-top: 6mm; }
.facts dd { font-size: 9pt; }
.tl { grid-template-columns: repeat(3, 1fr); margin-top: 10mm; }
.tl li { padding: 5mm 5mm 6mm 5mm !important; border-right: 1px solid #D3E1D8 !important; }
.tl li:nth-child(3n+1) { padding-left: 0 !important; }
.tl li:nth-child(3n) { border-right: 0 !important; }
.tl__y { font-size: 26pt; }
.tl__t { font-size: 7.5pt; margin-top: 3mm; }
.tl__x { font-size: 8.5pt; }

/* ---- chapter 5 ----------------------------------------------------------- */
.nums { grid-template-columns: repeat(3, 1fr); gap: 8mm; margin-top: 7mm; }
.nums .v { font-size: 44pt; }
.nums .v--t { font-size: 18pt; }
.nums .caps { font-size: 7pt; }
.eng-body { grid-template-columns: 1.4fr 1fr; gap: 8mm; margin-top: 8mm; padding-top: 5mm; }
section[data-ch="5"].sec--tint { padding-top: 8mm !important; }
section[data-ch="5"].sec--tint .sec-head { margin-bottom: 5mm; }
.quote { margin-top: 5mm !important; } .pair { margin-top: 5mm !important; } .partners { margin-top: 5mm !important; }
.sport { grid-template-columns: 1fr 1fr; gap: 3mm; }
.sport .pic.stadion, .sport .pic.run { aspect-ratio: auto; height: 56mm; margin: 0 !important; }
.quote { grid-template-columns: 1fr; gap: 3mm; margin-top: 8mm; }
.quote blockquote { font-size: 14pt; }
.pair { grid-template-columns: 1fr 1fr; gap: 8mm; margin-top: 8mm; }
.pair h3 { font-size: 13pt; margin: 2mm 0; }
.partners { margin-top: 8mm; }
.partners__h strong { font-size: 24pt; }
.partners ul { columns: 4; column-gap: 5mm; }
.partners li { font-size: 7.8pt; padding: 1.4mm 0; }

/* ---- chapter 6 ----------------------------------------------------------- */
#k6 { break-before: page; }
.pillars { grid-template-columns: repeat(3, 1fr); }
.pillar { padding: 6mm 5mm 6mm 5mm !important; border-bottom: 0; border-right: 1px solid #D3E1D8 !important; }
.pillar:first-child { padding-left: 0 !important; } .pillar:last-child { border-right: 0 !important; }
.pillar svg { width: 9mm; height: 9mm; margin-bottom: 4mm; }
.pillar h3 { font-size: 13pt; }
.pillar p { font-size: 8.8pt; }
.outlook { margin-top: 14mm; }
.ol li { grid-template-columns: 1.2fr 1fr; gap: 8mm; padding: 6mm 0; }
.ol h3 { font-size: 24pt; }

/* ---- chapter 7 ----------------------------------------------------------- */
#k7 { break-before: page; }
.sources summary { padding: 0 0 5mm; border-top: 0; }
.sources summary .display { font-size: 30pt; }
.src-body { grid-template-columns: 1.3fr 1fr; gap: 8mm; padding: 5mm 0 0; }
.src-list li, .demo-list li { font-size: 7.3pt; padding: 1.3mm 0; line-height: 1.35; }
.demo-list li { padding-left: 5mm; }
.demo-list li::before { top: 2.6mm; width: 2.4mm; height: 2.4mm; }
.src-list a { text-decoration: none; }
.src-list a::after { content: " — " attr(href); font-size: 6.5pt; color: #74857B; overflow-wrap: anywhere; }
.img-list li { font-size: 7pt; padding: 1.1mm 0; line-height: 1.3; }
.img-list li span { font-size: 6.5pt; }

/* ---- footer on the last content page ------------------------------------- */
.foot { display: none !important; }
.final__addr { font-size: 7pt; margin-top: 10mm; }
.final .final__line + .final__addr { margin-top: 12mm; }
.foot-unused { background: none; color: #3A4841; padding: 10mm 0 0; break-inside: avoid; }
.foot img { width: 44mm; content: url("../logo/logo-light.png"); }
.foot address { color: #16231C; font-size: 9pt; }
.foot__g { grid-template-columns: 1.2fr 1fr 1.4fr; gap: 8mm; font-size: 8pt; }
.foot__b { color: #74857B; border-top-color: #D3E1D8; font-size: 6.5pt; margin-top: 6mm; padding-top: 3mm; }

/* ---- no gradients / shadows / transparency in the PDF --------------------
   Some PDF viewers render CSS gradient overlays with a pink/magenta cast.
   Overlays are baked into assets/img/print-*.jpg instead (swapped in by
   finalize()); everything below is flat colour. */
.hero::after, .opener::after, .final::after { display: none !important; }
.pic figcaption, .caption, .hero__cap, .opener .cap { text-shadow: none !important; }
.demo, .demo--light, .pill { background: none !important; }
.demo-list li::before { background: none !important; }
.card, .tt { box-shadow: none !important; }
