/* Hero: one self-contained first-screen component. */
.hero {
  position: relative;
  isolation: isolate;
  min-height: max(640px, 100svh);
  margin-top: 0;
  overflow: hidden;
  background: #353b3a;
  color: #f7f4ee;
  font-family: Arial, Helvetica, sans-serif;
}

.hero__scene {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: #353b3a;
}

.hero__scene::before,
.hero__scene::after {
  position: absolute;
  inset: 0;
  content: "";
}

.hero__scene::before {
  inset: 0 0 0 26%;
  background: url("../img/desktop.webp") center 42% / cover no-repeat;
  /* Keep the original photographic colour; the UI palette is independent. */
  filter: brightness(.92);
}

.hero__scene::after {
  background:
    linear-gradient(0deg, #353b3a 0%, rgba(53, 59, 58, .77) 9%, transparent 37%),
    linear-gradient(90deg, #353b3a 0%, #353b3a 20%, rgba(53, 59, 58, .94) 32%, rgba(53, 59, 58, .67) 47%, rgba(53, 59, 58, .05) 74%);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .82fr);
  grid-template-rows: 1fr auto;
  width: min(calc(100% - 108px), 1320px);
  min-height: inherit;
  margin-inline: auto;
  padding-top: calc(68px + clamp(55px, 7.5svh, 94px));
}

.hero__intro {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 1;
  align-self: start;
  padding-bottom: 36px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 21px;
  color: #e5e1d9;
  font: 500 13px/1.55 Arial, Helvetica, sans-serif;
  letter-spacing: .055em;
}

.hero__eyebrow-dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border: 1px solid #f7f4ee;
  border-radius: 50%;
}

.hero__title {
  width: 123%;
  max-width: 790px;
  margin: 0;
  color: #faf7f0;
  font: 400 clamp(43px, 4.55vw, 66px)/1.15 Georgia, 'Times New Roman', serif;
  letter-spacing: -.05em;
}

.hero__title > span {
  display: block;
}

.hero__title em {
  color: #e6e1d9;
  font-weight: 400;
}

.hero__description {
  max-width: 520px;
  margin: 22px 0 0;
  color: #e3e2de;
  font: 400 15px/1.7 Arial, Helvetica, sans-serif;
}

.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 25px;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 58px;
  padding: 13px 26px;
  border: 1px solid #efebe4;
  border-radius: 999px;
  background: #efebe4;
  color: #292e2c;
  cursor: pointer;
  font: 600 15px/1.35 Arial, Helvetica, sans-serif;
  transition: background-color 220ms ease, transform 220ms ease;
}

.hero__cta:hover {
  background: #fffdf9;
  transform: translateY(-2px);
}

.hero__cta:focus-visible,
.hero__dialog button:focus-visible {
  outline: 2px solid #efebe4;
  outline-offset: 4px;
}


.hero__trust {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #f0eee9;
  font: 400 13px/1.55 Arial, Helvetica, sans-serif;
}

.hero__trust strong {
  font-weight: 600;
  color: white;
}

/* The entire client stack is real HTML: separate circular cards and a badge. */
.hero__client-stack {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  isolation: isolate;
  margin: 0;
  padding: 2px 1px 2px 0;
  list-style: none;
}

.hero__client-card,
.hero__client-badge {
  position: relative;
  display: grid;
  flex: 0 0 49px;
  place-items: center;
  width: 49px;
  height: 49px;
  margin-left: -10px;
  overflow: hidden;
  border: 2px solid #ebe8e2;
  border-radius: 50%;
  background: #a8afaa;
  box-shadow: 0 2px 7px rgba(18, 27, 20, .15);
}

.hero__client-card:first-child { margin-left: 0; }
.hero__client-card:nth-child(1) { z-index: 5; }
.hero__client-card:nth-child(2) { z-index: 4; }
.hero__client-card:nth-child(3) { z-index: 3; }
.hero__client-card:nth-child(4) { z-index: 2; }

.hero__client-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.hero__client-badge {
  z-index: 1;
  background: #8d9890;
  color: #fffdf7;
  font: 600 11px/1 Arial, Helvetica, sans-serif;
  letter-spacing: -.025em;
  white-space: nowrap;
}

.hero__portrait {
  display: none;
}

.hero__specialties {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 20px 0 24px;
  border-top: 1px solid rgba(247, 244, 238, .28);
  list-style: none;
}

.hero__specialties li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #edece8;
  font: 500 12px/1.5 Arial, Helvetica, sans-serif;
}

