/* ========================================================================
   open-source.css — Seiten-lokale Styles fuer /open-source/ (Hub + Tutorials)
   BC ALL (Dachmarke), jf-gold. Additiv: nutzt Base-Tokens & globale Klassen
   (.section, .container, .btn, .hero*, .section__*). USCRX-2026-5507.
   ======================================================================== */

/* --- Breadcrumb (wie /ki-integration/ ki-crumb) --- */
.os-crumb { position: absolute; top: 6.25rem; left: 0; right: 0; z-index: 5; padding-bottom: 0; }
.os-crumb__nav { font-size: 0.85rem; color: var(--color-text-muted); display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.os-crumb__nav a { color: var(--color-text-muted); }
.os-crumb__nav a:hover { color: var(--color-accent-light); }
.os-crumb__sep { opacity: 0.5; }
.os-crumb__current { color: var(--color-text); }
@media (max-width: 768px) { .os-crumb { top: 5.25rem; } }

/* --- Hub-Hero (Text/Gradient, jf-gold) --- */
.os-hero { min-height: 60dvh; }
.os-hero__gradient {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(236, 188, 31, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 80% 60%, rgba(236, 188, 31, 0.06) 0%, transparent 55%),
    var(--color-bg);
}
.os-hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black, transparent);
}
.os-hero__eyebrow {
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--color-accent-light); margin-bottom: 1.5rem;
}
.os-hero__title {
  font-family: var(--font-display); font-weight: 400; font-style: italic;
  font-size: clamp(2.6rem, 7vw, 5.5rem); line-height: 0.98; letter-spacing: 0.01em;
  text-align: center; text-wrap: balance; color: var(--color-white);
  max-width: 18ch; margin: 0 auto 1.2rem;
}
.os-hero__sub {
  max-width: 62ch; margin: 0 auto 2.25rem;
  font-size: clamp(1rem, 1.9vw, 1.2rem); line-height: 1.6; color: var(--color-text); text-align: center;
}

/* --- Prosa (Intro / Warum verschenken) --- */
.os-prose { max-width: 760px; margin: 0 auto; font-size: 1.1rem; line-height: 1.75; color: var(--color-text); }

/* --- Hub-Listing: blog-artiges Karten-Grid (USCRX-2026-5506) --------------
   Orientiert sich stark an blog.html: nav--scrolled, KEIN grosser Hero,
   Section-Header + Intro + .blog__grid mit .article-card-Karten (global).
   ------------------------------------------------------------------------ */
.os-listing { padding-top: 7rem; }            /* wie .blog-page */

/* Sammlung/Projekt-Gruppe: open-skills (Parent) mit seinen Skills als Unterpunkt-Karten,
   darunter eigenstaendige Projekte. Der Tutorial-Card ist ein Kind von open-skills. */
.os-collection { margin-top: 3rem; }
.os-collection:first-of-type { margin-top: 2.25rem; }
.os-collection__head { margin-bottom: 1.4rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--color-border); }
.os-collection__titlerow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1.25rem; }
.os-collection__name {
  font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: 0.01em;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem); line-height: 1; color: var(--color-white); margin: 0;
}
.os-collection__repo { font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; color: var(--color-accent); white-space: nowrap; }
.os-collection__repo:hover { color: var(--color-white); }
.os-collection__desc { margin: 0.55rem 0 0; max-width: 72ch; color: var(--color-text-muted); font-size: 0.98rem; line-height: 1.55; }

/* Karten-Grid: blog-artige .article-card (global). Ab 2 Karten ein vertikales Raster. */
.os-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(290px, 360px)); justify-content: start; }

/* Einzelne Karte = horizontale Feature-Karte: Cover gross (zeigt das LinkedIn-Bild),
   fuellt die Breite sauber statt als einsame Mini-Kachel. Ab dem 2. Skill greift das Grid. */
.os-grid:has(.article-card:only-child) { display: block; }
.os-grid .article-card:only-child { display: grid; grid-template-columns: 1.05fr 0.95fr; max-width: 940px; }
.os-grid .article-card:only-child .article-card__image,
.os-grid .article-card:only-child .os-card__cover { height: 100%; aspect-ratio: auto; min-height: 230px; }
.os-grid .article-card:only-child .article-card__body { justify-content: center; padding: 1.75rem 1.9rem; }

@media (max-width: 680px) {
  .os-grid { grid-template-columns: 1fr; }
  .os-grid .article-card:only-child { grid-template-columns: 1fr; max-width: none; }
  .os-grid .article-card:only-child .article-card__image,
  .os-grid .article-card:only-child .os-card__cover { height: auto; aspect-ratio: 16 / 9; min-height: 0; }
  .os-grid .article-card:only-child .article-card__body { justify-content: flex-start; }
}

