/*
 * Final-v28 home ownership module.
 * Writer scope: home hero, deadlines, guide block and FAQ preview only.
 */

/* Keep the home-specific layouts shrinkable before any responsive reflow. */
.site.page-home :is(
  .hero-copy,
  .deadline-panel,
  .deadline-grid,
  .download-feature,
  .download-feature-copy,
  .guide-list,
  .guide-list > div,
  .guide-list > div > span,
  .home-faq-layout,
  .home-faq-panel
) {
  min-width: 0;
}

/* Client brief: three explicit actions, without the removed proof strip. */
.site.page-home .home-journey-actions {
  width: min(100%, 570px);
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.site.page-home .home-journey-actions a {
  min-height: 54px;
  padding: 11px 15px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--surface-line);
  border-radius: 8px;
  background: var(--surface-base);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.site.page-home .home-journey-actions a:hover {
  border-color: var(--red);
}

.site.page-home .home-journey-actions a > svg {
  width: 20px;
  height: 20px;
}

.site.page-home .home-journey-number {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(230, 0, 18, 0.07);
  color: var(--red);
  font-size: 13px;
}

.site.page-home .home-journey-actions li:first-child a {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.site.page-home .home-journey-actions li:first-child .home-journey-number {
  background: white;
}

/* Deadlines: keep each complete explanation and advice together. */
.site.page-home .deadline-panel {
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
}

.site.page-home .deadline-copy {
  max-width: 740px;
}

.site.page-home .deadline-grid {
  align-self: stretch;
}

.site.page-home .deadline-grid article {
  min-width: 0;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 10px;
}

.site.page-home .deadline-grid h3 {
  display: block;
  min-width: 0;
  align-self: start;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: balance;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.035em;
  color: var(--red);
  margin: 0;
}

.site.page-home .deadline-grid p {
  min-width: 0;
  align-self: start;
  overflow-wrap: break-word;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

.site.page-home .deadline-grid .deadline-advice {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--surface-line);
}

.site.page-home .deadline-advice b {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 13px;
}

/* Share the three content rows, including wrapped headings/descriptions.
 * Mobile carousel cards keep their own natural flow below this breakpoint. */
@media (min-width: 701px) {
  .site.page-home .deadline-grid {
    row-gap: 10px;
  }

  .site.page-home .deadline-grid article {
    grid-row: span 3;
    grid-template-rows: subgrid;
  }
}

@media (min-width: 961px) {
  .site.page-home .deadline-grid {
    align-self: center;
  }

  .site.page-home .deadline-grid article {
    min-height: 170px;
  }
}

/* Guide: icons stay fixed while the full copy column is allowed to wrap. */
.site.page-home #download .download-feature {
  align-items: stretch;
}

@media (min-width: 961px) {
  .site.page-home #download .download-feature {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }

  .site.page-home #download .guide-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.site.page-home #download .download-feature-copy {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  padding: clamp(28px, 3.2vw, 44px);
  overflow: hidden;
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  background: var(--surface-base);
}

.site.page-home #download .section-head > div,
.site.page-home #download .section-head :is(h2, p),
.site.page-home #download .guide-lead-panel {
  min-width: 0;
  max-width: 100%;
}

.site.page-home #download .guide-form-grid .field label {
  max-width: 100%;
  flex-wrap: wrap;
  white-space: normal;
  overflow-wrap: anywhere;
}

.site.page-home #download .guide-form-grid .field-note {
  min-width: 0;
  flex-shrink: 1;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (min-width: 961px) and (max-width: 1279px) {
  .site.page-home #download .guide-form-grid {
    grid-template-columns: 1fr;
  }

  .site.page-home #download .guide-form-grid .field.full {
    grid-column: 1;
  }
}

.site.page-home #download .guide-list.open-list > div {
  grid-template-columns: 38px minmax(0, 1fr);
}

.site.page-home #download .guide-list > div > svg {
  width: 22px;
  height: 22px;
  justify-self: start;
}

.site.page-home #download .guide-list > div > span {
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.site.page-home #download .guide-list :is(strong, small) {
  max-width: 100%;
  overflow: visible;
  white-space: normal;
  overflow-wrap: break-word;
}

.site.page-home .home-guide-visual {
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 60%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--surface-base);
}

.site.page-home .home-guide-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, var(--surface-base) 0%, rgba(255, 254, 250, 0.96) 12%, rgba(255, 254, 250, 0.12) 65%, rgba(255, 254, 250, 0) 100%);
  pointer-events: none;
}

.site.page-home .home-guide-visual img {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: cover;
  object-position: 64% 50%;
}

/* FAQ preview: a distinct heading, a short introduction and calm accordion rows. */
.site.page-home .home-faq-panel .section-head {
  max-width: 690px;
  margin-bottom: 22px;
}

