/* -------------------------------------------------------
   Fonts (Guide: Poppins × Merriweather)
------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Merriweather:wght@400;700&display=swap');

/* -------------------------------------------------------
   Root / Tokens
------------------------------------------------------- */
:root{
  /* Farben */
  --color-bg: #fdfdfd;
  --color-text: #2d2d2d;
  --color-heading: #1a1a1a;
  --color-muted: #555;
  --color-link: #0066aa;

  /* Typo */
  --font-body: 'Merriweather', serif;
  --font-head: 'Poppins', sans-serif;

  /* Basisgrößen */
  --font-base-mobile: 15px;   /* Body mobile */
  --font-base-desktop: 16px;  /* Body desktop */
  --leading: 1.618;           /* Goldener Schnitt */

  /* Spacings */
  --space-1: .3rem;
  --space-2: .6rem;
  --space-3: 1rem;
  --space-4: 2rem;
}

/* -------------------------------------------------------
   Base – mobile first
------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body{
  margin: 0;
  padding: var(--space-3);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--font-base-mobile);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* -------------------------------------------------------
   Headings
------------------------------------------------------- */
h1, h2, h3, h4, h5{
  margin-top: var(--space-2);
  margin-bottom: var(--space-1);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-heading);
}

/* Mobile sizes (Guide) */
h1{ font-size: 42px; }
h2{ font-size: 26px; }
h3{ font-size: 18px; }
h4{ font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
h5{ font-size: 9px;  text-transform: uppercase; letter-spacing: .05em; }

p{ margin: var(--space-2) 0; }
strong{ font-weight: 700; }
em{ font-style: italic; }

/* Abschnittstitel in Guides / Demos */
header, footer{ margin-bottom: var(--space-4); }
section > h2{
  font-weight: 700;
  font-size: 20px;
  margin-bottom: var(--space-3);
  color: #111;
}

/* -------------------------------------------------------
   Listen (">" statt Bullet)
------------------------------------------------------- */
ul, ol{ list-style: none; padding-left: 1.2rem; margin: 0 0 var(--space-3); }
ul li, ol li{
  position: relative;
  margin-bottom: .4rem;
}
ul li::before, ol li::before{
  content: '>';
  position: absolute;
  left: -1.2rem;
  color: #666;
}

/* -------------------------------------------------------
   Tabellen – Linie unter jeder Zeile
------------------------------------------------------- */
table{ width:100%; border-collapse: collapse; margin: 0 0 var(--space-3); }
th, td{ text-align:left; padding: .6rem 0; }
tr{ border-bottom: 1px solid #ddd; }

/* -------------------------------------------------------
   Links – Balken-Hover + Farbwechsel
------------------------------------------------------- */
a{
  position: relative;
  color: var(--color-link);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding: .1rem 0;
  transition: color .3s ease;
  z-index: 0;
}
a::after{
  content: '';
  position: absolute; left: 0; bottom: 0;
  height: 100%; width: 0; background-color: var(--color-link);
  z-index: -1; transition: width .3s ease;
}
a:hover, a:focus{ color: #fff; }
a:hover::after, a:focus::after{ width: 100%; }

/* -------------------------------------------------------
   Buttons
------------------------------------------------------- */
.btn{
  display:inline-block;
  background:#333; color:#fff;
  padding:.5rem 1rem; border:none; border-radius:.3rem;
  font-family: var(--font-head); font-size:14px; font-weight:600;
  cursor:pointer; transition: background-color .3s ease;
  margin-top: var(--space-2); text-decoration:none;
}
.btn:hover, .btn:focus{ background:#555; }

/* -------------------------------------------------------
   Formulare
------------------------------------------------------- */
form label{
  display:block; font-family: var(--font-head);
  font-size:12px; margin-top: var(--space-2); color:#444;
}
input[type="text"], input[type="email"], textarea, select{
  width:100%; padding:.6rem; margin-top:.2rem;
  border:1px solid #ccc; border-radius:.3rem;
  font-family: inherit; font-size:14px;
}
input:focus, textarea:focus, select:focus{
  outline: none; border-color:#777;
  box-shadow: 0 0 0 3px rgba(100,100,255,.2);
}

/* -------------------------------------------------------
   Blockquote
------------------------------------------------------- */
blockquote{
  border-left: 4px solid #ccc;
  margin: .8rem 0;
  padding-left: .8rem;
  font-style: italic;
  color: #555;
}

/* -------------------------------------------------------
   Optional: H2 Blur Loading Effekt (Smoky)
------------------------------------------------------- */
@keyframes h2-blur {
  0%, 80%, 100% { filter: blur(0); }
  40%          { filter: blur(20px); }
}
h2.loading-blur span{
  display:inline-block;
  animation: h2-blur 3s linear infinite;
}
/* Verzögerungen */
h2.loading-blur span:nth-child(1){  animation-delay: 0s;   }
h2.loading-blur span:nth-child(2){  animation-delay: .1s;  }
h2.loading-blur span:nth-child(3){  animation-delay: .2s;  }
h2.loading-blur span:nth-child(4){  animation-delay: .3s;  }
h2.loading-blur span:nth-child(5){  animation-delay: .4s;  }
h2.loading-blur span:nth-child(6){  animation-delay: .5s;  }
h2.loading-blur span:nth-child(7){  animation-delay: .6s;  }
h2.loading-blur span:nth-child(8){  animation-delay: .7s;  }
h2.loading-blur span:nth-child(9){  animation-delay: .8s;  }
h2.loading-blur span:nth-child(10){ animation-delay: .9s;  }
h2.loading-blur span:nth-child(11){ animation-delay: 1.0s; }
h2.loading-blur span:nth-child(12){ animation-delay: 1.1s; }
h2.loading-blur span:nth-child(13){ animation-delay: 1.2s; }

/* -------------------------------------------------------
   Bestehende Menü-/Drawer-Styles
------------------------------------------------------- */
.site-header{ position:relative; padding: 1rem; }

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

/* Burger Button */
.burger{
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  width: 2.5rem;
  height: 2rem;
  position: relative;
  z-index: 1002;
}
.burger:focus{ outline: 2px solid #0066aa; outline-offset: 2px; }

.burger-lines{
  display: block;
  width: 100%;
  height: .2rem;
  background: #333;
  border-radius: 2px;
  position: relative;
  transition: background .2s ease;
}
.burger-lines::before,
.burger-lines::after{
  content: '';
  position: absolute;
  left: 0; width: 100%; height: 100%;
  background: inherit; border-radius: inherit;
  transition: transform .25s ease;
}
.burger-lines::before{ top: -.6rem; }
.burger-lines::after{  top: .6rem; }

/* X-State */
.burger.is-open .burger-lines{
  background: transparent;
}
.burger.is-open .burger-lines::before{
  transform: translateY(.6rem) rotate(45deg);
}
.burger.is-open .burger-lines::after{
  transform: translateY(-.6rem) rotate(-45deg);
}

/* Drawer rechts */
.nav{
  position: fixed; top:0; right:0; width:80%; max-width:320px; height:100vh;
  background:#fff; color:#000; transform: translateX(100%);
  transition: transform .3s ease; padding: 2rem; z-index:1000;
  box-shadow: -4px 0 6px rgba(0,0,0,.15);
  border-top-left-radius: 20px; border-bottom-left-radius: 20px;
}
.nav ul{ list-style:none; padding:0; margin:0; }
.nav li{ margin-bottom: 1rem; }
.nav-link{
  color:#000; text-decoration:none; font-size:1.25rem; display:block; padding:.5rem 0;
}
.nav-link.active{ font-weight:700; }

/* Off-Canvas linkes Menü */
#site-nav{
  position:fixed; top:0; left:0; bottom:0;
  width:100%; max-width:420px;
  background:#fff; color:#000; overflow:auto;
  transform:translateX(-100%); transition:transform .25s ease; z-index:1000;
}
#site-nav.closed{ transform: translateX(-100%); pointer-events:none; }
#site-nav.open{   transform: translateX(0);       pointer-events:auto; }

/* -------------------------------------------------------
   Desktop-Anpassungen
------------------------------------------------------- */
@media (min-width: 768px){
  body{ font-size: var(--font-base-desktop); padding: var(--space-4); }

  /* Desktop-Typo Größen */
  h1{ font-size: 60px; }
  h2{ font-size: 37px; }
  h3{ font-size: 23px; }
  h4{ font-size: 14px; }
  h5{ font-size: 10px; }

  /* Listen etwas luftiger */
  ul li, ol li{ margin-bottom: .6rem; }
}


/* ========================================
   NEUES PHYSIK-MENÜ (aus menu.html)
======================================== */

/* Menu Container (oben links) */
.menu-container {
  position: fixed;
  top: max(40px, env(safe-area-inset-top) + 40px);
  left: max(40px, env(safe-area-inset-left) + 40px);
  z-index: 1100;
}

/* MENU Button */
.menu-btn {
  background: linear-gradient(135deg, #f25757 0%, #e84545 100%);
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 16px;
  font-weight: bold;
  font-family: var(--font-head);
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 1px;
}

.menu-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.menu-btn:active {
  transform: translateY(0);
}

/* Close Button */
.close-btn {
  background: linear-gradient(135deg, #8b7355 0%, #6d5a46 100%);
  padding: 12px 30px;
  font-size: 14px;
  font-family: var(--font-head);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
  transition: transform 0.2s, box-shadow 0.2s;
  display: none;
  margin-top: 10px;
}

.close-btn.active {
  display: block;
}

.close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

/* Menu Items Container */
.menu-items {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1050;
}

/* Menu Item Base */
.menu-item {
  position: absolute;
  color: white;
  border: none;
  font-size: 18px;
  font-weight: bold;
  font-family: var(--font-head);
  border-radius: 12px; /* GEÄNDERT: Weniger Rundung für bessere Kollision */
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Keine globalen Link-Styles auf Menu Items */
.menu-item::after {
  content: none !important;
}

.menu-item:hover,
.menu-item:focus {
  color: white;
  text-decoration: none;
}

.menu-item.hidden {
  display: none;
}

/* Individuelle Styles für jedes Menu Item */
.menu-item {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
}

.menu-item:nth-child(1) {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  height: 70px;
  font-size: 20px;
}

.menu-item:nth-child(2) {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  height: 80px;
  font-size: 19px;
}

.menu-item:nth-child(3) {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  height: 90px;
  font-size: 21px;
}

.menu-item:nth-child(4) {
  background: linear-gradient(135deg, #fccb90 0%, #d57eeb 100%);
  height: 75px;
  font-size: 18px;
}

/* Desktop: Größere Buttons */
@media (min-width: 768px) {
  .menu-item:nth-child(1) {
    width: 380px;
    height: 90px;
    font-size: 24px;
  }

  .menu-item:nth-child(2) {
    width: 420px;
    height: 95px;
    font-size: 23px;
  }

  .menu-item:nth-child(3) {
    width: 400px;
    height: 100px;
    font-size: 25px;
  }

  .menu-item:nth-child(4) {
    width: 360px;
    height: 85px;
    font-size: 22px;
  }
}
