/* ==========================================================================
   Charles and Lois Home — Homepage
   Page-specific layout. Only loaded on index.html. Shared patterns
   (buttons, container, section-heading) still come from components.css.
   ========================================================================== */

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-2xl);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Swap this src for the client's own photography when supplied — no other
   markup needs to change. See README for details. */
.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}

/* Brand-tinted duotone: the forest green multiplies through the photo
   rather than sitting as a flat dark layer on top of it, so the image
   still reads through the colour instead of looking obscured. */
.hero__tint {
  position: absolute;
  inset: 0;
  background-color: var(--color-forest);
  mix-blend-mode: multiply;
  opacity: 0.5;
}

/* A directional scrim ensures the text block always has enough contrast,
   strongest toward the lower-left where the copy sits. */
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgba(15, 36, 28, 0.92) 0%,
    rgba(15, 36, 28, 0.72) 28%,
    rgba(15, 36, 28, 0.28) 60%,
    rgba(15, 36, 28, 0.15) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  animation: hero-reveal 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes hero-reveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__eyebrow {
  display: block;
  margin-bottom: var(--space-sm);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.hero__title {
  color: var(--color-cream);
  font-size: var(--text-4xl);
}

.hero__title span {
  display: block;
}

.hero__body {
  margin-top: var(--space-md);
  max-width: 46ch;
  font-size: var(--text-lg);
  color: rgba(247, 244, 238, 0.88);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* ==========================================================================
   Filter field styles
   Used by the filter bar on the Properties page (.search-field). The home
   page no longer has a search box, so the old search panel styles are gone.
   ========================================================================== */

.search-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
}

.search-field label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
}

.search-field input {
  padding: 0.75em 0.9em;
  background-color: var(--color-bg);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  transition: border-color var(--transition-fast);
}

.search-field input:hover {
  border-color: var(--color-gold);
}

@media (min-width: 1024px) {
  .hero {
    min-height: 88vh;
    padding-bottom: var(--space-3xl);
  }
}

/* ==========================================================================
   Featured Properties
   Cards are rendered into [data-featured-properties] by
   js/featured-properties.js from the central property data — no property
   markup is hand-written here.
   ========================================================================== */

.featured {
  padding-top: var(--space-3xl);
}

.property-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

.property-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  transition: transform var(--transition-base), box-shadow var(--transition-base),
    border-color var(--transition-base);
}

.property-card:hover,
.property-card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
  border-color: var(--color-gold);
}

.property-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--color-sage);
}

.property-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.property-card:hover .property-card__media img {
  transform: scale(1.045);
}

.property-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--color-sage) 0%, #dfe5df 100%);
}

.property-card__placeholder span {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.property-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
}

.property-card__name {
  font-size: var(--text-xl);
}

.property-card__type {
  margin-top: 0.25em;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.property-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-sm);
  padding-top: var(--space-sm);
  border-top: var(--border-width) solid var(--color-border);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-forest);
}

.property-card__stats li:not(:first-child) {
  position: relative;
  padding-left: var(--space-sm);
}

.property-card__stats li:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: var(--color-gold);
}

