/* ================================================================
   Holzsicht – Skulpturen von Armin Hackl
   Stylesheet · Design-Vision siehe DESIGN.md, Standards siehe STANDARDS.md
   ================================================================ */

/* ----------------------------------------------------------------
   FONTS – lokal gehostet (DSGVO-konform, keine externen Requests)
---------------------------------------------------------------- */
@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-v38-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-v38-latin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: optional;
}
@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-v38-latin-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-v38-latin-300italic.woff2') format('woff2');
  font-weight: 300;
  font-style: italic;
  font-display: optional;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-v20-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------------------------------
   DESIGN TOKENS – siehe DESIGN.md
---------------------------------------------------------------- */
:root {
  --kalk:     #ECEDE7;
  --salbei:   #C6CDBE;
  --moos:     #B4BCA9;
  --moos-t:   #5F6C55;
  --text:     #1E1912;
  --text-2:   #4A4A3E;
  --akzent:   #5F6E58;
  --holz:     #8A5A38;
  --linie:    rgba(30, 25, 18, 0.14);

  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  --text-hero:    clamp(3.5rem, 10vw, 8rem);
  --text-display: clamp(2rem, 5vw, 4rem);
  --text-sub:     clamp(1.25rem, 2.4vw, 1.85rem);
  --text-body:    clamp(1rem, 1.15vw, 1.125rem);
  --text-quote:   clamp(1.5rem, 3.2vw, 2.5rem);
  --text-label:   0.8125rem;

  --content-w: 1240px;
  --gutter:    clamp(1.25rem, 4vw, 3rem);

  --z-base:    1;
  --z-card:    10;
  --z-nav:     100;
  --z-overlay: 1000;
}

/* ----------------------------------------------------------------
   RESET & BASE
---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--kalk);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--akzent); }
::selection { background: var(--akzent); color: var(--kalk); }

/* Skip-to-Content-Link (a11y) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--text);
  color: var(--kalk);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: var(--z-overlay);
  border-radius: 2px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; color: var(--kalk); }

/* Fokusring – global, wenn per Tastatur navigiert wird */
:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Screenreader-Only Utility */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border-width: 0;
}

/* ----------------------------------------------------------------
   LAYOUT
---------------------------------------------------------------- */
.wrap {
  max-width: var(--content-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
section { padding-block: clamp(5rem, 12vw, 10rem); position: relative; }
section.salbei { background: var(--salbei); }
section.moos-tief { background: var(--moos-t); color: var(--kalk); }

.kicker {
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--akzent);
  display: inline-block;
  margin-bottom: 1.5rem;
}
section.moos-tief .kicker { color: var(--kalk); opacity: 0.85; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: inherit;
}

p { max-width: 62ch; }
p + p { margin-top: 1.1em; }

/* ----------------------------------------------------------------
   HERO – 40% Bild / 60% Text
---------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  align-items: stretch;
  padding: 0;
  background: var(--kalk);
}
.hero__image {
  background: var(--salbei);
  overflow: hidden;
  position: relative;
}
.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: center;
  animation: hero-zoom 10s ease-out both;
  will-change: transform;
}
@keyframes hero-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}
.hero__text {
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2.25rem;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text);
  font-size: clamp(3.25rem, 8vw, 7rem);
  line-height: 1;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144;
}
.hero__sub {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(0.95rem, 1.15vw, 1.1rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-top: -1rem;
}
.hero__intro {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 42ch;
}
.hero__cta {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text);
  padding: 12px 4px 10px;
  border-bottom: 1px solid var(--text);
  margin-top: 0.5rem;
  transition: color 0.2s ease, border-color 0.2s ease, letter-spacing 0.2s ease;
  min-height: 48px;
}
.hero__cta:hover {
  color: var(--akzent);
  border-bottom-color: var(--akzent);
  letter-spacing: 0.32em;
}
.hero__ausstellung {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--linie);
  border-bottom: 1px solid var(--linie);
  max-width: 44ch;
}
.hero__ausstellung-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--akzent);
}
.hero__ausstellung-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.01em;
}
.hero__ausstellung-title em { font-style: italic; font-weight: 500; }
.hero__ausstellung-meta {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--text-2);
  letter-spacing: 0.04em;
}

/* ----------------------------------------------------------------
   ZUR PERSON
---------------------------------------------------------------- */
.person__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.person__text h2 {
  font-size: var(--text-display);
  margin-bottom: 2.5rem;
  max-width: 14ch;
}
.person__image { position: relative; margin-top: 4rem; }
.person__image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--salbei);
}
.person__caption {
  margin-top: 1rem;
  font-size: var(--text-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* ----------------------------------------------------------------
   FASZINATION DES HOLZES
---------------------------------------------------------------- */
.faszination__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
  margin-bottom: 5rem;
}
.faszination__text h2 {
  font-size: var(--text-display);
  max-width: 12ch;
  margin-bottom: 2rem;
}
.faszination__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: start;
}
.faszination__images figure img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  background: var(--salbei);
}
figcaption {
  margin-top: 0.75rem;
  font-size: var(--text-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
}
.zitat {
  max-width: 46ch;
  margin: clamp(4rem, 8vw, 7rem) auto;
  text-align: center;
  padding-inline: 1rem;
}
.zitat blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: var(--text-quote);
  line-height: 1.25;
  color: var(--text);
  font-variation-settings: "opsz" 100;
}
.zitat cite {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--text-label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--akzent);
}

