/*
  style.css  -  Stylesheet fuer mberginz.ch (Relaunch).

  Autor:     Marc Berginz
  Erstellt:  12.10.2026
  Version:   1.1.0

  Beschreibung:
    Eigenes CSS ohne Framework. Farben als Custom Properties auf :root,
    Dark Mode ueber prefers-color-scheme, mobile-first Layout mit Grid.
    Primaerfarbe ist das Blau aus dem IBZH11-Logo (#105090).
    Gemeinsame Datei fuer mberginz.ch und support.mberginz.ch.

  Aenderungen:
    1.1.0  13.10.2026  Marc Berginz  Handy-Stufe unter 600px: kompakte Navigation, kleines Logo oben im Hero, Karten quer, engere Abstaende
    1.0.1  13.10.2026  Marc Berginz  Skip-Link bei Tastaturfokus sichtbar, weisser Fokusring im Hero
    1.0.0  12.10.2026  Marc Berginz  Erste Live-Fassung: Stil fuer Motto-Zitat, Versionsanzeige im Footer entfernt
    0.1.2  12.10.2026  Marc Berginz  Linkstil fuer Eintraege in Feature-Listen ergaenzt
    0.1.1  12.10.2026  Marc Berginz  Navigation auf schmalen Screens kompakter (vier Links in einer Zeile)
    0.1.0  12.10.2026  Marc Berginz  Erstfassung (Entwurf)
*/

/* ---------- Design-Tokens ---------- */

:root {
  --blue-900: #082a52;
  --blue-800: #0b3a6b;
  --blue-700: #105090;
  --blue-600: #1a63ad;
  --blue-500: #2b7bcc;
  --blue-100: #e3edf8;
  --blue-50:  #f1f6fc;

  --bg:          #f6f8fb;
  --bg-elevated: #ffffff;
  --bg-muted:    var(--blue-50);
  --text:        #1a2433;
  --text-muted:  #5b6675;
  --border:      #dfe5ee;
  --shadow:      0 1px 2px rgba(10, 30, 60, 0.06), 0 8px 24px rgba(10, 30, 60, 0.08);
  --shadow-hover: 0 2px 4px rgba(10, 30, 60, 0.08), 0 16px 40px rgba(10, 30, 60, 0.14);

  --primary:          var(--blue-700);
  --primary-hover:    var(--blue-600);
  --primary-contrast: #ffffff;
  --link:             var(--blue-700);

  --hero-bg:   linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 60%, var(--blue-600) 100%);
  --hero-text: #ffffff;

  --radius:    16px;
  --radius-sm: 10px;
  --gutter:    16px;
  --maxw:      1080px;

  --font: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0f1622;
    --bg-elevated: #172030;
    --bg-muted:    #1c2738;
    --text:        #e8edf4;
    --text-muted:  #9fadbf;
    --border:      #2a3648;
    --shadow:      0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.5);
    --primary:       var(--blue-500);
    --primary-hover: #3f8edb;
    --link:          #7db5ec;
    --hero-bg:   linear-gradient(135deg, #061d3a 0%, var(--blue-800) 60%, var(--blue-700) 100%);
  }
}

:root[data-theme="dark"] {
  --bg:          #0f1622;
  --bg-elevated: #172030;
  --bg-muted:    #1c2738;
  --text:        #e8edf4;
  --text-muted:  #9fadbf;
  --border:      #2a3648;
  --shadow:      0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.5);
  --primary:       var(--blue-500);
  --primary-hover: #3f8edb;
  --link:          #7db5ec;
  --hero-bg:   linear-gradient(135deg, #061d3a 0%, var(--blue-800) 60%, var(--blue-700) 100%);
}

