/* Homepage spatial experience — scoped to .page-home */

.page-home {
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.12);
  --glass-edge: rgba(255, 255, 255, 0.18);
  --glow: 0 0 40px rgba(255, 87, 34, 0.28);
}

.page-home .site-header {
  --header-bg-a: 0;
  box-shadow: none;
}
.page-home .site-header::before {
  background-color: rgba(3, 29, 41, 0.78);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}
.page-home .site-header.is-scrolled {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
}

.page-home .cursor-orb,
.page-home .cursor-orb-dot {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .page-home.has-cursor .cursor-orb,
  .page-home.has-cursor .cursor-orb-dot {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 200;
    transform: translate3d(-50%, -50%, 0);
    will-change: transform;
  }
  .page-home.has-cursor .cursor-orb {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 87, 34, 0.55);
    background: rgba(255, 87, 34, 0.08);
    mix-blend-mode: screen;
  }
  .page-home.has-cursor .cursor-orb-dot {
    width: 6px;
    height: 6px;
    background: #ff5722;
  }
}

/* Hero — spatial scene, not a photo banner */
.home-hero {
  --mx: 0;
  --my: 0;
  --hero-max: 1520px;
  --hero-gutter: clamp(64px, 5vw, 80px);
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  overflow: hidden;
  background: #02151c;
  margin-top: calc(var(--header-h) * -1);
  padding-top: var(--header-h);
  padding-inline: var(--hero-gutter);
  padding-bottom: 40px;
}
.hero-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  perspective: 1400px;
}
.hero-canvas,
.hero-vignette {
  position: absolute;
  inset: 0;
}
.hero-canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 600ms var(--ease);
}
.hero-canvas.is-ready { opacity: 1; }
.hero-depth {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  transform-style: preserve-3d;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  will-change: transform;
}
.hero-orb-a {
  width: 42vw;
  height: 42vw;
  right: -8%;
  top: -12%;
  background: radial-gradient(circle, rgba(255, 87, 34, 0.32), rgba(255, 87, 34, 0) 68%);
  transform: translate3d(calc(var(--mx) * -24px), calc(var(--my) * -18px), 80px);
  animation: orb-pulse 9s ease-in-out infinite;
}
.hero-orb-b {
  width: 28vw;
  height: 28vw;
  right: 18%;
  bottom: 8%;
  background: radial-gradient(circle, rgba(90, 170, 196, 0.22), transparent 70%);
  transform: translate3d(calc(var(--mx) * 18px), calc(var(--my) * 14px), 40px);
}
.hero-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  background: #0a3a4e;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 87, 34, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform-origin: center center;
  transform:
    perspective(1400px)
    rotateY(calc(-11deg + var(--mx) * 6deg))
    rotateX(calc(4deg + var(--my) * -3deg))
    translate3d(calc(var(--mx) * 8px), calc(var(--my) * 6px), 24px);
}
.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
  filter: saturate(1.05) contrast(1.04);
}
.hero-stat-chip {
  position: absolute;
  z-index: 2;
  right: 4%;
  bottom: 8%;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(7, 40, 56, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  transform: translate3d(calc(var(--mx) * -22px), calc(var(--my) * 12px), 120px);
}
.hero-stat-chip span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ryd-orange);
  font-weight: 700;
}
.hero-stat-chip strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.hero-vignette {
  background:
    linear-gradient(90deg, rgba(2, 21, 28, 0.62) 0%, rgba(2, 21, 28, 0.28) 42%, rgba(2, 21, 28, 0.08) 68%, rgba(2, 21, 28, 0.18) 100%),
    linear-gradient(180deg, rgba(2, 21, 28, 0.35) 0%, transparent 32%, rgba(2, 21, 28, 0.78) 100%);
  pointer-events: none;
  z-index: 1;
}
@keyframes orb-pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.home-hero-layout {
  --hero-image-w: min(45%, 575px);
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--hero-image-w);
  align-items: center;
  column-gap: clamp(28px, 3.2vw, 56px);
  row-gap: 24px;
  width: min(var(--hero-max), 100%);
  margin: 0 auto;
  padding: 12px 0 24px;
}
.home-hero-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  position: relative;
  z-index: 4;
}
.home-hero-copy {
  position: relative;
  z-index: 2;
  padding: 0;
  width: 100%;
  max-width: none;
  margin: 0;
}
.home-hero-main .search-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
  align-items: end;
}
.home-hero-main .search-grid .btn {
  grid-column: auto;
  width: 100%;
  min-height: 52px;
  height: 52px;
  padding: 0 16px;
  font-size: 14px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hero-stats li {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.hero-stats strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  color: #fff;
}
.hero-stats span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(238, 243, 245, 0.65);
}
.hero-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-shortcuts a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.hero-shortcuts a:hover {
  border-color: rgba(255, 87, 34, 0.7);
  color: #ffb199;
}
.home-hero-visual {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  padding-right: 8px;
  box-sizing: border-box;
  overflow: visible;
  perspective: 1200px;
  transform-style: preserve-3d;
}
.hero-kicker {
  color: var(--ryd-orange);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 18px;
}
.home-hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 6.2vw, 80px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  max-width: none;
  margin: 0 0 14px;
  text-shadow: none;
}
.hero-line {
  display: block;
}
.hero-line-italic {
  font-style: italic;
  font-weight: 500;
  color: #f4ebe3;
}
.hero-lede {
  font-size: clamp(16px, 1.6vw, 19px);
  color: rgba(238, 243, 245, 0.86);
  max-width: 46ch;
  margin: 0;
  line-height: 1.55;
}