.property-card__footer {
  margin-top: auto;
  padding-top: var(--space-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.property-card__price {
  margin: 0;
  line-height: 1.25;
}

.property-card__price-amount {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-forest);
}

.property-card__price-unit {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.property-card__price-note {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.property-card__cta {
  flex-shrink: 0;
  padding: 0.7em 1.3em;
}

@media (min-width: 768px) {
  .property-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .property-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Why Choose Charles and Lois Home
   Editorial two-column layout rather than a SaaS-style feature grid: a
   short intro on the left, a lead paragraph and a numbered list of points
   on the right, separated by thin rules instead of cards.
   ========================================================================== */

.why-choose {
  padding-block: var(--space-2xl);
}

.why-choose__grid {
  display: grid;
  gap: var(--space-xl);
}

.why-choose__intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.why-choose__heading {
  font-size: var(--text-3xl);
  max-width: 16ch;
}

.why-choose__lead {
  max-width: 62ch;
  font-size: var(--text-lg);
  color: var(--color-text);
}

.why-choose__points {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
}

.why-choose__point {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-md);
  padding-block: var(--space-md);
  border-top: var(--border-width) solid var(--color-border);
}

.why-choose__point:last-child {
  border-bottom: var(--border-width) solid var(--color-border);
}

.why-choose__index {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  color: var(--color-gold-text);
  line-height: var(--leading-tight);
}

.why-choose__point-title {
  font-size: var(--text-lg);
}

.why-choose__point-text {
  margin-top: var(--space-2xs);
  max-width: 56ch;
  color: var(--color-text-muted);
}

@media (min-width: 1024px) {
  .why-choose__grid {
    grid-template-columns: 0.85fr 1.15fr;
    gap: var(--space-2xl);
    align-items: start;
  }

  .why-choose__intro {
    position: sticky;
    top: calc(var(--header-height) + var(--space-lg));
  }

  .why-choose__point {
    grid-template-columns: 64px 1fr;
  }
}

/* ==========================================================================
   How Booking Works
   Dark section (breaks the light/sage rhythm above it, and gives the CTA
   real contrast) with a centered intro and a four-step process. Steps sit
   in a row divided by thin rules on desktop, and stack with top rules on
   narrower screens — same divider language as Why Choose, different
   orientation, so the two sections read as related but not repetitive.
   ========================================================================== */

.how-it-works {
  background-color: var(--color-forest);
  color: var(--color-cream);
  border-bottom: var(--border-width) solid var(--color-border-dark);
}

.how-it-works__intro {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
}

.how-it-works__label {
  display: block;
  margin-bottom: var(--space-2xs);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-gold);
}

.how-it-works__heading {
  color: var(--color-cream);
}

.how-it-works__lead {
  margin-top: var(--space-sm);
  font-size: var(--text-lg);
  color: rgba(247, 244, 238, 0.8);
}

.how-it-works__steps {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
}

.how-it-works__step {
  padding-block: var(--space-md);
  border-top: var(--border-width) solid var(--color-border-dark);
}

.how-it-works__step:last-child {
  border-bottom: var(--border-width) solid var(--color-border-dark);
}

.how-it-works__index {
  display: block;
  margin-bottom: var(--space-2xs);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  color: var(--color-gold);
}

.how-it-works__step-title {
  color: var(--color-cream);
  font-size: var(--text-lg);
}

.how-it-works__step-text {
  margin-top: var(--space-2xs);
  max-width: 42ch;
  color: rgba(247, 244, 238, 0.72);
}

.how-it-works__cta {
  margin-top: var(--space-xl);
  display: flex;
  justify-content: center;
}

@media (min-width: 768px) {
  .how-it-works__steps {
    flex-direction: row;
  }

  .how-it-works__step {
    flex: 1;
    padding-block: 0;
    padding-inline: var(--space-md);
    border-top: none;
    border-left: var(--border-width) solid var(--color-border-dark);
  }

  .how-it-works__step:first-child {
    padding-left: 0;
  }

  .how-it-works__step:last-child {
    border-bottom: none;
  }
}

/* ==========================================================================
   Find The Right Space
   A two-way split rather than cards or a numbered list: apartments and
   houses sit side by side as two distinct fields of colour, meeting at a
   single gold rule. Stacks vertically on narrower screens.
   ========================================================================== */

.find-space__intro {
  max-width: 680px;
}

.find-space__split {
  margin-top: var(--space-xl);
  display: grid;
  border: var(--border-width) solid var(--color-border);
}

.find-space__category {
  padding: var(--space-lg);
}

.find-space__category--apartments {
  background-color: var(--color-surface);
}

.find-space__category--houses {
  background-color: var(--color-sage);
}

.find-space__category-name {
  font-size: var(--text-2xl);
}

.find-space__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-md);
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 2px solid var(--color-gold);
}

.find-space__stats li {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-forest);
}

.find-space__category-text {
  margin-top: var(--space-md);
  max-width: 42ch;
  color: var(--color-text-muted);
}

.find-space__cta {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}

.find-space__cta-text {
  max-width: 46ch;
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .find-space__split {
    grid-template-columns: 1fr 1fr;
  }

  .find-space__category {
    padding: var(--space-xl);
  }

  .find-space__category--apartments {
    border-right: 2px solid var(--color-gold);
  }
}

@media (min-width: 1024px) {
  .find-space__cta {
    flex-direction: row;
    justify-content: center;
  }
}

/* ==========================================================================
   Final Homepage CTA
   Deliberately brief: no cards, no list, no stats. Dark background so the
   section reads as a quiet closing beat and transitions smoothly into the
   footer below (also dark), rather than another light section right
   before it.
   ========================================================================== */
