/* ============================================================
   Logan Custom Homes — Homepage Styles
   ============================================================ */

/* ---- Hero ---- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* Fallback for browsers without small-viewport units */
@supports not (height: 100svh) {
  .hero { height: 100vh; }
}

.hero__slides {
  position: absolute;
  inset: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity var(--duration-hero) var(--ease-out);
  transform: scale(1.04);
  transition: opacity var(--duration-hero) var(--ease-out),
              transform 8s linear;
}

.hero__slide.active {
  opacity: 1;
  transform: scale(1);
}

/* Extra scrim for bright exterior shots so the tagline, CTA, nav logo and
   dots stay legible. Lives on the slide (fades in/out with it) so the
   moodier slides keep the lighter, global .hero__overlay only. */
.hero__slide--bright::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(20, 20, 26, 0.52) 0%,
      rgba(20, 20, 26, 0.20) 42%,
      rgba(20, 20, 26, 0) 72%
    ),
    linear-gradient(
      to bottom,
      rgba(20, 20, 26, 0.55) 0%,
      rgba(20, 20, 26, 0.18) 16%,
      rgba(20, 20, 26, 0) 40%
    );
  pointer-events: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    /* top-left vignette so the header logo always has contrast to sit against */
    radial-gradient(
      58% 48% at top left,
      rgba(20, 20, 26, 0.68) 0%,
      rgba(20, 20, 26, 0.32) 38%,
      rgba(20, 20, 26, 0) 68%
    ),
    linear-gradient(
      to top,
      rgba(20, 20, 26, 0.85) 0%,
      rgba(20, 20, 26, 0.3) 50%,
      rgba(20, 20, 26, 0.15) 100%
    );
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 var(--gutter) var(--space-20);
}

.hero__tagline {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(var(--text-4xl), 7vw, 5.25rem);
  font-weight: 400;
  color: var(--bone);
  line-height: 1.14;
  margin-bottom: var(--space-6);
  max-width: none;
  text-wrap: balance;
}

.hero__sub {
  font-family: var(--font-body);
  font-size: var(--text-base);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: var(--space-10);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--bone);
  border: 1px solid rgba(237, 229, 211, 0.4);
  padding: var(--space-3) var(--space-8);
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.hero__cta:hover {
  border-color: var(--bone);
  background: rgba(237, 229, 211, 0.08);
}

.hero__cta-arrow {
  width: 20px;
  height: 1px;
  background: var(--bone);
  position: relative;
  transition: width var(--duration-fast) var(--ease-out);
}

.hero__cta-arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--bone);
  border-right: 1px solid var(--bone);
  transform: rotate(45deg);
}

.hero__cta:hover .hero__cta-arrow {
  width: 30px;
}

/* Slide indicators */
.hero__indicators {
  position: absolute;
  bottom: var(--space-8);
  right: var(--gutter);
  z-index: 3;
  display: flex;
  gap: var(--space-2);
}

.hero__dot {
  width: 20px;
  height: 1px;
  background: rgba(237, 229, 211, 0.3);
  border: none;
  cursor: pointer;
  padding: 20px 0;
  background-clip: content-box;
  transition: background var(--duration-fast);
}

.hero__dot.active {
  background: var(--bone);
  background-clip: content-box;
  width: 36px;
}

/* ---- Brand Statement ---- */

.brand-statement {
  padding: var(--space-24) 0;
  text-align: center;
}

.brand-statement__rule {
  width: 1px;
  height: 60px;
  background: var(--bronze);
  margin: 0 auto var(--space-8);
  opacity: 0.6;
}

.brand-statement__text {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl));
  font-weight: 300;
  letter-spacing: var(--tracking-wide);
  color: var(--bone);
  opacity: 0.9;
  max-width: 820px;
  margin-inline: auto;
  line-height: var(--leading-normal);
}

.brand-statement__location {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--text-base);
  color: var(--bronze);
  margin-top: var(--space-6);
  letter-spacing: 0.05em;
}

/* ---- Featured Work ---- */

.featured-work {
  padding: var(--space-8) 0 var(--space-24);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-10);
  gap: var(--space-4);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--bronze);
}

.section-link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
  color: var(--bone);
  opacity: 0.5;
  transition: opacity var(--duration-fast);
  white-space: nowrap;
}

.section-link:hover {
  opacity: 1;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
}

.work-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.work-item:nth-child(1) { grid-column: span 7; grid-row: span 2; }
.work-item:nth-child(2) { grid-column: span 5; }
.work-item:nth-child(3) { grid-column: span 5; }
.work-item:nth-child(4) { grid-column: span 4; }
.work-item:nth-child(5) { grid-column: span 4; }
.work-item:nth-child(6) { grid-column: span 4; }

.work-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
  transition: transform var(--duration-slow) var(--ease-out);
}

.work-item:nth-child(1) .work-item__img {
  aspect-ratio: unset;
  min-height: 520px;
}

.work-item:hover .work-item__img {
  transform: scale(1.04);
}

