/* =========================================================
   RIVERVIEW ESTATE — page-specific styling
   ========================================================= */

/* ---------- Stats bar ---------- */
.rv-stats {
  background: var(--cream);
  padding: 56px 6vw;
  border-bottom: 1px solid var(--line);
}
.rv-stats-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.rv-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}
.rv-stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(31, 28, 24, 0.12);
}
.rv-stat-num {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(34px, 4vw, 56px);
  color: var(--bronze-deep);
  line-height: 1;
  margin-bottom: 14px;
}
.rv-stat-lbl {
  font-family: var(--f-heading);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--charcoal-mute);
}

@media (max-width: 760px) {
  .rv-stats { padding: 36px 6vw; }
  .rv-stats-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 18px;
  }
  .rv-stat:nth-child(5) { grid-column: 1 / -1; }
  .rv-stat:nth-child(2)::after,
  .rv-stat:nth-child(4)::after { display: none; }
}

/* ---------- Gallery ---------- */
.rv-gallery-section {
  padding: var(--pad-section) 5vw;
  background: var(--ivory);
}
.rv-gallery-head {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
}
.rv-gallery-head .eyebrow {
  display: block;
  margin-bottom: 16px;
  color: var(--bronze);
}
.rv-gallery-head h2 {
  font-family: var(--f-heading);
  font-weight: 300;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin: 0;
}

.rv-gallery {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  grid-auto-flow: dense;
}
.rv-gallery-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--sand);
  cursor: zoom-in;
}
.rv-gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.6s ease;
  filter: saturate(0.96) contrast(1.02);
}
.rv-gallery-item:hover img {
  transform: scale(1.04);
  filter: saturate(1) contrast(1.04);
}
.rv-gallery-wide {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

/* On-grid caption — italic Cormorant, fades in from bottom on hover */
.rv-gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 20px 16px;
  font-family: var(--f-display, 'Cormorant Garamond', Georgia, serif);
  font-style: italic;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.35;
  color: var(--ivory);
  letter-spacing: 0.005em;
  background: linear-gradient(to top, rgba(15, 13, 11, 0.78) 0%, rgba(15, 13, 11, 0.45) 55%, rgba(15, 13, 11, 0) 100%);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: none;
  z-index: 2;
}
.rv-gallery-item:hover .rv-gallery-caption,
.rv-gallery-item:focus-visible .rv-gallery-caption {
  opacity: 1;
  transform: translateY(0);
}
/* Mobile: always show caption (no hover on touch) */
@media (hover: none), (max-width: 980px) {
  .rv-gallery-caption {
    opacity: 1;
    transform: translateY(0);
    font-size: 15px;
    padding: 14px 16px 12px;
  }
}

@media (max-width: 980px) {
  .rv-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rv-gallery-wide { grid-column: span 2; aspect-ratio: 16 / 9; }
}
@media (max-width: 580px) {
  .rv-gallery { grid-template-columns: 1fr; gap: 10px; }
  .rv-gallery-wide { grid-column: span 1; aspect-ratio: 4 / 3; }
  .rv-gallery-item { aspect-ratio: 4 / 3; }
}

/* ---------- Lightbox ---------- */
.rv-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 13, 11, 0.96);
  z-index: 9000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s linear;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rv-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}
.rv-lb-stage {
  position: relative;
  width: 92vw;
  height: 88vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.rv-lb-img {
  max-width: 100%;
  max-height: calc(100% - 36px);
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  user-select: none;
  -webkit-user-drag: none;
}
.rv-lb-meta {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  max-width: min(88vw, 900px);
}
.rv-lb-caption {
  font-family: var(--f-display, 'Cormorant Garamond', Georgia, serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.4;
  color: rgba(245, 241, 234, 0.92);
  letter-spacing: 0.005em;
}
.rv-lb-caption:empty {
  display: none;
}
.rv-lb-count {
  font-family: var(--f-heading);
  color: rgba(245, 241, 234, 0.55);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.rv-lb-close,
.rv-lb-prev,
.rv-lb-next {
  position: absolute;
  background: rgba(245, 241, 234, 0.08);
  color: var(--ivory);
  border: 1px solid rgba(245, 241, 234, 0.22);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
  z-index: 2;
  font-family: var(--f-heading);
  line-height: 1;
  padding: 0;
}
.rv-lb-close:hover,
.rv-lb-prev:hover,
.rv-lb-next:hover {
  background: rgba(245, 241, 234, 0.18);
  transform: scale(1.06);
}
.rv-lb-close { top: 28px; right: 28px; font-size: 28px; }
.rv-lb-prev { left: 28px; top: 50%; transform: translateY(-50%); }
.rv-lb-next { right: 28px; top: 50%; transform: translateY(-50%); }
.rv-lb-prev:hover { transform: translateY(-50%) scale(1.06); }
.rv-lb-next:hover { transform: translateY(-50%) scale(1.06); }

@media (max-width: 720px) {
  .rv-lb-close, .rv-lb-prev, .rv-lb-next {
    width: 44px; height: 44px; font-size: 22px;
  }
  .rv-lb-close { top: 16px; right: 16px; }
  .rv-lb-prev { left: 10px; }
  .rv-lb-next { right: 10px; }
}

/* ---------- Property Film placeholder ---------- */
.rv-video-section {
  background: var(--ivory);
  padding: 120px 6vw 100px;
}
.rv-video-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}
.rv-video-head .eyebrow {
  display: block;
  margin-bottom: 18px;
  color: var(--bronze);
}
.rv-video-head h2 {
  font-family: var(--f-heading);
  font-weight: 300;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin: 0 0 18px;
}
.rv-video-head p {
  font-family: var(--f-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  color: var(--charcoal-mute);
  letter-spacing: 0.02em;
  margin: 0;
}
.rv-video-frame {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--sand);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(31, 28, 24, 0.18);
}
/* The film itself fills the framed 16:9 box. object-fit: contain keeps the
   delivered aspect ratio honest — the frame is already 16:9, so there are no
   letterbox bars, but a differently-cropped replacement film would never be
   distorted. */
.rv-video-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--charcoal);
  display: block;
}
/* Cinematic cover over the poster, removed on first play. It is a real
   <button> so it is keyboard reachable and announced to screen readers. */
