/* Homepage (docs/design.md, Page structure). Builds on components.css; loads
   after main.css so these rules win over the legacy homepage styles. */

.home-icon {
  display: block;
  flex-shrink: 0;
}

/* ── Hero ── */
.home-hero .site-hero-title {
  max-width: 720px;
}

.home-hero .site-hero-lead {
  max-width: 640px;
}

.home-hero .site-hero-mascot {
  width: 420px;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) 28px;
  align-items: center;
  margin-top: 30px;
}

.home-hero .hero-plan-highlights {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-top: 18px;
  color: var(--muted-foreground);
  font-size: 14.4px;
  line-height: 1.6;
}

.home-hero .hero-plan-highlights .home-icon {
  color: var(--success);
}

/* ── Testimonials and founder strip ── */
.home-founder {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  max-width: 900px;
  margin: var(--space-9) auto 0;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--muted);
}

.home-founder-photo {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-pill);
  object-fit: cover;
}

.home-founder-text p {
  color: var(--body-foreground);
  font-size: 16px;
  line-height: 1.5;
}

.home-founder-text p + p:not(.home-founder-name, .home-founder-role) {
  margin-top: var(--space-2);
}

.home-founder-text .home-founder-label {
  margin-bottom: var(--space-1);
  color: var(--muted-foreground);
  font-size: 12.48px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-founder-text .home-founder-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.home-founder-name a {
  display: inline;
  color: var(--foreground);
}

.home-founder-role a {
  display: inline;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.home-founder-name a:hover,
.home-founder-role a:hover {
  color: var(--eyebrow);
}

.home-founder-text .home-founder-role {
  margin: 2px 0 var(--space-2);
  color: var(--muted-foreground);
  font-size: 14.4px;
}

/* ── The Cosy difference ── */
.home-compare {
  display: flex;
  gap: var(--space-8);
  align-items: center;
  justify-content: center;
}

.home-compare-card {
  flex: 0 1 526px;
  min-width: 0;
  padding: var(--space-8) 30px;
  border-radius: var(--radius-lg);
}

.home-compare-card--cosy {
  background: var(--secondary);
  color: var(--secondary-foreground);
  box-shadow: 0 12px 35px rgba(22, 36, 71, 0.07);
}

.home-compare-card--manual {
  border: 2px solid var(--border);
  background: var(--card);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.home-compare-title {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 28px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.home-compare-card--cosy .home-compare-title {
  margin-bottom: 37px;
  color: var(--secondary-foreground);
}

.home-compare-card--manual .home-compare-title {
  margin-bottom: var(--space-3);
}

.home-compare-steps {
  display: grid;
  gap: 30px;
}

.home-compare-steps li {
  display: flex;
  gap: var(--space-5);
  align-items: center;
}

.home-compare-tile {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 15px;
  background: var(--white-tint);
}

.home-compare-step {
  display: grid;
  gap: var(--space-1);
  font-size: 14px;
  line-height: 1.65;
}

.home-compare-step strong {
  font-size: 18px;
  line-height: 1.2;
}

.home-compare-pains li {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: var(--space-3) 0;
  color: var(--muted-foreground);
  font-size: 16px;
  line-height: 1.5;
}

.home-compare-pains .home-icon,
.home-icon--no {
  color: var(--error);
}

.home-compare-vs {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--muted);
  color: var(--foreground);
  font-size: 16px;
  font-weight: 700;
}

/* ── Feature cards ── */
.feature-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

/* The card clips overflow, so draw the focus ring inside the image. */
.feature-image-button:focus-visible {
  outline-offset: -3px;
}

.home-feature-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.home-feature-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  padding: var(--space-6);
}

.home-feature-title {
  font-size: 21.6px;
  letter-spacing: -0.005em;
  line-height: 1.2;
}

.home-feature-body p {
  color: var(--body-foreground);
  font-size: 16.64px;
  line-height: 1.75;
}

.home-features-more {
  margin-top: var(--space-9);
  color: var(--body-foreground);
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
}

/* ── Pricing ── */
.home-period {
  gap: var(--space-3);
  justify-content: center;
  margin-bottom: var(--space-9);
}

.home-period-tab {
  padding: 10px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--muted);
  color: var(--muted-foreground);
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.home-period-tab:hover {
  color: var(--foreground);
}

.home-period-tab.active {
  border-color: var(--secondary);
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.home-plans {
  display: flex;
  gap: var(--space-7);
  align-items: flex-start;
  justify-content: center;
}

.home-plan {
  display: flex;
  flex: 0 1 416px;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 45px 30px;
  border-radius: var(--radius-2xl);
  background: var(--card);
  box-shadow: 0 0 59px rgba(191, 191, 191, 0.16);
  text-align: center;
}

.home-plan .home-plan-price {
  color: var(--foreground);
  font-size: 45px;
  font-weight: 700;
  line-height: 1.5;
}

.home-plan-name {
  font-size: 25px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.home-plan .home-plan-desc {
  margin-top: var(--space-4);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 18px;
  line-height: 1.7;
}

.home-plan-features {
  display: grid;
  gap: 15px;
  align-self: stretch;
  margin: 28px 0 var(--space-7);
  text-align: left;
}

.home-plan-features li {
  display: flex;
  gap: 15px;
  align-items: center;
  color: var(--muted-foreground);
  font-size: 18px;
  line-height: 1.5;
}

.home-icon--yes {
  color: var(--success);
}

.home-plan .home-plan-note {
  margin-top: 10px;
  color: var(--muted-foreground);
  font-size: 14px;
  font-style: italic;
  line-height: 1.86;
}

/* ── FAQ ── */
.home-faq {
  display: grid;
  gap: var(--space-4);
  max-width: 856px;
  margin: 0 auto;
}

.home-faq-item {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
}

.home-faq-item summary {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) 25px;
  background: var(--muted);
  color: var(--foreground);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  list-style: none;
  cursor: pointer;
}

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

.home-faq-item summary:focus-visible {
  outline-offset: -3px;
}

.home-faq-item[open] summary {
  color: var(--eyebrow);
}

.home-faq-chevron {
  flex-shrink: 0;
  color: var(--foreground);
  transition: transform 0.2s ease;
}

.home-faq-item[open] .home-faq-chevron {
  transform: rotate(180deg);
}

.home-faq-answer {
  padding: var(--space-5) 25px;
  color: var(--muted-foreground);
  font-size: 16px;
  line-height: 1.5;
}

.home-faq-answer p,
.home-faq-answer li {
  font-size: 16px;
  line-height: 1.5;
}

.home-faq-answer p + p,
.home-faq-answer p + ol,
.home-faq-answer ol + p {
  margin-top: var(--space-4);
}

.home-faq-answer ol {
  padding-left: 1.25em;
  list-style: decimal;
}

.home-faq-answer a,
.home-page .site-section-lead a,
.home-features-more a {
  display: inline;
  color: var(--foreground);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-faq-answer a:hover,
.home-page .site-section-lead a:hover,
.home-features-more a:hover {
  color: var(--eyebrow);
}

/* ── Closing CTA ── */
.home-page .mascot-cta-copy .home-cta-note {
  margin: var(--space-4) 0 0;
  color: var(--muted-foreground);
  font-size: 14.4px;
  line-height: 1.6;
}

.home-page .footer {
  margin-top: 0;
}

/* ── Responsive ── */
@media (max-width: 1199px) {
  .home-hero .site-hero-mascot {
    width: 320px;
  }
}

@media (max-width: 991px) {
  .home-hero .site-hero-mascot {
    width: 240px;
  }

  .home-compare {
    flex-direction: column;
    gap: var(--space-5);
  }

  .home-compare-card {
    flex-basis: auto;
    width: 100%;
    max-width: 640px;
  }
}

@media (max-width: 767px) {
  .home-hero .site-hero-row picture {
    justify-self: center;
  }

  .home-hero-actions .btn-primary-standard {
    width: 100%;
  }

  .home-hero .hero-plan-highlights {
    align-items: flex-start;
    font-size: 14px;
  }

  .home-hero .hero-plan-highlights .home-icon {
    margin-top: 3px;
  }

  .home-founder {
    flex-direction: column;
    gap: var(--space-4);
    margin-top: var(--space-7);
    padding: var(--space-5);
  }

  .home-founder-text .home-founder-label,
  .home-founder-text .home-founder-role {
    font-size: 14px;
  }

  .home-compare-card {
    padding: var(--space-7) var(--space-5);
  }

  .home-compare-title {
    font-size: 24px;
  }

  .home-period {
    gap: var(--space-2);
    margin-bottom: var(--space-7);
  }

  .home-period-tab {
    padding: 10px 18px;
    font-size: 15px;
  }

  .home-plans {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-7);
  }

  .home-plan {
    flex-basis: auto;
    padding: var(--space-8) var(--space-5);
    border-radius: var(--radius-xl);
  }

  .home-plan .home-plan-price {
    font-size: 40px;
  }

  .home-plan .home-plan-desc,
  .home-plan-features li {
    font-size: 16px;
  }

  .home-feature-body p {
    font-size: 16px;
  }

  .home-features-more {
    margin-top: var(--space-7);
  }

  .home-faq-item summary {
    padding: var(--space-4) var(--space-5);
    font-size: 17px;
  }

  .home-faq-answer {
    padding: var(--space-4) var(--space-5);
  }
}
