/* =============================================================================
   landing.css — Kursseite Economics — ISBA Freiburg

   Struktur:
     1. CSS-Variablen
     2. Reset & Basis
     3. Navbar (Anpassungen)
     4. Hero-Bereich
     5. Stats-Leiste
     6. Container & Section-Titel
     7. Block-Karten
     8. Material-Tiles (Default + Block-Card-Spezialisierung + WIP-Variante)
     9. CC-Line (Lizenz-Icon mit Name)
    10. Footer
    11. Responsive
   ============================================================================= */


/* =============================================================================
   1. CSS-VARIABLEN
   ============================================================================= */

:root {
  /* Marken-Farben */
  --isba-blue:        #232461;
  --isba-red:         #d84116;
  --isba-grey:        #696969;
  --isba-grey-light:  #f5f5f7;
  --isba-white:       #ffffff;

  /* Material-Tile-Farben (aus Marken-Blau abgeleitet) */
  --tile-bg:          #d8dceb;
  --tile-bg-hover:    #c4cae0;
  --tile-border:      #b8c0d8;

  /* WIP-Tile-Farben (zurückweichend) */
  --tile-wip-bg:      #fafafa;
  --tile-wip-border:  #ececec;
  --tile-wip-text:    #a0a0a0;

  /* Sonstige */
  --body-color:       #1a1a1a;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(35, 36, 97, 0.05);
  --shadow-md: 0 4px 14px rgba(35, 36, 97, 0.09);
  --shadow-lg: 0 10px 30px rgba(35, 36, 97, 0.14);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


/* =============================================================================
   2. RESET & BASIS
   ============================================================================= */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--body-color);
  background: var(--isba-white);
}

a { color: var(--isba-blue); text-decoration: none; }
a:hover { color: var(--isba-red); }

::selection {
  background: rgba(216, 65, 22, 0.25);
  color: var(--body-color);
}


/* =============================================================================
   3. NAVBAR — dezente Trennung zum Hero
   ============================================================================= */

.navbar {
  border-bottom: 1px solid rgba(35, 36, 97, 0.08);
  box-shadow: 0 1px 3px rgba(35, 36, 97, 0.04);
}


/* =============================================================================
   4. HERO
   ============================================================================= */

.hero {
  background: var(--isba-blue);
  color: var(--isba-white);
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  color: var(--isba-white);
  line-height: 1;
}

.hero-dot {
  color: var(--isba-red);
  font-weight: 800;
  display: inline-block;
  margin-left: 0.08em;
}

.hero h3 {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0.75rem 0 0;
}

.hero-divider {
  width: 180px;
  height: 3px;
  background: var(--isba-red);
  margin: 1.75rem auto;
  border-radius: 2px;
}

.hero-content p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
  max-width: 640px;
  margin: 0 auto;
}


/* =============================================================================
   5. STATS-LEISTE
   ============================================================================= */

.stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
}

.stat-item strong {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--isba-white);
  line-height: 1;
  margin-bottom: 0.3rem;
}


/* =============================================================================
   6. HAUPT-CONTAINER & SECTION-TITEL
   ============================================================================= */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
}

.section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--isba-blue);
  margin: 3.5rem 0 1.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 3px solid var(--isba-red);
  display: inline-block;
}

.container > h2.section-title:first-of-type { margin-top: 0; }

/* Inhalt des Containers in normaler Case/Weight */
.container p,
.container li {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}


/* =============================================================================
   7. BLOCK-KARTEN
   ============================================================================= */

.block-card {
  background: var(--isba-white);
  border: 1px solid var(--isba-grey-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.block-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(216, 65, 22, 0.35);
}

.block-header {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.75rem;
  align-items: start;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--isba-grey-light);
}

.block-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--isba-red);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  padding-top: 0.1rem;
}

.block-header h3 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  color: var(--isba-blue);
  font-weight: 700;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: normal;
}