.rv-video-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: block;
  transition: opacity 0.5s ease;
}
.rv-video-cover:focus-visible {
  outline: 2px solid var(--bronze-soft);
  outline-offset: -6px;
}
.rv-video-frame.is-playing .rv-video-cover {
  opacity: 0;
  pointer-events: none;
}
.rv-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(31, 28, 24, 0.34) 0%, rgba(31, 28, 24, 0.58) 100%);
  transition: background 0.45s ease;
}
.rv-video-cover:hover .rv-video-overlay {
  background: linear-gradient(180deg, rgba(31, 28, 24, 0.26) 0%, rgba(31, 28, 24, 0.5) 100%);
}
.rv-video-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
/* Bronze ring with a CSS triangle — no icon font or SVG request. */
.rv-play-glyph {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1px solid rgba(240, 235, 226, 0.55);
  background: rgba(31, 28, 24, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
  transition: background 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}
.rv-play-glyph::before {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent var(--ivory);
  margin-left: 5px;
}
.rv-video-cover:hover .rv-play-glyph {
  background: var(--bronze);
  border-color: var(--bronze);
  transform: scale(1.06);
}
.rv-video-label .eyebrow {
  display: block;
  color: var(--bronze-soft);
  margin-bottom: 16px;
  font-size: 12px;
  letter-spacing: 0.32em;
}
.rv-video-title {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 30px);
  color: var(--ivory);
  letter-spacing: 0.01em;
  margin: 0;
  max-width: 640px;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .rv-video-section { padding: 80px 5vw 70px; }
  .rv-video-head { margin-bottom: 40px; }
  .rv-play-glyph { width: 60px; height: 60px; margin-bottom: 20px; }
  .rv-play-glyph::before { border-width: 8px 0 8px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .rv-video-cover,
  .rv-video-overlay,
  .rv-play-glyph { transition: none; }
}

/* ---------- Property Overview (two-column) ---------- */
.rv-overview {
  background: var(--cream);
  padding: 120px 6vw;
}
.rv-overview-grid {
  max-width: var(--max-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.rv-overview-col .eyebrow {
  display: block;
  margin-bottom: 14px;
  color: var(--bronze);
}
.rv-overview-col h3 {
  font-family: var(--f-heading);
  font-weight: 300;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin: 0 0 36px;
}

/* Spec list — label · value rows with subtle bottom borders */
.rv-spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rv-spec-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(31, 28, 24, 0.10);
  font-family: var(--f-body);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.rv-spec-list li:first-child { padding-top: 0; }
.rv-spec-list li:last-child { border-bottom: none; }
.rv-spec-list li span {
  color: var(--charcoal-mute);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 11px;
  flex-shrink: 0;
}
.rv-spec-list li strong {
  font-weight: 400;
  color: var(--charcoal);
  text-align: right;
  letter-spacing: 0.02em;
}

/* Amenity list — two-column on desktop */
.rv-amenity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
}
.rv-amenity-list li {
  font-family: var(--f-body);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.55;
  color: var(--charcoal);
  letter-spacing: 0.02em;
  padding-left: 18px;
  position: relative;
}
.rv-amenity-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 1px;
  background: var(--bronze);
}

@media (max-width: 980px) {
  .rv-overview { padding: 80px 5vw; }
  .rv-overview-grid {
    grid-template-columns: 1fr;
    gap: 64px;
  }
  .rv-amenity-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* =========================================================
   NARRATIVE — Editorial "About the Estate" section
   ========================================================= */
.rv-narrative {
  background: var(--ivory);
  padding: 130px 6vw;
  position: relative;
  overflow: hidden;
}
/* Subtle hairline decoration on the section corners */
.rv-narrative::before,
.rv-narrative::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 1px;
  background: var(--bronze);
  opacity: 0.4;
}
.rv-narrative::before { top: 60px; left: 6vw; }
.rv-narrative::after { bottom: 60px; right: 6vw; }

.rv-narrative-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.rv-narrative-inner > .eyebrow {
  display: block;
  margin-bottom: 18px;
  color: var(--bronze);
}
.rv-narrative-inner > h2 {
  font-family: var(--f-heading);
  font-weight: 300;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin: 0 0 64px;
  line-height: 1.25;
}

/* ---------- Pull-quote ---------- */
.rv-pullquote {
  max-width: 820px;
  margin: 0 auto 80px;
  padding: 0 20px;
  position: relative;
}
.rv-pullquote-mark {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(80px, 9vw, 130px);
  line-height: 0.7;
  color: var(--bronze-soft);
  display: block;
  margin-bottom: -20px;
  opacity: 0.65;
}
.rv-pullquote blockquote {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.55;
  letter-spacing: 0.005em;
  color: var(--charcoal);
  margin: 0 0 24px;
  padding: 0;
}
.rv-pullquote figcaption {
  font-family: var(--f-heading);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--charcoal-mute);
}

