/* ============================================================
   PAGE HERO (service pages)

   Single source of truth for the service-page hero band. Replaces
   five near-identical inline copies, one per service page.

   Structure:
     section.page-hero
       div.page-hero-media      absolute image layers + dark overlay
         div.page-hero-bg  x4
       div.container            everything readable, above the media
         h1                     page-owned, never rotated
         div.page-hero-rotate   fixed-height box of rotating lines
           p.page-hero-line x4
         p / p.lead             page-owned standfirst
         div.page-hero-cta

   The charcoal background stays as the fallback colour behind the
   photographs, so the band still reads correctly before the images
   load and if they fail.

   decoration-renovation.html carries extra treatments. Those live on
   the additive .page-hero--feature modifier, not a second base.
   ============================================================ */

/* ---- base band ---- */
.page-hero{
  background:var(--charcoal);
  padding:clamp(60px,8vw,100px) 0;
  position:relative;
  overflow:hidden;
  isolation:isolate;
}

/* Decorative gold ring, top right. Present on all five pages. */
.page-hero::before{
  content:'';
  position:absolute;
  top:-50%;
  right:-20%;
  width:500px;
  height:500px;
  border-radius:50%;
  border:1px solid rgba(201,168,76,.06);
  z-index:2;
  pointer-events:none;
}

/* Second ring, bottom left. decoration-renovation only. */
.page-hero--feature::after{
  content:'';
  position:absolute;
  bottom:-30%;
  left:-10%;
  width:400px;
  height:400px;
  border-radius:50%;
  border:1px solid rgba(201,168,76,.04);
  z-index:2;
  pointer-events:none;
}

.page-hero .container{
  position:relative;
  z-index:3;
}

/* ---- rotating photography ---- */
.page-hero-media{
  position:absolute;
  inset:0;
  overflow:hidden;
  z-index:1;
}

.page-hero-bg{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  opacity:0;
  transition:opacity .8s ease;
}

.page-hero-bg--active{opacity:1}

/* Each page supplies its own four images as custom properties on the
   section, so this file stays page-agnostic and no inline style
   attribute (and therefore no !important) is needed anywhere. */
.page-hero-bg[data-bg="0"]{background-image:var(--ph-bg-0)}
.page-hero-bg[data-bg="1"]{background-image:var(--ph-bg-1)}
.page-hero-bg[data-bg="2"]{background-image:var(--ph-bg-2)}
.page-hero-bg[data-bg="3"]{background-image:var(--ph-bg-3)}

/* Dark overlay. Weighted to the left, where the headline sits, and
   heavy enough to hold white text over the brightest of the four
   photographs (the empty white-walled flats). */
.page-hero-media::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(
    to right,
    rgba(10,10,10,.93) 0%,
    rgba(10,10,10,.86) 34%,
    rgba(10,10,10,.66) 62%,
    rgba(10,10,10,.5) 100%
  );
}

/* ---- headline ---- */
.page-hero h1{
  font-family:var(--font-display);
  font-size:clamp(32px,5vw,56px);
  font-weight:500;
  color:var(--white);
  margin-bottom:16px;
  line-height:1.15;
}

.page-hero h1 em{
  font-style:italic;
  color:var(--gold-light);
}

.page-hero--feature h1{
  font-size:clamp(36px,5.5vw,64px);
  margin-bottom:20px;
  line-height:1.1;
  max-width:900px;
}

/* ---- rotating lines ----
   Every line is absolutely positioned, including the active one, so
   the box height never depends on which line is showing. min-height
   is sized to the tallest line at each breakpoint, which makes the
   swap cost exactly zero layout shift. */
.page-hero-rotate{
  position:relative;
  min-height:30px; /* tallest line measures 27px at 1440 */
  margin-bottom:18px;
  max-width:640px;
}

.page-hero .page-hero-line{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  margin:0;
  max-width:none;
  font-size:clamp(15px,1.6vw,18px);
  line-height:1.5;
  font-weight:500;
  color:var(--gold-light);
  opacity:0;
  transform:translateY(8px);
  transition:opacity .8s ease,transform .8s ease;
}

.page-hero .page-hero-line--active{
  opacity:1;
  transform:translateY(0);
}

/* ---- standfirst ---- */
.page-hero p{
  font-size:17px;
  color:rgba(255,255,255,.6);
  max-width:600px;
  line-height:1.8;
}

