/*
Theme Name: GUTenbergschule
Theme URI:
Author URI:
Description: Individuelles Theme für GUTenbergschule. Enthält Startseite, Fragen, Über uns und Datenschutzerklärung.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: gutenbergschule
*/

:root{
  --bg: #ffffff;
  --bg-soft: #eef6fc;
  --card: #ffffff;
  --text: #14202b;
  --text-dim: #5b7a90;
  --accent: #2f80ed;
  --accent-2: #38bdf8;
  --on-accent: #ffffff;
  --border: #d7e8f7;
  --radius: 26px;
  --radius-sm: 14px;
  --maxw: 880px;
}

*{box-sizing:border-box;}

body{
  margin:0;
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  position: relative;
}

/* Sehr dezenter Parallax-Hintergrund: bleibt beim Scrollen fix stehen,
   während der Inhalt darüber scrollt – erzeugt Tiefe ohne JS/Ruckeln */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 12%, #38bdf812, transparent 42%),
    radial-gradient(circle at 85% 28%, #2f80ed12, transparent 40%),
    radial-gradient(circle at 50% 85%, #38bdf80d, transparent 45%),
    var(--bg);
}
@media (prefers-reduced-motion: reduce){
  body::before{ position: absolute; }
}

header.site-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px clamp(20px, 5vw, 60px);
  border-bottom: none;
  border-radius: var(--radius);
}
header.site-header::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
  background-size: 220% 100%;
  animation: kwi-edge-flow 7s linear infinite;
  opacity: 0.8;
}

.logo{
  font-weight:800;
  font-size:1.4rem;
  letter-spacing:-0.02em;
  color:var(--text);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
}
.logo span{
  color: var(--accent);
}
.logo-icon{
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
}

nav.site-nav a{
  color: var(--text-dim);
  text-decoration:none;
  margin-left: 24px;
  font-size:0.95rem;
}
nav.site-nav a:hover{ color: var(--text); }

