/* ==========================================================================
   InfiniVent Theme – Design-System
   ========================================================================== */

:root {
  --iv-bg: #ffffff;
  --iv-bg-soft: #f6f7f9;
  --iv-ink: #0f1420;
  --iv-ink-soft: #4c5566;
  --iv-accent: #6d5dfc;
  --iv-accent-2: #11c3a4;
  --iv-line: #e6e9ef;
  --iv-radius: 16px;
  --iv-radius-sm: 10px;
  --iv-shadow: 0 10px 30px rgba(15, 20, 32, 0.08);
  --iv-shadow-lg: 0 20px 50px rgba(15, 20, 32, 0.14);
  --iv-gutter: clamp(1.1rem, 4vw, 2.5rem);
  --iv-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--iv-font);
  color: var(--iv-ink);
  background: var(--iv-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--iv-accent); text-decoration: none; }
p { margin: 0 0 1rem; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5rem; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 9999;
  background: var(--iv-accent); color: #fff; padding: 8px 14px; border-radius: 8px;
  clip: auto; width: auto; height: auto;
}

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

/* ============================= Header ============================= */
.iv-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--iv-line);
}
.iv-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}
.iv-logo { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; letter-spacing: -0.02em; }
.iv-logo__mark {
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--iv-accent), var(--iv-accent-2));
  color: #fff; border-radius: 9px; font-size: 14px;
}
.iv-logo__text { font-size: 1.25rem; color: var(--iv-ink); }
.iv-logo__accent { color: var(--iv-accent); }

.iv-nav__list { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.iv-nav__list a {
  color: var(--iv-ink); font-weight: 600; font-size: 0.95rem;
  padding: 0.35rem 0; position: relative;
}
.iv-nav__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--iv-accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease; border-radius: 2px;
}
.iv-nav__list a:hover::after { transform: scaleX(1); }

.iv-nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.iv-nav-toggle span { width: 22px; height: 2px; background: var(--iv-ink); border-radius: 2px; transition: 0.25s; }
.iv-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.iv-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.iv-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.iv-nav-mobile {
  display: none; background: #fff; border-bottom: 1px solid var(--iv-line);
  padding: 1rem var(--iv-gutter);
}
.iv-nav-mobile[hidden] { display: none; }
.iv-nav-mobile:not([hidden]) { display: block; }
.iv-nav-mobile__list { list-style: none; margin: 0; padding: 0; }
.iv-nav-mobile__list a { display: block; padding: 0.75rem 0; font-weight: 600; color: var(--iv-ink); border-bottom: 1px solid var(--iv-line); }

/* ============================= Buttons ============================= */
.iv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.5rem; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  border: 2px solid transparent; cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s;
  text-align: center;
}
.iv-btn--primary {
  background: linear-gradient(135deg, var(--iv-accent), var(--iv-accent-2));
  color: #fff; box-shadow: 0 8px 20px rgba(109, 93, 252, 0.35);
}
.iv-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(109, 93, 252, 0.45); }
.iv-btn--ghost { background: transparent; color: var(--iv-ink); border-color: var(--iv-line); }
.iv-btn--ghost:hover { border-color: var(--iv-accent); color: var(--iv-accent); }

/* ============================= Hero ============================= */
.iv-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #eef0ff 0%, #fbfbff 60%, var(--iv-bg) 100%);
  padding: clamp(3rem, 8vw, 6rem) 0;
}
.iv-hero__bg { position: absolute; inset: 0; pointer-events: none; }
.iv-hero__bg-shape { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; }
.iv-hero__bg-shape--1 { width: 480px; height: 480px; background: var(--iv-accent); top: -160px; right: -80px; }
.iv-hero__bg-shape--2 { width: 360px; height: 360px; background: var(--iv-accent-2); bottom: -140px; left: -60px; }
.iv-hero__inner { position: relative; max-width: 820px; }
.iv-hero__eyebrow {
  display: inline-flex; padding: 0.35rem 0.9rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
  background: rgba(109, 93, 252, 0.12); color: var(--iv-accent); margin-bottom: 1rem; letter-spacing: 0.04em;
}
.iv-hero__title { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; }
.iv-hero__subtitle { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--iv-ink-soft); max-width: 60ch; }

