/* Home Blade = sandbox redesign/v1 (scoped) */
.v1-home {
  --bg: #eef3f6;
  --bg-deep: #e2ebe8;
  --ink: #152028;
  --ink-soft: #4a5a66;
  --line: rgba(21, 32, 40, 0.1);
  --surface-solid: #ffffff;
  --accent: #0b6b62;
  --accent-bright: #129487;
  --warm: #d4923a;
  --hero-veil: linear-gradient(
    105deg,
    rgba(238, 243, 246, 0.96) 0%,
    rgba(238, 243, 246, 0.88) 42%,
    rgba(238, 243, 246, 0.25) 68%,
    rgba(238, 243, 246, 0.05) 100%
  );
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --radius: 1.25rem;
  --max: 72rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color: var(--ink);
}

.v1-home a {
  color: inherit;
  text-decoration: none;
}

.v1-home img {
  max-width: 100%;
  display: block;
}

/* Hero */
.v1-home .hero {
  position: relative;
  min-height: min(92vh, 52rem);
  margin-top: 0.75rem;
  overflow: hidden;
  isolation: isolate;
}

.v1-home .hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #d7e2e6;
}

.v1-home .hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% center;
  transform: scale(1.06);
  animation: v1HeroDrift 18s var(--ease) infinite alternate;
}

.v1-home .hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--hero-veil);
}

.v1-home .hero-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.35;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.v1-home .hero-inner {
  position: relative;
  z-index: 3;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 10vw, 7.5rem) 1.25rem clamp(3rem, 8vw, 5.5rem);
  display: grid;
  align-content: end;
  min-height: inherit;
}

.v1-home .hero-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  margin: 0 0 1.25rem;
  max-width: 12ch;
  opacity: 0;
  transform: translateY(28px);
  animation: v1RiseIn 0.9s var(--ease) 0.1s forwards;
}

.v1-home .hero-brand em {
  font-style: normal;
  color: var(--accent);
}

.v1-home .hero-title {
  margin: 0 0 0.85rem;
  max-width: 18ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  opacity: 0;
  transform: translateY(24px);
  animation: v1RiseIn 0.9s var(--ease) 0.22s forwards;
}

.v1-home .hero-lead {
  margin: 0 0 1.75rem;
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  opacity: 0;
  transform: translateY(20px);
  animation: v1RiseIn 0.9s var(--ease) 0.34s forwards;
}

.v1-home .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(16px);
  animation: v1RiseIn 0.9s var(--ease) 0.46s forwards;
}

.v1-home .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3.1rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.35s var(--ease), background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.v1-home .btn:hover {
  transform: translateY(-2px);
}

.v1-home .btn-primary {
  background: var(--accent);
  color: #f5fffd;
}

.v1-home .btn-primary:hover {
  background: var(--accent-bright);
}

.v1-home .btn-ghost {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.v1-home .btn-ghost:hover {
  background: var(--surface-solid);
}

/* Sections */
.v1-home .section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 5.5rem) 1.25rem;
}

.v1-home .section-head {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
  max-width: 36rem;
}

.v1-home .section-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.v1-home .section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.v1-home .section-head p {
  margin: 0;
  color: var(--ink-soft);
}

/* Categories */
.v1-home .cat-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .v1-home .cat-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .v1-home .cat-rail {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.v1-home .cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 8.5rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55)),
    linear-gradient(135deg, rgba(11, 107, 98, 0.08), rgba(212, 146, 58, 0.08));
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.25s ease, box-shadow 0.4s var(--ease);
  opacity: 0;
  transform: translateY(18px);
}

.v1-home .cat-tile.is-in {
  opacity: 1;
  transform: translateY(0);
}

.v1-home .cat-tile::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 107, 98, 0.18), transparent 70%);
  transition: transform 0.5s var(--ease);
}

.v1-home .cat-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(11, 107, 98, 0.35);
  box-shadow: 0 18px 40px rgba(21, 32, 40, 0.08);
}

.v1-home .cat-tile:hover::after {
  transform: translate(-12px, -18px) scale(1.15);
}

.v1-home .cat-tile strong {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: -0.03em;
}

.v1-home .cat-tile span {
  position: relative;
  z-index: 1;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* Listing board */
.v1-home .listing-board {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .v1-home .listing-board {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.25rem;
  }
}

.v1-home .listing-feature {
  position: relative;
  min-height: 22rem;
  border-radius: calc(var(--radius) + 0.35rem);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #d9e4e8;
}

.v1-home .listing-feature img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.v1-home .listing-feature:hover img {
  transform: scale(1.04);
}

.v1-home .listing-feature-copy {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.4rem 1.35rem 1.5rem;
  background: linear-gradient(180deg, transparent, rgba(21, 32, 40, 0.78));
  color: #f5f8fa;
}

.v1-home .listing-feature-copy .tag {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffd89a;
}

.v1-home .listing-feature-copy h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.v1-home .listing-feature-copy p {
  margin: 0;
  opacity: 0.88;
  font-size: 0.92rem;
}

.v1-home .listing-stack {
  display: grid;
  gap: 0.75rem;
}

.v1-home .ad-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: var(--radius);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), border-color 0.25s ease;
  opacity: 0;
  transform: translateY(14px);
}

.v1-home .ad-row.is-in {
  opacity: 1;
  transform: translateY(0);
}

.v1-home .ad-row:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 107, 98, 0.3);
}

.v1-home .ad-thumb {
  width: 5.5rem;
  height: 4.4rem;
  border-radius: 0.85rem;
  overflow: hidden;
  background: #d7e2e6;
}

.v1-home .ad-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v1-home .ad-meta h3 {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.v1-home .ad-meta p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.v1-home .ad-price {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

/* Counties */
.v1-home .county-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.v1-home .county-cloud a {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.v1-home .county-cloud a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #f4fffc;
}

@keyframes v1RiseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes v1HeroDrift {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.12) translate3d(-1.5%, -1%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .v1-home .hero-brand,
  .v1-home .hero-title,
  .v1-home .hero-lead,
  .v1-home .hero-actions,
  .v1-home .cat-tile,
  .v1-home .ad-row {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .v1-home .hero-media img {
    animation: none !important;
  }
}
