/* ─────────────────────────────────────────────────────────────
   Settlescan — Home page
   - Full-bleed multi-track parallax background (5 lanes)
   - Foreground hero w/ gold CTA + features
   ───────────────────────────────────────────────────────────── */

.home-root {
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

/* ── Parallax background ───────────────────────────────────────── */

.parallax {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--topbar-h) + 24px) 0 24px;
  /* Subtle radial glow so middle of viewport feels lit */
  background:
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(255, 215, 0, 0.04), transparent 60%),
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(0, 0, 0, 0.5), transparent 70%);
}

/* Each lane is a full-width strip that scrolls horizontally forever. */
.lane {
  position: relative;
  height: 18%;
  min-height: 110px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

/* The track holds 2× the lane group so we can loop seamlessly. */
.lane__track {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  width: max-content;
  will-change: transform;
  /* Promote to its own GPU layer for smooth compositing */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  animation: lane-scroll var(--lane-duration) linear infinite;
}

.lane[data-direction="rtl"] .lane__track {
  animation-direction: reverse;
}

.lane__group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 2px;
  flex: 0 0 auto;
}

/* Subtle gold/dark gradient seam between cards */
.lane__group .house-card + .house-card {
  position: relative;
}
.lane__group .house-card + .house-card::before {
  content: "";
  position: absolute;
  top: 6%;
  bottom: 6%;
  left: -4px;
  width: 4px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(255, 215, 0, 0.18) 30%,
    rgba(255, 215, 0, 0.28) 50%,
    rgba(255, 215, 0, 0.18) 70%,
    transparent 100%);
  pointer-events: none;
  z-index: 3;
}

@keyframes lane-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* All lanes have equal height and the same crisp look — no depth scaling. */
.lane--1,
.lane--2,
.lane--3,
.lane--4,
.lane--5 {
  height: 20%;
  filter: none;
  opacity: 1;
}
.lane--1 .house-card,
.lane--2 .house-card,
.lane--3 .house-card,
.lane--4 .house-card,
.lane--5 .house-card {
  transform: none;
}

/* ── House cards ───────────────────────────────────────────────── */
/* All cards share the source 1792×1024 aspect ratio (7:4).
   Lane height drives card height; width is computed via aspect-ratio
   so swapping in real <img> at 1792×1024 lines up exactly. */

.house-card {
  position: relative;
  margin: 0;
  flex: 0 0 auto;
  height: 100%;
  aspect-ratio: 1448 / 1086;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--t-med);
}

/* Shape modifiers retired — all cards share the same size now. */
.house-card--wide,
.house-card--square,
.house-card--tall,
.house-card--xwide {
  /* uniform */
}

/* Real photo fills the card. <img> with object-fit:cover so any source
   aspect ratio crops cleanly into the card frame. */
.house-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: linear-gradient(135deg, var(--tone-a, #2a2a2a), var(--tone-b, #1a1a1a));
}

/* Dark vignette on the card (not the img) so it composites over the photo. */
.house-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.05), transparent 50%),
    linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.45));
  pointer-events: none;
  z-index: 1;
}

.house-card__label {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.house-card__tag {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--gold-grad);
  color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.25);
}

/* ── Scrim: gradient between bg and content ────────────────────── */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 68% 55% at 50% 42%, rgba(13, 13, 13, 0.82), rgba(13, 13, 13, 0.4) 60%, transparent 80%),
    linear-gradient(180deg, rgba(13, 13, 13, 0.7) 0%, rgba(13, 13, 13, 0.25) 35%, rgba(13, 13, 13, 0.25) 65%, rgba(13, 13, 13, 0.85) 100%);
  /* No backdrop-filter — it forces every animation frame to re-rasterize
     the lanes underneath, which is the stutter source. */
}

/* ── Foreground content ────────────────────────────────────────── */

.home-content {
  position: relative;
  z-index: 10;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 60px) var(--page-gutter) 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  min-height: 100dvh;
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  padding: 8px 0;
  max-width: 640px;
}

/* Eyebrow badge — small accent above the headline */
.hero__title-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 18px 8px 13px;
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-radius: var(--r-pill);
  background: rgba(28, 28, 28, 0.55);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}

