/* =========================================================
   BuildByMi – Downloads-Seite
   Karten kommen aus assets/js/downloads-data.js.
   Formular und Fenster: assets/css/formular.css (wie bei Events).
   ========================================================= */
.downloads-page [hidden] { display: none !important; }

/* ---------- Hero ---------- */
.dl-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: calc(var(--nav-h) + var(--header-pad) + clamp(28px, 5vh, 64px)) 0 clamp(28px, 4vw, 48px);
}
.dl-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.dl-hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(13, 11, 30, .1) 1px, transparent 1.3px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 50% 80% at 50% 30%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 50% 80% at 50% 30%, #000 10%, transparent 75%);
}
.dl-hero__bg::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -30vmax;
  width: 70vmax;
  height: 60vmax;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(139, 108, 255, .28), rgba(139, 108, 255, 0));
}
.dl-hero__inner { max-width: 860px; text-align: center; }
.dl-hero__title {
  margin: 0;
  font-size: clamp(2.6rem, 1rem + 6vw, 5.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.05em;
}
.dl-hero__title .line { padding-bottom: .06em; }
.dl-hero__lead {
  max-width: 36rem;
  margin: 20px auto 0;
  font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink-2);
}

/* ---------- Liste ---------- */
.dl-list { padding-block: clamp(8px, 2vw, 24px) clamp(64px, 9vw, 120px); }

/* Große Karte: Vorschau links, Inhalt rechts */
.dl-feature {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  max-width: 1160px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 50px 100px -60px rgba(36, 18, 120, .55);
  scroll-margin-top: calc(var(--nav-h) + 40px);
}
.dl-feature__body { padding: clamp(28px, 4vw, 56px); }

/* Vorschau: Roadmap-Seite hinten, Titelseite vorne */
.dl-visual {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 40px 24px;
  overflow: hidden;
  background:
    radial-gradient(80% 70% at 30% 20%, rgba(139, 108, 255, .35), rgba(139, 108, 255, 0) 70%),
    linear-gradient(160deg, #EFEAFF 0%, #E2DAFF 100%);
}
.dl-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(85, 48, 245, .16) 1px, transparent 1.3px);
  background-size: 22px 22px;
}
.dl-visual--big { min-height: 560px; }
.dl-page {
  display: block;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 34px 60px -24px rgba(20, 6, 90, .55), 0 8px 18px -10px rgba(20, 6, 90, .35);
  transition: rotate .6s var(--ease-out), translate .6s var(--ease-out);
}
.dl-page--cover {
  position: relative;
  z-index: 2;
  width: min(62%, 300px);
  rotate: -4deg;
}
.dl-page--back {
  position: absolute;
  z-index: 1;
  right: -6%;
  bottom: 12%;
  width: min(78%, 440px);
  rotate: 6deg;
}
.dl-visual--big .dl-page--cover { translate: -14% 0; }
.dl-feature:hover .dl-page--cover,
.dl-card:hover .dl-page--cover { rotate: -1.5deg; translate: -14% -6px; }
.dl-card:hover .dl-page--cover { translate: 0 -6px; }
.dl-feature:hover .dl-page--back { rotate: 3deg; }

.dl-badge {
  position: absolute;
  z-index: 3;
  top: 22px;
  left: 22px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 12px 24px -12px rgba(85, 48, 245, .8);
}

/* Texte */
.dl-kicker {
  margin: 0 0 12px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-strong);
}
.dl-feature__title {
  margin: 0;
  font-size: clamp(1.9rem, 1.2rem + 2vw, 2.9rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.045em;
}
.dl-feature__lead {
  margin: 14px 0 0;
  font-size: clamp(1.02rem, .97rem + .25vw, 1.15rem);
  line-height: 1.6;
  color: var(--ink-2);
}
.dl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.dl-meta li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink-2);
}
.dl-meta li:last-child { background: var(--brand-tint); border-color: rgba(85, 48, 245, .16); color: var(--brand-strong); }