/* Karten-Cover 16:9 fuer Projekte ohne Foto: jf-gold-Gradient + feines Raster
   + dezenter Glyph; der Titel liegt als Overlay drueber (.article-card__title--over). */
.os-card__cover {
  display: block; width: 100%; aspect-ratio: 16 / 9; position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 80% 90% at 22% 12%, rgba(236, 188, 31, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 70% 80% at 92% 95%, rgba(236, 188, 31, 0.10) 0%, transparent 55%),
    linear-gradient(160deg, #1c2228, #10141a);
}
.os-card__cover::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse 78% 78% at 50% 40%, black, transparent);
  mask-image: radial-gradient(ellipse 78% 78% at 50% 40%, black, transparent);
}
.os-card__glyph { position: absolute; top: 11%; right: 7%; width: 26%; max-width: 78px; color: var(--color-accent); opacity: 0.42; }
.os-card__glyph svg { width: 100%; height: auto; display: block; }
/* externe Repo-Karten: kleiner ↗ am Meta-Label, sonst .article-card-Optik 1:1 */
.article-card__date .os-ext { opacity: 0.7; }

/* --- CTA-Action-Box (jf-gold) --- */
.os-cta-box {
  max-width: 680px; margin: 2.5rem auto 0; text-align: center;
  border: 1px solid rgba(236, 188, 31, 0.4); border-radius: 24px; padding: 2.75rem 2rem;
  background: linear-gradient(160deg, rgba(236, 188, 31, 0.10), rgba(236, 188, 31, 0.02));
}
.os-cta-box__label {
  display: inline-block; font-family: var(--font-heading); font-size: 0.74rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 1rem;
}
.os-cta-box__line { font-family: var(--font-heading); font-size: clamp(1.3rem, 3vw, 1.85rem); font-weight: 600; font-style: italic; color: var(--color-white); margin: 0 0 0.9rem; }
.os-cta-box__text { color: var(--color-text-muted); font-size: 1.02rem; line-height: 1.6; margin: 0 auto 1.75rem; max-width: 52ch; }

/* --- Tutorial --- */
.os-tut-lead { max-width: 760px; margin: 0 auto; font-size: 1.12rem; line-height: 1.7; color: var(--color-text); }
.os-tut-note {
  max-width: 760px; margin: 1.5rem auto 0; padding: 1rem 1.4rem;
  border-left: 3px solid var(--color-accent); border-radius: 8px;
  background: rgba(36, 42, 49, 0.5); color: var(--color-text-muted); font-size: 0.96rem; line-height: 1.6;
}
.os-tut-note a { color: var(--color-accent); font-weight: 600; }
.os-tut-note a:hover { color: var(--color-white); }
.os-tut-note__ref { color: var(--color-text); font-style: italic; }   /* Artikel-Referenz vor Publikation (kein toter Link) */
.os-figure { margin: 2.75rem auto 0; max-width: 880px; text-align: center; }
.os-figure__img { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--color-border); display: block; }
.os-figure__cap { margin-top: 0.85rem; font-size: 0.9rem; color: var(--color-text-muted); }
.os-steps { max-width: 820px; margin: 2.5rem auto 0; padding: 0; list-style: none; counter-reset: os-step; display: grid; gap: 1.1rem; }
.os-steps li {
  position: relative; padding: 1.25rem 1.4rem 1.25rem 3.6rem; min-width: 0;
  border: 1px solid var(--color-border); border-radius: 14px; background: rgba(36, 42, 49, 0.45);
  color: var(--color-text); line-height: 1.6;
}
.os-steps li::before {
  counter-increment: os-step; content: counter(os-step);
  position: absolute; left: 1.1rem; top: 1.1rem;
  width: 1.9rem; height: 1.9rem; display: grid; place-items: center;
  font-family: var(--font-display); font-style: italic; font-size: 1.1rem;
  color: var(--color-accent); border: 1px solid rgba(236, 188, 31, 0.45); border-radius: 999px;
}
.os-steps strong { color: var(--color-white); }

/* --- Responsive --- */
@media (max-width: 360px) {
  .os-cta-box { padding: 2rem 1.3rem; }
  .os-steps li { padding: 1.1rem 1.1rem 1.1rem 3.2rem; }
}

/* --- Sektion-BG #kits (Bild + Scroll-Scrub-Video, Modus B2 wie Startseiten-Sektionen).
   Basis-Muster (.section__bg/::before/::after + .section__bg-video) kommt aus /style.css. --- */
.os-listing .section__bg::before { background-image: url("/img/open-source-bg.webp"); opacity: 0.14; }