main{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.hero h1{
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0 0 14px;
  letter-spacing: -0.03em;
}
.hero p{
  color: var(--text-dim);
  font-size: 1.15rem;
  max-width: 60ch;
}

.cta{
  display:inline-block;
  margin-top: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration:none;
}

.legal main{
  padding-top: clamp(30px, 6vw, 60px);
  animation: legal-fade-in 0.6s ease both;
}
@keyframes legal-fade-in{
  from{ opacity: 0; transform: translateY(14px); }
  to{ opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce){
  .legal main{ animation: none; }
}

.legal h1{
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  margin-bottom: 6px;
  letter-spacing:-0.02em;
}

.legal .updated{
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.legal h2{
  font-size: 1.2rem;
  margin-top: 40px;
  color: var(--accent);
}

.legal h3{
  font-size: 1.05rem;
  margin-top: 28px;
  color: var(--text);
}

.legal p, .legal li{
  color: var(--text);
}

.legal ul{
  padding-left: 20px;
}

.legal a{
  color: var(--accent);
}

.legal table{
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 30px;
  font-size: 0.95rem;
}
.legal table th,
.legal table td{
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.legal table th{
  color: var(--accent);
  font-weight: 700;
}
@media (max-width: 600px){
  .legal table{ font-size: 0.85rem; }
  .legal table th, .legal table td{ padding: 8px; }
}

.placeholder{
  background: #2f80ed1a;
  border: 1px dashed #2f80ed80;
  color: #bfe0ff;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.95em;
}

footer.site-footer{
  border-top: 1px solid #ffffff12;
  padding: 30px clamp(20px, 5vw, 60px);
  display:flex;
  flex-wrap:wrap;
  gap: 16px 28px;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.9rem;
}

footer.site-footer .legal-links a{
  color: var(--text-dim);
  text-decoration:none;
  margin-right: 20px;
}
footer.site-footer .legal-links a:hover{
  color: var(--accent);
}

@media (max-width: 520px){
  footer.site-footer{ flex-direction:column; }
}

/* ---- Homepage sections ---- */
.home main, .front-page main{ max-width: 1120px; padding: 0; }

.section{ padding: 90px clamp(20px,5vw,60px); }
.section.alt{ background: var(--bg-soft); }

.eyebrow{
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero{
  padding: 24px clamp(20px,5vw,60px) 60px;
  text-align:center;
}

/* Temporärer Lückenfüller (Logo) über dem Hero-Text – bei Bedarf einfach
   diesen Block und das <img class="hero-logo-fill"> in front-page.php wieder entfernen */
.hero-logo-fill{
  display:block;
  width: clamp(90px, 12vw, 140px);
  height: auto;
  margin: 0 auto 20px;
  border-radius: var(--radius-sm);
}
.hero p{ margin: 0 auto; }
.hero .ctas{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin-top:30px; }
.cta.ghost{
  background:none;
  border: 1px solid #ffffff30;
  color: var(--text);
}

.stat-row{
  display:flex;
  gap: 40px;
  justify-content:center;
  flex-wrap:wrap;
  margin-top: 50px;
}

/* Vertrauens-Leiste: als Badges hervorgehoben, aber ruhig gehalten */
.trust-bar{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap: 10px 12px;
  margin-top: 26px;
  letter-spacing: 0.01em;
}
.trust-bar span{
  display:inline-flex;
  align-items:center;
  gap:7px;
  white-space:nowrap;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff10, #ffffff05);
  border: 1px solid #ffffff20;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), border-color 0.25s ease, background 0.25s ease;
}
.trust-bar span:hover{
  transform: translateY(-2px);
  border-color: #2f80ed60;
  background: linear-gradient(180deg, #2f80ed22, #ffffff05);
}
.trust-icon{ font-size: 1rem; }
@media (max-width: 700px){
  .trust-bar{ gap: 8px 10px; }
  .trust-bar span{ font-size: 0.76rem; padding: 7px 13px; }
}
.stat{ text-align:center; }
.stat .num{ font-size: 2rem; font-weight:800; color: var(--accent); }
.stat .label{ color: var(--text-dim); font-size: 0.85rem; }

.chat-demo{
  max-width: 480px;
  margin: 50px auto 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
  text-align:left;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
  animation: chatFloat 4.5s ease-in-out infinite, kwi-border-flow 9s linear infinite;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent)) border-box;
  background-size: 100% 100%, 260% 260%;
}
.chat-demo-bar{
  display:flex;
  align-items:center;
  gap:7px;
  padding: 12px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid #ffffff10;
}
.chat-demo-bar .dot{
  width:9px; height:9px; border-radius:50%;
  background: #ffffff20;
}
.chat-demo-title{
  margin-left: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.chat-demo-body{ padding: 18px; }
.chat-demo .bubble{
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: 0.92rem;
  max-width: 85%;
}
.chat-demo .user{ background:#332a4d; margin-left:auto; }
.chat-demo .ai{ background: linear-gradient(135deg, #2e2547, #241c38); border:1px solid #2f80ed40; }

@keyframes chatFloat{
  0%, 100%{ transform: translateY(0) rotate(0deg); }
  50%{ transform: translateY(-14px) rotate(-0.4deg); }
}
@media (prefers-reduced-motion: reduce){
  .chat-demo{ animation: none; }
}

.grid-3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
@media (max-width: 800px){ .grid-3{ grid-template-columns: 1fr; } }

.card{
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 28px;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent)) border-box;
  background-size: 100% 100%, 260% 260%;
  animation: kwi-border-flow 9s linear infinite;
}
.card .icon{
  font-size: 1.5rem;
  width: 48px; height: 48px;
  display:flex; align-items:center; justify-content:center;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  background: linear-gradient(135deg, #2f80ed22, #38bdf822);
  border: 1px solid #ffffff10;
}
.card h3{ margin: 0 0 10px; font-size: 1.1rem; }
.card p{ color: var(--text-dim); font-size: 0.92rem; margin:0; }
.card ul{ margin: 14px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 0.9rem; }

.steps{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
@media (max-width: 800px){ .steps{ grid-template-columns: 1fr; } }
.step .num{
  width: 40px; height:40px; border-radius:50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent); font-weight:800;
  display:flex; align-items:center; justify-content:center;
  margin-bottom: 16px;
}
.step h4{ margin: 0 0 8px; }
.step p{ color: var(--text-dim); font-size: 0.92rem; margin:0; }

.pricing-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
@media (max-width: 900px){ .pricing-grid{ grid-template-columns: 1fr; } }

.plan{
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent)) border-box;
  background-size: 100% 100%, 260% 260%;
  animation: kwi-border-flow 9s linear infinite;
}
.plan.featured{
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
  background: linear-gradient(var(--card), var(--card)) padding-box;
  animation: none;
}
.plan .badge{
  position:absolute; top:-12px; left:28px;
  background: var(--accent); color: var(--on-accent);
  font-size:0.72rem; font-weight:800;
  padding: 4px 10px; border-radius: 999px;
}
.plan h3{ margin:0 0 6px; }
.plan .price{ font-size: 2rem; font-weight:800; margin: 10px 0; }
.plan .desc{ color: var(--text-dim); font-size:0.9rem; margin-bottom: 18px; }
.plan ul{ list-style:none; padding:0; margin:0 0 24px; }
.plan li{ padding: 6px 0; font-size: 0.92rem; color: var(--text); }
.plan .cta{ width:100%; text-align:center; box-sizing:border-box; }

.cta-banner{
  text-align:center;
  padding: 80px clamp(20px,5vw,60px);
}
.cta-banner h2{ font-size: clamp(1.6rem,4vw,2.4rem); margin-bottom:16px; }
.cta-banner p{ color: var(--text-dim); max-width:60ch; margin:0 auto 30px; }
.cta-banner .ctas{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

.contact-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 40px;
}
@media (max-width: 800px){ .contact-grid{ grid-template-columns: 1fr; } }

.contact-item{ display:flex; gap:14px; margin-bottom: 26px; }
.contact-item .icon{ font-size:1.3rem; }
.contact-item h4{ margin:0 0 4px; font-size:0.95rem; }
.contact-item p{ margin:0; color: var(--text-dim); font-size:0.9rem; }
.contact-item a{ color: var(--text-dim); text-decoration:none; }
.contact-item a:hover{ color: var(--accent); }

.form input, .form select, .form textarea{
  width:100%;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--text-dim) 40%, transparent);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  margin-bottom: 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.form input:focus, .form select:focus, .form textarea:focus{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
}
.form label{ font-size: 0.85rem; color: var(--text-dim); display:block; margin-bottom: 6px; }
.form button{
  border:none;
  cursor:pointer;
  font-family:inherit;
}
#gutenbergschuleFormSubmit{
  display:block;
  width:100%;
  text-align:center;
  font-size: 1rem;
  margin-top: 6px;
}
#gutenbergschuleFormSubmit:disabled{
  opacity: 0.7;
  cursor: default;
  transform: none !important;
}
.hp-field{
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.form-status{
  margin: 14px 0 0;
  font-size: 0.88rem;
  min-height: 1.3em;
  color: var(--text-dim);
}
.form-status.success{ color: #4ade80; }
.form-status.error{ color: #f87171; }

.section > .section-head{ text-align:center; max-width: 640px; margin: 0 auto 10px; }
.section-head h2{ font-size: clamp(1.5rem,4vw,2.1rem); margin: 0 0 12px; }
.section-head p{ color: var(--text-dim); margin:0; }
.section-head.left{ text-align:left; margin:0 0 10px; }
.pricing-note{
  margin: 10px auto 0 !important;
  font-size: 0.85rem !important;
  color: var(--accent) !important;
  opacity: 0.9;
}

/* ---- KI-Chatbot: fester Floating-Widget unten rechts (mwai_chatbot) ---- */
/* Fixed statt in-page, damit der Chat auf JEDER Seite und beim Scrollen
   immer erreichbar bleibt – wie ein klassischer Support-Chat-Bubble. */
.gutenbergschule-widget{
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 9999;
}

/* AI-Engine-eigene CSS-Variablen etwas größer/passend zum Theme setzen,
   damit das geöffnete Chat-Fenster gut lesbar ist statt winzig zu wirken */
.gutenbergschule-widget{
  --mwai-window-width: 380px;
  --mwai-window-height: min(70vh, 640px);
  --mwai-fullscreen-height: 88vh;
}
@media (max-width: 480px){
  .gutenbergschule-widget{
    right: 10px;
    bottom: 10px;
    --mwai-window-width: calc(100vw - 20px);
  }
}

.footer-full{
  background: var(--bg-soft);
  border-top: none;
  border-radius: var(--radius);
  padding: 60px clamp(20px,5vw,60px) 30px;
  position: relative;
}
.footer-full::before{
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-2));
  background-size: 220% 100%;
  animation: kwi-edge-flow 7s linear infinite reverse;
  opacity: 0.8;
}
.footer-grid{
  display:grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  max-width: 1120px;
  margin: 0 auto;
}
@media (max-width: 700px){ .footer-grid{ grid-template-columns: 1fr; } }
.footer-grid h5{ color:var(--text); margin: 0 0 14px; font-size:0.9rem; }
.footer-grid ul{ list-style:none; padding:0; margin:0; }
.footer-grid li{ margin-bottom: 10px; }
.footer-grid a{ color: var(--text-dim); text-decoration:none; font-size:0.9rem; }
.footer-grid a:hover{ color: var(--accent); }
.footer-bottom{
  max-width:1120px; margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid #ffffff12;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
  color: var(--text-dim); font-size:0.85rem;
}
.footer-bottom a{ color: var(--text-dim); margin-left: 16px; text-decoration:none; }
.footer-bottom a:hover{ color: var(--accent); }

/* =========================================================
   ANIMATIONS & MODERN INTERACTIONS
   ========================================================= */

html{ scroll-behavior: smooth; }

/* Wiederverwendbare Rand-Animationen: lassen einen Farbverlauf
   langsam am Rand eines Blocks entlangwandern -> deutlich sichtbarer
   Kontrast zum Hintergrund, ohne aufdringlich zu wirken. */
@keyframes kwi-border-flow{
  0%   { background-position: 0 0, 0% 50%; }
  100% { background-position: 0 0, 200% 50%; }
}
@keyframes kwi-edge-flow{
  0%   { background-position: 0% 0; }
  100% { background-position: 220% 0; }
}

/* Sticky Header: bleibt beim Scrollen oben fixiert */
header.site-header{
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(20,17,31,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header.is-scrolled{
  box-shadow: 0 8px 24px -12px rgba(0,0,0,0.5);
}

/* Scroll-reveal system (für Inhalte UNTERHALB des ersten Bildschirms –
   bis der Nutzer dorthin scrollt, hatte das JS längst Zeit zu laden) */
.reveal{
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.7s cubic-bezier(.22,.9,.32,1), transform 0.7s cubic-bezier(.22,.9,.32,1);
  transition-delay: calc(var(--d, 0) * 90ms);
  will-change: opacity, transform;
}
.reveal.in-view{
  opacity: 1;
  transform: none;
}

/* Der Hero ist beim Laden SOFORT sichtbar - keine Einblend-Animation,
   damit unter dem Header nie eine leere/dunkle Fläche zu sehen ist. */
.hero .reveal{
  opacity: 1;
  transform: none;
  animation: none;
}

/* Hero ambient glow (signature element) */
.hero{ position: relative; overflow: hidden; }
.hero-glow{ display: none; }
.hero-glow-disabled{
  position: absolute;
  top: -220px;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 30% 30%, #2f80ed40, transparent 60%),
    radial-gradient(circle at 70% 60%, #38bdf836, transparent 55%);
  filter: blur(10px);
  animation: drift 11s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
.hero > *{ position: relative; z-index: 1; }

@keyframes drift{
  0%   { transform: translateX(-54%) translateY(0) scale(1); }
  100% { transform: translateX(-46%) translateY(46px) scale(1.12); }
}

/* Buttons */
.cta{
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), box-shadow 0.3s ease, filter 0.3s ease;
}
.cta:hover{
  transform: translateY(-5px) scale(1.035);
  box-shadow: 0 22px 48px -12px color-mix(in srgb, var(--accent) 60%, transparent);
  filter: brightness(1.1);
}
.cta.ghost:hover{
  background: #ffffff14;
  box-shadow: none;
  border-color: #ffffff77;
}
.cta:active{ transform: translateY(-1px) scale(0.98); }

/* Cards & steps lift on hover */
.card, .step, .plan, .contact-item{
  transition: transform 0.4s cubic-bezier(.22,.9,.32,1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.card:hover, .plan:hover{
  transform: translateY(-10px) scale(1.015);
  box-shadow: 0 28px 52px -20px rgba(0,0,0,0.6);
  border-color: #2f80ed70;
}
.plan.featured{
  animation: glow-pulse 2.4s ease-in-out infinite;
}
@keyframes glow-pulse{
  0%, 100% { box-shadow: 0 0 0 1px var(--accent) inset, 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
  50%      { box-shadow: 0 0 0 1px var(--accent) inset, 0 0 60px -2px color-mix(in srgb, var(--accent) 75%, transparent); }
}

/* Stat numbers */
.stat .num{ transition: transform 0.35s cubic-bezier(.34,1.56,.64,1); }
.stat:hover .num{ transform: scale(1.15); }

/* Chat demo typing */
.bubble.ai.typing-target{ min-height: 1.6em; }
.typing-dots{
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 1em;
}
.typing-dots span{
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  animation: bounce 1s ease-in-out infinite;
}
.typing-dots span:nth-child(2){ animation-delay: 0.15s; }
.typing-dots span:nth-child(3){ animation-delay: 0.3s; }
@keyframes bounce{
  0%, 60%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
  30% { transform: translateY(-8px) scale(1.15); opacity: 1; }
}
.typing-cursor{
  display: inline-block;
  width: 2px;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 0.9s steps(1) infinite;
}
@keyframes blink{ 50%{ opacity: 0; } }

/* Nav link underline animation */
nav.site-nav a{ position:relative; transition: color 0.25s ease; }
nav.site-nav a::after{
  content:"";
  position:absolute;
  left:0; right:100%;
  bottom:-4px;
  height:2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: right 0.3s cubic-bezier(.22,.9,.32,1);
}
nav.site-nav a:hover::after{ right:0; }

/* ---- Nav-Dropdown "Schulleben" ---- */
.nav-dropdown{
  position: relative;
  display: inline-block;
  margin-left: 24px;
}
.nav-dropdown summary{
  list-style: none;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-family: inherit;
  user-select: none;
}
.nav-dropdown summary::-webkit-details-marker{ display:none; }
.nav-dropdown summary::after{
  content: "▾";
  font-size: 0.7em;
  margin-left: 5px;
  display: inline-block;
  transition: transform 0.2s ease;
}
.nav-dropdown[open] summary::after{ transform: rotate(180deg); }
.nav-dropdown summary:hover{ color: var(--text); }

.nav-dropdown-menu{
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  min-width: 220px;
  box-shadow: 0 12px 30px #0000001a;
  z-index: 20;
}
.nav-dropdown-menu a{
  display: block;
  margin: 0 !important;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  white-space: nowrap;
}
.nav-dropdown-menu a::after{ display:none; }
.nav-dropdown-menu a:hover{ background: var(--bg-soft); }

@media (max-width: 700px){
  .nav-dropdown{ margin-left: 0; display:block; }
  .nav-dropdown summary{ margin: 0 0 14px; font-size: 1.05rem; }
  .nav-dropdown-menu{
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 0 14px;
    min-width: 0;
  }
  .nav-dropdown-menu a{ padding: 6px 0; margin: 0 0 10px !important; }
}

/* Logo hover micro-animation */
.logo{ transition: transform 0.25s ease, filter 0.25s ease; }
.logo:hover{ transform: translateY(-1px); filter: brightness(1.1); }

/* ---- Hell/Dunkel-Umschalter ----
   Weiß mit dem klassischen GUTenbergschule-Blauton, statt des
   dunkel-transparenten Stils der kwichat-Vorlage. */
.theme-toggle{
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: #ffffff;
  color: var(--accent);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 2px 8px -4px rgba(47,128,237,0.35);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.theme-toggle:hover{
  transform: translateY(-1px);
  background: var(--bg-soft);
  box-shadow: 0 4px 12px -4px rgba(47,128,237,0.45);
}
.theme-icon{ position: absolute; transition: opacity 0.25s ease, transform 0.35s cubic-bezier(.34,1.56,.64,1); }
.theme-icon-sun{ opacity: 1; transform: scale(1) rotate(0deg); }
.theme-icon-moon{ opacity: 0; transform: scale(0.5) rotate(40deg); }
[data-theme="dark"] .theme-icon-sun{ opacity: 0; transform: scale(0.5) rotate(-40deg); }
[data-theme="dark"] .theme-icon-moon{ opacity: 1; transform: scale(1) rotate(0deg); }
[data-theme="dark"] .theme-toggle{
  background: #14202b;
  border-color: var(--accent-2);
  color: var(--accent-2);
}

/* Language switch pill toggle */
.lang-switch{
  position: relative;
  display: inline-flex;
  align-items: center;
  background: #ffffff0d;
  border: 1px solid #ffffff1c;
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-pill{
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform 0.3s cubic-bezier(.22,.9,.32,1);
  z-index: 0;
}
.lang-switch.lang-en .lang-pill{
  transform: translateX(100%);
}
.lang-btn{
  position: relative;
  z-index: 1;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  padding: 6px 13px;
  border-radius: 999px;
  transition: color 0.25s ease;
}
.lang-btn.is-active{ color: var(--on-accent); }
.lang-btn:not(.is-active):hover{ color: var(--text); }

@media (max-width: 700px){
  .lang-switch{ margin-left:0; }
}

/* ---- Header-Tools-Wrapper (Theme-Toggle + Sprache + Hamburger) ---- */
.header-tools{
  display:flex;
  align-items:center;
  gap: 14px;
}

/* ---- Mobil-Menü (Hamburger) ---- */
.menu-toggle{
  display:none;
  width: 38px; height:38px;
  border-radius: var(--radius-sm);
  border: 1px solid #ffffff1c;
  background: #ffffff0d;
  cursor:pointer;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
}
.menu-toggle span{
  display:block;
  width: 18px; height:2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(.22,.9,.32,1), opacity 0.2s ease;
}
.menu-toggle.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2){ opacity:0; }
.menu-toggle.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 700px){
  .menu-toggle{ display:flex; }

  nav.site-nav{
    display:block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid #ffffff12;
    border-radius: var(--radius);
    padding: 6px clamp(20px,5vw,60px) 4px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
  }
  nav.site-nav.is-open{
    max-height: 320px;
    opacity: 1;
    padding: 16px clamp(20px,5vw,60px) 20px;
  }
  nav.site-nav a{
    display:block;
    margin: 0 0 14px;
    font-size: 1.05rem;
  }
}

/* Scroll progress bar */
.scroll-progress{
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  z-index: 100;
  transition: transform 0.12s linear;
}

/* Lade-Animationen entfernt – Header ist sofort komplett sichtbar */

/* Animated gradient accent on hero emphasis */
.hero h1 em{
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-flow 5s linear infinite;
}
@keyframes gradient-flow{
  to{ background-position: 200% center; }
}

/* Icon micro-interactions */
.card .icon{ transition: transform 0.35s cubic-bezier(.34,1.56,.64,1); }
.card:hover .icon{ transform: scale(1.18) rotate(-6deg); }
.contact-item .icon{ display:inline-block; transition: transform 0.3s cubic-bezier(.34,1.56,.64,1); }
.contact-item:hover .icon{ transform: scale(1.2) rotate(6deg); }
.step .num{ transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), box-shadow 0.3s ease; }
.step:hover .num{ transform: scale(1.12); box-shadow: 0 8px 20px -8px #2f80ed70; }

/* Button ripple */
.cta{ position: relative; overflow: hidden; }
.cta .ripple{
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transform: scale(0);
  animation: ripple-anim 0.6s ease-out;
  pointer-events: none;
}
@keyframes ripple-anim{
  to{ transform: scale(2.6); opacity: 0; }
}

/* ---------------------------------------------------
 * Cookie-Consent-Gate
 * ------------------------------------------------- */
html.cookie-gate-active,
html.cookie-gate-active body{
  overflow: hidden;
  height: 100%;
}

/* Harte Absicherung: wurde bereits (auch bei einer eventuell gecachten
   Seite) eine Cookie-Entscheidung im localStorage hinterlegt, bleibt
   der Banner/Overlay sofort und ohne jede Animation unsichtbar. */
html.gutenbergschule-consent-set .cookie-banner,
html.gutenbergschule-consent-set .cookie-overlay{
  display: none !important;
}

.cookie-overlay{
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(10,8,16,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.cookie-overlay[hidden]{ display: none; }
.cookie-overlay.is-visible{
  opacity: 1;
  pointer-events: auto;
}

.cookie-banner{
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 999;
  width: min(92vw, 640px);
  max-height: 90vh;
  overflow-y: auto;
  transform: translate(-50%, -50%) scale(0.94);
  border: 1px solid transparent;
  border-radius: var(--radius);
  box-shadow: 0 40px 90px -24px rgba(0,0,0,0.7);
  padding: 44px 46px;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(.22,.9,.32,1), transform 0.5s cubic-bezier(.22,.9,.32,1);
  pointer-events: none;
  background:
    linear-gradient(160deg, var(--card), var(--bg-soft)) padding-box,
    linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent)) border-box;
  background-size: 100% 100%, 260% 260%;
  animation: kwi-border-flow 9s linear infinite;
}
.cookie-banner[hidden]{ display: none; }
.cookie-banner.is-visible{
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}
.cookie-banner-inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}
.cookie-logo{ flex-shrink: 0; overflow: visible; margin-bottom: 4px; }
.cookie-banner-title{
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.cookie-banner-text{
  margin: 0;
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 46ch;
}
.cookie-banner-text a{ color: var(--accent); }
.cookie-banner-actions{
  display: flex;
  gap: 14px;
  margin-top: 10px;
  width: 100%;
  justify-content: center;
}
.cookie-btn{
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), box-shadow 0.25s ease, filter 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.cookie-btn:hover{
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 32px -10px color-mix(in srgb, var(--accent) 65%, transparent);
  filter: brightness(1.05);
}
.cookie-btn.ghost{
  background: transparent;
  color: var(--text-dim);
  border-color: var(--border);
}
.cookie-btn.ghost:hover{
  color: var(--text);
  border-color: #ffffff55;
  box-shadow: none;
  background: #ffffff0d;
}

@media (max-width: 640px){
  .cookie-banner{ width: min(94vw, 640px); padding: 32px 26px; border-radius: var(--radius); }
  .cookie-banner-title{ font-size: 1.25rem; }
  .cookie-banner-text{ font-size: 0.94rem; }
  .cookie-banner-actions{ flex-direction: column; }
  .cookie-btn{ width: 100%; text-align: center; }
}

/* ---------------------------------------------------
 * Hintergrund-Logo: fixierte Ebene hinter dem gesamten Content
 * (auch hinter dem Header/Menü, daher z-index -1), bewegt sich
 * beim Scrollen und bei Mausbewegung dezent versetzt zum
 * restlichen Inhalt (Parallax). Zeigt das runde Schullogo.
 * ------------------------------------------------- */
.bg-logo-parallax{
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* WICHTIG: kein isolation:isolate hier – das würde den
     mix-blend-mode unten daran hindern, mit dem echten Seiten-
     hintergrund zu verschmelzen (er würde nur gegen den leeren,
     eigenen Layer blenden -> unsichtbar). z-index: -1 reicht für
     die Sicherheit hinter dem Header völlig aus, da position:fixed
     ohnehin einen eigenen Stacking-Context erzeugt. */
}
.bg-logo-img{
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(85vw, 1100px);
  aspect-ratio: 1 / 1;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.85;
  /* Das Logo hat innen eine fast weiße Fläche – auf weißem
     Seitenhintergrund bleibt das bei normaler Überblendung quasi
     unsichtbar, egal wie hoch die Opacity ist. multiply lässt die
     weißen Bereiche mit dem Hintergrund verschmelzen und zeigt nur
     Ring + Zeichnung deutlich sichtbar als Wasserzeichen. */
  mix-blend-mode: multiply;
  /* Rand bleibt weich, aber deutlich weniger ausgeblendet als vorher -
     das Logo soll klar erkennbar sein, nicht nur erahnbar. */
  -webkit-mask-image: radial-gradient(circle, #000 78%, transparent 92%);
  mask-image: radial-gradient(circle, #000 78%, transparent 92%);
  will-change: transform;
}

/* Tiefen-Ebene: Basis-Zentrierung + Mausversatz (per JS über die
   CSS-Variablen --bgl-mx/--bgl-my) in EINEM transform, damit sich
   beide nicht gegenseitig überschreiben -> ruhiges 3D-Parallax-Gefühl. */
.bgl-layer{
  transform: translate3d(
    calc(-50% + (var(--bgl-mx, 0) * var(--bgl-depth, 0px))),
    calc(-50% + (var(--bgl-my, 0) * var(--bgl-depth, 0px))),
    0
  );
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.bgl-layer-logo{ --bgl-depth: 16px; }

@media (max-width: 900px){
  .bg-logo-img{
    width: min(95vw, 620px);
    opacity: 0.7;
  }
  .bgl-layer-logo{ --bgl-depth: 8px; }
}

/* Line-draw Logo-Animation: K-Zeichen + Bot-Icon zeichnen sich beim
   Erscheinen des Cookie-Banners selbst, danach füllen sich Farbe/Augen ein. */
.cookie-logo .cl-k-bar,
.cookie-logo .cl-k-chevron{
  stroke-width: 4;
  stroke-linejoin: round;
  fill-opacity: 0;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.cookie-logo .cl-k-bar{
  stroke: var(--accent);
  fill: var(--accent);
  animation: cl-draw 0.7s ease 0.15s forwards, cl-fill 0.4s ease 0.7s forwards;
}
.cookie-logo .cl-k-chevron{
  stroke: var(--accent-2);
  fill: var(--accent-2);
  animation: cl-draw 0.8s ease 0.65s forwards, cl-fill 0.4s ease 1.3s forwards;
}
.cookie-logo .cl-bot-antenna-line,
.cookie-logo .cl-bot-antenna-dot,
.cookie-logo .cl-bot-body,
.cookie-logo .cl-bot-tail{
  fill: none;
  stroke: var(--text-dim);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.cookie-logo .cl-bot-antenna-dot{ animation: cl-draw 0.25s ease 1.5s forwards; }
.cookie-logo .cl-bot-antenna-line{ animation: cl-draw 0.2s ease 1.6s forwards; }
.cookie-logo .cl-bot-body{ animation: cl-draw 0.9s ease 1.75s forwards; }
.cookie-logo .cl-bot-tail{ animation: cl-draw 0.35s ease 2.55s forwards; }
.cookie-logo .cl-bot-eye{
  fill: var(--accent);
  opacity: 0;
  transform-origin: center;
  transform: scale(0);
  animation: cl-eye 0.3s ease forwards;
}
.cookie-logo .cl-eye-l{ animation-delay: 2.85s; }
.cookie-logo .cl-eye-r{ animation-delay: 2.95s; }

@keyframes cl-draw{ to{ stroke-dashoffset: 0; } }
@keyframes cl-fill{ to{ fill-opacity: 1; } }
@keyframes cl-eye{ to{ opacity: 1; transform: scale(1); } }

/* Reduced motion: calm everything down */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .reveal{
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero-glow{ animation: none; }
  .plan.featured{ animation: none; }
  .typing-dots span, .typing-cursor{ animation: none; }
  .cta, .card, .step, .plan, .contact-item, .stat .num{ transition: none; }
  .lang-pill, nav.site-nav a::after, .logo{ transition: none; }
  .site-header, .site-header .logo, .site-header .site-nav a, .site-header .lang-switch{ animation: none; }
  .hero h1 em{ animation: none; background-position: 0 0; }
  .card .icon, .contact-item .icon, .step .num{ transition: none; }
  .scroll-progress{ display: none; }
  .cta .ripple{ display: none; }
  .cookie-banner{ transition: none; }
  .cookie-overlay{ transition: none; }
  .card, .plan, .chat-demo, .cookie-banner{
    animation: none;
    background-position: 0 0, 0% 0% !important;
  }
  header.site-header::after,
  .footer-full::before{
    animation: none;
    background-position: 0% 0;
  }
  .bg-logo-parallax{
    animation: none;
  }
  .bg-logo-img{
    opacity: 0.1;
    transition: none;
    transform: translate3d(-50%, -50%, 0) !important;
  }
  .bgl-layer{ animation: none; transition: none; }

  .cookie-logo .cl-k-bar,
  .cookie-logo .cl-k-chevron,
  .cookie-logo .cl-bot-antenna-line,
  .cookie-logo .cl-bot-antenna-dot,
  .cookie-logo .cl-bot-body,
  .cookie-logo .cl-bot-tail{
    animation: none;
    stroke-dashoffset: 0;
    fill-opacity: 1;
  }
  .cookie-logo .cl-bot-eye{ animation: none; opacity: 1; transform: scale(1); }
}

/* =========================================================
   HELLBLAU / WEISS – einziges Theme.
   Alle Farben laufen über die CSS-Variablen im :root oben,
   hier folgen nur die wenigen fest auf Hell-auf-Dunkel
   gesetzten Overlays/Feinheiten.
   ========================================================= */
header.site-header,
footer.site-footer,
.footer-full,
.footer-bottom{
  border-color: #00000012;
}
.cta.ghost{ border-color: #00000030; }
.cta.ghost:hover{ background: #0000000a; border-color: #00000045; }
.chat-demo-bar,
.card .icon{
  border-color: #00000012;
}
.card{ box-shadow: 0 2px 14px -6px rgba(20,32,43,0.08); }
.chat-demo{ box-shadow: 0 30px 60px -30px rgba(20,32,43,0.18); }
.chat-demo-bar .dot{ background: #00000022; }
.chat-demo .user{ background: #e4f2fd; color: var(--text); }
.chat-demo .ai{
  background: linear-gradient(135deg, #eaf5ff, #e4f0fb);
  border-color: #2f80ed50;
  color: var(--text);
}
.form input,
.form select,
.form textarea{
  border-color: color-mix(in srgb, var(--text-dim) 45%, transparent);
}
.site-header{ background: var(--bg); }
.site-header.is-scrolled{
  background: var(--bg);
  box-shadow: 0 8px 24px -12px rgba(20,32,43,0.12);
}
.card:hover,
.plan:hover{
  box-shadow: 0 20px 40px -22px rgba(20,32,43,0.16);
}
.menu-toggle,
.lang-switch{
  background: #0000000a;
  border-color: #00000018;
}
.menu-toggle span{ background: var(--text); }
nav.site-nav{ background: var(--bg); border-color: #00000012; }
.hero-glow{ opacity: 0.55; }
.trust-bar span{
  background: linear-gradient(180deg, #ffffff, #f3f9fe);
  border-color: #00000014;
  box-shadow: 0 2px 10px -6px rgba(20,32,43,0.1);
}
.trust-bar span:hover{
  border-color: #2f80ed55;
  background: linear-gradient(180deg, #eaf5ff, #f3f9fe);
}
.plan.featured{ box-shadow: 0 0 0 1px var(--accent) inset; }
.placeholder{
  background: #2f80ed1a;
  border-color: #2f80ed80;
  color: #1f5aa8;
}

/* =========================================================
   DUNKLES DESIGN – wird per Knopf im Header umgeschaltet
   (data-theme="dark" auf <html>). Überschreibt nur die
   CSS-Variablen; der Blauton (--accent/--accent-2) bleibt
   bewusst gleich, damit die Marke wiedererkennbar bleibt.
   ========================================================= */
[data-theme="dark"]{
  --bg: #101a24;
  --bg-soft: #16232f;
  --card: #16232f;
  --text: #eaf3fb;
  --text-dim: #93acc0;
  --border: #26394a;
}
[data-theme="dark"] .menu-toggle,
[data-theme="dark"] .lang-switch{
  background: #ffffff0d;
  border-color: #ffffff1f;
}
[data-theme="dark"] .menu-toggle span{ background: var(--text); }
[data-theme="dark"] nav.site-nav{ border-color: #ffffff14; }
[data-theme="dark"] .card,
[data-theme="dark"] .chat-demo-bar,
[data-theme="dark"] .card .icon{
  border-color: #ffffff14;
}
[data-theme="dark"] .trust-bar span{
  background: linear-gradient(180deg, #16232f, #101a24);
  border-color: #ffffff14;
}
[data-theme="dark"] .chat-demo .user{ background: #1c2c3a; color: var(--text); }
[data-theme="dark"] .chat-demo .ai{
  background: linear-gradient(135deg, #1c2c3a, #16232f);
  color: var(--text);
}



