/* ==========================================================================
   Realhouse Management Ltd. — site styles
   Direction D "Authority".

   Palette is taken verbatim from the previous realhouse.com.mt.
   The ONLY derived value is --gold-ink: a darkened gold used for small text
   on light backgrounds, because --gold on white is 1.8:1 and fails WCAG AA.
   Everything else is the brand's own.
   ========================================================================== */

/* --------------------------------------------------------- design tokens */
:root {
  /* brand — exact values from the live site */
  --gold:          #EBBA4D;
  --gold-light:    #EDCF91;
  --charcoal:      #363636;
  --charcoal-deep: #2A2A2A;
  --grey:          #C4C4C4;
  --offwhite:      #FAFAFA;
  --white:         #FFFFFF;

  /* derived, accessibility only */
  --gold-ink:      #8C7433;   /* small gold-ish text on light grounds, 4.6:1 */
  --rule-dark:     #4A4A4A;
  --rule-light:    #E2E0DC;
  --ink-soft:      #4A4A4A;
  --ink-mute:      #9A9A9A;

  /* type */
  --font-display: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* fluid scale — replaces the 14 unrelated sizes on the old site */
  --t-hero:    clamp(2.75rem, 7.2vw, 6.5rem);
  --t-h1:      clamp(2.25rem, 5vw, 3.5rem);
  --t-h2:      clamp(1.875rem, 3.4vw, 2.875rem);
  --t-h3:      clamp(1.125rem, 1.6vw, 1.25rem);
  --t-lead:    clamp(1.0625rem, 1.5vw, 1.25rem);
  --t-body:    1.0625rem;
  --t-small:   0.9375rem;
  --t-eyebrow: 0.72rem;
  --t-micro:   0.66rem;

  /* space */
  --gutter:    clamp(1.5rem, 4.2vw, 4rem);
  --section-y: clamp(4.5rem, 9vw, 7.5rem);
  --maxw:      1440px;

  /* motion */
  --ease: cubic-bezier(0.2, 0.7, 0.25, 1);
  --dur:  0.7s;
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--offwhite);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: 300;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* Do NOT put overflow-x: hidden on body — it promotes body to the scroll
   container, which zeroes window.scrollY and breaks scroll listeners and
   any viewport-rooted IntersectionObserver. `clip` contains overflow
   without creating a scroll container. Sections that bleed (.hero,
   .services) clip their own content anyway. */
html { overflow-x: clip; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; }

a { color: inherit; }

button { font: inherit; }

/* focus — visible, gold, never removed */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 200;
  background: var(--gold);
  color: var(--charcoal-deep);
  font-family: var(--font-display);
  font-size: var(--t-eyebrow);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 1.75rem;
  transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------- utilities */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.eyebrow--on-dark { color: var(--gold); }

.rule {
  width: 84px;
  height: 4px;
  background: var(--gold);
  border: 0;
  margin: 1.5rem 0 0;
  transform-origin: left center;
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.6;
  color: var(--ink-soft);
}
.lead--on-dark { color: #E4E2DE; }

/* ---------------------------------------------------------------- button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 2.25rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.28s var(--ease), color 0.28s var(--ease),
              border-color 0.28s var(--ease), transform 0.28s var(--ease);
}
.btn--gold { background: var(--gold); color: var(--charcoal-deep); }
.btn--gold:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(250,250,250,0.45); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.is-solid,
body:not(.has-hero) .site-header {
  background: var(--charcoal-deep);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.875rem);
  min-height: 92px;
}

.brand { display: flex; align-items: center; gap: 0.875rem; text-decoration: none; flex-shrink: 0; }
.brand__mark { width: 46px; height: 46px; }
.brand__text { display: flex; flex-direction: column; gap: 2px; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--white);
}
.brand__name b { font-weight: 700; color: var(--gold); }
.brand__sub {
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0.32em;
  line-height: 1;
  color: var(--grey);
}

.nav { flex-grow: 1; display: flex; justify-content: center; }
.nav__list { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.125rem); list-style: none; }
.nav__link {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--offwhite);
  text-decoration: none;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.32s var(--ease);
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left center; }

.header__cta { flex-shrink: 0; min-height: 46px; padding: 0 1.75rem; }

/* burger */
/* scrim exists in the DOM at all widths but only participates on mobile */
.nav-scrim { display: none; }

.burger {
  display: none;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer;
  flex-shrink: 0;
}
.burger__box { display: block; width: 24px; height: 14px; position: relative; }
.burger__box span {
  position: absolute; left: 0;
  width: 100%; height: 2px;
  background: var(--offwhite);
  transition: transform 0.35s var(--ease), opacity 0.2s var(--ease);
}
.burger__box span:nth-child(1) { top: 0; }
.burger__box span:nth-child(2) { top: 6px; }
.burger__box span:nth-child(3) { top: 12px; }
.burger[aria-expanded="true"] .burger__box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__box span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  min-height: clamp(560px, 88vh, 860px);
  display: flex;
  align-items: flex-end;
  background: var(--charcoal-deep);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(42, 42, 42, 0.74);
}
.hero__inner { position: relative; width: 100%; padding-block: 10.5rem 4.5rem; }
.hero__title { font-size: var(--t-hero); color: var(--white); margin-top: 2.25rem; }
.hero__lead { margin-top: 2.5rem; max-width: 42ch; }
.hero__actions { margin-top: 3.25rem; display: flex; flex-wrap: wrap; gap: 1rem; }

