/* Header */

.landing-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.landing-header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.landing-logo {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.landing-header-actions {
  display: flex;
  gap: 10px;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--stone-300);
  background: var(--surface);
  color: var(--stone-950);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: box-shadow 0.15s var(--ease), background-color 0.15s var(--ease);
}

/* Reserved exclusively for the header/footer CTA, per the design system. */
.header-btn.primary {
  background: var(--stone-950);
  border-color: var(--stone-950);
  color: #fff;
}

.header-btn:hover {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1), 0 0 0 1px var(--stone-300);
}

.header-btn.primary:hover {
  background: var(--stone-800);
  box-shadow: none;
}

/* Shared section primitives — every section is full-bleed (its own background,
   edge-to-edge) with a max-width inner container, so sections read as clearly
   separated bands rather than one dense, undifferentiated column. */

.landing-section {
  width: 100%;
  padding: 88px 20px;
}

.landing-section-white {
  background: var(--surface);
}

.landing-section-tint {
  background: var(--bg);
}

.section-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.section-inner-narrow {
  max-width: 680px;
}

.center {
  text-align: center;
}

.section-title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: 0 0 40px;
  font-size: 16px;
  color: var(--text-muted);
}

.info-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  font-style: normal;
  font-family: Georgia, serif;
  cursor: help;
  vertical-align: middle;
}

.info-icon:hover,
.info-icon:focus-visible {
  background: var(--action);
  color: #fff;
  outline: none;
}

.info-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--text-primary);
  color: var(--surface);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
  pointer-events: none;
}

.info-icon:hover .info-tooltip,
.info-icon:focus-visible .info-tooltip {
  visibility: visible;
  opacity: 1;
}

.hero-section {
  padding-top: 72px;
  padding-bottom: 96px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.hero-subheadline {
  margin: 0;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
}

.landing-headline {
  margin: 0;
  font-size: 46px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.landing-intro {
  margin: 0;
  max-width: 600px;
  font-size: 15px;
  color: var(--text-secondary);
}

.landing-questions {
  margin: -16px 0 0;
  padding: 0;
  max-width: 520px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: landing-question;
}

.landing-questions li {
  position: relative;
  padding-left: 32px;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  color: var(--text-primary);
  counter-increment: landing-question;
}

.landing-questions li::before {
  content: counter(landing-question);
  position: absolute;
  left: 0;
  top: -1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--action-bg);
  color: var(--action);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.landing-cards {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.landing-card {
  display: block;
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  text-align: left;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}

.landing-card:hover {
  border-color: var(--action);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.landing-card-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 500;
}

.landing-card-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.landing-disclaimer {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Promise section */

.promise-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 760px) {
  .promise-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .promise-grid {
    grid-template-columns: 1fr;
  }
}

/* Flat, sharp-cornered mosaic tiles — confirmed against buena.com's own feature grid
   (radius: 0, tall tiles, mostly neutral fills with one vivid accent tile), a
   deliberately different treatment from the rounded, shadowed `.card` used elsewhere
   for elevated/interactive elements. */
.promise-item {
  min-height: 220px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.promise-item:nth-child(5n + 1) { background: var(--surface); }
.promise-item:nth-child(5n + 2) { background: var(--sand); }
.promise-item:nth-child(5n + 3) { background: var(--surface); }
.promise-item:nth-child(5n + 4) { background: var(--orange); }
.promise-item:nth-child(5n + 5) { background: var(--sand); }

.promise-item:nth-child(5n + 4) .promise-title,
.promise-item:nth-child(5n + 4) .promise-text {
  color: #fff;
}

.promise-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.promise-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--stone-700);
}

/* Explanation section */

.explain-text {
  margin: 0 0 14px;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: left;
}

.explain-text:last-child {
  margin-bottom: 0;
}

/* Mini calculator */

.mini-calc-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 28px;
  text-align: left;
}

.mini-calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mini-calc-inputs .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-calc-inputs label {
  font-size: 14px;
  font-weight: 500;
}

.mini-calc-output {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding-left: 32px;
  border-left: 1px solid var(--border);
}

.mini-calc-output .stat-label {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.mini-calc-output .stat-label:first-child {
  margin-top: 0;
}

.mini-calc-output .stat-value {
  margin: 0;
  font-size: 28px;
  font-weight: 300;
}

.button-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--action);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s var(--ease);
}