/* Suche */
.iv-search {
  display: flex; gap: 0.5rem; margin-top: 1.75rem; max-width: 560px;
  background: #fff; padding: 0.5rem; border-radius: 999px;
  box-shadow: var(--iv-shadow); border: 1px solid var(--iv-line);
}
.iv-search__input {
  flex: 1; border: 0; outline: 0; background: transparent; padding: 0.65rem 1rem;
  font-size: 1rem; color: var(--iv-ink); min-width: 0;
}
.iv-search__button { white-space: nowrap; }
.iv-search--archive { margin: 1.5rem 0 0; max-width: 560px; }

/* ============================= Sections ============================= */
.iv-section, .iv-filters, .iv-locations, .iv-archive-head { padding: clamp(2rem, 5vw, 4rem) 0; }
.iv-section__title { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 1.5rem; }
.iv-section__title--small { font-size: 1.15rem; margin-bottom: 1rem; }

/* ============================= Filter ============================= */
.iv-filters { background: var(--iv-bg-soft); border-block: 1px solid var(--iv-line); }
.iv-filter-hub { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; }
.iv-filter-group { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.iv-filter-label { font-weight: 700; font-size: 0.85rem; color: var(--iv-ink-soft); }
.iv-filter-chip {
  background: #fff; border: 1px solid var(--iv-line); color: var(--iv-ink-soft);
  padding: 0.45rem 1rem; border-radius: 999px; font-size: 0.88rem; cursor: pointer;
  transition: 0.15s; font-weight: 600;
}
.iv-filter-chip:hover { border-color: var(--iv-accent); color: var(--iv-accent); }
.iv-filter-chip.is-active {
  background: var(--iv-accent); border-color: var(--iv-accent); color: #fff;
}
.iv-filter-hub__spinner {
  width: 18px; height: 18px; border: 2px solid var(--iv-line); border-top-color: var(--iv-accent);
  border-radius: 50%; animation: iv-spin 0.8s linear infinite;
}
.iv-filter-hub__status { margin: 0; color: var(--iv-ink-soft); font-size: 0.9rem; }
@keyframes iv-spin { to { transform: rotate(360deg); } }

/* ============================= Cards ============================= */
.iv-card-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.iv-card {
  position: relative; background: #fff; border: 1px solid var(--iv-line);
  border-radius: var(--iv-radius); overflow: hidden; box-shadow: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease; display: flex; flex-direction: column;
}
.iv-card:hover { transform: translateY(-6px); box-shadow: var(--iv-shadow-lg); }
.iv-card__link { position: absolute; inset: 0; z-index: 2; }
.iv-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--iv-bg-soft); }
.iv-card__image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.iv-card:hover .iv-card__image { transform: scale(1.05); }
.iv-card__placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--iv-accent); background: linear-gradient(135deg, #eef0ff, #e6faf5);
}
.iv-card__body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.iv-card__title { font-size: 1.15rem; font-weight: 800; margin: 0; }
.iv-card__title a { color: var(--iv-ink); }
.iv-card__title a:hover { color: var(--iv-accent); }
.iv-card__cats { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.iv-card__excerpt { color: var(--iv-ink-soft); font-size: 0.92rem; margin: 0; }
.iv-card__cta { margin-top: auto; font-weight: 700; color: var(--iv-accent); font-size: 0.92rem; }

.iv-chip {
  display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  background: rgba(109, 93, 252, 0.1); color: var(--iv-accent);
}

.iv-locations__hint { margin-top: 1.5rem; color: var(--iv-ink-soft); }
.iv-empty { padding: 2rem; text-align: center; background: #fff; border: 1px dashed var(--iv-line); border-radius: var(--iv-radius); color: var(--iv-ink-soft); }
.iv-results__count { font-size: 0.9rem; color: var(--iv-ink-soft); margin-top: 1.5rem; }

/* ============================= CTA ============================= */
.iv-cta {
  background: linear-gradient(135deg, var(--iv-accent), var(--iv-accent-2));
  color: #fff; padding: clamp(3rem, 7vw, 5rem) 0; text-align: center;
}
.iv-cta__title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; }
.iv-cta__text { opacity: 0.92; max-width: 52ch; margin: 1rem auto 1.5rem; }
.iv-cta .iv-btn--primary { background: #fff; color: var(--iv-accent); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); }

/* ============================= Archive head ============================= */
.iv-archive-head { background: linear-gradient(180deg, #eef0ff, var(--iv-bg)); }
.iv-archive-head__title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.03em; }
.iv-archive-head__intro { color: var(--iv-ink-soft); max-width: 60ch; }

/* ============================= Single ============================= */
.iv-single__head { position: relative; padding-top: 2rem; }
.iv-single__media img {
  width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--iv-radius);
  box-shadow: var(--iv-shadow);
}
.iv-single__title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.03em; margin-top: 1.5rem; }
.iv-single__chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.75rem 0; }
.iv-single__meta { color: var(--iv-ink-soft); margin-bottom: 1.25rem; }
.iv-single__meta-item { margin-right: 1.5rem; }
.iv-single__body { padding: 2.5rem 0 4rem; max-width: 760px; }
.iv-single__lede { font-size: 1.2rem; color: var(--iv-ink-soft); }
.iv-single__content { margin: 1.5rem 0; }
.iv-single__features { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; margin: 1rem 0 2rem; }
.iv-single__features li {
  padding: 0.8rem 1rem; background: var(--iv-bg-soft); border: 1px solid var(--iv-line);
  border-radius: var(--iv-radius-sm); font-weight: 600;
}
.iv-single__features li::before { content: "✓ "; color: var(--iv-accent-2); font-weight: 800; }