.hero__emergency {
  margin-top: 4.5rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex-wrap: wrap;
  text-decoration: none;
}
.hero__dot { width: 9px; height: 9px; background: var(--gold); flex-shrink: 0; }
.hero__emergency-label {
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
}
.hero__emergency-number {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--white);
  transition: color 0.25s var(--ease);
}
.hero__emergency:hover .hero__emergency-number { color: var(--gold); }

/* page hero (inner pages) */
.page-hero {
  background: var(--charcoal-deep);
  padding-block: calc(92px + var(--section-y)) var(--section-y);
}
.page-hero__title { font-size: var(--t-h1); color: var(--white); margin-top: 1.75rem; }
.page-hero__lead { margin-top: 2.25rem; max-width: 62ch; }

.breadcrumb { font-size: var(--t-small); color: var(--ink-mute); }
.breadcrumb a { color: var(--grey); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }

/* ----------------------------------------------------------------- stats */
.stats { background: var(--gold); }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat { padding: clamp(2.75rem, 5vw, 4.25rem) clamp(1.25rem, 2.75vw, 2.75rem); }
.stat + .stat { border-left: 1px solid rgba(42, 42, 42, 0.22); }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.3vw, 4.75rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--charcoal-deep);
  font-variant-numeric: tabular-nums;
}
.stat__label {
  display: block;
  margin-top: 0.875rem;
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--charcoal);
}

/* ----------------------------------------------------------------- about */
.split { display: grid; grid-template-columns: 0.92fr 1fr; align-items: stretch; }
.split__media { position: relative; min-height: 420px; background: var(--charcoal-deep); overflow: hidden; }
.split__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split__body { padding: var(--section-y) var(--gutter); display: flex; flex-direction: column; justify-content: center; }
.split__body > * + * { margin-top: 1.75rem; }
.split__body h2 { font-size: var(--t-h2); color: var(--charcoal-deep); }

.link-underline {
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--charcoal-deep);
  text-decoration: none;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--gold);
  transition: color 0.25s var(--ease), gap 0.25s var(--ease);
}
.link-underline:hover { color: var(--gold-ink); }

/* -------------------------------------------------------------- services */
.services { position: relative; background: var(--charcoal); padding-block: var(--section-y); overflow: hidden; }
.services__watermark {
  position: absolute;
  right: -130px; top: 60px;
  width: 520px;
  opacity: 0.07;
  pointer-events: none;
}
.services__head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2.875rem;
  border-bottom: 1px solid var(--rule-dark);
}
.services__head h2 { font-size: var(--t-h2); color: var(--white); margin-top: 1.5rem; }

.services__grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.service {
  display: flex;
  flex-direction: column;
  padding: 2.875rem 2.75rem 3rem;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-dark);
  border-left: 1px solid var(--rule-dark);
  position: relative;
  transition: background-color 0.35s var(--ease);
}
.service:nth-child(3n+1) { border-left: 0; padding-left: 0; }
.service:nth-child(3n)   { padding-right: 0; }
.service::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 100%; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--ease);
}
.service:hover::before, .service:focus-visible::before { transform: scaleX(1); }
.service__num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: var(--gold);
}
.service__title {
  margin-top: 1.125rem;
  font-size: var(--t-h3);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--white);
  transition: transform 0.35s var(--ease);
}
.service:hover .service__title { transform: translateX(6px); }
.service__desc { margin-top: 0.875rem; font-size: var(--t-small); line-height: 1.62; color: var(--grey); }

.services__also {
  position: relative;
  margin-top: 3.25rem;
  display: flex;
  align-items: baseline;
  gap: 1.625rem;
  flex-wrap: wrap;
}
.services__also-label {
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  flex-shrink: 0;
}
.services__also-list { font-size: var(--t-small); color: var(--grey); }