/* ---------- Basis ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px; /* Navigation umbricht auf schmalen Screens in zwei Zeilen */
}
@media (min-width: 480px) {
  html { scroll-padding-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Skip-Link: unsichtbar, bis er per Tastatur den Fokus bekommt */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-contrast);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Fokusring auf dunklem Hero-Blau sonst zu schwach */
.hero :focus-visible { outline-color: #fff; }

/* ---------- Navigation ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  flex-wrap: wrap;
  padding-block: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease;
}
.nav-links a:hover { background: var(--bg-muted); }

/* Schmale Screens: vier Links in einer Zeile halten */
@media (max-width: 479px) {
  .nav-links { gap: 2px; }
  .nav-links a { padding: 6px 8px; font-size: 0.88rem; }
}

/* ---------- Hero ---------- */

.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.hero::before { width: 420px; height: 420px; top: -160px; right: -120px; }
.hero::after  { width: 260px; height: 260px; bottom: -120px; left: -60px; }

.hero .container {
  position: relative;
  display: grid;
  gap: 32px;
  padding-block: 56px 64px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
}

.hero h1 { color: #fff; margin-bottom: 14px; }

.hero-lead {
  font-size: 1.15rem;
  max-width: 44ch;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 28px;
}

.hero-logo {
  justify-self: center;
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  width: min(220px, 60vw);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

@media (min-width: 760px) {
  .hero .container {
    grid-template-columns: 1.3fr 0.7fr;
    padding-block: 88px 96px;
  }
  .hero-logo { width: min(260px, 100%); justify-self: end; }
}

/* ---------- Buttons ---------- */

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }

.btn-light {
  background: #fff;
  color: var(--blue-800);
}
.btn-light:hover { background: var(--blue-50); }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.btn-primary {
  background: var(--primary);
  color: var(--primary-contrast);
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Sektionen ---------- */

.section { padding-block: 64px; }
.section + .section { border-top: 1px solid var(--border); }
.section-alt { background: var(--bg-muted); }

.section-head { max-width: 60ch; margin-bottom: 32px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; margin: 0; }

.section-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}

/* ---------- Link-Karten ---------- */

.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px)  { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--blue-100);
  color: var(--blue-700);
  overflow: hidden;
}
:root[data-theme="dark"] .card-icon { background: #22314a; color: #9cc6f2; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .card-icon { background: #22314a; color: #9cc6f2; }
}
.card-icon svg { width: 26px; height: 26px; }
.card-icon img { width: 100%; height: 100%; object-fit: contain; }
.card-icon.is-logo { background: #fff; padding: 4px; }
.card-icon.is-logo-zoom img { transform: scale(1.6); } /* Logo mit viel Weissraum vergroessern */

.card h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card h3 .ext { width: 16px; height: 16px; opacity: 0.5; flex-shrink: 0; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.97rem; }
.card-meta {
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- Support-Kachel ---------- */

.feature {
  display: grid;
  gap: 28px;
  padding: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (min-width: 860px) {
  .feature { grid-template-columns: 1.1fr 1fr; padding: 40px; align-items: center; }
}

.feature-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 14px;
}
.feature-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
}
.feature-list .card-icon { width: 40px; height: 40px; border-radius: 10px; }
.feature-list .card-icon svg { width: 22px; height: 22px; }
.feature-list strong { display: block; }
.feature-list span { color: var(--text-muted); font-size: 0.95rem; }
.feature-list strong a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--link);
  text-decoration: none;
}
.feature-list strong a:hover { text-decoration: underline; }
.feature-list strong a .ext { width: 15px; height: 15px; opacity: 0.6; }

/* ---------- Ueber mich ---------- */

.about {
  display: grid;
  gap: 28px;
  align-items: start;
}
@media (min-width: 760px) { .about { grid-template-columns: 220px 1fr; gap: 40px; } }

.avatar {
  width: 180px; height: 180px;
  border-radius: 50%;
  background: var(--hero-bg);
  color: #fff;
  display: grid; place-items: center;
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow);
  margin-inline: auto;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 760px) { .avatar { width: 220px; height: 220px; margin-inline: 0; } }

.motto {
  margin: 20px 0 4px;
  padding: 4px 0 4px 18px;
  border-left: 4px solid var(--primary);
}
.motto blockquote {
  margin: 0;
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 600;
  color: var(--text);
}
.motto figcaption {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.facts {
  list-style: none;
  margin: 20px 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.facts li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--text-muted);
}
.facts svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }

/* ---------- Handy-Stufe (unter 600px) ----------
   Kompakte Navigation, kleines Logo oben im Hero, Karten quer statt hochkant,
   engere Abstaende. Gilt fuer beide Seiten. */

@media (max-width: 599px) {
  .site-nav .container { min-height: 0; padding-block: 6px; gap: 4px 12px; }
  .brand { font-size: 1rem; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; font-size: 0.72rem; border-radius: 7px; }
  .nav-links a { padding: 5px 8px; font-size: 0.86rem; }

  .hero .container { padding-block: 28px 44px; gap: 18px; }
  .hero-logo {
    order: -1;
    justify-self: start;
    width: 104px;
    padding: 10px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  }
  .hero-eyebrow { margin-bottom: 10px; font-size: 0.78rem; }
  .hero-lead { font-size: 1.05rem; margin-bottom: 20px; }
  .btn { padding: 11px 18px; }

  .section { padding-block: 44px; }
  .section-head { margin-bottom: 22px; }
  .section-head p { font-size: 1rem; }

  .card { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 6px 14px; padding: 16px; }
  .card .card-icon { width: 44px; height: 44px; flex: 0 0 44px; }
  .card h3 { flex: 1 1 0; min-width: 0; align-self: center; font-size: 1.05rem; }
  .card p { flex-basis: 100%; font-size: 0.93rem; }
  .card-meta { flex-basis: 100%; margin-top: 0; }

  .feature { padding: 22px 18px; gap: 20px; }
  .feature-list { gap: 12px; }

  .about { gap: 20px; }
  .avatar { width: 140px; height: 140px; font-size: 2.5rem; }
  .motto blockquote { font-size: 1rem; }
  .facts { margin: 16px 0 20px; }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--blue-900);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  padding-block: 28px;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.site-footer a { color: #fff; }
