/* sanexta.com – Ergänzungen zum gemeinsamen SANEXTA-Stylesheet (sanexta.css bleibt unverändert).
   Wird nach sanexta.css eingebunden. Nur logische Eigenschaften (RTL) und keine Farbwerte
   außer var(--…) aus den Theme-Blöcken von sanexta.css. */

/* ---------- Kopfleiste: Sprachumschalter ----------
   Markup: <nav class="lang-switch"><ul><li><a hreflang="de" aria-current="true">Deutsch</a>…
   Eigenes <nav>, weil sanexta.css jedem direkten <a> in .app-header-tools einen Avatar gibt. */
.lang-switch ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding-inline: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-2);
  font-weight: 500;
}
.lang-switch a:hover {
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}
.lang-switch a[aria-current] {
  border-color: var(--primary-soft-2);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
}
/* Neben dem Sprachumschalter gibt es keinen Benutzer, also keine Trennlinie nötig –
   sie trennt hier Darstellung und Sprache. */
.app-header-tools .theme-select {
  padding-inline-end: 12px;
}

/* Hauptbereich bekommt beim Sprunglink den Fokus, ohne Rahmen */
.app-main:focus {
  outline: none;
}

/* ---------- Text ---------- */
.lead {
  font-size: 16px;
  line-height: 1.5;
}
.prose,
.card p,
.card li,
.card dd,
.card address {
  font-size: 15px;
  line-height: 1.6;
}
.prose {
  max-inline-size: 70ch;
  margin-block-end: 28px;
  color: var(--text-2);
}
.card ul {
  margin-block: 0 12px;
  padding-inline-start: 20px;
}
.card ul:last-child {
  margin-block-end: 0;
}
.card > p {
  max-inline-size: 75ch;
}
address {
  font-style: normal;
}

/* Platzhalter für noch fehlende Angaben, erzeugt von {{todo:…}} in tools/build.py */
mark.placeholder {
  padding-inline: 4px;
  border: 1px dashed var(--warning-border);
  border-radius: 4px;
  background: var(--warning-bg);
  color: var(--warning);
  font-weight: 600;
}

/* ---------- Startseite ---------- */
/* Markup: <section class="hero"><img class="hero-logo"><div><h1>…</h1><p class="lead">… */
.hero {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-block: 8px 28px;
}
.hero-logo {
  flex: none;
  inline-size: 96px;
  block-size: auto;
}
.hero h1 {
  font-size: 34px;
  line-height: 1.2;
}
.hero .lead {
  margin-block-start: 6px;
  color: var(--text-muted);
  font-size: 18px;
}

/* Zwei große Kacheln, die ganze Karte ist der Verweis.
   Markup: <div class="tiles tiles-wide"><a class="card tile tile-link">…<span class="tile-more"> */
.tiles-wide {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.tiles-wide > .card {
  margin-block-end: 0;
}
.tile-link {
  gap: 10px;
  color: var(--text);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.tile-link:hover {
  border-color: var(--primary);
  text-decoration: none;
}
.tile-link p {
  color: var(--text-2);
}
.tile-link .tile-more {
  margin-block-start: auto;
  padding-block-start: 6px;
  color: var(--primary);
  font-weight: 600;
}
.tile-link:hover .tile-more {
  text-decoration: underline;
}
.arrow {
  display: inline-block;
}
[dir="rtl"] .arrow {
  transform: scaleX(-1);
}

/* ---------- Dienstleistungen ---------- */
.tech-list {
  margin-block-start: 16px;
}

/* ---------- Software ----------
   Markup: <div class="product-grid"><section class="card product">…<div class="product-ops"> */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-block-end: 24px;
}
.product-grid > .card {
  display: flex;
  flex-direction: column;
  margin-block-end: 0;
}
.product > h2 {
  margin-block-end: 2px;
}
.product-tagline {
  color: var(--primary-dark);
  font-weight: 600;
}
/* Hinweis "In Entwicklung" über dem Produktnamen. Markup: <p class="product-badge"><span class="status open"> */
.product-badge {
  margin-block-end: 8px;
}
.product-license {
  color: var(--text-muted);
}
.product-ops {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-block-start: auto;
  padding-block-start: 14px;
  border-block-start: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}
.product-ops .ops {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* .card li würde die Markierungen auf Fließtextgröße ziehen */
.product-ops .status {
  font-size: 12px;
  line-height: 1.5;
}

.page-cta {
  margin-block: 8px 0;
}

/* ---------- Kontakt ---------- */
.contact-mail {
  font-size: 17px;
  font-weight: 600;
}

/* ---------- Fußzeile ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-block-start: 48px;
  padding-block-start: 20px;
  border-block-start: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.site-footer p {
  margin: 0;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a[aria-current] {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Sprachwahl unter / und Fehlerseite ---------- */
.root-choice {
  max-inline-size: 34rem;
  margin-inline: auto;
  padding: 64px 16px;
  text-align: center;
}
.root-choice img {
  margin-block-end: 16px;
}
.root-choice .actions {
  justify-content: center;
}
.root-choice section + section {
  margin-block-start: 28px;
  padding-block-start: 28px;
  border-block-start: 1px solid var(--border);
}

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 960px) {
  /* Fingerbedienung: Ziele mindestens 44 px hoch */
  .app-nav a,
  .lang-switch a,
  .theme-select select {
    min-height: 44px;
  }
  .app-nav a {
    font-size: 14px;
  }
  .theme-select select {
    height: 44px;
  }
  .app-header-tools .theme-select {
    padding-inline-end: 8px;
  }
  .site-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}
@media (max-width: 560px) {
  .hero {
    gap: 16px;
  }
  .app-nav a {
    padding-inline: 9px;
  }
  .app-header-tools .theme-select {
    border-inline-end: 0;
  }
  .hero-logo {
    inline-size: 64px;
  }
  .hero h1 {
    font-size: 26px;
  }
  .hero .lead {
    font-size: 16px;
  }
  .product-grid,
  .tiles-wide {
    grid-template-columns: 1fr;
  }
}

/* Kontrast: Weiß auf dem hellen Dunkel-Blau erreicht nur 3,6 : 1, dunkle Schrift 5 : 1 */
[data-theme="dark"] .button.primary,
[data-theme="dark"] button.primary {
  color: var(--bg);
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .button.primary,
  [data-theme="auto"] button.primary {
    color: var(--bg);
  }
}

@media print {
  .lang-switch,
  .theme-select {
    display: none !important;
  }
}