.hero-dock {
  position: relative;
  z-index: 3;
  padding: 0;
}
.glass-search {
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 12px 14px 12px;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.page-home .glass-search .search-switch {
  background: rgba(3, 29, 41, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 3px;
  margin-bottom: 10px;
}
.page-home .glass-search .search-switch button {
  min-width: 72px;
  min-height: 32px;
  padding: 0 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
}
.page-home .glass-search .search-switch button.is-active {
  background: linear-gradient(180deg, #fff, #f3eee6);
  color: var(--ryd-navy);
}
.page-home .glass-search .field {
  gap: 4px;
}
.page-home .glass-search .field label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}
.page-home .glass-search .field input,
.page-home .glass-search .field select {
  min-height: 50px;
  height: 50px;
  padding: 8px 12px;
  background: rgba(3, 29, 41, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.page-home .glass-search .field input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}
.page-home .glass-search .field input:focus,
.page-home .glass-search .field select:focus {
  border-color: rgba(255, 87, 34, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 3px rgba(255, 87, 34, 0.2);
}
.page-home .glass-search .field select option {
  color: var(--ryd-navy);
  background: #fff;
}

/* Story */
.story-pin {
  position: relative;
  padding: 96px 0 80px;
  background: #031d29;
  color: #e8eef1;
  overflow: hidden;
}
.story-bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 87, 34, 0.16), transparent 36%),
    radial-gradient(circle at 80% 70%, rgba(10, 58, 78, 0.9), transparent 40%);
  transform: translate3d(0, 0, 0);
  pointer-events: none;
}
.story-inner { position: relative; z-index: 1; }
.story-pin .eyebrow { color: var(--ryd-orange); }
.story-pin h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  color: #fff;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
}
.story-lead {
  max-width: 46ch;
  color: rgba(232, 238, 241, 0.78);
  font-size: 18px;
  margin: 0 0 40px;
}
.story-beats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.glass-beat {
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-edge);
  border-radius: 22px;
  padding: 22px 20px 24px;
  min-height: 210px;
  transform-style: preserve-3d;
  will-change: transform;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.beat-num {
  display: block;
  color: var(--ryd-orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin-bottom: 28px;
}
.glass-beat h3 {
  font-family: var(--font-display);
  font-size: 26px;
  color: #fff;
  margin: 0 0 10px;
}
.glass-beat p {
  margin: 0;
  color: rgba(232, 238, 241, 0.7);
  font-size: 14px;
}

/* Services bento */
.services-stage {
  background:
    radial-gradient(ellipse at top, #efe8dc, var(--ryd-cream) 55%);
}
.service-bento {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.service-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 220px;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-card);
  color: inherit;
  transform-style: preserve-3d;
  will-change: transform;
}
.service-card-lg {
  grid-row: span 2;
  min-height: 460px;
  color: #fff;
  background: #0a3a4e;
}
.service-card-lg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 700ms var(--ease);
}
.service-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 29, 41, 0.05), rgba(3, 29, 41, 0.78));
}
.service-card-body {
  position: relative;
  z-index: 1;
  padding: 24px;
  width: 100%;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 0 0 8px;
  color: var(--ryd-navy);
}
.service-card-lg h3,
.service-card-accent h3 { color: #fff; }
.service-card p { margin: 0 0 14px; color: var(--ryd-muted); font-size: 14px; }
.service-card-lg p,
.service-card-accent p { color: rgba(255, 255, 255, 0.82); }
.service-go {
  font-weight: 700;
  color: var(--ryd-orange);
}
.service-card-lg .service-go,
.service-card-accent .service-go { color: #ffb199; }
.service-card-accent {
  background: linear-gradient(160deg, #0b3d54, #031d29);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}
.service-card:hover .service-card-lg img,
.service-card-lg:hover img { transform: scale(1.1); }
.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 87, 34, 0.45), 0 0 40px rgba(255, 87, 34, 0.18);
  transition: opacity 220ms var(--ease);
}
.service-card:hover::after,
.property-masonry .property-card:hover::after {
  opacity: 1;
}

/* Masonry */
.masonry-stage { padding-top: 40px; }
.property-masonry {
  column-count: 3;
  column-gap: 20px;
}
.property-masonry .property-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 20px;
  break-inside: avoid;
  transform-style: preserve-3d;
  will-change: transform;
  position: relative;
}
.property-masonry .property-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 36px rgba(255, 87, 34, 0.2);
  transition: opacity 220ms var(--ease);
}
.property-masonry .property-card.is-tall .property-card-media { aspect-ratio: 3 / 4; }
.property-masonry .property-card.is-wide .property-card-media { aspect-ratio: 16 / 9; }
.property-masonry .property-card-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 18px;
  background: linear-gradient(180deg, transparent, rgba(3, 29, 41, 0.55));
  color: #fff;
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}
.property-masonry .property-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(3, 29, 41, 0.5));
  opacity: 0;
  transition: opacity 280ms var(--ease);
  pointer-events: none;
}
.property-masonry .property-card:hover .property-card-media::after {
  opacity: 1;
}

