/*
 * home.css — homepage only, loaded after site.css.
 * Every rule is scoped under .home so listing/detail/editor pages keep the
 * base cascade. Palette comes from the existing site.css custom properties.
 */

.home,
.home *,
.home *::before,
.home *::after {
  box-sizing: border-box;
}

.home {
  display: block;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

/* ---------- hero: roomy two-column at desktop ---------- */

/* base .hero paints --surface grey; the homepage ground is cream */
.home .hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  align-items: center;
  gap: clamp(32px, 4vw, 72px);
  min-height: 720px;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(56px, 6vw, 104px) clamp(20px, 4vw, 64px) clamp(48px, 5vw, 96px);
  background: var(--paper);
}

.home .hero-content {
  min-width: 0;
  padding: 0;
}

.home .hero .eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.home .hero .headline {
  margin: 0;
  max-width: 15em;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(38px, 4.2vw, 68px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
}

.home .hero .intro {
  margin: 24px 0 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
  overflow-wrap: break-word;
}

.home .hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.home .hero-cta .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.home .hero-cta .btn-primary {
  background: var(--accent);
  color: var(--white);
}

.home .hero-cta .btn-primary:hover {
  background: var(--accent-dark);
}

.home .hero-cta .btn-line {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--accent-dark);
}

/* right dark three-step panel */

.home .hero-steps {
  min-width: 0;
  padding: clamp(24px, 2.4vw, 40px);
  border-radius: 10px;
  background: var(--accent-dark);
  color: var(--paper);
}

.home .hero-steps-title {
  margin: 0 0 8px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.home .steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home .step {
  padding: 20px 0;
  border-top: 1px solid rgba(240, 238, 233, 0.18);
}

.home .step:first-child {
  border-top: 0;
  padding-top: 12px;
}

.home .step-no {
  display: block;
  color: var(--paper);
  opacity: 0.6;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.home .step h3 {
  margin: 6px 0 8px;
  color: var(--paper);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.home .step p {
  margin: 0;
  color: var(--paper);
  opacity: 0.78;
  font-size: 15px;
  line-height: 1.75;
}

/* ---------- shared section frame ---------- */

.home .listings,
.home .about,
.home .cases {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(40px, 4vw, 72px) clamp(20px, 4vw, 64px);
}

.home .section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.home .section-head h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
}

.home .section-more,
.home .text-link {
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.home .section-more:hover,
.home .text-link:hover {
  color: var(--accent-dark);
}

/* ---------- listings: compact cards or honest empty state ---------- */

.home .listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.home .property-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}

.home .property-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.home .property-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 18px;
}

.home .property-info h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.home .property-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* base .empty-list is 72px padded; keep the empty state honest but compact */
.home .empty-list {
  grid-column: 1 / -1;
  padding: 32px 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
}

/* ---------- about: one modest portrait beside the text ---------- */

.home .about {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 2.4vw, 40px);
  border-top: 1px solid var(--line);
}

.home .portrait {
  width: 160px;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.home .about-body {
  min-width: 0;
}

.home .about-body h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
}

.home .about-body p {
  margin: 0 0 12px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.home .credentials {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

/* ---------- case notes: quiet rows, not cards ---------- */

.home .cases {
  border-top: 1px solid var(--line);
}

.home .cases-disclaimer {
  margin: 0 0 8px;
  max-width: 68ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.home .case-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home .case-note {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.home .case-note:first-child {
  border-top: 0;
}

.home .case-note h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
}

.home .case-note p {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.home .case-note .case-tag {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  opacity: 0.8;
}

/* ---------- contact: slim band ---------- */

.home .contact-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px clamp(20px, 4vw, 64px);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.home .contact-copy {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
}

.home .contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.home .contact-links .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 6px;
  background: var(--accent-dark);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .home .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 0;
    gap: 32px;
    padding-top: 64px;
  }

  .home .hero .headline {
    font-size: clamp(34px, 4.6vw, 48px);
  }
}

@media (max-width: 768px) {
  .home .hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 48px 20px 56px;
  }

  .home .hero-content {
    order: 1;
  }

  .home .hero-steps {
    order: 2;
  }

  .home .hero .headline {
    max-width: none;
    font-size: clamp(36px, 8.4vw, 40px);
  }

  .home .hero .intro {
    margin-top: 18px;
    font-size: 16px;
  }

  .home .hero-cta {
    margin-top: 28px;
    gap: 10px;
  }

  .home .hero-cta .btn {
    flex: 1 1 100%;
    min-height: 48px;
  }

  .home .listings,
  .home .about,
  .home .cases {
    padding: 40px 20px;
  }

  .home .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .home .about {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .home .contact-cta {
    padding: 20px;
  }
}

@media (max-width: 390px) {
  .home .hero {
    padding: 36px 16px 44px;
  }

  .home .hero-steps {
    padding: 20px 16px;
  }

  /* 36px keeps the CJK headline readable and wrapping to two lines */
  .home .hero .headline {
    max-width: none;
    font-size: 36px;
    line-height: 1.25;
  }

  .home .hero-cta .btn {
    padding: 12px 18px;
    font-size: 15px;
  }

  .home .listings,
  .home .about,
  .home .cases {
    padding: 32px 16px;
  }

  .home .listing-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .home .contact-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 16px;
  }

  .home .contact-links {
    width: 100%;
  }

  .home .contact-links .btn {
    flex: 1 1 auto;
  }
}