/* ------------------------------------------------------------ testimonial */
.testimonial { background: var(--offwhite); padding-block: var(--section-y); }
.testimonial blockquote {
  margin: 0;
  max-width: 62ch;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.4vw, 1.8125rem);
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: -0.02em;
  color: var(--charcoal-deep);
  text-transform: none;
}
.testimonial cite {
  display: block;
  margin-top: 1.375rem;
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-style: normal;
  color: var(--gold-ink);
}

/* --------------------------------------------------------------- content */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.5rem; }
.prose h2 { font-size: var(--t-h2); color: var(--charcoal-deep); margin-top: 3.75rem; }
.prose h3 {
  font-size: var(--t-h3);
  color: var(--charcoal-deep);
  margin-top: 2.75rem;
  letter-spacing: 0.01em;
}
.prose ul { list-style: none; }
.prose li { position: relative; padding-left: 1.75rem; margin-top: 0.75rem; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 9px; height: 9px;
  background: var(--gold);
}
.section { padding-block: var(--section-y); }
.section--light { background: var(--offwhite); }
.section--white { background: var(--white); }

/* team */
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule-light); }
.team-card { background: var(--offwhite); padding: 2.75rem 2.5rem 3rem; }
.team-card__name { font-size: var(--t-h3); color: var(--charcoal-deep); letter-spacing: 0.01em; }
.team-card__role {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.team-card__bio { margin-top: 1.125rem; font-size: var(--t-small); line-height: 1.64; color: var(--ink-soft); }
.team-card__mail {
  display: inline-block;
  margin-top: 1.125rem;
  font-size: var(--t-small);
  color: var(--charcoal-deep);
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}

/* clients list */
.clients-list {
  columns: 3;
  column-gap: 2.5rem;
  list-style: none;
}
.clients-list li {
  break-inside: avoid;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule-light);
  font-size: var(--t-small);
}