.hero__specialties li::before {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.hero__dialog {
  width: min(calc(100% - 32px), 460px);
  padding: 34px;
  border: 1px solid #e0dbd3;
  border-radius: 20px;
  background: #f6f3ed;
  color: #303735;
  box-shadow: 0 25px 75px rgba(0, 0, 0, .25);
  font-family: Arial, Helvetica, sans-serif;
}

.hero__dialog::backdrop {
  background: rgba(17, 22, 21, .58);
}

.hero__dialog-label {
  margin: 0 0 16px;
  color: #7a807c;
  font: italic 20px/1.2 Georgia, serif;
}

.hero__dialog h2 {
  margin: 0 32px 16px 0;
  font: 400 30px/1.2 Georgia, serif;
}

.hero__dialog p:not(.hero__dialog-label) {
  margin: 0;
  color: #646b67;
  font-size: 14px;
  line-height: 1.7;
}

.hero__dialog-close {
  position: absolute;
  top: 17px;
  right: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #646b67;
  cursor: pointer;
  font: 32px/1 Arial, Helvetica, sans-serif;
}

.hero__dialog-ok {
  min-width: 104px;
  min-height: 42px;
  margin-top: 26px;
  padding: 8px 18px;
  border: 1px solid #555f59;
  border-radius: 24px;
  background: #555f59;
  color: white;
  cursor: pointer;
  font: 500 13px Arial, Helvetica, sans-serif;
}

@media (min-width: 901px) and (max-width: 1200px) {
  .hero__inner {
    width: calc(100% - 70px);
  }

  .hero__title {
    font-size: clamp(42px, 4.55vw, 57px);
  }

  .hero__actions {
    gap: 16px;
  }
}

@media (min-width: 901px) and (max-width: 1300px) {
  .hero__trust { font-size: 12px; }
  .hero__client-card, .hero__client-badge { flex-basis: 43px; width: 43px; height: 43px; margin-left: -9px; }
  .hero__client-card:first-child { margin-left: 0; }
  .hero__client-badge { font-size: 10px; }
}

@media (min-width: 901px) and (max-height: 790px) {
  .hero__inner { padding-top: 113px; }
  .hero__intro { padding-bottom: 18px; }
  .hero__eyebrow { margin-bottom: 16px; }
  .hero__title { font-size: clamp(40px, 4.05vw, 58px); line-height: 1.12; }
  .hero__description { margin-top: 16px; line-height: 1.6; }
  .hero__actions { margin-top: 20px; }
  .hero__specialties { padding-block: 14px 17px; }
}

@media (max-width: 900px) {
  .hero {
    min-height: 0;
    margin-top: 0;
  }

  .hero__scene::before {
    display: none;
  }

  .hero__scene::after {
    background: radial-gradient(ellipse at 50% 40%, #454b49, #353b3a 70%);
  }

  .hero__inner {
    display: flex;
    flex-direction: column;
    width: min(calc(100% - 44px), 650px);
    min-height: 0;
    padding-top: 98px;
  }

  .hero__intro {
    display: contents;
  }

  .hero__eyebrow {
    order: 1;
    margin-bottom: 14px;
  }

  .hero__title {
    order: 2;
    width: 100%;
    max-width: none;
    font-size: clamp(36px, 6.3vw, 49px);
  }

  /* Clean editorial portrait: photograph and paper-coloured caption, no frame. */
  .hero__portrait {
    position: relative;
    order: 3;
    display: block;
    width: min(100%, 540px);
    margin: 21px auto 0;
    overflow: hidden;
    border: 0;
    border-radius: 7px;
    background: #f6f3ed;
    box-shadow: 0 18px 36px rgba(15, 21, 19, .20);
  }

  .hero__portrait-picture {
    display: block;
    width: 100%;
    aspect-ratio: 1.18;
    overflow: hidden;
    background: #1b211d;
  }

  .hero__portrait-picture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 24%;
  }

  .hero__portrait-caption {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 17px 22px 19px;
    color: #303834;
    background: #f6f3ed;
  }

  .hero__portrait-caption strong {
    font: 400 26px/1.16 Georgia, serif;
    letter-spacing: -.03em;
  }

  .hero__portrait-roles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
  }

  .hero__portrait-roles span {
    color: #727c74;
    font: 400 12px/1.4 Arial, Helvetica, sans-serif;
    letter-spacing: .015em;
  }

  .hero__portrait-roles span + span::before {
    content: "·";
    margin-right: 8px;
    color: #a2aaa2;
  }

  .hero__portrait-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 3px;
  }

  .hero__portrait-socials a {
    color: #475950;
    text-decoration: none;
    border-bottom: 1px solid rgba(71, 89, 80, .38);
    font: 500 12px/1.5 Arial, Helvetica, sans-serif;
    transition: color 200ms ease, border-color 200ms ease;
  }

  .hero__portrait-socials a:hover {
    color: #1c3026;
    border-color: currentColor;
  }

  .hero__portrait-socials a:focus-visible {
    outline: 2px solid #627768;
    outline-offset: 4px;
  }

  .hero__description {
    order: 4;
    margin-top: 27px;
    max-width: none;
    font-size: 14px;
  }

  .hero__actions {
    order: 5;
    margin-top: 25px;
  }

  .hero__specialties {
    order: 6;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 38px;
    gap: 19px 12px;
    padding-block: 26px 31px;
  }
}