.page-hero p.lead{
  font-size:clamp(16px,1.6vw,19px);
  color:rgba(255,255,255,.65);
  max-width:680px;
  line-height:1.8;
  margin-bottom:28px;
}

/* ---- calls to action ---- */
.page-hero-cta{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:24px;
  width:100%;
}

/* Only decoration-renovation defined .btn-outline inline; on the other
   four pages the secondary action would render as unstyled dark text on
   a dark band. Scoped to .page-hero-cta so it cannot leak into page
   content, and matched to decoration's existing values so the two agree. */
.page-hero-cta .btn-outline{
  display:inline-flex;
  align-items:center;
  gap:10px;
  background:transparent;
  color:var(--white);
  padding:15px 30px;
  font-family:var(--font-body);
  font-size:12px;
  font-weight:600;
  letter-spacing:1.5px;
  text-transform:uppercase;
  border:1px solid rgba(255,255,255,.25);
  cursor:pointer;
  transition:all .4s var(--t);
}

.page-hero-cta .btn-outline:hover{
  border-color:var(--gold);
  color:var(--gold);
}

.page-hero-cta .page-hero-tel{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--gold-light);
  font-size:13px;
  font-weight:600;
  padding:15px 0;
}

/* ---- reduced motion ---- */
@media(prefers-reduced-motion:reduce){
  .page-hero-bg,
  .page-hero .page-hero-line{
    transition:none;
  }
  .page-hero .page-hero-line{transform:none}
}

/* ---- tablet and below ----
   Every line renders on a single 23px line down to 360px, but the
   longest ("Referencing and Right to Rent, done properly.") clears its
   312px column by only 7px. A 320px viewport, or a raised minimum font
   size, tips it onto a second line. Because the lines are absolutely
   positioned, a wrap that the box has not reserved space for would
   overlap the paragraph beneath it, so two lines are reserved here.
   The cost is 23px of band; the benefit is that the layout cannot
   break. Still zero shift: the reservation is fixed either way. */
@media(max-width:900px){
  .page-hero-rotate{min-height:46px}
}

/* ---- MOBILE HERO (portrait 3:4 background crops + compact layout) ----
   Mirrors the index.html treatment from 905eaec. index.html needs
   !important there because its desktop images sit in inline style
   attributes; here they come from custom properties, so a plain
   same-specificity override later in the file is enough. */
@media(max-width:768px){
  .page-hero{
    min-height:auto;
    padding:44px 0 40px;
  }

  .page-hero-bg{background-position:center center}

  /* Overlay turns vertical and gets heavier: on mobile the text runs
     the full width of the frame, not just the plain left third. */
  .page-hero-media::after{
    background:linear-gradient(
      to bottom,
      rgba(10,10,10,.88) 0%,
      rgba(10,10,10,.74) 45%,
      rgba(10,10,10,.9) 100%
    );
  }

  .page-hero h1,
  .page-hero--feature h1{
    font-size:clamp(28px,7.5vw,38px);
    line-height:1.15;
    margin-bottom:14px;
    max-width:none;
  }

  .page-hero-rotate{
    min-height:46px;
    margin-bottom:16px;
    max-width:none;
  }

  .page-hero .page-hero-line{
    font-size:15px;
    line-height:1.5;
  }

  .page-hero p,
  .page-hero p.lead{
    font-size:15px;
    line-height:1.7;
  }

  .page-hero-cta{
    flex-direction:column;
    align-items:stretch;
  }

  .page-hero-cta .btn-gold,
  .page-hero-cta .btn-outline{
    justify-content:center;
    width:100%;
  }

  .page-hero-cta .page-hero-tel{
    justify-content:center;
    padding:6px 0;
  }
}

/* Portrait 3:4 crops, keyed to the slot index on each page. Same
   specificity as the landscape rules above, so source order wins and
   no !important is needed. */
@media(max-width:768px){
  .page-hero-bg[data-bg="0"]{background-image:var(--ph-bg-0-portrait)}
  .page-hero-bg[data-bg="1"]{background-image:var(--ph-bg-1-portrait)}
  .page-hero-bg[data-bg="2"]{background-image:var(--ph-bg-2-portrait)}
  .page-hero-bg[data-bg="3"]{background-image:var(--ph-bg-3-portrait)}
}
