/* =========================================================
   MeinLernAtlas – Startseite
   Designkonzept: Logo-Palette zurückhaltend, viel Weißraum,
   freundlich, kindgerecht und professionell.
   ========================================================= */

/* --- Farb- und Designvariablen (aus dem Logo abgeleitet) --- */
:root {
  --tuerkis:        #4FB3BF;
  --tuerkis-dunkel: #3C9AA5;
  --gelb:           #F4C430;
  --koralle:        #F08A7A;
  --gruen:          #7BB661;

  --text:           #2E4A53;  /* Dunkelgrau-Blau für Fließtext/Überschriften */
  --text-leise:     #5d737c;
  --weiss:          #FFFFFF;
  --hell:           #F2FAFB;  /* sehr helles Türkis für ruhige Flächen */
  --rand:           #e1edef;

  --radius:         14px;
  --radius-gross:   22px;
  --schatten:       0 6px 22px rgba(46, 74, 83, 0.08);
  --schatten-stark: 0 10px 30px rgba(46, 74, 83, 0.14);
  --max-breite:     1080px;

  /* Eigene Schriften – dieselben wie auf den Arbeitsheft-Kopfzeilen */
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-hand:    'Nothing You Could Do', cursive;
}

/* --- Eigene Schriften, selbst gehostet (keine Google-Fonts-CDN-Anfrage) --- */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url('fonts/BricolageGrotesque-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Nothing You Could Do';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/NothingYouCouldDo-Regular.woff2') format('woff2');
}

/* --- Grundlagen --- */
* { box-sizing: border-box; }

html { font-size: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--weiss);
}

h1, h2, h3 {
  line-height: 1.2;
  color: var(--text);
  font-family: var(--font-display);
}

p { margin: 0 0 1rem; }

a { color: var(--tuerkis-dunkel); }

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

.container {
  width: 100%;
  max-width: var(--max-breite);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Sichtbar nur bei Tastatur-Fokus */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--tuerkis);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--tuerkis);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 179, 191, 0.35);
}
.btn-primary:hover { background: var(--tuerkis-dunkel); }

.btn-secondary {
  background: var(--gelb);
  color: var(--text);
}
.btn-secondary:hover { background: #e9b820; }

.btn-disabled {
  background: var(--hell);
  color: var(--text-leise);
  border-color: var(--rand);
  cursor: not-allowed;
}
.btn-disabled:hover { transform: none; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--rand);
  box-shadow: 0 2px 14px rgba(46, 74, 83, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
}
.brand-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(79, 179, 191, 0.25);
}
.brand-name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; letter-spacing: 0.2px; }
.brand-name .brand-dot { color: var(--koralle); }

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.main-nav a {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.main-nav a:hover,
.main-nav a:focus {
  background: var(--hell);
  color: var(--tuerkis-dunkel);
}
.main-nav a[aria-current="page"] {
  color: var(--tuerkis-dunkel);
  background: var(--hell);
}

/* Mobiler Menü-Button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0;
  background: var(--hell);
  border: 1px solid var(--rand);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2.5px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 0%, #eafafb 0%, rgba(234, 250, 251, 0) 55%),
    linear-gradient(180deg, var(--hell) 0%, var(--weiss) 100%);
  padding-block: 4rem 4.5rem;
}

/* dekorative Hintergrundebene – dezente gestrichelte Kreise,
   wie der Kreis-Rand im Logo, statt weicher Verlaufs-Blobs */
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-bg .blob {
  position: absolute;
  border-radius: 50%;
  border-style: dashed;
  background: none;
}
.blob-1 { width: 300px; height: 300px; top: -80px; right: -60px;
  border: 3px dashed rgba(79, 179, 191, 0.35); }
.blob-2 { width: 190px; height: 190px; bottom: -70px; left: -50px;
  border: 3px dashed rgba(244, 196, 48, 0.4); }
.blob-3 { width: 130px; height: 130px; top: 42%; left: 44%;
  border: 3px dashed rgba(240, 138, 122, 0.32); }
.hero-bg .dots {
  position: absolute;
  width: 130px; height: 130px;
  background-image: radial-gradient(var(--tuerkis) 2px, transparent 2.5px);
  background-size: 18px 18px;
  opacity: 0.18;
}
.dots-1 { top: 30px; left: 46%; }
.dots-2 { bottom: 40px; right: 8%; color: var(--koralle);
  background-image: radial-gradient(var(--koralle) 2px, transparent 2.5px); opacity: 0.16; }

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 3rem;
}
.hero-text { min-width: 0; }
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-hand);
  font-size: 1.55rem;
  font-weight: 400;
  color: var(--koralle);
  transform: rotate(-2deg);
  margin: 0 0 0.2rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 1rem;
}
.hero h1 .hl { position: relative; white-space: nowrap; }
/* handgezeichnete Wellenlinie statt Textmarker-Fläche */
.hero h1 .hl::after {
  content: "";
  position: absolute;
  left: -3px; right: -3px; bottom: -0.1em;
  height: 0.24em;
  z-index: -1;
  background-repeat: repeat-x;
  background-position: left bottom;
  background-size: 40px 13px;
}
.hl-tuerkis::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 13'%3E%3Cpath d='M0 7 Q 6 2 10 7 T 20 7 T 30 7 T 40 7' fill='none' stroke='%234FB3BF' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
}
.hl-koralle::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 13'%3E%3Cpath d='M0 7 Q 6 2 10 7 T 20 7 T 30 7 T 40 7' fill='none' stroke='%23F08A7A' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-leise);
  max-width: 40ch;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* --- Hero-Illustration (reine CSS-/SVG-Formen) --- */
