/* ============================================================
   Onboarder Homepage Layer
   ------------------------------------------------------------
   Marketing-style background page behind the wizard popup.
   Visible when body.mode-homepage OR body.mode-wizard
   (in wizard mode the homepage sits behind the modal backdrop).
   ============================================================ */

.layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: opacity 500ms ease-out, visibility 500ms ease-out;
}

.layer-homepage   { z-index: 10; }
.layer-wizard-modal { z-index: 30; }
.layer-pickadoc-mock { z-index: 20; }

/* default-hide every layer */
body .layer { opacity: 0; visibility: hidden; pointer-events: none; }

/* mode-homepage: only the marketing page is interactive */
body.mode-homepage .layer-homepage      { opacity: 1; visibility: visible; pointer-events: auto; }

/* mode-wizard: homepage stays as backdrop (dimmed), modal interactive */
body.mode-wizard .layer-homepage        { opacity: 1; visibility: visible; pointer-events: none; }
body.mode-wizard .layer-wizard-modal    { opacity: 1; visibility: visible; pointer-events: auto; }

/* mode-pickadoc: only the fake pickadoc app is visible */
body.mode-pickadoc .layer-pickadoc-mock { opacity: 1; visibility: visible; pointer-events: auto; }

/* leaving-wizard helper class is added briefly during the
   triple-step crossfade so transitions can stagger nicely */
body.is-crossfading .layer-wizard-modal { transition: opacity 300ms ease-out; }
body.is-crossfading .layer-homepage     { transition: opacity 500ms ease-out 150ms; }
body.is-crossfading .layer-pickadoc-mock { transition: opacity 700ms ease-out 300ms; }

/* allow scroll inside the homepage layer */
.layer-homepage { overflow-y: auto; }

/* ----- Marketing page chrome ----- */
.home-shell {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(220,50,219,0.10), transparent 40%),
    radial-gradient(circle at 88% 22%, rgba(124,58,237,0.10), transparent 45%),
    linear-gradient(180deg, #fbfcff 0%, #f3f5fb 100%);
  min-height: 100%;
}

.home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 32px;
}

.home-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 950;
  letter-spacing: -0.05em;
  font-size: 24px;
  background: linear-gradient(120deg, var(--accent), #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-logo img { height: 28px; width: auto; }

.home-nav-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--muted);
}
.home-nav-links a { color: inherit; text-decoration: none; }
.home-nav-links a:hover { color: var(--text); }

.home-nav-cta {
  background: linear-gradient(120deg, var(--accent), #7c3aed);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(220,50,219,0.30);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.home-nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(220,50,219,0.42); }

/* hero */
.home-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 32px 64px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.home-hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.home-hero h1 {
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin-bottom: 18px;
}
.home-hero h1 .accent {
  background: linear-gradient(120deg, var(--accent), #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 540px;
}

.home-hero-ctas {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.home-cta-primary {
  background: linear-gradient(120deg, var(--accent), #7c3aed);
  color: white;
  border: none;
  padding: 16px 28px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(220,50,219,0.30);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.home-cta-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(220,50,219,0.42); }

.home-cta-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 16px 24px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 200ms, background 200ms;
}
.home-cta-secondary:hover { border-color: var(--accent); background: var(--accent-soft); }

.home-hero-trust {
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-hero-trust .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); display: inline-block; }

/* hero visual (mock dashboard preview) */
.home-hero-visual {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff, #f3f5fb);
  border: 1px solid var(--line);
  box-shadow: 0 28px 60px rgba(19,33,58,0.12);
  aspect-ratio: 4 / 3;
}
.home-hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(19,33,58,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19,33,58,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black, transparent 70%);
}
.home-hero-card {
  position: absolute;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(19,33,58,0.10);
  font-size: 12px;
}
.home-hero-card strong { display: block; font-size: 13px; margin-bottom: 4px; }
.home-hero-card .meta { color: var(--muted); font-size: 11px; }

.home-hero-card.calendar  { left: 7%;  top: 14%; width: 46%; padding: 16px; }
.home-hero-card.calendar .row {
  display: flex; justify-content: space-between; padding: 5px 0;
  border-top: 1px dashed rgba(19,33,58,0.08); font-size: 11px;
}
.home-hero-card.calendar .row:first-of-type { border-top: none; }
.home-hero-card.calendar .row .pill {
  background: var(--accent-soft); color: var(--accent); padding: 2px 8px;
  border-radius: 999px; font-weight: 700; font-size: 10px;
}
.home-hero-card.sms  { right: 6%; top: 8%;  width: 42%; }
.home-hero-card.doc  { right: 4%; bottom: 10%; width: 38%; }
.home-hero-card.avatar { left: 14%; bottom: 8%; width: 36%; }

.home-hero-card .avatar-row {
  display: flex; align-items: center; gap: 10px; margin-top: 4px;
}
.home-hero-card .avatar-bubble {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}

/* features section */
.home-features {
  padding: 80px 32px;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.5) 100%);
}
.home-section-head {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}
.home-section-head .kicker {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.home-section-head h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.home-section-head p { font-size: 17px; color: var(--muted); line-height: 1.55; }

.home-feature-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.home-feature-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
  opacity: 0;
  transform: translateY(28px);
}
.home-feature-card.is-visible { opacity: 1; transform: translateY(0); }
.home-feature-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(19,33,58,0.12); border-color: rgba(220,50,219,0.30); }