.hero__title-btn::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-1);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.9), 0 0 16px rgba(255, 215, 0, 0.45);
  animation: pulse-dot 2s ease-in-out infinite;
  flex: 0 0 auto;
  order: -1;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.hero__title-btn span {
  background: linear-gradient(90deg, #ffd700, #ffed4e, #fff8dc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__title-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 215, 0, 0.55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 24px rgba(255, 215, 0, 0.16);
}

/* Headline — the actual centerpiece */
.hero__headline {
  margin: 0;
  font-size: clamp(36px, 5.4vw, 64px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}
.hero__headline em {
  font-style: normal;
  background: linear-gradient(90deg, #ffd700 0%, #ffed4e 50%, #fff8dc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__lede {
  margin: 0;
  max-width: 480px;
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.55;
  color: var(--ink-3);
  text-wrap: balance;
}

.hero__cta {
  margin-top: 6px;
  width: min(100%, 320px);
  min-height: 52px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--gold-grad);
  color: #111;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.005em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 22px rgba(255, 215, 0, 0.14);
  transition: transform var(--t-fast), filter var(--t-fast), box-shadow var(--t-fast);
}

.hero__cta::after {
  content: "";
  position: absolute;
  inset: -20% auto -20% -35%;
  width: 32%;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.18) 35%, rgba(255, 255, 255, 0.62) 50%, rgba(255, 255, 255, 0.18) 65%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  animation: cta-shimmer 2.6s ease-in-out infinite;
}

.hero__cta-label { position: relative; z-index: 1; }

.hero__cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55), 0 0 42px rgba(255, 215, 0, 0.22);
}
.hero__cta:focus-visible {
  outline: 2px solid #fff3b0;
  outline-offset: 3px;
}

@keyframes cta-shimmer {
  0%   { left: -38%; opacity: 0; }
  12%  { opacity: 1; }
  55%  { left: 106%; opacity: 1; }
  100% { left: 106%; opacity: 0; }
}

/* Features */

.features-wrap {
  width: 100%;
  max-width: 980px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
}

.feature {
  background: rgba(24, 24, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-radius: var(--r-md);
  padding: 24px 22px;
  text-align: left;
  transition: transform var(--t-med) var(--ease-out), border-color var(--t-med);
}
.feature:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 215, 0, 0.22);
}

/* Real illustrated icon image — drops the abstract gold-gradient pill
   in favor of the existing brand badges (verified.png, rentfilter.png,
   homesearch.png). Sized larger and centered above the title. */
.feature__icon {
  display: block;
  width: 128px;
  height: 128px;
  object-fit: contain;
  margin: 4px auto 18px;
  background: none;
  border: 0;
  border-radius: 0;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
}
@media (max-width: 760px) {
  .feature__icon {
    width: 96px;
    height: 96px;
    margin: 2px auto 14px;
  }
}

.feature__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.feature__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* ── Mobile ─────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .home-content {
    padding: calc(var(--topbar-h) + 32px) var(--page-gutter-tight) 48px;
    gap: 44px;
  }
  .hero {
    gap: 14px;
    padding: 4px 0;
  }
  /* Mobile badge */
  .hero__title-btn {
    font-size: 13px;
    padding: 6px 14px 6px 10px;
    gap: 8px;
  }
  .hero__title-btn::after {
    width: 4px;
    height: 4px;
  }
  .hero__headline {
    font-size: 32px;
    line-height: 1.05;
  }
  .hero__lede {
    font-size: 13px;
    max-width: 300px;
  }
  .hero__cta {
    width: 100%;
    max-width: 320px;
    min-height: 50px;
    font-size: 16px;
    border-radius: 16px;
  }

  /* Mobile: features become a single-position carousel that auto-rotates.
     Use grid-stacking so the wrap auto-sizes to the tallest card. */
  .features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }
  .features .feature {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  }
  .features .feature.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .features-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
  }
  .features-dots .features-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.18);
    padding: 0;
    cursor: pointer;
    transition: background var(--t-fast), transform var(--t-fast);
  }
  .features-dots .features-dot.is-active {
    background: var(--gold-1);
    transform: scale(1.2);
  }

  .lane { min-height: 88px; }
  .lane--1 .house-card { transform: scale(0.7); }
  .lane--5 .house-card { transform: scale(1.0); }
  .scrim {
    background:
      radial-gradient(ellipse 90% 60% at 50% 40%, rgba(13,13,13,.85), rgba(13,13,13,.5) 65%, transparent 90%),
      linear-gradient(180deg, rgba(13,13,13,.75) 0%, rgba(13,13,13,.35) 35%, rgba(13,13,13,.4) 65%, rgba(13,13,13,.9) 100%);
  }
}

/* Hide dots on desktop */
@media (min-width: 761px) {
  .features-dots { display: none; }
}

/* Pause animation when tab not visible (saves battery on mobile) */
@media (prefers-reduced-motion: reduce) {
  .lane__track { animation: none; }
}