.dl-points__title {
  margin: 26px 0 12px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.dl-points { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.dl-points li {
  position: relative;
  padding-left: 34px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
}
.dl-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235530F5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E") center / 13px no-repeat,
    var(--brand-tint);
}

.dl-actions { margin-top: 28px; }
.dl-action__note { margin: 10px 0 0; font-size: .86rem; color: var(--muted); }

/* Weitere Downloads (sobald es mehr als einen gibt) */
.dl-more { max-width: 1160px; margin: clamp(48px, 6vw, 80px) auto 0; }
.dl-more__title {
  margin: 0 0 20px;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 700;
  letter-spacing: -.035em;
}
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.dl-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -44px rgba(36, 18, 120, .45);
  scroll-margin-top: calc(var(--nav-h) + 40px);
}
.dl-card .dl-visual { min-height: 260px; }
.dl-card .dl-page--cover { width: min(48%, 170px); }
.dl-card__body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.dl-card__title { margin: 0; font-size: 1.3rem; font-weight: 700; line-height: 1.2; letter-spacing: -.03em; }
.dl-card__lead { margin: 10px 0 0; font-size: .95rem; line-height: 1.55; color: var(--ink-2); }
.dl-card__meta { margin: 12px 0 0; font-size: .85rem; font-weight: 600; color: var(--muted); }
.dl-card .dl-actions { margin-top: auto; padding-top: 20px; }

.dl-empty { max-width: 40rem; margin: 0 auto; text-align: center; color: var(--ink-2); }
.dl-empty a { color: var(--brand); font-weight: 600; }

/* ---------- So kommst du an das PDF ---------- */
.dl-steps { padding-block: 0 clamp(80px, 10vw, 140px); }
.dl-steps__title { text-align: center; }
.dl-steps__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1040px;
  margin: clamp(32px, 4vw, 48px) auto 0;
  padding: 0;
  list-style: none;
}
.dl-step {
  padding: 26px 24px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.dl-step__num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
  box-shadow: 0 12px 24px -12px rgba(85, 48, 245, .8);
}
.dl-step h3 { margin: 0 0 8px; font-size: 1.12rem; font-weight: 700; letter-spacing: -.02em; }
.dl-step p { margin: 0; font-size: .95rem; line-height: 1.6; color: var(--ink-2); }

/* ---------- Im Formular: welches Dokument? ---------- */
.dl-doc {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -6px 0 22px;
  padding: 12px;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.dl-doc__cover {
  flex: none;
  width: 52px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 10px 18px -10px rgba(20, 6, 90, .6);
}
.dl-doc__title { display: block; font-size: .98rem; line-height: 1.3; }
.dl-doc__meta { display: block; margin-top: 3px; font-size: .82rem; color: var(--muted); }

/* Download-Button nach dem Absenden: Titel + Eckdaten */
.dl-file { height: auto; padding-block: 10px; text-align: left; }
.dl-file__text { display: grid; gap: 1px; }
.dl-file__text small { font-size: .78rem; font-weight: 600; opacity: .8; }

/* ---------- Kleinere Bildschirme ---------- */
@media (max-width: 960px) {
  .dl-feature { grid-template-columns: minmax(0, 1fr); }
  .dl-visual--big { min-height: 420px; }
  .dl-steps__list { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
}
@media (max-width: 620px) {
  .dl-feature { border-radius: 28px; }
  .dl-visual--big { min-height: 340px; padding: 32px 16px; }
  .dl-visual--big .dl-page--cover { width: min(56%, 220px); translate: -10% 0; }
  .dl-feature:hover .dl-page--cover { translate: -10% -6px; }
  .dl-page--back { right: -14%; width: 74%; }
  .dl-badge { top: 16px; left: 16px; }
  .dl-actions .btn { width: 100%; justify-content: space-between; }
  .dl-file { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .dl-page { transition: none; }
}