.home-feature-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 24px;
  margin-bottom: 18px;
}
.home-feature-card h3 { font-size: 20px; margin-bottom: 10px; letter-spacing: -0.02em; }
.home-feature-card p  { font-size: 14px; line-height: 1.6; color: var(--muted); margin-bottom: 14px; }
.home-feature-card .price {
  display: inline-block;
  margin-top: 4px;
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3f5fb;
}

/* testimonials */
.home-testimonials {
  padding: 64px 32px 80px;
}
.home-testimonial-row {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.home-testimonial-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.home-testimonial-card.is-visible { opacity: 1; transform: translateY(0); }
.home-testimonial-quote { font-size: 15px; line-height: 1.55; color: var(--text); }
.home-testimonial-foot {
  display: flex; gap: 12px; align-items: center; margin-top: auto;
}
.home-testimonial-foot .avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}
.home-testimonial-foot .who { font-size: 13px; }
.home-testimonial-foot .who strong { display: block; }
.home-testimonial-foot .who span { color: var(--muted); }

/* footer */
.home-footer {
  border-top: 1px solid var(--line);
  padding: 40px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255,255,255,0.55);
}
.home-footer .home-logo { justify-content: center; margin-bottom: 12px; font-size: 18px; }
.home-footer-links {
  display: flex; gap: 18px; justify-content: center; margin: 12px 0;
}
.home-footer-links a { color: var(--muted); text-decoration: none; }
.home-footer-links a:hover { color: var(--text); }

/* dim hero subtly when wizard modal is open */
body.mode-wizard .layer-homepage { filter: blur(2px) brightness(0.85); }

@media (max-width: 980px) {
  .home-hero { grid-template-columns: 1fr; padding: 32px 24px 48px; gap: 32px; }
  .home-feature-grid, .home-testimonial-row { grid-template-columns: 1fr; }
  .home-hero-visual { aspect-ratio: 5 / 4; }
}

/* ============================================================
   Wizard-as-Modal overlay (the existing .page lives inside)
   ============================================================ */
.wizard-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 36, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.wizard-modal-frame {
  position: relative;
  margin: 4vh auto;
  width: min(1200px, calc(100% - 32px));
  max-height: 92vh;
  background: var(--bg);
  border-radius: 22px;
  /* Scroll-Container für den Wizard-Inhalt. Sticky-Hero (.wizard-visual)
     haftet hier dran. Alles >max-height wird durch overflow:auto innerhalb
     dieses Popup-Rahmens scrollbar — KEIN Window-Scroll mehr. */
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(220, 50, 219, 0.55) transparent;
  box-shadow: 0 40px 100px rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.08);
  animation: wizardModalIn 320ms cubic-bezier(0.22, 0.85, 0.34, 1.07) both;
}

.wizard-modal-frame::-webkit-scrollbar {
  width: 10px;
}
.wizard-modal-frame::-webkit-scrollbar-track {
  background: transparent;
  margin: 12px 0;
}
.wizard-modal-frame::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(220, 50, 219, 0.85), rgba(124, 58, 237, 0.85));
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

@keyframes wizardModalIn {
  from { opacity: 0; transform: translateY(28px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.wizard-modal-close {
  position: sticky;
  top: 12px;
  margin-left: auto;
  margin-right: 12px;
  /* 2026-05-24: Vorher block + line-height:32px — die "x"-Glyphe sass je
     nach Font-Metrik leicht oben/links versetzt. Flex-Centering parkt die
     Glyphe pixel-genau in der Mitte des Kreises, unabhaengig vom Font. */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  font-weight: 500;
  padding: 0;
  cursor: pointer;
  z-index: 5;
  transition: background 200ms, color 200ms, border-color 200ms;
}
.wizard-modal-close:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

.wizard-modal-frame .page {
  max-width: none;
  margin: 0;
  padding: 4px 28px 24px;
  min-height: auto;
}

/* Inside the popup the wizard-shell becomes natural-height: it grows with
   content, the popup-frame scrolls (overflow-y on .wizard-modal-frame). The
   wizard-visual on the left uses position:sticky so it stays parked while
   the right panel scrolls. */
.wizard-modal-frame .wizard-shell {
  height: auto;
  min-height: 0;
  max-height: none;
}

/* Sticky-Hero relative to the popup frame. Top offset accounts for the
   modal-close button area. */
.wizard-modal-frame .wizard-visual {
  position: sticky;
  top: 12px;
  align-self: start;
  max-height: calc(92vh - 120px);
}
.wizard-modal-frame .top > div > h1 { font-size: 22px; }
.wizard-modal-frame .top > div > p  { font-size: 13px; }

.wizard-modal-home-link {
  display: block;
  padding: 18px 0 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
}
.wizard-modal-home-link:hover { color: var(--text); }