.hero-figure {
  display: flex;
  justify-content: center;
}
.illu {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1 / 1;
}
.illu-blob {
  position: absolute;
  inset: 6%;
  background: linear-gradient(150deg, #d8f1f3 0%, #eafafb 60%, #fff 100%);
  border-radius: 42% 58% 56% 44% / 48% 42% 58% 52%;
  box-shadow: inset 0 0 0 2px rgba(79, 179, 191, 0.12), var(--schatten-stark);
}
/* Zusammenhängende Lernszene (Inline-SVG) */
.illu-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: visible;
}
.illu-star {
  position: absolute;
  width: 9%;
  filter: drop-shadow(0 3px 5px rgba(46, 74, 83, 0.15));
  animation: twinkle 4s ease-in-out infinite;
}
.illu-star-1 { top: 6%; left: 14%; }
.illu-star-2 { top: 54%; right: 2%; width: 7%; animation-delay: 1.2s; }
.illu-dot {
  position: absolute;
  border-radius: 50%;
}
.illu-dot-1 { width: 14px; height: 14px; background: var(--koralle); top: 40%; left: 2%; }
.illu-dot-2 { width: 10px; height: 10px; background: var(--gruen); top: 8%; right: 30%; }
.illu-dot-3 { width: 16px; height: 16px; background: var(--gelb); bottom: 2%; left: 40%; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(0.82) rotate(8deg); opacity: 0.7; }
}

/* =========================================================
   Allgemeine Sektionen
   ========================================================= */
.section { padding-block: 3.5rem; }
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-hand);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--koralle);
  transform: rotate(-1.5deg);
  margin: 0 0 0.1rem;
}

/* --- Doodle-Band (handgezeichnete Trennlinie zwischen Abschnitten) --- */
.doodle-band {
  max-width: var(--max-breite);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.doodle-band svg {
  display: block;
  width: 100%;
  height: 30px;
  overflow: visible;
}
.section-title {
  font-size: clamp(1.7rem, 3.8vw, 2.3rem);
  font-weight: 800;
  margin: 0 0 1.75rem;
  text-wrap: balance;
}

.lead { font-size: 1.15rem; max-width: 110ch; }

/* --- Karten Lernmaterialien --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.card {
  position: relative;
  overflow: hidden;
  background: var(--weiss);
  border: 1px solid var(--rand);
  border-radius: var(--radius-gross);
  padding: 1.9rem 1.6rem;
  box-shadow: var(--schatten);
  transition: transform .2s ease, box-shadow .2s ease;
}
/* farbiger Akzentbalken oben pro Fach */
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--akzent, var(--tuerkis));
}
/* dezenter farbiger Schein in der Ecke */
.card::after {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--akzent, var(--tuerkis));
  opacity: 0.08;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--schatten-stark); }
.card:hover .card-badge { transform: scale(1.06) rotate(-3deg); }
.card h3 { font-size: 1.45rem; margin: 0.3rem 0 0.6rem; }
.card p { margin: 0; color: var(--text-leise); }

.card-badge {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--akzent-hell, var(--hell));
  box-shadow: 0 8px 18px var(--akzent-schatten, rgba(79, 179, 191, 0.35));
  transition: transform .2s ease;
  overflow: hidden;
}
.card-badge img {
  width: 84%;
  height: 84%;
  object-fit: contain;
  object-position: bottom;
}