.site.page-home .home-faq-panel .section-head h2 {
  max-width: 690px;
  font-size: clamp(30px, 2.5vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.site.page-home .home-faq-panel .section-head p {
  max-width: 62ch;
  line-height: 1.6;
}

.site.page-home .home-faq-panel .faq-question {
  line-height: 1.32;
}

.site.page-home .home-faq-panel .faq-question > svg {
  transform: rotate(0deg);
  transition: transform 100ms ease-out;
}

.site.page-home .home-faq-panel .faq-card.is-open .faq-question > svg {
  transform: rotate(45deg);
}

.site.page-home .home-faq-panel .faq-answer {
  line-height: 1.58;
}

/*
 * The image is already an absolute visual layer below 1050px. Its former
 * 500/522px minimum forced empty space below the actions; content now owns
 * the natural hero height.
 */
@media (max-width: 1050px) {
  .site.page-home .hero-inner,
  .site.page-home .hero-copy {
    min-height: 0;
  }

  .site.page-home .hero-copy {
    padding-top: 36px;
    padding-bottom: 34px;
  }
}

@media (max-width: 960px) {
  .site.page-home .deadline-panel {
    gap: 26px;
  }

  .site.page-home .deadline-grid article {
    padding: 20px 18px;
  }

  .site.page-home .download-feature {
    gap: 30px;
  }

  .site.page-home .home-faq-panel .section-head {
    margin-bottom: 20px;
  }

  .site.page-home .home-faq-panel .faq-question {
    min-height: 60px;
    padding: 14px 4px;
    gap: 16px;
    font-size: 17px;
  }

  .site.page-home .home-faq-panel .faq-answer {
    padding: 0 40px 18px 4px;
    font-size: 15px;
  }
}

@media (max-width: 700px) {
  .site.page-home .deadline-grid.mobile-card-carousel.is-carousel-active > article {
    min-height: 140px;
    padding: 20px;
  }

  .site.page-home .deadline-grid h3 {
    font-size: 30px;
  }
}

@media (max-width: 767px) {
  .site.page-home .hero-copy {
    width: calc(100% - 32px);
    padding-top: 26px;
    padding-bottom: 24px;
  }

  .site.page-home .hero h1 {
    max-width: 100%;
    font-size: clamp(30px, 8.5vw, 32px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.035em !important;
    text-wrap: balance;
  }

  .site.page-home .hero-photo {
    opacity: 0.74;
  }

  .site.page-home .hero-photo::after {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.1) 62%, rgba(255, 255, 255, 0.08) 100%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.4) 40%, #fff 90%);
  }

  .site.page-home .home-journey-actions {
    margin-top: 18px;
  }

  .site.page-home .home-journey-actions a {
    padding: 11px 12px;
    gap: 10px;
    font-size: 14px;
  }

  .site.page-home .deadline-panel {
    padding: 24px 20px;
    gap: 22px;
  }

  .site.page-home .deadline-grid.mobile-card-carousel.is-carousel-active > article {
    min-height: 136px;
    padding: 18px;
  }

  .site.page-home #download .section-head h2 {
    font-size: clamp(28px, 8.2vw, 31px);
    line-height: 1.12;
    text-wrap: balance;
  }

  .site.page-home #download .guide-list.open-list > div {
    min-height: 72px;
    padding-block: 13px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 14px;
  }

  .site.page-home #download .guide-list small {
    line-height: 1.5;
  }

  .site.page-home #download .download-feature-copy {
    padding: 24px 20px;
  }

  .site.page-home .home-guide-visual::after {
    background:
      linear-gradient(90deg, rgba(255, 254, 250, 0.98), rgba(255, 254, 250, 0.72)),
      linear-gradient(180deg, rgba(255, 254, 250, 0.98) 0%, rgba(255, 254, 250, 0.82) 60%, rgba(255, 254, 250, 0.54) 100%);
  }

  .site.page-home .home-guide-visual img {
    object-position: 66% 50%;
  }

  .site.page-home .home-faq-panel .section-head {
    margin-bottom: 16px;
  }

  .site.page-home .home-faq-panel .section-head h2 {
    font-size: clamp(28px, 8.2vw, 31px);
    line-height: 1.12;
  }

  .site.page-home .home-faq-panel .section-head p {
    font-size: 16px;
    line-height: 1.55;
  }

  .site.page-home .home-faq-panel .faq-question {
    min-height: 56px;
    padding: 12px 2px;
    gap: 12px;
    font-size: 16px;
    line-height: 1.32;
  }

  .site.page-home .home-faq-panel .faq-answer {
    padding: 0 34px 16px 2px;
    font-size: 15px;
    line-height: 1.55;
  }
}

@media (max-width: 340px) {
  .site.page-home .hero-copy {
    width: calc(100% - 28px);
    padding-top: 24px;
    padding-bottom: 22px;
  }

  .site.page-home #download .section-head h2,
  .site.page-home .home-faq-panel .section-head h2 {
    font-size: 27px;
  }

  .site.page-home #download .guide-list.open-list > div {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
  }
}
