/* ==========================================================================
   SHANOVA — Seitenspezifische Ergaenzungen
   ========================================================================== */

/* ==========================================================================
   1. Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 82svh;
  display: flex;
  align-items: center;
  padding-block: var(--sp-24) var(--sp-16);
  background:
    radial-gradient(120% 90% at 50% 40%, #1B232B 0%, #141B22 45%, #0F151B 100%);
  overflow: hidden;
  border-bottom: 1px solid var(--sh-line);
}

/* Raster aus 1px-Linien — nur erahnbar, Zitat des Logohintergrunds. */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(184, 190, 196, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 190, 196, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 50% 40%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, #000 30%, transparent 85%);
  pointer-events: none;
}

/* Diagonaler Linienfaecher unten links — statisches SVG, keine Animation. */
.hero__lines {
  position: absolute;
  left: -40px;
  bottom: -40px;
  width: min(520px, 46vw);
  opacity: .9;
  pointer-events: none;
  user-select: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: calc(var(--sh-gutter) * 2);
  align-items: center;
  width: 100%;
}

.hero__content { max-width: 720px; }
.hero__content .eyebrow { margin-bottom: var(--sp-6); }
.hero__content .lead { margin-bottom: var(--sp-8); }

.hero__visual { display: flex; justify-content: flex-end; align-items: center; }
.hero__visual img {
  width: clamp(240px, 26vw, 380px);
  height: auto;
  opacity: .9;
}

/* Einmaliges Fade-Up beim Laden, gestaffelt. Sonst keine Bewegung. */
.hero .fade-up {
  opacity: 0;
  transform: translateY(12px);
  animation: sh-fade-up 300ms var(--ease) forwards;
}
.hero .fade-up:nth-child(1) { animation-delay: 0ms; }
.hero .fade-up:nth-child(2) { animation-delay: 60ms; }
.hero .fade-up:nth-child(3) { animation-delay: 120ms; }
.hero .fade-up:nth-child(4) { animation-delay: 180ms; }

@keyframes sh-fade-up {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero .fade-up { opacity: 1; transform: none; animation: none; }
}

@media (max-width: 1023px) {
  .hero { min-height: 0; padding-block: var(--sp-16) var(--sp-12); }
  .hero__inner { grid-template-columns: 1fr; gap: var(--sp-12); }
  .hero__visual { justify-content: flex-start; order: -1; }
  .hero__visual img { width: 240px; }
  .hero__lines { width: 320px; opacity: .6; }
}

/* ---------- Kompakter Seitenkopf fuer Unterseiten ---------- */
.page-head {
  position: relative;
  padding-block: var(--sp-16) var(--sp-12);
  background: var(--sh-bg-900);
  border-bottom: 1px solid var(--sh-line);
  overflow: hidden;
}
.page-head__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(184, 190, 196, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 190, 196, .03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(100% 120% at 20% 0%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(100% 120% at 20% 0%, #000 20%, transparent 80%);
  pointer-events: none;
}
.page-head__inner { position: relative; z-index: 1; }
.page-head h1 { margin-bottom: var(--sp-4); }
.page-head .lead { margin-bottom: 0; }

/* ==========================================================================
   2. Startseite
   ========================================================================== */

/* Die drei Bereiche */
.pillar-card { padding: 32px; }
.pillar-card .hex-icon { margin-bottom: var(--sp-4); }
.pillar-card .card__title { font-size: var(--sh-fs-h3); }
.pillar-card__list {
  list-style: none;
  margin: var(--sp-2) 0 0;
  padding: 0;
  font-size: var(--sh-fs-small);
  color: var(--sh-text-3);
}
.pillar-card__list li {
  margin: 0;
  padding: 6px 0 6px 18px;
  position: relative;
}
.pillar-card__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 15px;
  width: 6px; height: 1px;
  background: var(--sh-gold-600);
}
.pillar-card__more { margin-top: var(--sp-4); }

/* CTA-Band */
.cta-band {
  background: var(--sh-bg-900);
  text-align: center;
  padding-block: var(--sp-24);
  border-top: 1px solid var(--sh-line);
}
.cta-band h2 { margin-inline: auto; max-width: 20ch; }
.cta-band p { margin-inline: auto; margin-bottom: var(--sp-8); }
.cta-band .btn-row { justify-content: center; }

/* ==========================================================================
   3. Wissen — Artikel
   ========================================================================== */

.article-body { font-size: var(--sh-fs-body-l); }
.article-body h2 {
  font-size: var(--sh-fs-h2);
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--sh-line);
}
.article-body h3 { margin-top: var(--sp-8); }
.article-body > :first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.article-body img { border-radius: var(--r-md); border: 1px solid var(--sh-line); margin-block: var(--sp-8); }
.article-body figure { margin: var(--sp-8) 0; }
.article-body figcaption {
  font-family: var(--sh-font-mono);
  font-size: var(--sh-fs-xs);
  color: var(--sh-text-3);
  margin-top: var(--sp-3);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  padding-bottom: var(--sp-6);
  margin-bottom: var(--sp-8);
  border-bottom: 1px solid var(--sh-line);
  font-family: var(--sh-font-mono);
  font-size: var(--sh-fs-xs);
  color: var(--sh-text-3);
}
.article-meta__sep { color: var(--sh-line-2); }