.card-mathe   { --akzent: var(--tuerkis); --akzent-hell: #e8f6f7; --akzent-schatten: rgba(79, 179, 191, 0.35); }
.card-deutsch { --akzent: var(--gelb);    --akzent-hell: #fdf5e0; --akzent-schatten: rgba(244, 196, 48, 0.35); }
.card-daz     { --akzent: var(--koralle); --akzent-hell: #fdeeeb; --akzent-schatten: rgba(240, 138, 122, 0.35); }

/* --- Beispielmaterialien in den Karten (Lernmaterialien-Seite) --- */
.material-examples {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.material-examples li {
  font-size: 0.92rem;
  color: var(--text-leise);
  padding-left: 1rem;
  position: relative;
}
.material-examples li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--akzent, var(--tuerkis));
}
.material-note {
  margin: 1.5rem 0 0;
  color: var(--text-leise);
  font-size: 0.98rem;
}

/* --- App-Bereich --- */
.section-app { background: var(--hell); }
.app-inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.app-text { flex: 1 1 0; }
.app-text .section-title { margin-bottom: 1rem; }
.app-availability { font-weight: 600; color: var(--tuerkis-dunkel); }
.app-figure { flex: 0 0 auto; }
.app-figure-paar { display: flex; gap: 1.1rem; }
.app-figure-paar .app-phone-shot { width: 150px; }
.app-phone {
  width: 150px;
  height: 290px;
  border-radius: 28px;
  background: linear-gradient(160deg, var(--tuerkis), var(--gruen));
  border: 6px solid #fff;
  box-shadow: var(--schatten-stark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-phone-icon {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
}
/* --- Echte App-Vorschaubilder (Screenshots im Telefonrahmen) --- */
.app-phone-shot {
  width: 200px;
  aspect-ratio: 390 / 844;
  border-radius: 28px;
  border: 6px solid #fff;
  box-shadow: var(--schatten-stark);
  overflow: hidden;
}
.app-phone-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* --- Eduki-Bereich --- */
.section-eduki {
  text-align: center;
}
.eduki-inner {
  max-width: 720px;
  background: var(--weiss);
  border: 1px solid var(--rand);
  border-radius: var(--radius-gross);
  padding: 2.5rem 2rem;
  box-shadow: var(--schatten);
}
.section-eduki .section-title { margin-bottom: 0.85rem; }
.section-eduki p { color: var(--text-leise); max-width: 55ch; margin-inline: auto; }
.section-eduki .btn { margin-top: 0.5rem; }

/* --- Eltern & Lehrkräfte --- */
.feature-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.feature-list li {
  background: var(--hell);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1rem 2.6rem;
  position: relative;
  font-weight: 500;
}
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0.9rem;
  top: 1rem;
  width: 1.3rem;
  height: 1.3rem;
  line-height: 1.3rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--gruen);
  border-radius: 50%;
}

/* =========================================================
   Unterseiten (Lernmaterialien, App, Über uns, Kontakt, Recht)
   ========================================================= */
.page-hero {
  background: linear-gradient(180deg, var(--hell) 0%, var(--weiss) 100%);
  padding-block: 3rem 2.5rem;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
}
.page-hero p {
  color: var(--text-leise);
  max-width: 60ch;
  margin-inline: auto;
  font-size: 1.1rem;
}

.card .btn { margin-top: 1.1rem; }

.prose { max-width: 68ch; margin-inline: auto; }
.prose p { color: var(--text-leise); font-size: 1.05rem; }

.contact-box {
  background: var(--hell);
  border-radius: var(--radius-gross);
  padding: 1.75rem 1.5rem;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}
.contact-email { font-weight: 700; font-size: 1.15rem; }
.contact-box p { margin: 0; color: var(--text-leise); }

/* --- Rechtliche Hinweise (Impressum/Datenschutz) --- */
.legal-notice {
  background: var(--hell);
  border: 2px dashed var(--rand);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.75rem;
  color: var(--text-leise);
  max-width: 68ch;
}
.legal-notice strong { color: var(--text); }

.legal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 68ch;
}
.legal-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rand);
}
.legal-list li:last-child { border-bottom: none; }
.legal-list .label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tuerkis-dunkel);
  margin-bottom: 0.2rem;
}

.pending-list {
  margin: 0;
  padding-left: 1.2rem;
  max-width: 68ch;
  color: var(--text-leise);
}
.pending-list li { margin-bottom: 0.5rem; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--text);
  color: #d7e4e7;
  padding-block: 2rem;
  margin-top: 1rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: #fff;
}
.footer-logo { width: 40px; height: 40px; background: #fff; border-radius: 50%; padding: 2px; }
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.footer-nav a { color: #d7e4e7; text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-copy { margin: 0; color: #9fb6bc; font-size: 0.95rem; }

/* =========================================================
   Responsiv
   ========================================================= */
@media (max-width: 920px) {
  .card-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .feature-list { grid-template-columns: 1fr; }

  /* Hero: Text zuerst, Illustration darunter */
  .hero { padding-block: 2.75rem 3rem; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .hero-text { display: flex; flex-direction: column; align-items: center; }
  .hero-subtitle { margin-inline: auto; }
  .hero-actions { justify-content: center; width: 100%; }
  .illu { width: min(86vw, 360px); }

  .app-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .illu { width: min(92vw, 320px); }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--weiss);
    border-bottom: 1px solid var(--rand);
    box-shadow: var(--schatten);
    padding: 0.75rem 1.5rem 1.1rem;
  }
  .site-header { position: relative; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0.15rem; }
  .main-nav a { padding: 0.7rem 0.85rem; }
}

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