/* =============================================
   REFERENCE DETAIL  (rd-)
   reference-detail.php — one completed project, opened from the
   "Legfrissebb referenciáink" row on a service subpage.

   The carousel, the photo grid and the lightbox on this page ARE the
   property-detail ones — same markup, same reveal, same script — so this
   file imports property-detail.css rather than restating any of it. Only
   the intro band below is new.

   Like property-detail.css this file is NOT in the style.css @import chain:
   reference-detail.php injects it per-page via $extra_css.
   ============================================= */

@import url('property-detail.css');

.rd {
  /* The intro band reuses .abt-reveal, whose transition is written against
     --abt-ease. That token is declared on .page-about / .page-elite-club, not
     at :root — and an unresolved var() invalidates the WHOLE transition
     shorthand, so the copy would appear with no fade at all. Redeclare it
     here, exactly as page-elite-club.css does. */
  --abt-ease: var(--ease-spring);
  /* Near-white canvas, as on the service subpages the row lives on. The
     parchment band below sweeps in over this. */
  background: var(--abt-surface);
  display: flow-root;
}


/* ===========================================
   1. TITLE + DESCRIPTION BAND
   Full-bleed so the bg-sweep ::before spans the viewport; the copy sits
   in a centred wrapper inside it. Same band mechanic as the middle
   section of construction.php.
=========================================== */
.rd-intro {
  position: relative;
  padding: clamp(56px, 9vh, 110px) clamp(24px, 8vw, 120px);
  /* The sweep is the section's own background — the canvas shows until it
     has passed, so nothing is painted here. */
}

.rd-intro__inner {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vh, 18px);
}

/* District / street — the locating line above the project name. Terracotta
   uppercase label, per the section-label role in the type scale. */
.rd-intro__eyebrow {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-terracotta);
  margin: 0;
}

/* .abt-title carries the serif italic; only the measure is page-local. */
.rd-intro__title {
  max-width: 22ch;
}

/* The description runs the full width of the band — the section's gutters
   are the measure here, not the 65ch article cap.
   That cap arrives twice, on the wrapper (`.abt-lead`, page-about-editorial)
   and on each paragraph (`.abt-lead p`, base.css), and while it is in force
   `text-align: justify` has nothing to stretch to: the lines end at 65ch and
   the copy reads as plain left-aligned inside a much wider band. Both have to
   be lifted, and justify is restated below so this page does not depend on
   staying a member of that shared selector list.
   The hyphens/text-wrap half of the shared block is deliberately left alone —
   `hyphens: manual` still applies, per the client's standing note. */
.rd-intro__body {
  max-width: none;
  margin-top: clamp(6px, 1.2vh, 14px);
}
.rd-intro__body p {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--color-charcoal);
  margin: 0;
  max-width: none;
  text-align: justify;
}
.rd-intro__body p + p {
  margin-top: clamp(12px, 1.8vh, 20px);
}
.rd-intro__body em {
  font-style: italic;
}


/* The photo grid follows the intro band directly. Its own top padding
   (--space-xl, sized for property-detail's specs block) stacked on the band's
   bottom padding left a ~230px gap; the band's padding alone is the gap here. */
.rd .pd-gallery {
  padding-top: 0;
}


/* ===========================================
   2. BACK LINK
   Underline CTA under the photo grid, matching .abt-more-toggle.
=========================================== */
.rd-back-wrap {
  margin: clamp(32px, 5vh, 56px) 0 0;
}

.rd-back {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-terracotta);
  text-decoration: none;
  padding: 4px 0;
  position: relative;
}
.rd-back::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--color-caramel);
  transform-origin: right;
  transition: transform 0.3s var(--ease-spring);
}
.rd-back:hover::after {
  transform: scaleX(0.4);
}

@media (prefers-reduced-motion: reduce) {
  .rd-back::after {
    transition: none;
  }
}


/* ===========================================
   RESPONSIVE
   (the pd- sections bring their own breakpoints via the import)
=========================================== */
@media (max-width: 767px) {
  .rd-intro {
    padding: clamp(40px, 7vh, 72px) var(--space-sm);
  }

  .rd-intro__title {
    max-width: none;
  }
}