/* ==========================================================================
   4. Projekte
   ========================================================================== */

.project-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--sh-bg-600);
  clip-path: var(--clip-hex);
  -webkit-clip-path: var(--clip-hex);
  display: grid;
  place-items: center;
  color: var(--sh-text-3);
  margin-bottom: var(--sp-4);
}
.project-card__thumb {
  width: 64px;
  height: 72px;
  flex-shrink: 0;
}

.fact-panel {
  background: var(--sh-bg-700);
  border: 1px solid var(--sh-line);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  box-shadow: var(--edge-gold);
  position: sticky;
  top: calc(var(--sh-header-h-sticky) + var(--sp-8));
}
.fact-panel h2 {
  font-family: var(--sh-font-body);
  font-size: var(--sh-fs-eyebrow);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--sh-ls-eyebrow);
  color: var(--sh-silver-300);
  margin-bottom: var(--sp-4);
}
@media (max-width: 1023px) { .fact-panel { position: static; } }

/* ==========================================================================
   5. Kontakt
   ========================================================================== */

.contact-aside { display: flex; flex-direction: column; gap: var(--sp-8); }
.contact-block h2 {
  font-family: var(--sh-font-body);
  font-size: var(--sh-fs-eyebrow);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--sh-ls-eyebrow);
  color: var(--sh-silver-300);
  margin-bottom: var(--sp-3);
}
.contact-block address { font-style: normal; color: var(--sh-text-2); line-height: 1.8; }

/* ==========================================================================
   6. Styleguide
   ========================================================================== */

.sg-section { padding-block: var(--sp-16); border-top: 1px solid var(--sh-line); }
.sg-section:first-of-type { border-top: 0; }

.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-4); }
.swatch { border: 1px solid var(--sh-line); border-radius: var(--r-sm); overflow: hidden; }
.swatch__chip { height: 72px; }
.swatch__info { padding: var(--sp-3); background: var(--sh-bg-700); }
.swatch__name { display: block; font-size: var(--sh-fs-xs); color: var(--sh-text-2); }
.swatch__hex { display: block; font-family: var(--sh-font-mono); font-size: 11px; color: var(--sh-text-3); text-transform: uppercase; }

