/* ==========================================================================
   DIGIVIESO — Designsystem
   Abgeleitet aus 4e_vieso_konsum_gruppenarbeit.html
   Eine Datei für alle Seiten. Einbinden mit:
     <link rel="stylesheet" href="styles.css">

   Enthaltene Korrekturen gegenüber den bisherigen Seiten:
   - Textfarben erfüllen WCAG AA (4,5:1) — siehe --brand-ink
   - Navigation und Breadcrumb sind an der Inhaltsspalte ausgerichtet
   - Sichtbarer Tastaturfokus auf allen Bedienelementen
   - Deaktivierter Kartenzustand ("kënnt nach") statt toter Links
   - Respektiert prefers-reduced-motion, druckt sauber als Arbeitsblatt
   ========================================================================== */

/* --- 1. Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg, video { max-width: 100%; height: auto; }

/* --- 2. Tokens ---------------------------------------------------------- */
:root {
  /* Marke.  --brand ist die FLÄCHENfarbe (Buttons, Badges, Balken).
     --brand-ink ist die TEXTfarbe. Niemals --brand für Text benutzen:
     #F37021 erreicht auf Weiß nur 2,9:1, --brand-ink erreicht 5,2:1. */
  --brand:        #F37021;
  --brand-ink:    #C2410C;
  --brand-soft:   #FDEBD0;
  --brand-mid:    #FAD7A0;
  --brand-deep:   #7D4300;

  --nav-bg:       #2C3E50;
  --bg:           #FAFAF8;
  --surface:      #FFFFFF;
  --text:         #2C2C2A;
  --text-muted:   #63635E;   /* 6,1:1 auf --surface */
  --border:       rgba(0,0,0,0.10);

  --radius:       14px;
  --radius-sm:    8px;
  --radius-pill:  20px;

  --measure:      860px;     /* Breite der Inhaltsspalte */
  --gutter:       1.5rem;

  --shadow-sm:    0 1px 2px rgba(0,0,0,.05);
  --shadow-md:    0 4px 18px rgba(0,0,0,.08);

  /* Akzentpaare für Gruppen, Kapitel, Kategorien.
     Jeder --aN-ink erreicht ≥4,5:1 auf Weiß UND auf seinem --aN-bg. */
  --a1-bg:#FDEBD0; --a1-ink:#B34700;   /* Orange   */
  --a2-bg:#D5F5E3; --a2-ink:#146B39;   /* Grün     */
  --a3-bg:#D6EAF8; --a3-ink:#0F4C75;   /* Blau     */
  --a4-bg:#E8DAEF; --a4-ink:#5B2C82;   /* Lavendel */
  --a5-bg:#FBF8D0; --a5-ink:#7A6200;   /* Gelb     */
  --a6-bg:#FADBD8; --a6-ink:#8C2018;   /* Rosé     */
}

/* --- 3. Basis ----------------------------------------------------------- */
body {
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.25; text-wrap: balance; font-weight: 800; }
p { max-width: 68ch; }
a { color: var(--brand-ink); }

/* Tastaturfokus — auf den alten Seiten nirgends sichtbar */
:focus-visible {
  outline: 3px solid var(--brand-ink);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Sprungmarke für Screenreader und Tastatur */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--nav-bg); color: #fff;
  padding: .6rem 1rem; font-weight: 700; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* --- 4. Navigationsleiste ----------------------------------------------- */