/* ---------------------------------------------------------------- contact */
.contact { background: var(--charcoal-deep); }
.contact__grid { display: grid; grid-template-columns: 0.62fr 1fr; }
.contact__info { padding: var(--section-y) clamp(2rem,3vw,3rem) var(--section-y) 0; }
.contact__info h2 { font-size: var(--t-h1); color: var(--white); }
.contact__dl { margin: 2.75rem 0 0; }
.contact__row { display: flex; gap: 1.375rem; padding: 1.1875rem 0; border-top: 1px solid var(--rule-dark); }
.contact__row:last-child { border-bottom: 1px solid var(--rule-dark); }
.contact__row dt {
  width: 78px;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 0.25rem;
}
.contact__row dd { margin: 0; font-size: var(--t-small); line-height: 1.6; color: #E4E2DE; }
.contact__row dd a { text-decoration: none; transition: color 0.25s var(--ease); }
.contact__row dd a:hover { color: var(--gold); }
.contact__row--emergency dt { color: var(--gold); }
.contact__emergency {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
}

.contact__form-wrap { padding: var(--section-y) 0 var(--section-y) clamp(2rem,3vw,3rem); }

/* ------------------------------------------------------------------ form */
.form { margin-top: 1.625rem; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.125rem 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.field input, .field select, .field textarea {
  min-height: 48px;
  padding: 0 0.9375rem;
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: 300;
  color: var(--offwhite);
  background: var(--charcoal);
  border: 1px solid var(--rule-dark);
  border-radius: 0;
  transition: border-color 0.25s var(--ease);
}
.field textarea { padding: 0.75rem 0.9375rem; resize: vertical; min-height: 96px; line-height: 1.55; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-mute); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field select { appearance: none; background-image: none; cursor: pointer; }
.field select option { background: var(--charcoal); color: var(--offwhite); }

.form__submit { grid-column: 1 / -1; justify-self: start; }

.form__status {
  grid-column: 1 / -1;
  font-size: var(--t-small);
  padding: 0.875rem 1.125rem;
  border-left: 3px solid var(--gold);
  background: rgba(235, 186, 77, 0.08);
  color: #E4E2DE;
}
.form__status[hidden] { display: none; }
.form__status--error { border-left-color: #E06B5A; background: rgba(224, 107, 90, 0.1); }

.form__consent { grid-column: 1 / -1; font-size: 0.8125rem; line-height: 1.55; color: var(--ink-mute); }
.form__consent a { color: var(--grey); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--charcoal); color: var(--grey); padding-block: var(--section-y) 2rem; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.75rem;
  border-bottom: 1px solid var(--rule-dark);
}
.site-footer h3 {
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 1.25rem;
}
.site-footer ul { list-style: none; }
.site-footer li + li { margin-top: 0.625rem; }
.site-footer a { color: var(--grey); text-decoration: none; font-size: var(--t-small); transition: color 0.25s var(--ease); }
.site-footer a:hover { color: var(--gold); }
.site-footer p { font-size: var(--t-small); }

.social { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.social a {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule-dark);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.social a:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

.site-footer__base {
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--ink-mute);
}
.site-footer__base a { font-size: 0.8125rem; }

/* ================================================================ MOTION */
/* Elements only start hidden when JS is present, so a no-JS or
   pre-hydration render still shows everything. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

.js .reveal-rule { transform: scaleX(0); transition: transform 0.8s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal-rule.is-visible { transform: scaleX(1); }

/* Hero animates on load via keyframes, not on scroll — it is above the
   fold and must not wait for the observer. */
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes ruleIn {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes heroZoom {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}

.hero__media img { animation: heroZoom 1.8s var(--ease) both; }
.hero__inner > * { animation: rise 0.8s var(--ease) both; }
.hero__inner > *:nth-child(1) { animation-delay: 0.05s; }
.hero__inner > *:nth-child(2) { animation-delay: 0.14s; }
.hero__inner > *:nth-child(3) { animation: ruleIn 0.7s var(--ease) 0.3s both; }
.hero__inner > *:nth-child(4) { animation-delay: 0.32s; }
.hero__inner > *:nth-child(5) { animation-delay: 0.42s; }
.hero__inner > *:nth-child(6) { animation-delay: 0.54s; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .services__grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .service:nth-child(3n+1) { border-left: 1px solid var(--rule-dark); padding-left: 2.75rem; }
  .service:nth-child(3n)   { padding-right: 2.75rem; }
  .service:nth-child(2n+1) { border-left: 0; padding-left: 0; }
  .service:nth-child(2n)   { padding-right: 0; }
  .team-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .clients-list { columns: 2; }
}

@media (max-width: 900px) {
  .site-header__inner { min-height: 72px; }
  .brand__mark { width: 38px; height: 38px; }
  .brand__name { font-size: 1.125rem; }
  .burger { display: flex; }
  .header__cta { display: none; }

  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(340px, 86vw);
    background: var(--charcoal-deep);
    border-left: 1px solid var(--rule-dark);
    transform: translateX(100%);
    transition: transform 0.42s var(--ease);
    justify-content: flex-start;
    padding: 6rem 2rem 2rem;
    overflow-y: auto;
  }
  .nav.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .nav__list li { border-bottom: 1px solid var(--rule-dark); }
  .nav__link { display: block; padding: 1.125rem 0; font-size: 0.85rem; }
  .nav__link::after { display: none; }

  .nav-scrim {
    display: block;
    position: fixed; inset: 0;
    background: rgba(20,20,20,0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.42s var(--ease);
    z-index: 99;
  }
  .nav-scrim.is-open { opacity: 1; pointer-events: auto; }

  .page-hero { padding-block: calc(72px + var(--section-y)) var(--section-y); }
  .hero__inner { padding-block: 8.75rem 3.5rem; }
  .hero__title { margin-top: 1.75rem; }
  .hero__lead { margin-top: 2rem; }
  .hero__actions { margin-top: 2.5rem; }
  .hero__emergency { margin-top: 3rem; }

  .split { grid-template-columns: 1fr; }
  .split__media { min-height: 300px; }
  .split__body { padding-inline: var(--gutter); }

  .contact__grid { grid-template-columns: 1fr; }
  .contact__info { padding: var(--section-y) 0 0; }
  .contact__form-wrap { padding: 2.5rem 0 var(--section-y); }

  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .stats__grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat:nth-child(odd)  { border-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid rgba(42,42,42,0.22); }
  .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(42,42,42,0.22); }

  .services__grid { grid-template-columns: 1fr; }
  .service, .service:nth-child(3n+1), .service:nth-child(3n),
  .service:nth-child(2n+1), .service:nth-child(2n) {
    border-left: 0; padding-inline: 0;
  }

  .team-grid { grid-template-columns: 1fr; }
  .clients-list { columns: 1; }
  .form { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .hero__actions .btn { width: 100%; }
}

/* ------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal-rule { transform: scaleX(1); }
  .hero__media img { animation: none; }
}

/* ------------------------------------------------------------------ print */
@media print {
  .site-header, .burger, .nav, .hero__media, .form, .social { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .js .reveal { opacity: 1; transform: none; }
}
