/*
 * Schule des Aufbruchs — Design System
 * Übertragen aus Figma „DSIK – Website Designsystem".
 * Pflegt CSS Custom Properties (Variables), Typografie (Text Styles),
 * Layer Styles (Schatten) und Layout-Werte.
 */

/* Readex Pro — selbst gehostete Variable-Font (woff2). Drei Subsets:
   latin + latin-ext für DE, arabic für AR. Variable Weight 200..700.
   Unicode-Ranges 1:1 aus Google Fonts CSS übernommen, damit der
   Browser pro Zeichen das richtige Subset lädt. */
@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url('../fonts/readex-pro-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url('../fonts/readex-pro-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url('../fonts/readex-pro-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

/* ============================================================
   Design Tokens
   ----------------------------------------------------------------
   Mobile-first: :root liefert die Mobile-Werte.
   Tablet (≥768px) und Desktop (≥1200px) überschreiben über Media
   Queries. Farben, Effekte und Schrift-Stile sind breakpoint-
   unabhängig, nur Größen, Spacings und Radien skalieren.
   ============================================================ */
:root {
  /* --- Color (konstant) --------------------------------------- */
  --color-warm-white: #fdf7eb;
  --color-black: #000000;
  --color-sand: #d8a86e;
  --color-orange: #f86335;
  --color-red: #b9332e;
  --color-green: #026f4e;
  --color-lime: #14c57e;
  --color-earth: #986d43;
  --color-light-grey: #c8cac5;
  --color-light-grey-trans-30: rgba(200, 202, 197, 0.3);
  --color-light-grey-trans-50: rgba(200, 202, 197, 0.5);
  --color-basalt: #837b76;

  /* Semantische Aliase */
  --text-body: var(--color-black);
  --bg-page: var(--color-warm-white);
  --overline-color: var(--color-red);

  /* --- Spacer (responsive) ------------------------------------ */
  --spacer-2xs: 4px;
  --spacer-xs: 4px;
  --spacer-s: 8px;
  --spacer-m: 16px;
  --spacer-l: 24px;
  --spacer-xl: 24px;
  --spacer-2xl: 32px;

  /* --- Basics / Layout (responsive) --------------------------- */
  --page-margin: 8px;
  --content-margin: 8px;
  --grid-gap: 4px;
  --border-radius-s: 2px;
  --border-radius-m: 3px;
  --nav-link-padding-x: 14px;
  --button-padding-x: 16px;
  --button-padding-x-hover: 24px;
  --header-height: 60px;

  /* --- Text Sizes (responsive) -------------------------------- */
  --text-overline: 10px;
  --text-body-s: 10px;
  --text-navigation: 16px;
  --text-button: 16px;
  --text-body-m: 14px;
  --text-title-s: 14px;
  --text-title-m: 16px;
  --text-body-l: 19px;
  --text-title-l: 20px;
  --text-quote: 24px;
  --text-title-xl: 24px;
  --text-title-2xl: 32px;
  --text-title-3xl: 48px;

  /* --- Layer Styles (Effects, konstant) ---------------------- */
  --shadow-button: 2px 2px 3px 0 rgba(0, 0, 0, 0.2);

  /* --- Layout Guides ------------------------------------------ */
  --breakpoint-tablet: 768px;
  --breakpoint-desktop: 1200px;
  --grid-columns-desktop: 12;
  --grid-columns-tablet: 8;
  --grid-columns-mobile: 4;
}

/* --- Tablet (≥768px) ----------------------------------------- */
@media (min-width: 768px) {
  :root {
    /* Spacer */
    --spacer-xs: 6px;
    --spacer-s: 12px;
    --spacer-m: 24px;
    --spacer-l: 32px;
    --spacer-xl: 40px;
    --spacer-2xl: 52px;

    /* Layout */
    --page-margin: 8px;
    --content-margin: 40px;
    --border-radius-s: 3px;
    --border-radius-m: 4px;
    --header-height: 60px;

    /* Text Sizes */
    --text-overline: 11px;
    --text-body-s: 12px;
    --text-body-m: 16px;
    --text-title-s: 16px;
    --text-title-m: 20px;
    --text-body-l: 26px;
    --text-title-l: 26px;
    --text-quote: 32px;
    --text-title-xl: 32px;
    --text-title-2xl: 48px;
    --text-title-3xl: 72px;
  }
}

/* --- Desktop (≥1200px) --------------------------------------- */
@media (min-width: 1200px) {
  :root {
    /* Spacer */
    --spacer-xs: 8px;
    --spacer-s: 16px;
    --spacer-m: 24px;
    --spacer-l: 32px;
    --spacer-xl: 48px;
    --spacer-2xl: 64px;

    /* Layout */
    --page-margin: 8px;
    --content-margin: 96px;
    --border-radius-s: 3px;
    --border-radius-m: 6px;
    --header-height: 100px;

    /* Text Sizes */
    --text-overline: 12px;
    --text-body-s: 14px;
    --text-body-m: 20px;
    --text-title-s: 20px;
    --text-title-m: 26px;
    --text-body-l: 32px;
    --text-title-l: 32px;
    --text-quote: 40px;
    --text-title-xl: 52px;
    --text-title-2xl: 64px;
    --text-title-3xl: 96px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text-body);
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: var(--text-body-m);
  font-weight: 350;
  line-height: 1.5;
  font-feature-settings: 'salt' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

/* ============================================================
   Text Styles
   ============================================================ */
.text-overline {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: var(--text-overline);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--overline-color);
}

.text-body-s {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: var(--text-body-s);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}

.text-body-m {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: var(--text-body-m);
  font-weight: 350;
  line-height: 1.5;
  letter-spacing: 0;
}

.text-body-l {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: var(--text-body-l);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.text-navigation {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: var(--text-navigation);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
}

.text-button {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: var(--text-button);
  font-weight: 550;
  line-height: 1.1;
  letter-spacing: 0;
}

.text-quote {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: var(--text-quote);
  font-weight: 200;
  line-height: 1.3;
  letter-spacing: 0;
}

.text-title-s {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: var(--text-title-s);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
}

.text-title-m {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: var(--text-title-m);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
}

.text-title-l {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: var(--text-title-l);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
}

.text-title-xl {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: var(--text-title-xl);
  font-weight: 350;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-title-2xl {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: var(--text-title-2xl);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-title-3xl {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: var(--text-title-3xl);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
}

/* ============================================================
   Layer Styles
   ============================================================ */
.shadow-button {
  box-shadow: var(--shadow-button);
}

/* ============================================================
   Layout Guides
   ============================================================ */
.page {
  padding-left: var(--page-margin);
  padding-right: var(--page-margin);
}

.content {
  padding-left: var(--content-margin);
  padding-right: var(--content-margin);
}

.grid {
  display: grid;
  gap: var(--grid-gap);
  grid-template-columns: repeat(var(--grid-columns-mobile), minmax(0, 1fr));
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(var(--grid-columns-tablet), minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(var(--grid-columns-desktop), minmax(0, 1fr));
  }
}

/* Stack-Helper */
.stack-2xs { display: flex; flex-direction: column; gap: var(--spacer-2xs); }
.stack-xs  { display: flex; flex-direction: column; gap: var(--spacer-xs);  }
.stack-s   { display: flex; flex-direction: column; gap: var(--spacer-s);   }
.stack-m   { display: flex; flex-direction: column; gap: var(--spacer-m);   }
.stack-l   { display: flex; flex-direction: column; gap: var(--spacer-l);   }
.stack-xl  { display: flex; flex-direction: column; gap: var(--spacer-xl);  }
.stack-2xl { display: flex; flex-direction: column; gap: var(--spacer-2xl); }
