/* =========================================================
   base.css
   PEP2030 minimal – globale Grundlagen
   ========================================================= */


/* ---------------------------------------------------------
   Reset / Basiseinstellungen
   --------------------------------------------------------- */
*{
  box-sizing:border-box;
}

html{
  color-scheme:light;
}

body{
  margin:0;
  font-family:var(--font-body);
  font-size:var(--fs-2);
  line-height:var(--lh-copy);
  font-weight:var(--fw-body);
  background:var(--c-bg);
  color:var(--c-fg);
}

strong,
b{
  font-weight:var(--fw-bold);
}

img{
  max-width:100%;
  height:auto;
}

article{
  background:var(--c-bg);
}


/* ---------------------------------------------------------
   Links und Fokus
   --------------------------------------------------------- */
a{
  color:var(--c-accent);
  text-decoration-thickness:.12em;
  text-underline-offset:.18em;
}

a:hover{
  text-decoration-thickness:.16em;
}

:focus-visible{
  outline:3px solid var(--c-focus);
  outline-offset:2px;
}


/* ---------------------------------------------------------
   Layout-Grundstruktur
   --------------------------------------------------------- */
.container{
  max-width:var(--container);
  margin-inline:auto;
  padding-inline:var(--s-3);
}


/* ---------------------------------------------------------
   Skip-Link / Barrierefreiheit
   --------------------------------------------------------- */
.skip-link{
  position:absolute;
  left:-999px;
  top:var(--s-3);
  background:var(--c-focus);
  color:#000;
  padding:var(--s-2) var(--s-3);
  z-index:9999;
}

.skip-link:focus{
  left:var(--s-3);
}


/* ---------------------------------------------------------
   Globale Typografie
   --------------------------------------------------------- */
h1,
h2,
h3{
  font-family:var(--font-heading);
  font-weight:var(--fw-heading);
  letter-spacing:var(--tracking-tight);
}

h1{
  font-size:var(--fs-5);
  line-height:var(--lh-heading);
  margin:0 0 var(--s-3);
}

h2{
  font-size:var(--fs-4);
  line-height:var(--lh-heading);
  margin-top:var(--s-6);
  margin-bottom:var(--s-3);
}

h3{
  font-size:var(--fs-3);
  line-height:1.3;
  margin:var(--s-5) 0 var(--s-2);
}

p{
  margin:0 0 var(--s-3);
}

hr{
  border:0;
  border-top:1px solid var(--c-border);
  margin:var(--s-5) 0;
}

button,
.btn{
  font:inherit;
}


/* ---------------------------------------------------------
   Tabellen
   --------------------------------------------------------- */
table{
  width:100%;
  border-collapse:collapse;
}

th,
td{
  border:1px solid var(--c-border);
  padding:.6rem .75rem;
  vertical-align:top;
}

th{
  background:var(--c-surface);
  text-align:left;
}


/* ---------------------------------------------------------
   WordPress / Inhaltsbereich
   --------------------------------------------------------- */
.entry-content{
  max-width:var(--container);
  font-size:clamp(1.05rem, 1.1vw, 1.15rem);
  line-height:var(--lh-copy);
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote{
  max-width:100%;
}

/* Standardabstand zwischen direkten Blöcken */
.entry-content > * + *{
  margin-top:var(--s-4);
}

/* Dokumentenrhythmus */
.entry-content h2{
  margin-top:calc(var(--s-6) * 1.35);
  margin-bottom:var(--s-3);
}

.entry-content h3{
  margin-top:var(--s-5);
  margin-bottom:var(--s-2);
}

.entry-content p{
  margin-bottom:var(--s-4);
}

.entry-content ul,
.entry-content ol{
  margin-top:0;
  margin-bottom:var(--s-4);
  padding-left:1.4rem;
}

.entry-content li + li{
  margin-top:var(--s-2);
}

.entry-content blockquote{
  margin:var(--s-5) 0;
  padding-left:var(--s-4);
  border-left:4px solid var(--c-border);
}

.entry-content hr,
.entry-content .wp-block-separator{
  margin-top:calc(var(--s-6) * 1.25);
  margin-bottom:calc(var(--s-6) * 1.25);
}

/* Wenn auf H2 direkt Fließtext oder Block folgt:
   bewusst etwas Luft, aber nicht übertrieben */
.entry-content h2 + p,
.entry-content h2 + div,
.entry-content h2 + h3{
  margin-top:var(--s-3);
}

/* Voll- und Wide-Alignments */
.entry-content > .alignwide{
  max-width:min(90ch, 100%);
}

.entry-content > .alignfull{
  max-width:100%;
}

/* CTA-Abstände */
.entry-content > :is(p, ul, ol, blockquote) + :is(.wp-block-buttons, .wp-block-button){
  margin-top:var(--s-6);
}

.entry-content :is(.wp-block-buttons, .wp-block-button){
  margin-top:var(--s-5);
  margin-bottom:calc(var(--s-5) * 1.25);
}

/* Zusätzlicher Abstand für gezielt markierte erste Separatoren */
.entry-content .wp-block-separator.first-separator{
  margin-top:calc(var(--s-6) * 1.5);
}


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


/* ---------------------------------------------------------
   Bewegungsreduktion
   --------------------------------------------------------- */
@media (prefers-reduced-motion:reduce){
  *{
    scroll-behavior:auto !important;
    transition:none !important;
    animation:none !important;
  }
}