.block-header p {
  margin: 0;
  color: var(--isba-grey);
  font-size: 0.95rem;
  line-height: 1.55;
  text-transform: none;
  letter-spacing: normal;
}


/* =============================================================================
   8. MATERIAL-TILES

   Default-Layout (auto-fit) für freie Verwendung in Sub-Seiten,
   spezialisiertes 4-Spalten-Layout in Block-Karten der Landing-Page.

   Die Spezifität (.block-card .material-grid) reicht aus, um den
   Default zu überschreiben — kein !important nötig.
   ============================================================================= */

/* ---- Grid: Default (auto-fit, mind. 220px breit) ---- */
.material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* ---- Grid: Spezialisierung in Block-Karten (4 gleiche Spalten) ---- */
.block-card .material-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* ---- Quarto wickelt Tiles in <p>-Element; transparent machen ---- */
.material-grid > p {
  display: contents;
}

/* ---- Tile: Default-Aussehen (aktiv, klickbar) ---- */
.material-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 1.25rem;
  min-height: 90px;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--isba-blue);
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
  transition: background 0.15s ease, transform 0.15s ease;
}

.material-tile strong {
  display: block;
  color: var(--isba-red);
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.material-tile:hover {
  background: var(--tile-bg-hover);
  transform: translateY(-1px);
}

/* ---- Tile-Subtitle (nach <br>) etwas kleiner ---- */
.material-tile br + *,
.material-tile-wip br + * {
  font-size: 0.85em;
  line-height: 1.3;
}

/* ---- Tile: WIP-Variante (nicht klickbar, zurückweichend) ---- */
.material-tile-wip {
  background: var(--tile-wip-bg);
  border-color: var(--tile-wip-border);
  color: var(--tile-wip-text);
  cursor: not-allowed;
  pointer-events: none;
}

.material-tile-wip:hover {
  background: var(--tile-wip-bg);
  transform: none;
  box-shadow: none;
}

a.material-tile-wip,
a.material-tile-wip:hover,
a.material-tile-wip:focus,
a.material-tile-wip:visited {
  text-decoration: none;
  color: var(--tile-wip-text);
}


/* =============================================================================
   9. CC-LINE — Icon + Name sauber aligned (für Lizenz-Bereich + Footer)
   ============================================================================= */

.cc-line {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  line-height: 1;
}

.cc-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
  vertical-align: middle;
}

.cc-name {
  font-weight: 400;
  line-height: 1;
}

/* Quarto wickelt Inline-Spans in <p>; das bricht das Flex-Layout */
.cc-line > p {
  margin: 0;
  display: contents;
}

/* Sicherheits-Constraint: alle SVGs in cc-line/site-footer auf 16px begrenzen */
.cc-line svg,
.site-footer svg {
  max-width: 16px;
  max-height: 16px;
  width: 16px;
  height: 16px;
}


/* =============================================================================
   10. FOOTER
   ============================================================================= */

.site-footer {
  background: var(--isba-blue);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  margin-top: 4rem;
  letter-spacing: 0.03em;
}

.footer-top {
  margin-bottom: 0.8rem;
}

.site-footer .footer-bottom {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  display: inline-flex;
  margin: 0 auto;
}

.site-footer > .footer-bottom {
  display: flex;
  justify-content: center;
}


/* =============================================================================
   11. RESPONSIVE
   ============================================================================= */

/* Tablet: 2x2-Grid für Material-Tiles in Block-Karten */
@media (max-width: 900px) {
  .block-card .material-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: einspaltig */
@media (max-width: 640px) {
  .hero { padding: 3rem 1.25rem 2.5rem; }
  .container { padding: 2.5rem 1.25rem; }
  .stats { gap: 2rem; }
  .stat-item strong { font-size: 2rem; }
  .hero-divider { width: 120px; }

  .block-header {
    grid-template-columns: 60px 1fr;
    gap: 1.25rem;
  }
  .block-number { font-size: 2.2rem; }

  .block-card .material-grid,
  .material-grid {
    grid-template-columns: 1fr;
  }
}