.sg-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-6);
  background: var(--sh-bg-700);
  border: 1px solid var(--sh-line);
  border-radius: var(--r-md);
}
.sg-label {
  font-family: var(--sh-font-mono);
  font-size: var(--sh-fs-xs);
  color: var(--sh-text-3);
  margin-bottom: var(--sp-3);
}
.sg-scale > * { margin-bottom: var(--sp-4); }
.sg-space { background: var(--sh-gold-a35); height: 16px; border-radius: var(--r-xs); }
.sg-radius {
  width: 88px; height: 64px;
  background: var(--sh-bg-600);
  border: 1px solid var(--sh-line-2);
  display: grid; place-items: center;
  font-family: var(--sh-font-mono);
  font-size: 11px;
  color: var(--sh-text-3);
}
.sg-shadow {
  width: 140px; height: 88px;
  background: var(--sh-bg-700);
  border: 1px solid var(--sh-line);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  font-family: var(--sh-font-mono);
  font-size: 11px;
  color: var(--sh-text-3);
}

/* ==========================================================================
   7. 404
   ========================================================================== */

.error-page {
  min-height: 70svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--sp-24);
}
.error-page__code {
  font-family: var(--sh-font-mono);
  font-size: clamp(3rem, 12vw, 7rem);
  color: var(--sh-gold-600);
  line-height: 1;
  margin-bottom: var(--sp-6);
  letter-spacing: 0.04em;
}
.error-page p { margin-inline: auto; }
.error-page .btn-row { justify-content: center; margin-top: var(--sp-8); }

/* ==========================================================================
   8. Rechtstexte
   ========================================================================== */

.legal h2 { font-size: var(--sh-fs-h3); margin-top: var(--sp-12); }
.legal h3 { font-size: var(--sh-fs-h4); margin-top: var(--sp-8); }
.legal > :first-child { margin-top: 0; }
.legal p, .legal ul { font-size: var(--sh-fs-small); color: var(--sh-text-2); }

/* Tabellen auf kleinen Schirmen horizontal scrollbar mit Schattenkante. */
@media (max-width: 479px) {
  .table-scroll {
    overflow-x: auto;
    background:
      linear-gradient(90deg, var(--sh-bg-800) 30%, rgba(21, 28, 35, 0)) left / 24px 100% no-repeat,
      linear-gradient(-90deg, var(--sh-bg-800) 30%, rgba(21, 28, 35, 0)) right / 24px 100% no-repeat;
  }
  .table-scroll table { min-width: 520px; }
  .btn { width: 100%; }
  .btn-row .btn { width: 100%; }
  .btn--ghost { width: auto; }
}

/* shanova-media: Bilder/Abbildungen aus der Medienbibliothek im Fliesstext */
.prose img, .project-body img, .path-body img { max-width: 100%; height: auto; border-radius: 8px; }
.prose figure, .project-body figure, .path-body figure { margin: 1.5rem 0; }
.prose figcaption, .project-body figcaption, .path-body figcaption { margin-top: .5rem; font-size: .875rem; opacity: .75; }

/* ==========================================================================
   4b. Projektkarte
   Jedes Projekt ist eine Webapp unter eigener Adresse. Die Karte zeigt
   deshalb ein kleines Fenster: Adresszeile oben, darunter das Monogramm
   im Sechseck des Logos, daneben bzw. darunter Titel, Text und Aktionen.
   ========================================================================== */

.project-grid[data-count="1"] { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.project-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.project-card { padding: 0; gap: 0; overflow: hidden; }

.project-card__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 16px;
  background: var(--sh-bg-800);
  border-bottom: 1px solid var(--sh-line);
  font-family: var(--sh-font-mono);
  font-size: var(--sh-fs-xs);
  color: var(--sh-text-2);
}
.project-card__bar::before {
  content: "";
  flex: none;
  width: 10px;
  height: 11px;
  background: var(--sh-gold-500);
  clip-path: var(--clip-hex);
  -webkit-clip-path: var(--clip-hex);
}
.project-card__host { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-card__host--none { color: var(--sh-text-3); }
.project-card__bar .status { margin-left: auto; flex: none; }

.project-card__main { display: flex; flex-direction: column; flex: 1; }

/* Grund wie im Logo: Vignette, zur Mitte heller */
.project-card__well {
  display: grid;
  place-items: center;
  padding: 28px;
  background: radial-gradient(circle at 50% 45%, #1F262E 0%, #13161B 100%);
  border-bottom: 1px solid var(--sh-line);
}
.project-card__mono {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  height: 96px;
  background: linear-gradient(160deg, var(--sh-gold-200), var(--sh-gold-600));
  clip-path: var(--clip-hex);
  -webkit-clip-path: var(--clip-hex);
}
.project-card__mono::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: #171D24;
  clip-path: var(--clip-hex);
  -webkit-clip-path: var(--clip-hex);
}
.project-card__mono span {
  position: relative;
  font-family: var(--sh-font-head);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--sh-gold-300);
}

