/* P09: shared directory hero treatment. Home retains its own motion and controls. */
:is(body.directory-editorial, body[data-page="about"], body[data-page="services"], body[data-page="contact"]) .inner-hero,
html[dir="ltr"] .inner-hero,
body[data-page="home"] #hero.hero {
  --bonyan-hero-shade: linear-gradient(var(--bonyan-hero-shade-angle, 90deg),rgba(3,17,31,0) 0%,rgba(3,17,31,0) 12%,rgba(3,17,31,.03) 28%,rgba(3,17,31,.28) 48%,rgba(3,17,31,.78) 72%,rgba(3,17,31,.97) 100%);
}

:is(body.directory-editorial, body[data-page="about"], body[data-page="services"], body[data-page="contact"]) .inner-hero .inner-hero-bg {
  opacity: 1;
  background-image: var(--bonyan-hero-shade), url('assets/hero-concept.webp');
}

:is(body.directory-editorial, body[data-page="about"], body[data-page="services"], body[data-page="contact"]) .inner-hero-content > p {
  max-width: 1120px;
}

body[data-page="home"] #hero .hero-shade {
  background: var(--bonyan-hero-shade);
  mask-image: none;
  transform: none;
}

body:is([data-page="about"], [data-page="services"], [data-page="contact"]) .inner-hero-content {
  text-align: start;
}

body:is([data-page="about"], [data-page="services"], [data-page="contact"]) .inner-hero-content > :is(h1, p) {
  text-wrap: balance;
  overflow-wrap: anywhere;
}

@media (min-width: 601px) {
  body:is([data-page="about"], [data-page="services"], [data-page="contact"]) .inner-hero-content {
    /* The unchanged gradient is darker on the right in both languages. */
    margin-left: auto;
    max-inline-size: clamp(640px, 56%, 900px);
    /* Bottom alignment keeps the reference inset; leave room for wrapped copy above it. */
    padding-block-start: 8px;
  }

  body:is([data-page="about"], [data-page="services"], [data-page="contact"]) .inner-hero-content > h1 {
    font-size: clamp(36px, 4.2vw, 58px);
  }
}

@media (min-width: 981px) {
  body[data-page="home"] #hero.hero {
    display: flex;
    align-items: flex-end;
    height: auto;
    min-height: calc(var(--header-height) + 370px);
  }

  body[data-page="home"] #hero .hero-content {
    width: 100%;
    max-width: none;
    padding: calc(var(--header-height) + 95px) clamp(24px, 6vw, 105px) 124px;
    text-align: start;
  }

  body[data-page="home"] #hero .hero-content > :is(h2,h1:where(.hero-title)) {
    max-width: 950px;
    margin: 17px 0;
    font-size: clamp(39px, 5vw, 70px);
    line-height: 1.13;
  }

  body[data-page="home"] #hero .hero-content > p {
    max-width: 1120px;
    margin: 0;
    font-size: 19px;
    line-height: 1.8;
  }

  body[data-page="home"] #hero .hero-buttons { margin-top: 22px; }
  body[data-page="home"] #hero .hero-annotation { margin-top: 20px; }
}

/* English mirrors the scene and shade on separate layers. */
html[dir="ltr"] .inner-hero,
html[dir="ltr"] body[data-page="home"] #hero.hero {
  --bonyan-hero-shade-angle: 270deg;
}

html[dir="ltr"] .inner-hero > .inner-hero-bg {
  background-image: url('assets/hero-concept.webp');
}

html[dir="ltr"] .inner-hero > .inner-hero-bg,
html[dir="ltr"] body[data-page="home"] #hero > .hero-bg {
  /* Use 1 for a custom image whose lettering must stay in its original orientation. */
  scale: var(--bonyan-hero-photo-scale-x, -1) 1;
}

html[dir="ltr"] body[data-page="home"] #hero > .blueprint {
  scale: -1 1;
}

html[dir="ltr"] .inner-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--bonyan-hero-shade);
  pointer-events: none;
}

html[dir="ltr"] .inner-hero > .inner-hero-content,
html[dir="ltr"] body[data-page="home"] #hero .hero-content {
  direction: ltr;
  text-align: left;
  margin-inline: 0 auto;
  max-inline-size: clamp(460px, 52%, 900px);
}

