/* Shared by the law and real estate pages: the contact form's sending states, and the scroll-led motion.
   Colours come from each page's own :root (--red is red on law, gold on real estate). */

/* Contact form: WhatsApp button, status line, spam trap */
form .btn-wa { margin-top: 0; background: transparent; border-color: var(--line-l); color: var(--paper); }
form .btn-wa:hover { border-color: var(--paper); }
form .btn-wa svg { width: 18px; height: 18px; }
form .btn-wa:hover svg { transform: none; }
form .status { grid-column: 1 / -1; margin: 0; font-size: 14px; line-height: 1.45; color: var(--paper); }
form .status:empty { display: none; }
form .status.bad { color: #ffab9d; }
form button[disabled] { opacity: .6; cursor: default; }
form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Section numbers on the law page's labels */
.label b { font-weight: 500; color: var(--ink); }
.closing .label b, .contact .label b { color: var(--paper); }

/* Headings rise line by line out of a mask. Each mask is padded so descenders and italic overhangs are not cut,
   and the padding is taken back in the margins so the line spacing stays exactly as set. (Negative margins of
   neighbours collapse to the larger one, so all of it sits on the bottom edge, except at the two ends.) */
.kb-l-mask, .kb-mask-l-mask { padding: .1em .14em .2em; margin: 0 -.14em -.3em; }
.kb-l-mask:first-child, .kb-mask-l-mask:first-child { margin-top: -.1em; }
.kb-l-mask:last-child, .kb-mask-l-mask:last-child { margin-bottom: -.2em; }

/* Hero depth: the outline behind the portrait drifts on scroll */
.portrait::before { translate: 0 var(--py, 0px); }

/* Five steps: the line is drawn by the scroll, and each step lights as the line reaches it */
.steps.scrub .bar { transition: none; width: 100%; transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
.steps.scrub .step::before { transition-delay: 0s; }
.steps.scrub .step:not(.lit)::before { background: var(--ink); border-color: rgba(244, 239, 231, .5); }
.steps.scrub .step > * { opacity: .32; transition: opacity .5s var(--ease); }
.steps.scrub .step.lit > * { opacity: 1; }
@media (max-width: 860px) {
  .steps.scrub .bar { width: 1px; height: 100%; transform: scaleY(var(--p, 0)); transform-origin: 50% 0; }
}
/* The hold: the section sticks (its top is set by the script) while the page scrolls the holder's extra length */
.kb-hold.on > section { position: sticky; }
.kb-hold.on::after { content: ""; display: block; height: 85vh; }

/* Law: a quiet section rail at the right edge (wide screens with a mouse) */
.rail { position: fixed; right: 14px; top: 50%; z-index: 40; translate: 0 -50%; display: none; flex-direction: column; align-items: flex-end; gap: 6px; color: var(--ink); transition: color .4s var(--ease); }
.rail.dark { color: var(--paper); }
@media (min-width: 1180px) and (hover: hover) and (pointer: fine) { .rail { display: flex; } }
.rail a { position: relative; display: flex; align-items: center; justify-content: flex-end; width: 44px; height: 22px; text-decoration: none; }
.rail a i { width: 14px; height: 1px; background: currentColor; opacity: .5; transition: width .5s var(--ease), opacity .3s, background .3s; }
.rail a.on i { width: 34px; height: 2px; opacity: 1; background: var(--red); }
.rail a:hover i, .rail a:focus-visible i { width: 34px; opacity: 1; }
.rail a span { position: absolute; right: 52px; top: 50%; translate: 8px -50%; padding: 8px 12px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), translate .4s var(--ease); }
.rail.dark a span { background: var(--paper); color: var(--ink); }
.rail a:hover span, .rail a:focus-visible span { opacity: 1; translate: 0 -50%; }
.rail a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }

/* Real estate: more than one photograph per listing */
.ls-ph img.g { position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease); }
.ls-ph img.g.on { opacity: 1; }
.ls:not(.js) .ls-ph img.g { display: none; }
.ls-ph.multi { cursor: pointer; }
.ls-more { position: absolute; right: 14px; bottom: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 10px; padding: 11px 14px; border: 0; border-radius: 999px; background: rgba(21, 30, 27, .74); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--paper); font: 500 12px/1 var(--sans); letter-spacing: .1em; font-variant-numeric: tabular-nums; cursor: pointer; transition: transform .3s var(--ease); }
.ls-more svg { width: 14px; height: 14px; }
.ls-more:active { transform: scale(.94); }
.ls-more:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

/* Real estate: a gold disc follows the pointer over a listing photograph that has more to show */
.kb-cur { position: fixed; left: 0; top: 0; z-index: 80; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; background: var(--red); color: var(--ink); display: grid; place-items: center; text-align: center; font: 500 11px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; pointer-events: none; }
.kb-cur b { font-weight: inherit; }
.kb-disc .ls-ph.multi, .kb-disc .ls-ph.multi .ls-more { cursor: none; }
