/* =========================================================================
   Pharma Kodex – Startseite (GoodNotes-orientiert)
   Großzügiger Weißraum, große Typo, alternierende Sektionen,
   CSS-imitierte App-Auszüge (kein Screenshot/Mockup).
   ========================================================================= */

/* =========================================================================
   Buzzword-Textmarker (wie die Markier-Funktion der App)
   Beim Scrollen in den Viewport "wischt" der Marker von links nach rechts
   durchs Wort. Farben = exakt die 4 App-Highlight-Töne.
   Ausgelöst durch .is-marked (gesetzt per IntersectionObserver in home.js).
   ========================================================================= */
.hl {
  position: relative;
  display: inline;
  /* Marker liegt hinter dem Text, deckt nur das untere ~58% ab (echter Marker-Look) */
  background-image: linear-gradient(transparent 42%, var(--hl-color, #fef08a) 42%);
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 0% 100%;          /* Start: unsichtbar */
  border-radius: 2px;
  padding: 0 .06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;       /* sauberer Marker auch über Zeilenumbruch */
  transition: none;
}
.hl.is-marked {
  background-size: 100% 100%;        /* Ziel: voll durchgewischt */
  transition: background-size .55s cubic-bezier(.22,.61,.36,1);
}
/* App-Farbpalette */
.hl-yellow { --hl-color: #fef08a; }
.hl-green  { --hl-color: #bbf7d0; }
.hl-blue   { --hl-color: #bfdbfe; }
.hl-pink   { --hl-color: #fbcfe8; }

/* Reduzierte Bewegung respektieren: sofort markiert, ohne Animation */
@media (prefers-reduced-motion: reduce) {
  .hl { background-size: 100% 100%; transition: none; }
  .hl.is-marked { transition: none; }
}

/* ── Allgemeine Sektions-Rhythmik ── */
.hp-section { padding: 6rem 0; }
.hp-section-tight { padding: 4rem 0; }
.hp-eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--pk-blue); background: var(--pk-accent-light);
  padding: .35rem .9rem; border-radius: 999px; margin-bottom: 1rem;
}
.hp-h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.1;
  color: var(--pk-blue-dark);
}
.hp-lead { font-size: 1.12rem; line-height: 1.65; color: var(--pk-muted); }

/* ── HERO ── */
.hp-hero {
  position: relative; overflow: hidden;
  padding: 8rem 0 5rem;
  background:
    radial-gradient(1200px 600px at 75% -10%, rgba(74,144,217,.10), transparent 60%),
    linear-gradient(180deg, #fbfcfe 0%, #fff 100%);
}
.hp-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.1rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.04;
  color: var(--pk-blue-dark); margin-bottom: 1.25rem;
}
.hp-hero h1 .accent { color: var(--pk-blue); }
.hp-hero-lead { font-size: 1.25rem; line-height: 1.6; color: #41506a; max-width: 540px; }
.hp-hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hp-btn-primary {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--pk-blue); color: #fff; font-weight: 600;
  padding: .9rem 1.8rem; border-radius: 12px; text-decoration: none;
  box-shadow: 0 8px 24px rgba(26,60,110,.22);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.hp-btn-primary:hover { background: var(--pk-blue-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(26,60,110,.3); }
.hp-btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--pk-blue-dark); font-weight: 600;
  padding: .9rem 1.6rem; border-radius: 12px; text-decoration: none;
  border: 1.5px solid var(--pk-border);
  transition: border-color .15s, color .15s;
}
.hp-btn-ghost:hover { border-color: var(--pk-blue); color: var(--pk-blue); }
.hp-hero-meta { display: flex; gap: 1.75rem; margin-top: 2.25rem; flex-wrap: wrap; }
.hp-hero-meta-item { display: flex; align-items: center; gap: .5rem; color: var(--pk-muted); font-size: .92rem; }
.hp-hero-meta-item .bi { color: var(--pk-blue); }

/* Hero-Bild rechts (gerahmt, schwebend) */
.hp-hero-visual { position: relative; }
.hp-hero-img {
  width: 100%; border-radius: 22px; object-fit: cover; aspect-ratio: 4/5;
  box-shadow: 0 30px 60px rgba(20,41,77,.18);
}
.hp-hero-float {
  position: absolute; border-radius: 16px;
  /* Glasmorphism: schwebt über dem Hero-Bild */
  background: rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 18px 40px rgba(20,41,77,.18); padding: .85rem 1.05rem;
  display: flex; align-items: center; gap: .7rem;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hp-hero-float { background: #fff; }
}
.hp-hero-float .bi { font-size: 1.4rem; }
/* Vier schwebende Kärtchen rund um das Hero-Bild */
.hp-hero-float-1 { bottom: 64px;  left: -28px;  animation: hp-float 5.5s ease-in-out infinite; }
.hp-hero-float-2 { top: 26px;     right: -22px; animation: hp-float 6.2s ease-in-out infinite .8s; }
.hp-hero-float-3 { top: 92px;     left: -34px;  animation: hp-float 5.8s ease-in-out infinite 1.6s; }
.hp-hero-float-4 { bottom: 30px;  right: -30px; animation: hp-float 6.6s ease-in-out infinite .4s; }
.hp-hero-float-title { font-weight: 700; font-size: .9rem; color: var(--pk-text); line-height: 1.1; }
.hp-hero-float-sub { font-size: .76rem; color: var(--pk-muted); }

/* Sanftes Schweben (Floating) */
@keyframes hp-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
  .hp-hero-float { animation: none !important; }
}

/* ── Zielgruppen-Band (Chips) ── */
.hp-audience { border-top: 1px solid var(--pk-border); border-bottom: 1px solid var(--pk-border); background: #fafbfd; }
.hp-audience-label { font-size: .82rem; font-weight: 600; color: var(--pk-muted); text-align: center; margin-bottom: 1.25rem; }
.hp-audience-row { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.hp-audience-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; border: 1px solid var(--pk-border); border-radius: 999px;
  padding: .55rem 1.1rem; font-size: .92rem; font-weight: 500; color: var(--pk-text);
  text-decoration: none; cursor: pointer;
  transition: border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.hp-audience-chip:hover {
  color: var(--pk-blue-dark); border-color: var(--pk-blue);
  box-shadow: 0 6px 16px rgba(26,60,110,.10); transform: translateY(-2px);
}
.hp-audience-chip .bi { color: var(--pk-blue); }

/* ── Feature-Reihen (alternierend Text | Visual) ── */
.hp-feature-row { display: flex; align-items: center; gap: clamp(2rem, 5vw, 5rem); }
.hp-feature-row.reverse { flex-direction: row-reverse; }
.hp-feature-text { flex: 1; min-width: 0; }
.hp-feature-visual { flex: 1; min-width: 0; }
.hp-feature-text h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800; letter-spacing: -.02em;
  color: var(--pk-blue-dark); line-height: 1.12; margin-bottom: 1rem;
}
.hp-feature-text p { font-size: 1.08rem; line-height: 1.65; color: var(--pk-muted); }
.hp-feature-list { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.hp-feature-list li { display: flex; align-items: start; gap: .6rem; padding: .35rem 0; color: var(--pk-text); }
.hp-feature-list .bi { color: var(--pk-blue); margin-top: 3px; }

/* =========================================================================
   CSS-imitierte App-Auszüge ("App-Fenster")
   ========================================================================= */
.app-window {
  background: #fff;
  border: 1px solid rgba(26, 60, 110, 0.08);
  border-radius: 18px;
  /* edler, mehrschichtiger Schatten + feiner Lichtrand oben */
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 2px 6px rgba(20,41,77,.06),
    0 32px 64px -16px rgba(20,41,77,.22);
  overflow: hidden;
}
.app-window-bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .7rem .9rem;
  /* dezenter Glas-Ton in der Titelleiste */
  background: rgba(246, 248, 251, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(26, 60, 110, 0.06);
}
.app-dot { width: 11px; height: 11px; border-radius: 50%; }
.app-dot.r { background: #ff5f57; } .app-dot.y { background: #febc2e; } .app-dot.g { background: #28c840; }
.app-window-title { margin-left: .5rem; font-size: .8rem; color: var(--pk-muted); font-weight: 500; }

/* — Auszug 1: Artikel-Reader (3-Spalten) — */
.demo-reader { display: grid; grid-template-columns: 150px 1fr; min-height: 320px; }
.demo-reader-toc { background: #f8fafc; border-right: 1px solid var(--pk-border); padding: 1rem .75rem; }
.demo-toc-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--pk-muted); margin-bottom: .6rem; }
.demo-toc-item { font-size: .78rem; color: #475569; padding: .4rem .5rem; border-radius: 7px; border-left: 3px solid transparent; margin-bottom: 2px; }
.demo-toc-item.active { color: var(--pk-blue); background: rgba(26,60,110,.06); border-left-color: var(--pk-blue); font-weight: 600; }
.demo-reader-body { padding: 1.4rem 1.6rem; }
.demo-article-badge { display: inline-block; font-size: .68rem; font-weight: 700; color: var(--pk-blue); background: var(--pk-accent-light); padding: .25rem .6rem; border-radius: 6px; margin-bottom: .7rem; }
.demo-article-h { font-size: 1.05rem; font-weight: 800; color: var(--pk-blue-dark); margin-bottom: .9rem; }
.demo-para { font-size: .8rem; line-height: 1.6; color: #334155; margin-bottom: .7rem; }
.demo-para .pa { color: var(--pk-blue); font-weight: 700; }
.demo-skel { height: .62rem; border-radius: 4px; background: #eef2f7; margin-bottom: .45rem; }
.demo-skel.w90 { width: 90%; } .demo-skel.w75 { width: 75%; } .demo-skel.w60 { width: 60%; }

/* — Auszug 2: KI-Panel — */
.demo-ai { padding: 1.5rem; }
.demo-ai-head { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.demo-ai-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--pk-blue), var(--pk-blue-dark)); padding: .3rem .7rem; border-radius: 999px; }
.demo-ai-head-title { font-size: .95rem; font-weight: 700; color: var(--pk-blue-dark); }
.demo-ai-card { background: #f8fafc; border: 1px solid var(--pk-border); border-radius: 12px; padding: 1.1rem; }
.demo-ai-card p { font-size: .82rem; line-height: 1.6; color: #334155; margin: 0 0 .6rem; }
.demo-ai-card p:last-child { margin-bottom: 0; }
.demo-ai-quote { border-left: 3px solid var(--pk-blue); padding-left: .8rem; font-style: italic; color: #475569; font-size: .8rem; margin: .8rem 0; }
.demo-ai-disclaimer { font-size: .68rem; color: #94a3b8; margin-top: .8rem; display: flex; align-items: center; gap: .35rem; }

/* — Auszug 3: Karteikarte (Frage → Antwort) — */
.demo-flash { padding: 1.6rem; display: flex; align-items: stretch; gap: 1rem; }
.demo-flash-side { flex: 1; background: #f8fafc; border: 1px solid var(--pk-border); border-radius: 12px; padding: 1.1rem; display: flex; flex-direction: column; }
.demo-flash-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--pk-blue); margin-bottom: .55rem; display: flex; align-items: center; gap: .35rem; }
.demo-flash-text { font-size: .85rem; line-height: 1.5; color: #334155; }
.demo-flash-arrow { align-self: center; width: 38px; height: 38px; border-radius: 50%; background: var(--pk-accent-light); color: var(--pk-blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* — Auszug 4: Such-/Artikelliste — */
.demo-search { padding: 1.4rem 1.5rem; }
.demo-search-bar { display: flex; align-items: center; gap: .6rem; background: #f1f5f9; border-radius: 11px; padding: .7rem 1rem; color: #64748b; font-size: .85rem; margin-bottom: 1rem; }
.demo-search-bar .bi { color: var(--pk-blue); }
.demo-result { display: flex; align-items: center; gap: .8rem; padding: .7rem; border-radius: 11px; border: 1px solid var(--pk-border); margin-bottom: .55rem; transition: border-color .15s; }
.demo-result:hover { border-color: var(--pk-blue); }
.demo-result-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--pk-accent-light); color: var(--pk-blue); display: flex; align-items: center; justify-content: center; font-size: .85rem; flex-shrink: 0; }
.demo-result-title { font-size: .85rem; font-weight: 600; color: var(--pk-text); }
.demo-result-sub { font-size: .72rem; color: var(--pk-muted); }
.demo-result-chevron { margin-left: auto; color: #cbd5e1; }

/* ── Funktions-Grid (AI-Karten-Stil) ── */
.hp-grid-card {
  background: #fff; border: 1px solid var(--pk-border); border-radius: 18px; padding: 1.9rem;
  height: 100%; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.hp-grid-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(26,60,110,.10); border-color: var(--pk-blue); }
.hp-grid-icon {
  width: 56px; height: 56px; border-radius: 15px;
  background: linear-gradient(135deg, var(--pk-blue), var(--pk-blue-dark));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.55rem; margin-bottom: 1.1rem;
}
.hp-grid-card h4 { font-size: 1.15rem; font-weight: 700; color: var(--pk-blue-dark); margin-bottom: .55rem; }
.hp-grid-card p { color: var(--pk-muted); margin: 0; line-height: 1.6; }

/* ── Bild-Sektion (Foto mit Overlay-Text) ── */
.hp-photo-band {
  position: relative; border-radius: 24px; overflow: hidden; min-height: 420px;
  display: flex; align-items: center;
}
.hp-photo-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hp-photo-band-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,41,77,.86) 0%, rgba(18,41,77,.45) 60%, rgba(18,41,77,.15) 100%); }
.hp-photo-band-content { position: relative; padding: 3rem; max-width: 560px; color: #fff; }
.hp-photo-band-content h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 1rem; }
.hp-photo-band-content p { font-size: 1.08rem; line-height: 1.6; color: rgba(255,255,255,.9); }

/* ── Finaler CTA ── */
.hp-cta-final {
  background: linear-gradient(135deg, var(--pk-blue) 0%, var(--pk-blue-dark) 100%);
  border-radius: 28px; padding: clamp(3rem, 6vw, 5rem); text-align: center; color: #fff;
}
.hp-cta-final h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 1rem; }
.hp-cta-final p { font-size: 1.15rem; color: rgba(255,255,255,.88); max-width: 560px; margin: 0 auto 2rem; }
.hp-cta-final .hp-btn-primary { background: #fff; color: var(--pk-blue-dark); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.hp-cta-final .hp-btn-primary:hover { background: #eef3fb; color: var(--pk-blue-dark); }

/* ── Responsive ── */
@media (max-width: 991.98px) {
  .hp-section { padding: 4rem 0; }
  .hp-hero { padding: 5.5rem 0 3.5rem; }
  .hp-feature-row, .hp-feature-row.reverse { flex-direction: column; }
  .hp-hero-visual { margin-top: 2.5rem; }
  .hp-hero-float-1 { left: 8px; } .hp-hero-float-2 { right: 8px; }
  .hp-hero-float-3 { left: 8px; } .hp-hero-float-4 { right: 8px; }
  .hp-photo-band-overlay { background: linear-gradient(180deg, rgba(18,41,77,.55), rgba(18,41,77,.82)); }
}
@media (max-width: 575.98px) {
  .demo-reader { grid-template-columns: 1fr; }
  .demo-reader-toc { display: none; }
  .demo-flash { flex-direction: column; }
  .demo-flash-arrow { transform: rotate(90deg); }
  .hp-hero-float { display: none; }
}