html[dir="ltr"] .inner-hero > .inner-hero-content {
  z-index: 1;
}

html[dir="ltr"] .inner-hero > .inner-hero-content,
html[dir="ltr"] body[data-page="home"] #hero .hero-content > :is(.eyebrow, h2, h1:where(.hero-title), p) {
  text-shadow: 0 1px 4px #03111f, 0 2px 14px #03111fb3;
}

html[dir="ltr"] .inner-hero > .inner-hero-content > :is(h1, p),
html[dir="ltr"] body[data-page="home"] #hero .hero-content > :is(h2, h1:where(.hero-title), p) {
  text-wrap: balance;
  overflow-wrap: anywhere;
}

html[dir="ltr"] body[data-page="home"] #hero .hero-content > :is(h2,h1:where(.hero-title)) em {
  background: none;
  color: var(--copper2);
}

@media (min-width: 601px) {
  html[dir="ltr"] .inner-hero > .inner-hero-content {
    padding-block-start: 8px;
  }

  html[dir="ltr"] body[data-page="home"] #hero .hero-content {
    padding-inline: clamp(24px, 6vw, 105px);
  }
}

body[data-page="home"] :is(.home-service-journey, .journey-steps) {
  --home-card-radius: 20px;
  --home-card-border: #ad825b65;
  --home-card-shadow: 0 10px 28px #081b300e;
}

body[data-page="home"] :is(.home-service-panel .service-content > b, .journey-step > span, .home-service-progress > strong) {
  display: inline-grid;
  place-items: center;
  justify-self: start;
  min-inline-size: 44px;
  min-block-size: 34px;
  padding-inline: 10px;
  border: 1px solid #ad825b8c;
  border-radius: 999px;
  background: #102e4d;
  color: #f1bc8d;
  direction: ltr;
  font: 600 14px/1 Outfit, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.journey-steps { position: relative; isolation: isolate; gap: clamp(18px, 2.2vw, 34px); }
.journey-steps::before { content: ''; position: absolute; z-index: -1; top: 160px; inset-inline: 6%; height: 1px; background: linear-gradient(90deg, transparent, #ad825bb3, transparent); }
body[data-page="home"] .steps .journey-step {
  min-width: 0;
  position: relative;
  padding: clamp(20px, 2.1vw, 28px);
  border: 1px solid var(--home-card-border);
  border-radius: var(--home-card-radius);
  background: #fffcf6;
  box-shadow: var(--home-card-shadow);
  transition: transform 450ms, box-shadow 450ms, border-color 450ms;
}
body[data-page="home"] .journey-visual { margin-block: 14px 18px; background: radial-gradient(ellipse at center, #244561, #081b30 82%); border: 1px solid #ad825b55; border-radius: 14px; overflow: hidden; }
.journey-visual svg { display: block; width: 100%; height: auto; transition: transform 500ms; }
.journey-visual path, .journey-visual circle { fill: none; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.journey-grid { stroke: #92b1c23b; stroke-width: .7 !important; }
.journey-structure { stroke: #d6e1e8; }
.journey-accent, .journey-check { stroke: var(--copper2); }
.journey-ring { stroke: #d39a6877; }
body[data-page="home"] .journey-step h3 { color: var(--navy); font-size: clamp(22px, 2vw, 27px); line-height: 1.4; margin-block: 0 8px; }
body[data-page="home"] .journey-step p { color: #405568; margin-bottom: 0; }
[data-reveal].is-revealed { animation: bonyan-section-reveal 650ms cubic-bezier(.22, 1, .36, 1) both; animation-delay: var(--reveal-delay, 0ms); }
@keyframes bonyan-section-reveal { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@media (hover: hover) and (pointer: fine) {
  body[data-page="home"] .steps .journey-step:hover { transform: translateY(-2px); border-color: #b5855d; box-shadow: 0 14px 32px #081b3017; }
  .journey-step:hover svg { transform: scale(1.025); }
}
@media (max-width: 600px) {
  .journey-steps::before { top: 80px; bottom: 80px; inset-inline: 50% auto; width: 1px; height: auto; background: #ad825b80; }
  .journey-visual { max-width: 420px; margin-inline: auto; }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal].is-revealed, .steps .journey-step, .journey-visual svg { animation: none !important; transition: none !important; transform: none !important; translate: none !important; }
}
