/* =========================================================================
   Teachlets Landing — Layout & Components
   Alle Klassen sind BEM-artig klein gehalten; pro Block ein Kommentar.
   ========================================================================= */

/* ---------- Reset-Light ------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(0, 48, 94, 0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(44, 157, 143, 0.05), transparent 60%),
    var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { line-height: var(--lh-tight); margin: 0; }
p             { margin: 0; }
a             { color: inherit; text-decoration: none; }
button        { font-family: inherit; cursor: pointer; }

/* ---------- Sprach-Schalter (oben rechts) ------------------------------- */
.lang-toggle {
  position: absolute;
  top: var(--space-3);
  right: var(--space-5);
  z-index: 10;
  display: inline-flex;
  background: rgba(255, 255, 255, 0.6);  /* Glas-Effekt über Hero-Gradient */
  border: 1px solid var(--tud-border);
  border-radius: var(--radius-xs);
  overflow: hidden;
  backdrop-filter: blur(4px);
}

.lang-toggle__btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-soft);
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-toggle__btn[aria-pressed="true"] {
  background: var(--tud-blue);
  color: #ffffff;
}

.lang-toggle__btn:hover:not([aria-pressed="true"]) {
  background: rgba(0, 48, 94, 0.08);
  color: var(--tud-blue);
}

/* ---------- Container --------------------------------------------------- */
.page {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* ---------- Hero -------------------------------------------------------- */
.hero {
  position: relative;
  padding: var(--space-8) 0 var(--space-7);
  border-bottom: 1px solid rgba(0, 48, 94, 0.08);
  box-shadow: var(--shadow-hero);
}

.hero__eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-numeric);
  margin-bottom: var(--space-3);
}

.hero__title {
  font-size: var(--fs-h1);
  font-weight: 700;
  color: var(--tud-blue);
  margin-bottom: var(--space-3);
}

/* ---------- Category-Bar (skip-nav + Sprungmarken) ---------------------- */
.category-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0, 48, 94, 0.08);
  margin-bottom: var(--space-7);
}

.category-bar__list {
  list-style: none;
  margin: 0;
  padding: var(--space-3) 0;
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.category-bar__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--tud-border);
  font-size: 0.9rem;
  color: var(--tud-blue);
  background: #ffffff;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.category-bar__link::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent-raster);
}

.category-bar__link[data-cat="spatial"]::before { background: var(--accent-spatial); }
.category-bar__link[data-cat="numeric"]::before { background: var(--accent-numeric); }

.category-bar__link:hover {
  background: var(--tud-blue);
  color: #ffffff;
  border-color: var(--tud-blue);
}

.category-bar__link:hover::before { background: #ffffff; }

.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.4rem 0.8rem;
  margin-left: var(--space-4);
  background: var(--tud-blue);
  color: #fff;
  border-radius: var(--radius-xs);
}

/* ---------- Sektion ------------------------------------------------------ */
.section { margin-bottom: var(--space-8); }

.section__header {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.section__bar {
  width: 0.3rem;
  height: 1.4rem;
  border-radius: 2px;
  align-self: center;
}

.section__title {
  font-size: var(--fs-h2);
  font-weight: 600;
  color: var(--tud-blue);
}

/* ---------- Card-Grid --------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-5);
}

/* ---------- Card -------------------------------------------------------- */
.card {
  --card-accent: var(--accent-raster);     /* Standard */

  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 48, 94, 0.08);
  box-shadow: var(--shadow-card-rest);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0.25rem;
  height: 100%;
  background: var(--card-accent);
}

.card:hover,
.card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--card-accent);
  outline: none;
}

/* Kategorie-Variante */
.card[data-cat="raster"]  { --card-accent: var(--accent-raster); }
.card[data-cat="spatial"] { --card-accent: var(--accent-spatial); }
.card[data-cat="numeric"] { --card-accent: var(--accent-numeric); }

/* Card-Varianten für die Section-Bar */
.section[data-cat="raster"]  .section__bar { background: var(--accent-raster); }
.section[data-cat="spatial"] .section__bar { background: var(--accent-spatial); }
.section[data-cat="numeric"] .section__bar { background: var(--accent-numeric); }

/* ---------- Card-Glyph (SVG <use>) ------------------------------------- */
.card__glyph-svg {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--card-accent);
  flex-shrink: 0;
}

.card__glyph-svg :where(circle, rect, path, line, polyline, polygon) {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.card__glyph-svg :where(circle.filled, rect.filled, path.filled) {
  fill: currentColor;
  stroke: none;
}

/* ---------- Card-Inhalt ------------------------------------------------- */
.card__title {
  font-size: var(--fs-card-title);
  font-weight: 600;
  color: var(--tud-blue);
}

.card__desc {
  font-size: var(--fs-card-desc);
  color: var(--text-soft);
}

/* ---------- Footer ------------------------------------------------------ */
.footer {
  margin-top: var(--space-8);
  padding: var(--space-6) 0;
  border-top: 1px solid rgba(0, 48, 94, 0.08);
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-5) var(--space-5);
  align-items: start;
}

.footer__col--brand { max-width: 36rem; }

.footer__heading {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tud-blue);
  margin-bottom: var(--space-3);
  font-weight: 700;
}