/* ----------------------------------------------------------------
   SPURENSICHERUNG (Salbei)
---------------------------------------------------------------- */
.spuren__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.spuren__image img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  background: var(--moos);
}
.spuren__text h2 {
  font-size: var(--text-display);
  max-width: 12ch;
  margin-bottom: 2rem;
}
.spuren__signatur {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--akzent);
  margin-top: 2rem;
  font-size: 1.1rem;
}
.spuren__stimme-wrap {
  margin-top: 3rem;
  padding: 2rem 0 2rem 2rem;
  border-left: 2px solid var(--akzent);
  max-width: 40ch;
}
.spuren__stimme {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.4;
  color: var(--text);
}
.spuren__stimme-cite {
  margin-top: 1.25rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--akzent);
}

/* ----------------------------------------------------------------
   BRENNHOLZPASSION
---------------------------------------------------------------- */
.brenn {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.brenn__image {
  width: 100%;
  height: auto;
  display: block;
  background: transparent;
}
.brenn__caption {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  line-height: 1.5;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
  max-width: 48ch;
  margin-inline: auto;
}

/* ----------------------------------------------------------------
   GALERIE (Salbei) – Masonry
---------------------------------------------------------------- */
.galerie__head {
  margin-bottom: clamp(3rem, 6vw, 5rem);
  max-width: 62ch;
}
.galerie__head h2 { font-size: var(--text-display); margin-bottom: 1.25rem; }
.galerie__head p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--text);
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
  line-height: 1.45;
  max-width: 52ch;
}
.galerie__grid {
  column-count: 4;
  column-gap: clamp(0.75rem, 1.2vw, 1.25rem);
}
.galerie__item {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 clamp(0.75rem, 1.2vw, 1.25rem);
  position: relative;
  overflow: hidden;
  background: var(--moos);
}
.galerie__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.galerie__item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem 1.25rem 1rem;
  background: linear-gradient(to top, rgba(20,18,12,0.78) 0%, rgba(20,18,12,0.35) 60%, transparent 100%);
  color: var(--kalk);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
  text-transform: none;
}
.galerie__item:hover figcaption { opacity: 1; transform: none; }
.galerie__item:hover img { transform: scale(1.03); }

.galerie__empty {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--text-2);
  text-align: center;
  padding: 3rem 0;
}

/* Mobile: Titel per Scroll ein-/ausblenden */
@media (hover: none) {
  .galerie__item.in-view figcaption {
    opacity: 1;
    transform: none;
  }
}

/* ----------------------------------------------------------------
   AUSSTELLUNG (Moos tief)
---------------------------------------------------------------- */
.ausstellung { text-align: center; }
.ausstellung .kicker { color: var(--kalk); opacity: 0.7; }
.ausstellung__date {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  letter-spacing: 0.04em;
  color: var(--kalk);
  opacity: 0.9;
  max-width: none;
  margin: 0 auto 2rem;
}
.ausstellung__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 6vw, 4.75rem);
  line-height: 1.08;
  color: var(--kalk);
  max-width: 22ch;
  margin: 0 auto 3rem;
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
}
.ausstellung__title em { font-style: italic; color: var(--kalk); }
.ausstellung__ort {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--kalk);
  max-width: none;
  margin: 0 auto 3rem;
}
.ausstellung__crew {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 720px;
  margin: 0 auto;
  padding-top: 3rem;
  border-top: 1px solid rgba(236,237,231,0.28);
  align-items: center;
}
.ausstellung__crew > div { text-align: center; }
.ausstellung__crew .rolle {
  font-size: var(--text-label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--kalk);
  opacity: 0.7;
  margin-bottom: 0.75rem;
}
.ausstellung__crew .name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  color: var(--kalk);
  line-height: 1.3;
}
.ausstellung__crew .divider {
  background: rgba(236,237,231,0.28);
  align-self: stretch;
}