.project-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 1;
  min-width: 0;
  padding: 24px 28px 28px;
}
.project-card__foot {
  margin-top: auto;
  padding-top: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
/* Titel-Link liegt ueber der ganzen Karte; Aktionen muessen darueber liegen */
.project-card__actions { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.project-card__year {
  margin-left: auto;
  font-family: var(--sh-font-mono);
  font-size: var(--sh-fs-xs);
  color: var(--sh-text-3);
}

/* Ein einzelnes Projekt: liegendes Format, Monogramm links */
@media (min-width: 768px) {
  .project-grid[data-count="1"] .project-card__main { flex-direction: row; }
  .project-grid[data-count="1"] .project-card__well {
    flex: 0 0 36%;
    border-bottom: 0;
    border-right: 1px solid var(--sh-line);
  }
  .project-grid[data-count="1"] .project-card__mono { width: 104px; height: 119px; }
  .project-grid[data-count="1"] .project-card__mono span { font-size: 34px; }
}
@media (max-width: 1023px) {
  .project-grid[data-count="1"] { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .project-grid[data-count="2"] { grid-template-columns: 1fr; }
  .project-card__well { padding: 20px; }
  .project-card__body { padding: 20px; }
}

/* Aktuelles: Etikett automatischer Eintraege ("Neues Projekt" usw.) unter dem Datum */
.news-item__kind {
  display: block;
  margin-top: 4px;
  font-family: var(--sh-font-body);
  font-size: var(--sh-fs-xs);
  color: var(--sh-gold-500);
}

/* Projektkarte mit Titelbild (Screenshot der Webapp) statt Monogramm */
.project-card__well--cover { position: relative; padding: 0; aspect-ratio: 16 / 10; background: var(--sh-bg-900); }
.project-card__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}
@media (min-width: 768px) {
  .project-grid[data-count="1"] .project-card__well--cover { flex-basis: 46%; aspect-ratio: auto; min-height: 250px; }
}

/* Titelbild auf der Projektseite */
.project-cover {
  margin: var(--sp-6) 0;
  border: 1px solid var(--sh-line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--sh-bg-900);
}
.project-cover img { display: block; width: 100%; height: auto; }

/* Paket 51: Detailseite Lernen
   - Spalten eines Rasters duerfen schmaler werden als ihr breitester Inhalt (sonst schiebt z. B. ein
     langer Vorlagenblock die Seite auf dem Handy seitlich aus dem Bild)
   - Lesetext wie bei Artikeln: Abstaende der Ueberschriften, Vorlagen umbrechen statt seitlich scrollen */
.split > * { min-width: 0; }
.path-content { margin-top: var(--sp-6); }
.path-body { max-width: 720px; }
.path-body > :first-child { margin-top: 0; }
.path-body h2 { margin-top: var(--sp-12); }
.path-body h3 { margin-top: var(--sp-8); }
.path-body pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.path-body code { overflow-wrap: anywhere; }
.path-body table { display: block; max-width: 100%; overflow-x: auto; }
/* Lange Adressen (z. B. der PayPal-Link im Impressum) duerfen umbrechen */
.prose, .path-body, .project-body { overflow-wrap: break-word; }
