/* ========================================
   BASE
   Gemeinsame Grundlagen für alle Sprachen
   ======================================== */


/* 1. Lokale Schriften für Arabisch
   Pfade beziehen sich auf diesen CSS-Ordner. */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Estedad";
  src: url("../fonts/estedad-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Estedad";
  src: url("../fonts/estedad-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* 2. Farben und Schriften */

:root {
  color-scheme: dark;

  --background: #111111;
  --panel: #202020;
  --card: #151515;
  --text: #f4f4f4;
  --muted: #bcbcbc;
  --accent: #ffce00;
  --heading-accent: #ffce00;
  --link: #70b6ff;
  --border: #555555;
  --shadow: 0 2px 3px rgb(0 0 0 / 30%);

  --font-body: Georgia, "Times New Roman", serif;
  --font-heading: Georgia, "Times New Roman", serif;
}

/* Die arabischen Seiten erhalten passende Schriftfamilien. */
:root:lang(ar) {
  --font-body: "Vazirmatn", Tahoma, sans-serif;
  --font-heading: "Estedad", Tahoma, sans-serif;
}

/* Wird später über JavaScript eingeschaltet. */
body.light {
  color-scheme: light;

  --background: #f2f2f2;
  --panel: #ffffff;
  --card: #f3f3f3;
  --text: #171717;
  --muted: #555555;
  --heading-accent: #806000;
  --link: #075dad;
  --border: #cccccc;
  --shadow: 0 2px 3px rgb(0 0 0 / 12%);
}


/* 3. Grundregeln */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  text-align: start;
}

button {
  font: inherit;
  cursor: pointer;
}

a {
  color: var(--link);
}

img {
  max-width: 100%;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}


/* 4. Überschriften und Texte */

h1,
h2,
h3,
p {
  margin-block-start: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
}

h2 {
  margin-block-end: 12px;
  font-size: 25px;
  line-height: 1.3;
}

h3 {
  margin-block-end: 6px;
  font-size: 21px;
  line-height: 1.3;
}

p {
  margin-block-end: 16px;
}

em {
  color: var(--heading-accent);
  font-style: normal;
}


/* 5. Tastaturbedienung */

a:focus-visible,
button:focus-visible,
main:focus-visible {
  outline: 3px solid var(--heading-accent);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: 16px;
  z-index: 10;

  padding: 10px 16px;
  background: var(--accent);
  color: #111111;
}

.skip-link:focus {
  inset-block-start: 12px;
}


/* 6. Telefonnummern und E-Mail-Adressen
   Auch auf arabischen Seiten von links nach rechts lesen. */

a[href^="tel:"],
a[href^="mailto:"],
a[href^="https://wa.me/"],
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}


/* 7. Gemeinsame Anpassung für kleine Bildschirme */

@media (max-width: 800px) {
  h2 {
    font-size: 23px;
  }
}