.cta-band-cinematic {
  position: relative;
  overflow: hidden;
  padding: 96px 0;
}
.cta-glow {
  position: absolute;
  width: 60vw;
  height: 60vw;
  left: 50%;
  top: 50%;
  transform: translate3d(-50%, -50%, 0);
  background: radial-gradient(circle, rgba(255, 87, 34, 0.28), transparent 62%);
  pointer-events: none;
  animation: cta-pulse 8s ease-in-out infinite;
}
@keyframes cta-pulse {
  0%, 100% { transform: translate3d(-50%, -50%, 0) scale(1); opacity: 0.7; }
  50% { transform: translate3d(-50%, -48%, 0) scale(1.12); opacity: 1; }
}
.cta-band-cinematic .container { position: relative; z-index: 1; }
.cta-band-cinematic h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
}

/* Reveals before JS */
[data-reveal] { opacity: 1; }

@media (max-width: 1280px) {
  .home-hero-layout {
    --hero-image-w: min(48%, 500px);
  }
  .home-hero-main .search-grid {
    grid-template-columns: 1fr 1fr;
  }
  .home-hero-main .search-grid .btn {
    grid-column: 1 / -1;
  }
}
@media (max-width: 1100px) {
  .home-hero {
    --hero-gutter: clamp(32px, 4.2vw, 48px);
  }
}
@media (max-width: 1024px) {
  .story-beats { grid-template-columns: 1fr 1fr; }
  .service-bento { grid-template-columns: 1fr 1fr; }
  .service-card-lg { grid-row: auto; min-height: 320px; }
  .property-masonry { column-count: 2; }
  .home-hero-layout {
    --hero-image-w: min(43%, 375px);
  }
  .home-hero-copy h1 { font-size: clamp(36px, 5.4vw, 56px); }
  .hero-frame {
    transform:
      perspective(1200px)
      rotateY(calc(-9deg + var(--mx) * 5deg))
      rotateX(calc(3deg + var(--my) * -2deg));
  }
  .home-hero-visual { padding-right: 4px; }
}
@media (max-width: 900px) {
  .home-hero-layout {
    grid-template-columns: 1fr;
    justify-items: stretch;
    padding-top: 8px;
    row-gap: 20px;
  }
  .home-hero-visual {
    width: min(325px, 72%);
    max-width: 375px;
    justify-self: center;
    padding-right: 0;
  }
  .hero-frame {
    transform: perspective(1200px) rotateY(-7deg) rotateX(3deg);
  }
  .home-hero-main .search-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 768px) {
  .home-hero {
    min-height: 100svh;
    padding-bottom: 28px;
  }
  .home-hero-copy h1 { font-size: clamp(36px, 11vw, 52px); }
  .home-hero-visual {
    width: min(275px, 68%);
  }
  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .hero-stats li { padding: 10px 8px; }
  .hero-stats strong { font-size: 18px; }
  .glass-search { padding: 12px; }
  .story-beats,
  .service-bento { grid-template-columns: 1fr; }
  .property-masonry { column-count: 1; }
  .page-home .property-masonry .property-card {
    display: inline-block;
    grid-template-columns: none;
  }
  .hero-orb-a { width: 80vw; height: 80vw; right: -20%; }
}
@media (max-width: 600px) {
  .home-hero {
    --hero-gutter: clamp(16px, 5vw, 24px);
  }
  .home-hero-main .search-grid {
    grid-template-columns: 1fr;
  }
  .home-hero-main .search-grid .btn {
    grid-column: 1 / -1;
  }
}
@media (max-width: 480px) {
  .home-hero-visual {
    width: min(225px, 64%);
  }
  .hero-frame {
    border-radius: 20px;
    transform: none;
  }
  .page-home .glass-search .field input,
  .page-home .glass-search .field select {
    min-height: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta-glow,
  .hero-orb-a,
  .hero-frame { animation: none; }
  .hero-canvas { display: none; }
}