/* ============================= Test-Badge ============================= */
.iv-test-badge {
  display: inline-block; padding: 0.3rem 0.9rem; border-radius: 999px;
  background: #fff3d6; color: #8a6100; font-weight: 800; font-size: 0.78rem;
  letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid #e8c76a;
  margin-bottom: 0.75rem;
}

/* ============================= Facts (Detail) ============================= */
.iv-single__facts {
  display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.2rem;
  margin: 1rem 0 2rem; font-size: 0.98rem;
}
.iv-single__facts dt { font-weight: 700; color: var(--iv-ink); }
.iv-single__facts dd { margin: 0; color: var(--iv-ink-soft); }

/* ============================= Galerie (Detail) ============================= */
.iv-single__gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem; margin: 1rem 0 2rem;
}
.iv-single__gallery-item {
  display: block; border-radius: var(--iv-radius-sm); overflow: hidden;
  border: 1px solid var(--iv-line);
}
.iv-single__gallery-item img {
  width: 100%; height: 160px; object-fit: cover; transition: transform 0.3s ease;
}
.iv-single__gallery-item:hover img { transform: scale(1.04); }

/* ============================= Kontakt (Detail) ============================= */
.iv-single__contact { margin: 1rem 0 2rem; }
.iv-single__contact-item { margin: 0.25rem 0; }
.iv-single__contact-item a { color: var(--iv-accent); }

/* ============================= Footer ============================= */
.iv-footer { background: var(--iv-ink); color: #cdd3de; padding: 3rem 0 1.5rem; }
.iv-footer__grid { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; }
.iv-footer .iv-logo__text { color: #fff; }
.iv-footer__tagline { margin-top: 0.75rem; color: #9aa3b5; font-size: 0.92rem; }
.iv-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.iv-footer__list a { color: #cdd3de; }
.iv-footer__list a:hover { color: #fff; }
.iv-footer__bottom { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.iv-footer__bottom p { margin: 0; font-size: 0.85rem; color: #9aa3b5; }

/* ============================= Pagination ============================= */
.navigation.pagination { margin-top: 2.5rem; }
.nav-links { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.nav-links .page-numbers {
  padding: 0.5rem 0.9rem; border: 1px solid var(--iv-line); border-radius: 8px; color: var(--iv-ink); font-weight: 600;
}
.nav-links .page-numbers.current, .nav-links .page-numbers:hover { background: var(--iv-accent); border-color: var(--iv-accent); color: #fff; }

/* ============================= Motion / Reveal ============================= */
.iv-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.iv-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .iv-reveal { opacity: 1; transform: none; transition: none; }
  .iv-card, .iv-btn, .iv-card__image { transition: none; }
}

/* ============================= Responsive ============================= */
@media (max-width: 860px) {
  .iv-nav { display: none; }
  .iv-nav-toggle { display: flex; }
}
@media (max-width: 560px) {
  .iv-search { border-radius: 16px; flex-direction: column; }
  .iv-search__button { width: 100%; border-radius: 12px; }
  .iv-card-grid { grid-template-columns: 1fr; }
}