.footer__text {
  font-size: 0.95rem;
  color: var(--text-soft);
  margin-bottom: var(--space-3);
  line-height: var(--lh-base);
}

.footer__meta {
  font-size: 0.85rem;
  color: var(--text-mute);
}

.footer__subheading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-bottom: var(--space-3);
  font-weight: 600;
}

.footer__legal {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__legal a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
  color: var(--tud-blue);
  font-size: 0.95rem;
  padding: 1px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.footer__legal a[target="_blank"]::after {
  content: "\2197";          /* ↗ nur bei externen Links */
  font-size: 0.8em;
  color: var(--text-mute);
  transition: color 0.2s ease;
}

.footer__legal a:hover  { border-bottom-color: var(--tud-blue); }
.footer__legal a[target="_blank"]:hover::after { color: var(--tud-blue); }

.footer__copyright {
  grid-column: 1 / -1;
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(0, 48, 94, 0.08);
  font-size: 0.85rem;
  color: var(--text-mute);
}

.footer__copyright-link {
  color: var(--text-soft);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer__copyright-link:hover {
  color: var(--tud-blue);
  border-bottom-color: var(--tud-blue);
}

/* ---------- Responsiveness --------------------------------------------- */
@media (max-width: 768px) {
  .hero           { padding: var(--space-7) 0 var(--space-6); }
  .category-bar   { position: static; }
  .card-grid      { grid-template-columns: 1fr; }
  .lang-toggle    { top: var(--space-2); right: var(--space-3); }
  .footer         { grid-template-columns: 1fr; }
}


/* =========================================================================
   Teachlets Landing � i18n (Sprachumschaltung)
   Sichtbarkeit der <span lang="de"> / <span lang="en">-Paare wird rein �ber
   das body-Attribut [data-lang] gesteuert. Der Sprachschalter setzt dieses
   Attribut per JS (setLang in index.html).
   ========================================================================= */

/* Default (Attribut nicht gesetzt oder = "de"): Deutsch zeigen. */
body[data-lang="de"] [lang="en"],
body:not([data-lang])  [lang="en"] { display: none; }

body[data-lang="en"] [lang="de"]   { display: none; }

/* Keine Style-Gewinner; Cards/Buttons bleiben strukturell unver�ndert.
   Das <html lang=�>-Attribut wird in overview.html per JS auf
   documentElement.lang gespiegelt. */


/* =========================================================================
   Teachlets � Legal / Impressum Page
   Klare Akzent-Box f�r die Intro, einfach zu lesende Sektionen,
   dezenter "Zur�ck"-Link und Kontakt-Karte am Schluss.
   ========================================================================= */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--text-soft);
  font-size: 0.95rem;
  margin-bottom: var(--space-5);
  transition: color 0.2s ease, gap 0.2s ease;
}

.back-link:hover {
  color: var(--tud-blue);
  gap: 0.6em;
}

.legal-intro {
  background: rgba(0, 48, 94, 0.05);
  border-left: 4px solid var(--accent-raster);
  padding: var(--space-5);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: var(--space-6);
  font-size: 1.05rem;
  line-height: var(--lh-base);
  color: var(--text);
}

.legal-intro a {
  color: var(--tud-blue);
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 48, 94, 0.35);
  transition: border-color 0.2s ease;
}

.legal-intro a:hover {
  border-bottom-color: var(--tud-blue);
}

.legal-section {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid rgba(0, 48, 94, 0.08);
}

.legal-section:last-of-type {
  border-bottom: 0;
  margin-bottom: var(--space-7);
}

.legal-section__heading {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--tud-blue);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid rgba(0, 48, 94, 0.15);
}

.legal-section__body {
  color: var(--text-soft);
  line-height: var(--lh-base);
  font-size: 0.98rem;
}

.legal-section__body p { margin-bottom: var(--space-3); }
.legal-section__body p:last-child { margin-bottom: 0; }

.legal-section__body ul {
  list-style: disc;
  margin: 0 0 var(--space-4);
  padding-left: var(--space-5);
}
.legal-section__body ul li { margin-bottom: var(--space-3); }
.legal-section__body ul li:last-child { margin-bottom: 0; }

.legal-section address {
  font-style: normal;
  margin: var(--space-2) 0 var(--space-3);
  padding-left: var(--space-4);
  border-left: 2px solid rgba(0, 0, 0, 0.08);
  color: var(--text);
}

.legal-section address strong {
  color: var(--tud-blue);
  display: block;
  margin-bottom: 0.3em;
}

.legal-section .placeholder {
  display: inline-block;
  padding: 0.05em 0.4em;
  background: rgba(217, 191, 0, 0.22);
  border-radius: var(--radius-xs);
  font-style: italic;
  color: var(--text);
  border: 1px dashed rgba(120, 90, 0, 0.45);
}

.legal-direct-link {
  display: inline-block;
  margin-top: var(--space-2);
  color: var(--tud-blue);
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 48, 94, 0.35);
  transition: border-color 0.2s ease;
}

.legal-direct-link:hover {
  border-bottom-color: var(--tud-blue);
}


/* ---------- Impressum: Legal-Sektionen ----------------------------------------
   article.legal-section + h2.legal-section__heading + div.legal-section__body
------------------------------------------------------------------------------- */