.button-next:hover {
  opacity: 0.9;
}

.mini-calc-output .button-next {
  margin-top: 20px;
  width: 100%;
}

/* Timeline */

.timeline-list {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

/* The connecting line lives behind the numbered circles and fills as the visitor
   scrolls past — see initTimelineScroll() in index.js for the position/height math,
   which depends on .timeline-num being real elements it can measure. */
.timeline-track {
  position: absolute;
  left: 32px;
  width: 2px;
  background: var(--border);
  z-index: 0;
}

.timeline-track-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--action);
}

.timeline-item {
  position: relative;
  z-index: 1;
  padding: 18px 20px 18px 56px;
}

.timeline-num {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--action-bg);
  color: var(--action);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.timeline-num.reached {
  background: var(--action);
  color: var(--surface);
}

.timeline-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 500;
}

.timeline-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Embedded Ersteinschätzung picker */

.picker-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.picker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}

.picker-card:hover {
  border-color: var(--action);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.picker-card-icon {
  width: 28px;
  height: 28px;
  color: var(--action);
}

.picker-card-icon svg {
  width: 100%;
  height: 100%;
}

.picker-card-label {
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  color: var(--text-primary);
}

/* FAQ */

.faq-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px 20px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.faq-item:hover {
  border-color: var(--stone-300);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

/* A small colored bubble per question, cycling the brand tints — the "on-brand
   bubbles" accent that replaces the plain default accordion marker. */
.faq-item summary::before {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sand);
}

.faq-item:nth-child(3n + 2) summary::before {
  background: var(--sage);
}

.faq-item:nth-child(3n + 3) summary::before {
  background: var(--tan);
}

.faq-item summary::after {
  content: "";
  margin-left: auto;
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}

.faq-item[open] summary::after {
  transform: rotate(-135deg);
}

.faq-answer {
  margin: 0 0 20px;
  padding-left: 24px;
}

.faq-answer p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.pricing-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pricing-table th,
.pricing-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.pricing-table th {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Footer */

.landing-footer {
  background: #000;
  color: var(--stone-400);
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.landing-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.landing-footer-links a {
  font-size: 13px;
  color: var(--stone-400);
  text-decoration: none;
}

.landing-footer-links a:hover {
  color: #fff;
}

.landing-footer .landing-disclaimer {
  color: var(--stone-500);
}

/* The solid-black CTA would vanish against a black footer — invert it, same principle
   as the design system's own header-over-photo color flip. */
.landing-footer .header-btn {
  background: transparent;
  border-color: var(--stone-700);
  color: #fff;
}

.landing-footer .header-btn.primary {
  background: #fff;
  border-color: #fff;
  color: #000;
}

.landing-footer .header-btn:hover {
  border-color: var(--stone-400);
}

.landing-footer .header-btn.primary:hover {
  background: var(--stone-100);
}

.landing-footer-actions {
  display: flex;
  gap: 10px;
}

/* Scroll-reveal — progressive enhancement only: content is fully visible without JS
   or with prefers-reduced-motion, and only animates once `js-reveal` confirms the
   IntersectionObserver is wired up. */

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js-reveal .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.reveal-group.reveal > *:nth-child(2) { transition-delay: 70ms; }
.reveal-group.reveal > *:nth-child(3) { transition-delay: 140ms; }
.reveal-group.reveal > *:nth-child(4) { transition-delay: 210ms; }
.reveal-group.reveal > *:nth-child(5) { transition-delay: 280ms; }
.reveal-group.reveal > *:nth-child(6) { transition-delay: 350ms; }

.js-reveal .reveal-group.reveal > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js-reveal .reveal-group.reveal.in-view > * {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal-group.reveal > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 640px) {
  .mini-calc-grid {
    grid-template-columns: 1fr;
  }

  .mini-calc-output {
    padding-left: 0;
    border-left: none;
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 480px) {
  .landing-headline {
    font-size: 24px;
  }

  .landing-cards {
    grid-template-columns: 1fr;
  }

  .landing-header-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-header-actions {
    justify-content: stretch;
  }

  .header-btn {
    flex: 1;
    justify-content: center;
  }

  .landing-footer-actions {
    flex-direction: column;
    width: 100%;
  }
}