.work-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(20, 20, 26, 0.75) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}

.work-item:hover .work-item__overlay {
  opacity: 1;
}

.work-item__label {
  position: absolute;
  bottom: var(--space-6);
  left: var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  color: var(--bone);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
}

.work-item:hover .work-item__label {
  opacity: 1;
  transform: translateY(0);
}

/* ---- About Teaser ---- */

.about-teaser {
  padding-block: var(--space-24);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.about-teaser__img-wrap {
  position: relative;
  overflow: hidden;
}

.about-teaser__img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.about-teaser__img-accent {
  position: absolute;
  top: calc(-1 * var(--space-4));
  left: calc(-1 * var(--space-4));
  right: var(--space-8);
  bottom: var(--space-8);
  border: 1px solid rgba(184, 149, 106, 0.25);
  pointer-events: none;
}

.about-teaser__label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: var(--space-6);
}

.about-teaser__heading {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 3vw, var(--text-5xl));
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  color: var(--bone);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-6);
}

.about-teaser__body {
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--bone);
  opacity: 0.75;
  margin-bottom: var(--space-10);
}

.about-teaser__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--bone);
}

.about-teaser__link::after {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--bronze);
  transition: width var(--duration-fast) var(--ease-out);
}

.about-teaser__link:hover::after {
  width: 48px;
}

/* ---- Process Strip ---- */

.process-strip {
  position: relative;
  padding: var(--space-24) 0;
  overflow: hidden;
  border-top: 1px solid rgba(184, 149, 106, 0.22);
  border-bottom: 1px solid rgba(184, 149, 106, 0.22);
}

/* Treated regional photo behind the process band */
.process-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('/images/environment/misty-lake.jpg') center / cover no-repeat;
}

.process-strip::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(120% 80% at 50% 40%, rgba(20, 20, 26, 0.62) 0%, rgba(20, 20, 26, 0.86) 100%),
    linear-gradient(180deg, rgba(20, 20, 26, 0.9) 0%, rgba(20, 20, 26, 0.78) 50%, rgba(20, 20, 26, 0.94) 100%);
}

.process-strip > .container {
  position: relative;
  z-index: 2;
}

.process-strip__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-16);
}

.process-strip__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: var(--space-4);
}

.process-strip__heading {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 3.2vw, var(--text-5xl));
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  color: var(--bone);
  line-height: var(--leading-tight);
}

.process-strip__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-10);
}

.process-step {
  padding: var(--space-6) 0;
}

.process-step__num {
  font-family: var(--font-display);
  font-size: 3.75rem;
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: 0;
  color: var(--bronze);
  opacity: 0.28;
  margin-bottom: var(--space-4);
}

.process-step__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  color: var(--bone);
  margin-bottom: var(--space-4);
}

.process-step__title::after {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--bronze);
  opacity: 0.55;
  margin-top: var(--space-4);
}

.process-step__body {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--bone);
  opacity: 0.6;
}

/* ---- Communities ---- */

.communities {
  background: var(--charcoal-deep);
  padding: var(--space-16) 0;
  border-top: 1px solid rgba(184, 149, 106, 0.12);
  border-bottom: 1px solid rgba(184, 149, 106, 0.12);
}

.communities__label {
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--bone);
  opacity: 0.35;
  margin-bottom: var(--space-10);
}

.communities__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-12) var(--space-10);
}

.community-logo {
  width: 200px;
  height: 80px;
  object-fit: contain;
  object-position: center;
  opacity: 0.65;
  transition: opacity var(--duration-base) var(--ease-out);
  display: block;
}

.community-logo:hover {
  opacity: 1;
}

.communities__note {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--text-lg);
  text-align: center;
  color: var(--bone);
  opacity: 0.5;
  max-width: 620px;
  margin: var(--space-10) auto 0;
  line-height: var(--leading-snug);
}


/* ---- Mobile ---- */

@media (max-width: 1024px) {
  .about-teaser {
    grid-template-columns: 1fr;
  }

  .about-teaser__img-wrap {
    order: -1;
  }

  .work-item:nth-child(1) { grid-column: span 12; }
  .work-item:nth-child(2) { grid-column: span 6; }
  .work-item:nth-child(3) { grid-column: span 6; }
  .work-item:nth-child(4) { grid-column: span 4; }
  .work-item:nth-child(5) { grid-column: span 4; }
  .work-item:nth-child(6) { grid-column: span 4; }

  .process-strip__inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .work-item:nth-child(n) {
    grid-column: span 12;
  }

  .process-strip__inner {
    grid-template-columns: 1fr;
  }

  .hero__tagline {
    font-size: clamp(var(--text-3xl), 11vw, var(--text-5xl));
  }

  .communities__logos {
    gap: var(--space-8) var(--space-10);
  }

  .community-logo {
    width: 140px;
    height: 60px;
  }

  .communities__note {
    font-size: var(--text-base);
    margin-top: var(--space-8);
  }
}