/* ---------- Three Pillars ---------- */
.rv-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 0 auto 72px;
  text-align: left;
}
.rv-pillar {
  background: var(--cream);
  padding: 44px 36px 40px;
  border-top: 1px solid rgba(184, 149, 106, 0.4);
  position: relative;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s ease;
}
.rv-pillar:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(31, 28, 24, 0.10);
}
.rv-pillar-num {
  display: block;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 300;
  font-size: 38px;
  color: var(--bronze);
  line-height: 1;
  margin-bottom: 20px;
  opacity: 0.85;
}
.rv-pillar h3 {
  font-family: var(--f-heading);
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin: 0 0 18px;
}
.rv-pillar p {
  font-family: var(--f-body);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.75;
  color: var(--charcoal);
  letter-spacing: 0.012em;
  margin: 0;
}

/* ---------- Read More button ---------- */
.rv-readmore-wrap {
  margin-top: 0;
}
.rv-readmore-btn {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--f-heading);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--charcoal);
  transition: color 0.3s ease;
  margin: 0 auto;
}
.rv-readmore-btn:hover { color: var(--bronze-deep); }
.rv-readmore-line {
  display: inline-block;
  width: 48px;
  height: 1px;
  background: var(--bronze);
  transition: width 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.rv-readmore-btn:hover .rv-readmore-line { width: 72px; }
.rv-readmore-icon {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  margin-bottom: 4px;
}
.rv-readmore-btn[aria-expanded="true"] .rv-readmore-icon {
  transform: rotate(-135deg);
  margin-bottom: -4px;
}

/* ---------- Full story (expandable) ---------- */
.rv-fullstory {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
  overflow: hidden;
  /* Animated reveal: height transitions handled inline by JS,
     but opacity + transform smoothed via CSS */
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.rv-fullstory[hidden] { display: none; }
.rv-fullstory.is-open {
  opacity: 1;
  transform: translateY(0);
  padding-top: 56px;
}
.rv-chapter {
  margin-bottom: 56px;
  position: relative;
}
.rv-chapter-num {
  display: block;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 24px;
  color: var(--bronze);
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.85;
}
.rv-chapter h4 {
  font-family: var(--f-heading);
  font-weight: 300;
  font-size: clamp(18px, 1.8vw, 22px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin: 0 0 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(31, 28, 24, 0.10);
}
.rv-chapter p {
  font-family: var(--f-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.85;
  color: var(--charcoal);
  letter-spacing: 0.012em;
  margin: 0 0 18px;
}
.rv-chapter p:last-child { margin-bottom: 0; }

.rv-closing {
  margin: 48px 0 0;
  text-align: center;
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(18px, 1.8vw, 22px);
  color: var(--bronze-deep);
  line-height: 1.55;
  letter-spacing: 0.02em;
  padding-top: 40px;
  border-top: 1px solid rgba(184, 149, 106, 0.35);
}
.rv-closing em { font-style: italic; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .rv-pillars {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 56px;
  }
  .rv-pillar { padding: 36px 28px 32px; }
}
@media (max-width: 760px) {
  .rv-narrative { padding: 80px 5vw; }
  .rv-narrative::before,
  .rv-narrative::after { display: none; }
  .rv-narrative-inner > h2 { margin-bottom: 48px; }
  .rv-pullquote { margin-bottom: 56px; padding: 0; }
  .rv-chapter { margin-bottom: 44px; }
  .rv-chapter p { font-size: 14.5px; line-height: 1.8; }
}