/* ----------------------------------------------------------------
   FOOTER / KONTAKT
---------------------------------------------------------------- */
footer { padding: clamp(4rem, 8vw, 6rem) 0 3rem; }
.kontakt__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--linie);
}
.kontakt__head { padding-top: 0.25rem; }
.kontakt__lead {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  line-height: 1.35;
  color: var(--text);
  max-width: 22ch;
}
.kontakt__block h3 {
  font-family: var(--font-body);
  font-size: var(--text-label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--akzent);
  font-weight: 500;
  margin-bottom: 1rem;
}
.kontakt__block a {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  color: var(--text);
  border-bottom: 1px solid var(--linie);
  padding: 6px 0;
  transition: border-color 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
}
.kontakt__block a:hover { color: var(--akzent); border-bottom-color: var(--akzent); }
.kontakt__block a svg { flex-shrink: 0; width: 1em; height: 1em; }
.kontakt__block p {
  color: var(--text-2);
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.55;
}
.footer__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 2rem;
  font-size: var(--text-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  gap: 2rem;
  flex-wrap: wrap;
}
.footer__meta nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; }
.footer__wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--text);
}

/* ----------------------------------------------------------------
   PFLICHTSEITEN – Impressum / Datenschutz / Barrierefreiheit
---------------------------------------------------------------- */
.legal { padding-block: clamp(4rem, 10vw, 8rem); }
.legal .wrap { max-width: 780px; }
.legal h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 2.5rem;
  line-height: 1.15;
}
.legal h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}
.legal h3 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--akzent);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.legal p, .legal li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  max-width: 68ch;
}
.legal ul { margin: 0.5rem 0 1rem 1.5rem; }
.legal li { margin-bottom: 0.4rem; }
.legal a {
  color: var(--akzent);
  border-bottom: 1px solid var(--linie);
  padding-bottom: 1px;
}
.legal a:hover { border-bottom-color: var(--akzent); }
.legal__back {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--akzent);
  border-bottom: 1px solid var(--linie);
  padding: 8px 0;
  min-height: 48px;
}
.legal__back--top    { margin-bottom: 2rem; }
.legal__back--bottom { margin-top: 4rem; }

/* Mobile: oberen Back-Link anheften, unteren ausblenden */
@media (max-width: 900px) {
  .legal__back--top {
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
    display: block;
    background: var(--kalk);
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    padding-block: 14px;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--linie);
    box-shadow: 0 4px 12px rgba(30, 25, 18, 0.04);
  }
  .legal__back--bottom { display: none; }
}

/* ----------------------------------------------------------------
   RESPONSIVE – Breakpoints laut STANDARDS.md
---------------------------------------------------------------- */
@media (max-width: 1024px) { .galerie__grid { column-count: 3; } }
@media (max-width: 768px)  {
  .galerie__grid {
    column-count: 2;
    column-gap: 0.5rem;
  }
  .galerie__item { margin-bottom: 0.5rem; }
  /* Caption kompakter auf Mobile */
  .galerie__item figcaption {
    padding: 1rem 0.75rem 0.75rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero__image { order: -1; aspect-ratio: 4 / 5; max-height: 60vh; }
  .hero__text { padding: clamp(2.5rem, 8vw, 4rem) var(--gutter); gap: 1.75rem; }

  .person__grid,
  .faszination__grid,
  .spuren__grid,
  .kontakt__grid { grid-template-columns: 1fr; }

  .faszination__images { grid-template-columns: 1fr 1fr; }

  .ausstellung__crew {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .ausstellung__crew .divider {
    height: 1px;
    width: 60px;
    justify-self: center;
    align-self: center;
  }
}

@media (max-width: 640px) {
  .footer__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    letter-spacing: 0.1em;
  }
  .footer__meta nav { gap: 0.5rem 1.25rem; }
}

/* ----------------------------------------------------------------
   PREFERS-REDUCED-MOTION
---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ----------------------------------------------------------------
   PRINT
---------------------------------------------------------------- */
@media print {
  .skip-link, .footer__meta nav { display: none; }
  body { background: white; color: black; }
  section, footer { padding-block: 1.5rem; }
  section.salbei, section.moos-tief { background: white; color: black; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero__image { display: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  h1, h2, h3 { page-break-after: avoid; }
  img, figure { page-break-inside: avoid; max-width: 100%; }
}