@media (max-width: 600px) {
  .hero__inner {
    width: calc(100% - 36px);
    padding-top: 92px;
  }

  .hero__title {
    font-size: clamp(32px, 8.25vw, 44px);
    line-height: 1.16;
  }

  .hero__portrait {
    width: 100%;
    margin-inline: auto;
    border-radius: 7px;
  }

  .hero__portrait-picture {
    aspect-ratio: 1.18;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .hero__cta {
    width: 100%;
  }

  .hero__trust {
    padding-top: 4px;
  }
}

@media (max-width: 360px) {
  .hero__inner {
    width: calc(100% - 30px);
  }

  .hero__title {
    font-size: 31px;
  }

  .hero__eyebrow {
    font-size: 10px;
  }

  .hero__portrait {
    width: 100%;
  }

  .hero__portrait-caption {
    padding: 15px 18px 17px;
  }

  .hero__portrait-caption strong {
    font-size: 24px;
  }

  .hero__specialties li {
    font-size: 11px;
  }
}

/* Everything for the desktop and mobile entrance stays in this one Hero stylesheet.
   Preloader announces its completion using the single .is-ready root class. */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.is-ready) .hero__eyebrow,
  .js:not(.is-ready) .hero__title > span,
  .js:not(.is-ready) .hero__description,
  .js:not(.is-ready) .hero__actions,
  .js:not(.is-ready) .hero__portrait,
  .js:not(.is-ready) .hero__specialties li,
  .js:not(.is-ready) .hero__client-card,
  .js:not(.is-ready) .hero__client-badge {
    opacity: 0;
  }

  /* The background comes into focus as the curtain clears. */
  .js.is-ready .hero__scene::before {
    animation: hero-scene-focus 1750ms cubic-bezier(.22, 1, .36, 1) both;
  }

  .js.is-ready .hero__eyebrow,
  .js.is-ready .hero__description,
  .js.is-ready .hero__actions,
  .js.is-ready .hero__portrait {
    animation: hero-soft-entrance 850ms cubic-bezier(.22, 1, .36, 1) both;
  }

  .js.is-ready .hero__eyebrow { animation-delay: 90ms; }
  .js.is-ready .hero__description { animation-delay: 300ms; }
  .js.is-ready .hero__actions { animation-delay: 420ms; }
  .js.is-ready .hero__portrait { animation-delay: 250ms; }

  .js.is-ready .hero__title > span {
    animation: hero-title-focus 1000ms cubic-bezier(.19, 1, .22, 1) both;
  }
  .js.is-ready .hero__title > span:nth-child(1) { animation-delay: 50ms; }
  .js.is-ready .hero__title > span:nth-child(2) { animation-delay: 225ms; }
  .js.is-ready .hero__title > span:nth-child(3) { animation-delay: 405ms; }

  .js.is-ready .hero__specialties li {
    animation: hero-specialty-arrive 760ms cubic-bezier(.22, 1, .36, 1) both;
  }
  .js.is-ready .hero__specialties li:nth-child(1) { animation-delay: 690ms; }
  .js.is-ready .hero__specialties li:nth-child(2) { animation-delay: 795ms; }
  .js.is-ready .hero__specialties li:nth-child(3) { animation-delay: 900ms; }
  .js.is-ready .hero__specialties li:nth-child(4) { animation-delay: 1005ms; }

  /* Same timing and easing as the approved v16 client-card sequence. */
  .js.is-ready .hero__client-card,
  .js.is-ready .hero__client-badge {
    animation: hero-client-arrive 690ms cubic-bezier(.18, .87, .23, 1.13) both;
  }
  .js.is-ready .hero__client-card:nth-child(1) { animation-delay: 720ms; }
  .js.is-ready .hero__client-card:nth-child(2) { animation-delay: 915ms; }
  .js.is-ready .hero__client-card:nth-child(3) { animation-delay: 1110ms; }
  .js.is-ready .hero__client-card:nth-child(4) { animation-delay: 1305ms; }
  .js.is-ready .hero__client-badge { animation-delay: 1530ms; }
}

@keyframes hero-scene-focus {
  from { opacity: .55; filter: brightness(.95) blur(4px); }
  to { opacity: 1; filter: brightness(.92) blur(0); }
}

@keyframes hero-soft-entrance {
  from { opacity: 0; filter: blur(7px); transform: translate3d(0, 8px, 0); }
  to { opacity: 1; filter: blur(0); transform: none; }
}

@keyframes hero-title-focus {
  from { opacity: 0; filter: blur(12px); transform: scale(1.035); }
  to { opacity: 1; filter: blur(0); transform: scale(1); }
}

@keyframes hero-specialty-arrive {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-client-arrive {
  from { opacity: 0; transform: translate3d(10px, 8px, 0) scale(.70); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@media (max-width: 360px) {
  .hero__client-card,
  .hero__client-badge {
    flex-basis: 39px;
    width: 39px;
    height: 39px;
    margin-left: -8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scene::before,
  .hero__title > span,
  .hero__client-card,
  .hero__client-badge {
    animation: none;
  }
}