.site-nav { background: var(--nav-bg); }
.site-nav__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: .6rem var(--gutter);
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.site-nav__brand {
  color: #fff; font-weight: 800; font-size: 1.05rem;
  text-decoration: none; display: flex; align-items: center; gap: .4rem;
}
.site-nav__brand span { color: var(--brand); }
.site-nav__links { display: flex; gap: .75rem; flex-wrap: wrap; }
.site-nav__links a {
  color: rgba(255,255,255,.82); text-decoration: none;
  font-size: .82rem; font-weight: 600;
  padding: .4rem .8rem; border-radius: var(--radius-pill);
  transition: background .18s, color .18s;
  min-height: 32px; display: flex; align-items: center;
}
.site-nav__links a:hover { background: rgba(255,255,255,.14); color: #fff; }

/* --- 5. Breadcrumb ------------------------------------------------------ */
.breadcrumb { background: var(--surface); border-bottom: 1px solid var(--border); }
.breadcrumb__inner {
  max-width: var(--measure); margin: 0 auto;
  padding: .75rem var(--gutter);
  font-size: .82rem; color: var(--text-muted);
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
}
.breadcrumb a { color: var(--brand-ink); text-decoration: none; font-weight: 700; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { opacity: .45; }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* --- 6. Kopfbereich ----------------------------------------------------- */
.hero {
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.hero__inner {
  max-width: var(--measure); margin: 0 auto;
  padding: 2.5rem var(--gutter) 2rem;
}
.hero__tag {
  display: inline-block; background: var(--brand-soft); color: var(--a1-ink);
  font-size: .75rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase;
  padding: .3rem .9rem; border-radius: var(--radius-pill); margin-bottom: .9rem;
}
.hero h1 { font-size: clamp(1.6rem, 5vw, 2rem); margin-bottom: .6rem; }
.hero h1 em { font-style: normal; color: var(--brand-ink); }
.hero__lede {
  font-size: 1rem; color: var(--text-muted); max-width: 60ch; margin-bottom: 1.5rem;
}
.hero__meta { display: flex; gap: .6rem; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .83rem; font-weight: 700; color: var(--text-muted);
  background: var(--bg); border: 1px solid var(--border);
  padding: .35rem .85rem; border-radius: var(--radius-pill);
}

/* --- 7. Fuuss-Kasten ---------------------------------------------------- */
.fox-tip {
  background: var(--brand-soft); border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem; display: flex; gap: .8rem; align-items: flex-start;
  margin: 1.5rem auto; max-width: var(--measure);
}
.fox-tip__emoji { font-size: 1.6rem; flex-shrink: 0; }
.fox-tip p { font-size: .9rem; color: #5D2D0A; max-width: none; }

/* --- 8. Inhaltsspalte --------------------------------------------------- */
.wrap { max-width: var(--measure); margin: 0 auto; padding: 1.5rem var(--gutter) 3rem; }

.section-label {
  font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); margin: 2.5rem 0 1rem;
  display: flex; align-items: center; gap: .5rem;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* --- 9. Reiter ---------------------------------------------------------- */
.tabs {
  display: flex; gap: .4rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: .35rem; margin-bottom: 1.5rem;
}
.tab-btn {
  flex: 1 1 0; min-height: 40px; cursor: pointer;
  font: inherit; font-size: .9rem; font-weight: 800;
  color: var(--text-muted); background: transparent;
  border: 0; border-radius: var(--radius-pill); padding: .5rem 1.1rem;
  transition: background .18s, color .18s;
}
.tab-btn:hover { color: var(--text); background: var(--bg); }
.tab-btn[aria-selected="true"] { background: var(--brand); color: #fff; }
.tab-panel[hidden] { display: none; }

/* --- 10. Kapitelkarten (Klassenübersicht) ------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 1rem; }

.chapter-card {
  display: flex; align-items: flex-start; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-top: 4px solid var(--brand);
  border-radius: var(--radius); padding: 1.1rem 1.25rem;
  text-decoration: none; color: inherit;
  transition: box-shadow .2s, transform .2s;
}
.chapter-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.chapter-card__icon {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px;
  background: var(--brand-soft); display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem;
}
.chapter-card__body { display: block; flex: 1; min-width: 0; overflow-wrap: break-word;
  -webkit-hyphens: auto; hyphens: auto; }
.chapter-card__label {
  display: block; font-size: .72rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--brand-ink); margin-bottom: .15rem;
}
.chapter-card__title { display: block; font-size: 1rem; font-weight: 800; }
.chapter-card__note { display: block; font-size: .82rem; color: var(--text-muted); margin-top: .25rem; }

/* Geplant, aber noch nicht da — statt eines toten Links */
.chapter-card.is-soon {
  border-top-color: var(--border); background: var(--bg);
  cursor: default; opacity: .8;
}
.chapter-card.is-soon:hover { box-shadow: none; transform: none; }
.chapter-card.is-soon .chapter-card__icon { background: rgba(0,0,0,.05); filter: grayscale(1); }
.chapter-card.is-soon .chapter-card__label,
.chapter-card.is-soon .chapter-card__title { color: var(--text-muted); }
.badge-soon {
  display: inline-block; margin-top: .4rem;
  font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-pill); padding: .15rem .6rem;
}

/* --- 11. Ablaufschritte ------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.step-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem;
}
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--nav-bg); color: #fff;
  font-size: .8rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin-bottom: .7rem;
}
.step-card h3 { font-size: .92rem; margin-bottom: .3rem; }
.step-card p { font-size: .83rem; color: var(--text-muted); line-height: 1.55; }

/* --- 12. Akzentkarten (Gruppen, Themen) --------------------------------- */
.accent-card {
  border-radius: var(--radius); border: 1px solid var(--border);
  overflow: hidden; background: var(--surface); margin-bottom: 1.25rem;
  transition: box-shadow .2s;
}
.accent-card:hover { box-shadow: var(--shadow-md); }
.accent-card__head {
  padding: 1.1rem 1.25rem .9rem; display: flex; align-items: flex-start; gap: 1rem;
  background: var(--acc-bg);
}
.accent-card__badge {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; background: var(--acc-ink); color: #fff;
}
.accent-card__label {
  font-size: .72rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--acc-ink); margin-bottom: .2rem;
}
.accent-card__head h2, .accent-card__head h3 { font-size: 1rem; }
.accent-card__body { padding: 0 1.25rem 1.25rem; }

.quote-box {
  background: var(--acc-bg); border-radius: var(--radius-sm);
  padding: 1rem 1.1rem; margin-bottom: 1rem;
  font-size: .93rem; font-style: italic; font-weight: 600; line-height: 1.65;
  color: var(--acc-ink); max-width: none;
}
.tag-outline {
  display: inline-block; margin-bottom: .9rem;
  font-size: .75rem; font-weight: 800;
  padding: .25rem .7rem; border-radius: var(--radius-pill);
  color: var(--acc-ink); background: var(--acc-bg); border: 1.5px solid var(--acc-ink);
}
.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill-row .pill .pip {
  width: 6px; height: 6px; border-radius: 50%; background: var(--acc-ink);
}

.acc-1 { --acc-bg: var(--a1-bg); --acc-ink: var(--a1-ink); }
.acc-2 { --acc-bg: var(--a2-bg); --acc-ink: var(--a2-ink); }
.acc-3 { --acc-bg: var(--a3-bg); --acc-ink: var(--a3-ink); }
.acc-4 { --acc-bg: var(--a4-bg); --acc-ink: var(--a4-ink); }
.acc-5 { --acc-bg: var(--a5-bg); --acc-ink: var(--a5-ink); }
.acc-6 { --acc-bg: var(--a6-bg); --acc-ink: var(--a6-ink); }

/* --- 13. Ausklappbares -------------------------------------------------- */
details { margin-top: .75rem; }
summary {
  font-size: .82rem; font-weight: 800; cursor: pointer; color: var(--text-muted);
  list-style: none; display: flex; align-items: center; gap: .4rem;
  padding: .4rem 0; min-height: 32px;
}
summary::-webkit-details-marker { display: none; }
summary::before { content: '▸'; transition: transform .15s; }
details[open] summary::before { transform: rotate(90deg); }
.detail-content {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: .9rem 1rem; margin-top: .5rem; font-size: .84rem; line-height: 1.65;
}
.detail-content ul { padding-left: 1.2rem; margin-top: .4rem; }
.detail-content li { margin-bottom: .3rem; color: var(--text-muted); }

/* --- 14. Inhaltsblöcke -------------------------------------------------- */
.box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.box h2 { font-size: 1.1rem; margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.box__block { margin-bottom: 1.1rem; }
.box__block h3 {
  font-size: .88rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); margin-bottom: .5rem;
  border-bottom: 1px solid var(--border); padding-bottom: .4rem;
}
.box__block p { font-size: .9rem; margin-bottom: .4rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.split > * {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: .8rem .9rem;
}
.split h4 { font-size: .82rem; margin-bottom: .35rem; }
.split p { font-size: .81rem; color: var(--text-muted); line-height: 1.5; }

.rule-banner {
  background: var(--brand-soft); border: 1.5px solid var(--brand-mid);
  border-radius: var(--radius-sm); padding: .7rem 1rem;
  font-size: .85rem; font-weight: 700; color: var(--brand-deep);
  margin-top: .75rem; display: flex; align-items: center; gap: .5rem;
}

/* --- 15. Schaltflächen -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .6rem 1.3rem;
  font: inherit; font-weight: 800; font-size: .9rem;
  border-radius: var(--radius-pill); border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .18s, color .18s;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-ink); }
.btn--ghost { background: var(--surface); color: var(--brand-ink); border-color: var(--border); }
.btn--ghost:hover { background: var(--bg); }

/* --- 16. Vor / Zurück --------------------------------------------------- */
.pager {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
}

/* --- 17. Fußzeile ------------------------------------------------------- */
.site-footer {
  text-align: center; padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  font-size: .8rem; color: var(--text-muted); background: var(--surface);
}
.site-footer p { max-width: none; }
.site-footer a { color: var(--brand-ink); text-decoration: none; padding: .25rem; display: inline-block; }
.site-footer a:hover { text-decoration: underline; }

/* --- 18. Hilfsklassen --------------------------------------------------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
[hidden] { display: none !important; }

/* --- 19. Schmale Bildschirme ------------------------------------------- */
@media (max-width: 600px) {
  :root { --gutter: 1.1rem; }
  .hero__inner { padding-top: 1.6rem; padding-bottom: 1.4rem; }
  .split { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .hero__meta { gap: .45rem; }
  .pill { font-size: .78rem; padding: .3rem .7rem; }
  /* Navigatioun kompakt halen, fir datt d'Klassen méi héich stinn */
  .site-nav__inner { gap: .6rem; padding-block: .5rem; }
  .site-nav__links { gap: .35rem; }
  .site-nav__links a { font-size: .76rem; padding: .35rem .6rem; }
}

/* --- 20. Bewegung sparsam ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* --- 21. Druck: als Arbeitsblatt brauchbar ----------------------------- */
@media print {
  .site-nav, .breadcrumb, .pager, .tabs, .skip-link { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .tab-panel[hidden] { display: block !important; }   /* alle Reiter drucken */
  details { open: true; }
  details > * { display: block !important; }
  .accent-card, .chapter-card, .box, .step-card { break-inside: avoid; box-shadow: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* --- 22. Startsäit: Hero mat Maskottchen -------------------------------- */
.hero--home .hero__inner {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding-block: 3rem 2.5rem; position: relative;
}
.hero--home .hero__inner > *:not(.decor) { position: relative; z-index: 1; }
.mascot {
  width: clamp(96px, 18vw, 150px); height: auto; margin-bottom: 1rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.1));
}
.hero--home h1 {
  font-size: clamp(2.2rem, 7vw, 3.5rem); font-weight: 900;
  letter-spacing: -.03em; color: var(--brand-ink); margin-bottom: 0;
}
.hero__divider {
  height: 6px; width: 6rem; background: var(--brand);
  border-radius: 999px; margin: 1rem auto 1.25rem;
}
.hero--home .hero__lede {
  text-align: center; max-width: 46ch; margin: 0 auto; color: var(--text); font-size: 1.05rem;
}

/* Dekorsymboler — op klenge Schiermer ausgeblend, well se soss den Titel iwwerlageren */
.decor { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.decor span {
  position: absolute; font-weight: 900; color: var(--brand); opacity: .10;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; user-select: none;
}
.decor .serif { font-family: "Times New Roman", Georgia, serif; }
@media (max-width: 760px) { .decor { display: none; } }

/* --- 23. Klassekaarten -------------------------------------------------- */
.class-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.class-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--brand);
  border-radius: var(--radius); padding: 1.75rem 1.25rem;
  text-decoration: none; color: inherit;
  transition: box-shadow .2s, transform .2s;
}
.class-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.class-card__icon {
  width: 3.25rem; height: 3.25rem; background: var(--brand-soft);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1rem;
}
.class-card__num { font-size: 1.5rem; font-weight: 900; color: var(--brand-ink); line-height: 1.1; }
.class-card__sub { font-size: .85rem; color: var(--text-muted); margin-top: .2rem; }
.class-card.is-soon { border-top-color: var(--border); background: var(--bg); }
.class-card.is-soon:hover { box-shadow: none; transform: none; }
.class-card.is-soon .class-card__icon { background: rgba(0,0,0,.05); filter: grayscale(1); }
.class-card.is-soon .class-card__num, .class-card.is-soon .class-card__sub { color: var(--text-muted); }

/* --- 24. Banner (CTA, Quiz) --------------------------------------------
   Wichteg: Text am Banner ass DONKEL, net wäiss. Wäiss op #F37021 erreecht
   nëmmen 2,9:1; donkelbrong op der selwechter Fläch erreecht 5,9:1. */
.cta-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem; background: var(--brand); color: var(--text);
  border-radius: var(--radius); padding: 1.75rem 2rem; margin-top: 2rem;
  text-decoration: none; transition: box-shadow .2s, transform .2s;
}
a.cta-banner:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -12px rgba(243,112,33,.6); }
.cta-banner h2 { font-size: 1.5rem; color: var(--text); margin-bottom: .4rem; }
.cta-banner p { font-size: .95rem; font-weight: 600; color: var(--text); max-width: 52ch; }
.cta-banner__pill {
  background: #2D1200; color: #fff; padding: .9rem 1.8rem; border-radius: var(--radius-sm);
  font-weight: 900; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em;
  white-space: nowrap;
}
.cta-banner--soon {
  background: var(--brand-soft); border: 2px dashed var(--brand-mid); color: var(--text-muted);
}
.cta-banner--soon h2 { color: var(--text-muted); }
.cta-banner--soon p { color: var(--text-muted); font-weight: 500; }

/* --- 25. Fußzeil-Lëscht ------------------------------------------------- */
.footer-list {
  list-style: none; display: flex; flex-wrap: wrap;
  justify-content: center; gap: .25rem 1.5rem; margin-bottom: 1.25rem;
}
.footer-list a { font-size: .92rem; font-weight: 600; padding: .35rem .25rem; }
.footer__heading {
  font-size: .72rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase;
  color: var(--brand-ink); margin-bottom: .75rem;
}

/* --- 26. Zentréiert Kapitelkaart (Variant) ------------------------------ */
.chapter-card--centered { flex-direction: column; align-items: center; text-align: center; }
.chapter-card--centered .chapter-card__icon { margin-bottom: .75rem; }
.chapter-card--centered .chapter-card__body { flex: none; }
