/* ==========================================================================
   Showpiece sections — custom builds (HTML widget / custom code in Elementor)
   1. .hero          — scroll-driven "window" hero
   2. .matcher       — Property Matcher
   3. .journey       — pinned selling journey
   Content lives in markup; motion lives in /assets/js/*.js
   ========================================================================== */

/* ---------- 1. HERO ---------- */
.hero { position: relative; height: 210vh; background: var(--blue-night); }
.hero-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; }
.hero-media {
  position: absolute; inset: 0; overflow: hidden;
  clip-path: inset(var(--hero-inset, 0%) var(--hero-inset, 0%) var(--hero-inset, 0%) var(--hero-inset, 0%) round var(--hero-radius, 0px));
  will-change: clip-path;
}
.hero-media video, .hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--hero-scale, 1)); will-change: transform; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(1, 42, 73, .35) 0%, rgba(1, 42, 73, .15) 40%, rgba(1, 42, 73, .82) 100%); opacity: var(--hero-shade, 1); }
.hero-content { position: relative; z-index: 2; color: #fff; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); transform: translateY(var(--hero-lift, 0px)); opacity: var(--hero-fade, 1); padding-top: 90px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 14px; font-size: .8rem; letter-spacing: .3em; text-transform: uppercase; margin-bottom: 28px; color: #fff; }
.hero-eyebrow::before { content: ""; width: 40px; height: 1px; background: var(--red); }
.hero-headline { font-size: clamp(3rem, 7.2vw, 7.2rem); line-height: .94; letter-spacing: -.03em; max-width: 1080px; }
.hero-headline em { font-style: italic; color: var(--blue); white-space: nowrap; }
/* Extra room round each word so italic letters that lean past their box (e.g. the "t" in East) are not shaved off by the reveal mask; the matching negative margin keeps spacing unchanged */
.hero-headline .word { display: inline-block; overflow: hidden; vertical-align: top; padding: .04em .16em .12em .08em; margin: -.04em -.16em -.12em -.08em; }
.hero-headline .word > span { display: inline-block; transform: translateY(125%); transition: transform 1.2s var(--ease); }
.hero.is-ready .hero-headline .word > span { transform: none; }
.hero-sub { font-size: clamp(1.1rem, 1.6vw, 1.4rem); line-height: 1.5; max-width: 640px; margin-top: 30px; color: rgba(255, 255, 255, .88); opacity: 0; transform: translateY(20px); transition: opacity 1s var(--ease) .7s, transform 1s var(--ease) .7s; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 38px; opacity: 0; transform: translateY(20px); transition: opacity 1s var(--ease) .9s, transform 1s var(--ease) .9s; }
.hero.is-ready .hero-sub, .hero.is-ready .hero-actions { opacity: 1; transform: none; }
.hero-badge { position: absolute; z-index: 3; right: var(--gutter); top: 50%; width: clamp(110px, 12vw, 170px); transform: translateY(-50%) rotate(var(--badge-rot, 0deg)) scale(var(--badge-scale, 1)); filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .35)); opacity: 0; transition: opacity 1s var(--ease) 1.1s; }
.hero.is-ready .hero-badge { opacity: 1; }
.hero-badge img { width: 100%; height: auto; }
.hero-scroll { position: absolute; z-index: 3; left: 50%; bottom: 30px; transform: translateX(-50%); color: #fff; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 12px; opacity: var(--hero-fade, 1); text-decoration: none; }
/* The text column can run to the bottom of the hero, so the cue sits in the clear bottom-right corner */
.hero .hero-scroll { left: auto; right: var(--gutter); transform: none; }
.hero-scroll::after { content: ""; width: 1px; height: 48px; background: linear-gradient(#fff, transparent); animation: scrollCue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes scrollCue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
/* Statement revealed inside the shrinking window */
.hero-statement { position: absolute; z-index: 2; left: 0; right: 0; bottom: 9vh; text-align: center; color: #fff; padding: 0 var(--gutter); opacity: var(--statement-in, 0); transform: translateY(calc((1 - var(--statement-in, 0)) * 30px)); pointer-events: none; }
.hero-statement p { font-size: clamp(1.4rem, 3vw, 2.6rem); font-style: italic; line-height: 1.2; max-width: 900px; margin: 0 auto; }
.hero-statement small { display: block; margin-top: 14px; font-style: normal; font-size: .78rem; letter-spacing: .3em; text-transform: uppercase; color: var(--blue); }
/* Inner pages: same showpiece, shorter scroll and a headline sized for longer titles */
.hero--inner { height: 185vh; }
.hero--inner .hero-headline { font-size: clamp(2.8rem, 5.8vw, 5.8rem); line-height: .98; max-width: 1000px; }
.hero--inner .hero-sub { max-width: 680px; }
.hero--inner .hero-media::after { background: linear-gradient(180deg, rgba(1, 42, 73, .55) 0%, rgba(1, 42, 73, .45) 40%, rgba(1, 42, 73, .9) 100%); }
.hero-breadcrumbs { margin-bottom: 22px; }
/* Keep the headline and text clear of the awards badge, which sits mid-right on larger screens */
@media (min-width: 901px) { .hero-content { padding-right: calc(var(--gutter) + clamp(110px, 12vw, 170px) + 28px); } }
@media (min-width: 641px) and (max-width: 900px) { .hero-content { padding-right: calc(var(--gutter) + 112px); } }
@media (max-width: 900px) {
  .hero { height: 170vh; }
  .hero--inner { height: 155vh; }
  .hero-badge { top: auto; bottom: 110px; right: 20px; width: 92px; }
}
@media (max-width: 640px) {
  .hero-content { padding-top: 60px; }
  .hero-headline { font-size: clamp(2rem, 10.5vw, 2.65rem); }
  .hero-headline em { white-space: normal; }
  .hero-eyebrow { letter-spacing: .16em; font-size: .7rem; }
  .hero-eyebrow::before { display: none; }
  .hero-sub { font-size: 1rem; margin-top: 16px; }
  .hero-actions { margin-top: 22px; gap: 10px; }
  .hero-scroll { display: none; }
  /* Phones: inner-page photos are landscape, so show them in a square window
     under the header (not a tall strip) and set the text below it on navy.
     The home page video suits the full-screen crop, so it keeps it. */
  .hero-sticky { top: 70px; height: calc(100vh - 70px); height: calc(100svh - 70px); }
  .hero-sticky { align-items: flex-end; }
  .hero-content { padding-top: 0; padding-bottom: 28px; }
  .hero--inner .hero-media { bottom: auto; height: 100vw; max-height: 62%; }
  .hero--inner .hero-media::after { background: linear-gradient(180deg, rgba(1, 42, 73, .1) 0%, rgba(1, 42, 73, .25) 55%, rgba(1, 42, 73, 1) 100%); }
  .hero--inner .hero-headline { font-size: clamp(1.8rem, 9vw, 2.3rem); }
  .hero-badge { top: 14px; bottom: auto; right: 14px; width: 64px; transform: rotate(var(--badge-rot, 0deg)) scale(var(--badge-scale, 1)); }
  .hero--inner .hero-statement { top: calc(min(100vw, 62%) + 32px); bottom: auto; }
}
@media (max-width: 400px) {
  .hero-badge { width: 50px; top: 10px; right: 10px; }
  .hero-headline, .hero-eyebrow { padding-right: 52px; }
  .hero-eyebrow { font-size: .62rem; letter-spacing: .12em; margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero-sticky { position: relative; min-height: 100vh; }
  .hero-headline .word > span, .hero-sub, .hero-actions, .hero-badge { transform: none; opacity: 1; }
  .hero-statement { display: none; }
}

/* ---------- 2. PROPERTY MATCHER ---------- */
.matcher { background: var(--blue-night); color: #fff; position: relative; overflow: hidden; }
.matcher::before { content: ""; position: absolute; width: 900px; height: 900px; right: -300px; top: -300px; border-radius: 50%; background: radial-gradient(circle, rgba(1, 104, 179, .55), transparent 65%); pointer-events: none; }
.matcher .wrap { position: relative; }
.matcher-layout { display: flex; gap: clamp(32px, 5vw, 80px); align-items: flex-start; }
.matcher-panel { flex: 0 0 400px; position: sticky; top: 110px; display: flex; flex-direction: column; gap: 6px; }
.matcher-results { flex: 1 1 0; min-width: 0; }
.matcher-q { border: 0; margin: 0; padding: 22px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); display: flex; flex-direction: column; gap: 14px; }
.matcher-q legend { padding: 0; font-size: .76rem; letter-spacing: .26em; text-transform: uppercase; color: var(--blue); display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.matcher-q-num { width: 24px; height: 24px; border-radius: 50%; border: 1px solid currentColor; display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; letter-spacing: 0; }
.matcher-options { display: flex; flex-wrap: wrap; gap: 8px; }
.matcher-option { position: relative; }
.matcher-option input { position: absolute; opacity: 0; pointer-events: none; }
.matcher-option span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 40px; font-size: 1.05rem; cursor: pointer; transition: background .25s, border-color .25s, color .25s; user-select: none; }
.matcher-option span:hover { border-color: #fff; }
.matcher-option input:checked + span { background: #fff; color: var(--blue); border-color: #fff; }
.matcher-option input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.matcher-option[hidden] { display: none; }
.matcher-reset { align-self: flex-start; margin-top: 18px; background: none; border: 0; color: rgba(255, 255, 255, .7); font-size: .9rem; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .3); }
.matcher-reset:hover { color: #fff; }

.matcher-summary { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.matcher-count { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.1; }
.matcher-count em { color: var(--blue); }
.matcher-tabs { display: flex; gap: 6px; background: rgba(255, 255, 255, .08); padding: 5px; border-radius: 40px; }
.matcher-tab { background: none; border: 0; color: #fff; padding: 9px 18px; border-radius: 40px; font-size: 1rem; cursor: pointer; transition: background .25s, color .25s; }
.matcher-tab.is-active { background: #fff; color: var(--blue); }

.match-list { display: flex; flex-direction: column; gap: 18px; }
.match-card { display: flex; background: #fff; color: var(--ink); border-radius: var(--radius); overflow: hidden; position: relative; transition: transform .6s var(--ease), opacity .5s var(--ease), box-shadow .4s; }
.match-card:hover { box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.match-card.is-filtered { display: none; }
.match-card.is-weak { opacity: .55; }
.match-card-media { flex: 0 0 38%; position: relative; min-height: 230px; overflow: hidden; }
.match-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.match-card:hover .match-card-media img { transform: scale(1.05); }
.match-card-body { flex: 1 1 0; min-width: 0; padding: 26px 28px; display: flex; flex-direction: column; gap: 8px; }
.match-card-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.match-card .property-title { font-size: 1.3rem; }
.on-dark .match-card p { color: var(--muted); }
.on-dark .match-card .property-price { color: var(--blue); }
.match-score { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 78px; height: 78px; border-radius: 50%; background: conic-gradient(var(--red) calc(var(--score, 0) * 1%), var(--grey) 0); position: relative; transition: --score .8s; }
.match-score::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.match-score b, .match-score small { position: relative; font-weight: 400; line-height: 1; }
.match-score b { font-size: 1.45rem; color: var(--ink); }
.match-score small { font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.match-score[hidden] { display: none; }
.match-reasons { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.match-reasons li { font-size: .88rem; padding: 5px 11px; border-radius: 30px; background: var(--blue-soft); color: var(--blue-deep); }
.match-reasons li.miss { background: #FDECEC; color: var(--red-dark); }
.match-best { position: absolute; top: 18px; left: 18px; z-index: 2; background: var(--red); color: #fff; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; padding: 8px 12px; border-radius: 2px; display: none; }
.match-card.is-best .match-best { display: block; }
.match-card .property-status { top: auto; bottom: 18px; }
.match-card .property-meta { margin-top: auto; }
.match-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.match-empty { display: none; padding: 40px; border: 1px dashed rgba(255, 255, 255, .3); border-radius: var(--radius); text-align: center; }
.match-empty.show { display: block; }
.match-empty a { color: #fff; }

@media (max-width: 1000px) {
  .matcher-layout { flex-direction: column; }
  .matcher-panel { position: static; flex: 1 1 auto; width: 100%; }
}
@media (max-width: 640px) {
  .match-card { flex-direction: column; }
  .match-card-media { flex: 0 0 auto; min-height: 0; aspect-ratio: 16 / 10; }
  .match-score { width: 64px; height: 64px; }
}

/* ---------- 3. JOURNEY ---------- */
.journey { background: var(--paper); }
.journey-layout { display: flex; gap: clamp(40px, 6vw, 110px); align-items: flex-start; }
.journey-intro { flex: 0 0 38%; position: sticky; top: 140px; display: flex; flex-direction: column; gap: 22px; }
.journey-counter { display: flex; align-items: baseline; gap: 10px; margin-top: 20px; color: var(--blue); }
.journey-counter-current { font-size: clamp(5rem, 10vw, 9rem); line-height: .8; font-style: italic; min-width: 1.2ch; }
.journey-counter-total { font-size: 1.4rem; color: var(--muted); }
.journey-steps { flex: 1 1 0; min-width: 0; position: relative; padding-left: 56px; display: flex; flex-direction: column; }
.journey-track { position: absolute; left: 13px; top: 10px; bottom: 10px; width: 2px; background: var(--grey); }
.journey-progress { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: linear-gradient(var(--blue), var(--red)); transform-origin: top; transform: scaleY(var(--journey-progress, 0)); }
.journey-step { position: relative; padding: 0 0 clamp(60px, 9vh, 110px); opacity: .32; transition: opacity .6s var(--ease); }
.journey-step:last-child { padding-bottom: 0; }
.journey-step::before { content: ""; position: absolute; left: -51px; top: 8px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--grey); transition: border-color .4s, background .4s, transform .4s var(--ease); }
.journey-step.is-active, .journey-step.is-past { opacity: 1; }
.journey-step.is-active::before { border-color: var(--red); background: var(--red); transform: scale(1.25); }
.journey-step.is-past::before { border-color: var(--blue); background: var(--blue); }
.journey-step-label { font-size: .76rem; letter-spacing: .26em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; display: block; }
.journey-step h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 16px; }
.journey-step p { font-size: 1.2rem; color: var(--muted); max-width: 560px; }
.no-js .journey-step { opacity: 1; }
@media (max-width: 900px) {
  .journey-layout { flex-direction: column; }
  .journey-intro { position: static; flex: 1 1 auto; }
  .journey-counter { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .journey-step { opacity: 1; }
}

/* Very small, short phones (e.g. iPhone SE 1st gen): drop the services line and intro paragraph so the headline and postcode card fit */
@media (max-width: 400px) and (max-height: 620px) { .hero:not(.hero--inner) .hero-eyebrow, .hero:not(.hero--inner) .hero-sub { display: none; } }
