/* Home-only layout. Shared templates and article typography remain unchanged. */
body.home { --home-gutter: 64px; }
body.home .site-main .container,
body.home .site-header > .container { width: min(1440px, calc(100% - var(--home-gutter))); }
.home .section, .home #directions.section { padding: 64px 0; }
.home .section-heading,
.home .digital-showcase__intro,
.home .contact-block__content { max-width: none; }
.home .section-heading { margin: 0 0 28px; }
.home .section-heading--split,
.home .digital-showcase__intro--wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: end;
  width: 100%;
}
.home .section-heading--split > .section-intro { max-width: 48ch; }
.home .section-heading--split > div,
.home .section-heading--split > .button,
.home .digital-showcase__intro--wide > .digital-showcase__copy,
.home .digital-showcase__intro--wide > .digital-showcase__cta { grid-column: auto; grid-row: auto; }
.home .section-heading--split > .button,
.home .digital-showcase__intro--wide > .digital-showcase__cta { justify-self: end; }
.home .section-heading h2,
.home #directions .section-heading h2,
.home .digital-showcase__intro h2,
.home .contact-block__content h2 {
  max-width: 28ch;
  font-size: clamp(30px, 2.5vw, 42px);
  line-height: 1.13;
  letter-spacing: -.035em;
  margin-bottom: 12px;
  text-wrap: balance;
}
.home .section-heading .eyebrow { margin-bottom: 10px; }
.home .section-intro, .home .contact-block__lead { font-size: 16px; line-height: 1.65; }
.home h3, .home p, .home small { overflow-wrap: anywhere; }
.home .hero--refined {
  padding: 56px 0;
  background: linear-gradient(90deg, rgba(4, 12, 22, .82), rgba(4, 12, 22, .58)), url('../img/homepage/hero-1920.webp') center / cover no-repeat, var(--night);
}
.home .hero__inner--refined {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.home .hero__content--refined { max-width: 660px; }
.home .hero--refined .hero__title {
  max-width: 19ch;
  font-size: clamp(38px, 3.3vw, 54px);
  line-height: 1.06;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.home .hero__lead { max-width: 50ch; font-size: 17px; line-height: 1.6; margin-bottom: 24px; }
.home .hero__eyebrow { max-width: 100%; font-size: 12px; letter-spacing: .12em; }
.home .hero__actions { gap: 12px; margin: 0; flex-wrap: wrap; }
.home .hero__visual--decision { max-width: 640px; margin: 0; }
.home .hero-decision { padding: 24px; box-shadow: 0 16px 36px rgba(2, 9, 17, .2); }
.home .hero-decision__card { min-height: 172px; padding: 20px 14px; }
.home .hero-decision__card--result { min-height: 104px; }
.home .hero-decision__icon { width: 54px; height: 54px; }
.home .hero-decision__card > strong,
.home .hero-decision__result-copy > strong { font-size: 20px; }
.home .hero-decision__card > span:last-child,
.home .hero-decision__result-copy > span { font-size: 14px; }
.home .section--metrics-refined { padding: 32px 0; margin: 0; }
.home .home-metrics-title { font-size: 20px; margin-bottom: 20px; letter-spacing: -.02em; }
.home .metrics-grid--ribbon { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.home .metric-card--refined { padding: 16px 20px; min-height: 0; }
.home .metric-card--refined strong { font-size: 36px; line-height: 1.2; }
.home .metric-card--refined span { font-size: 14px; line-height: 1.45; }
.home .home-direction-nav { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0 0 24px; color: #166078; font-weight: 600; }
.home .home-direction-nav a { text-decoration: underline; text-underline-offset: 4px; }
.home .home-engineering-links { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.home .home-engineering-link { min-height: 0; padding: 24px 44px 24px 24px; border-radius: var(--radius-md); }
.home .home-engineering-link span { font-size: 20px; line-height: 1.22; }
.home .home-engineering-link small { font-size: 15px; line-height: 1.6; }
.home .card-grid--projects, .home .journal-grid--refined { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.home .project-card--refined, .home .journal-card--refined { padding: 20px; box-shadow: 0 8px 28px rgba(11,18,32,.045); }
.home .card-grid--projects .content-card__image,
.home .journal-grid--refined .content-card__image { aspect-ratio: 3 / 2; margin-bottom: 16px; }
.home .card-grid--projects .content-card__image img { width: 100%; height: 100%; object-fit: contain; background: #f3f6f8; }
.home .journal-grid--refined .content-card__image img { width: 100%; height: 100%; object-fit: contain; }
.home .project-card--refined h3, .home .journal-card--refined h3 { display: block; overflow: visible; font-size: 21px; line-height: 1.25; padding: 0; margin: 0; }
.home .content-card__meta { color: #287087; font-size: 11px; letter-spacing: .07em; line-height: 1.65; margin: 0; }
.home .project-card--refined .content-card__excerpt,
.home .project-card__result span { display: block; overflow: visible; }
.home .content-card__excerpt, .home .project-card__result { font-size: 15px; line-height: 1.6; }
.home .project-card__result { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.home .project-card--refined .content-card__body,
.home .journal-card--refined .content-card__body { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.home .content-card__link { margin-top: auto; padding-top: 8px; }
.home .audience-grid--refined, .home .digital-grid--refined { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.home .info-card--audience, .home .digital-card { padding: 24px; min-height: 0; }
.home .info-card--audience h3, .home .digital-card h3 { max-width: none; font-size: 21px; line-height: 1.25; margin-bottom: 12px; }
.home .info-card--audience p, .home .digital-card p { max-width: none; font-size: 15px; line-height: 1.65; margin: 0; }
.home .section--digital::before { background: radial-gradient(ellipse at top right, rgba(67,164,190,.14), transparent 65%); }
.home .digital-showcase__intro--wide .digital-showcase__copy { max-width: 780px; }
.home .digital-showcase__intro--wide .digital-showcase__copy h2 { width: auto; max-width: 28ch; font-size: clamp(30px, 2.5vw, 42px); line-height: 1.13; }
.home .digital-showcase__summary { display: block; max-width: 65ch; margin: 0; line-height: 1.65; }
.home .digital-card { display: block; }
.home .process-layout { display: block; }
.home .steps-grid--refined { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.home .step-card--refined { padding: 24px; min-width: 0; }
.home .step-card--refined h3 { font-size: 20px; line-height: 1.3; }
.home .step-card--refined p { font-size: 15px; line-height: 1.65; margin: 0; }
.home .contact-block--refined { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.home #contact, .home #directions { scroll-margin-top: 104px; }
.home .contact-block__form input, .home .contact-block__form textarea { font-size: 16px; }
.home :is(a, button, input, textarea):focus-visible { outline: 3px solid #1484a3; outline-offset: 4px; }
.home .crii-max-chat-launcher__icon { font-size: 0; width: 22px; height: 22px; }
.home .crii-max-chat-launcher__icon::before {
  content: ''; width: 22px; height: 22px; background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M5 3h14a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H9l-6 4V5a2 2 0 0 1 2-2Z M7 8h10M7 12h7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.home .privacy-consent--compact { inset: auto 0 0; padding: 16px; pointer-events: none; }
.home .privacy-consent--compact .privacy-consent__dialog { pointer-events: auto; width: min(100%, 1160px); display: flex; align-items: center; gap: 28px; padding: 20px 24px; border-radius: 18px; box-shadow: 0 8px 40px rgba(7,14,24,.16); background: #fff; }
.home .privacy-consent--compact .privacy-consent__title { font-size: 18px; line-height: 1.25; margin-bottom: 6px; }
.home .privacy-consent--compact .privacy-consent__text { font-size: 14px; line-height: 1.55; }
.home .privacy-consent--compact .privacy-consent__actions { margin: 0; flex: 0 0 auto; flex-wrap: nowrap; gap: 8px; }
.home .privacy-consent--compact .privacy-consent__button { min-width: 0; min-height: 44px; padding: 12px 16px; font-size: 14px; white-space: nowrap; box-shadow: none; }
.home.has-privacy-consent .crii-max-chat-widget:not(.is-open) { visibility: hidden; }
@media (max-width: 1100px) {
  body.home { --home-gutter: 40px; }
  .home .hero__inner--refined { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  .home .hero__title { font-size: 38px; }
  .home .hero-decision { padding: 16px; }
  .home .hero-decision__card { padding: 16px 10px; }
  .home .hero-decision__card > strong, .home .hero-decision__result-copy > strong { font-size: 17px; }
  .home .menu-toggle { display: block; position: relative; flex: 0 0 48px; width: 48px; height: 48px; padding: 12px; cursor: pointer; }
  .home .menu-toggle > span:not(.screen-reader-text) { transition: transform .18s ease, opacity .18s ease; }
  .home .menu-toggle[aria-expanded='true'] > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .home .menu-toggle[aria-expanded='true'] > span:nth-child(2) { opacity: 0; }
  .home .menu-toggle[aria-expanded='true'] > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .home .site-nav { display: none; position: absolute; inset: calc(100% + 4px) 20px auto; width: auto; max-height: calc(100dvh - 100px); overflow-y: auto; padding: 16px 20px; background: #fff; box-shadow: var(--shadow); border-radius: 18px; }
  .home .site-nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .home .site-nav .menu { display: flex; flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .home .site-nav .menu a { display: flex; align-items: center; min-height: 44px; width: 100%; }
  .home .site-nav__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
  .home .site-nav__meta a { display: flex; align-items: center; min-height: 40px; }
}
@media (max-width: 1000px) {
  .home .section-heading--split, .home .digital-showcase__intro--wide { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .home .section-heading--split > .button, .home .digital-showcase__intro--wide > .digital-showcase__cta { justify-self: start; }
  .home .section-heading--split > .section-intro { max-width: 65ch; }
  .home .home-engineering-links, .home .steps-grid--refined { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home .card-grid--projects, .home .journal-grid--refined { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home .audience-grid--refined, .home .digital-grid--refined { grid-template-columns: 1fr; gap: 16px; }
  .home .contact-block--refined { gap: 32px; }
  .home .privacy-consent--compact .privacy-consent__dialog { gap: 16px; }
  .home .privacy-consent--compact .privacy-consent__actions { flex-direction: column; }
}
@media (max-width: 800px) {
  .home .hero--refined { padding: 36px 0; background-image: linear-gradient(180deg,rgba(4,12,22,.84),rgba(4,12,22,.72)),url('../img/homepage/hero-960.webp'); }
  .home .hero__inner--refined { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .home .hero__content--refined { max-width: 680px; }
  .home .hero__visual--decision { width: 100%; max-width: 640px; justify-self: start; }
  .home .hero-decision__sources { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .home .hero-decision__sources .hero-decision__card:first-child::after { content: none; }
  .home .hero-decision__flow-branch { display: block; }
  .home .hero-decision__flow-mobile { display: none; }
  .home .hero-decision__card { min-height: 0; padding: 14px 10px; gap: 6px; }
  .home .hero-decision__card--result { min-height: 0; padding: 16px; }
  .home .hero-decision__icon, .home .hero-decision__icon--result { width: 38px; height: 38px; }
  .home .hero-decision__header { margin-bottom: 16px; }
  .home .hero-decision__header h2 { font-size: 20px; }
  .home .hero-decision__header > span { display: none; }
  .home .hero-decision__flow { height: 28px; }
}
@media (max-width: 600px) {
  body.home { --home-gutter: 32px; }
  .home .section, .home #directions.section { padding: 40px 0; }
  .home .section--metrics-refined { padding: 24px 0; }
  .home .hero--refined { padding: 28px 0 32px; }
  .home .hero--refined .hero__title { font-size: clamp(30px,8vw,38px); line-height: 1.1; max-width: 100%; margin-bottom: 16px; }
  .home .hero__eyebrow { font-size: 10px; letter-spacing: .1em; padding: 8px 10px; margin-bottom: 16px; }
  .home .hero__lead { font-size: 16px; line-height: 1.55; margin-bottom: 20px; }
  .home .hero__actions { flex-direction: column; gap: 10px; }
  .home .hero__actions .button { min-height: 48px; padding: 12px 18px; }
  .home .hero-decision { padding: 14px; border-radius: 18px; }
  .home .hero-decision__card { border-radius: 12px; }
  .home .hero-decision__card > strong, .home .hero-decision__result-copy > strong { font-size: 16px; line-height: 1.25; }
  .home .hero-decision__card > span:last-child, .home .hero-decision__result-copy > span { font-size: 13px; line-height: 1.45; }
  .home .section-heading h2, .home #directions .section-heading h2, .home .digital-showcase__intro h2, .home .contact-block__content h2 { max-width: 100%; font-size: 30px; line-height: 1.15; }
  .home .section-heading { margin-bottom: 24px; }
  .home .metrics-grid--ribbon { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .home .metric-card--refined { padding: 14px; }
  .home .metric-card--refined strong { font-size: 30px; }
  .home .metric-card--refined span { font-size: 13px; }
  .home .home-metrics-title { font-size: 18px; margin-bottom: 16px; }
  .home .home-direction-nav { flex-direction: column; gap: 8px; font-size: 15px; }
  .home .home-engineering-links, .home .card-grid--projects, .home .journal-grid--refined, .home .steps-grid--refined, .home .contact-block--refined { grid-template-columns: minmax(0,1fr); }
  .home .home-engineering-links { gap: 12px; }
  .home .home-engineering-link { padding: 20px 40px 20px 20px; }
  .home .home-engineering-link span { font-size: 19px; }
  .home .project-card--refined, .home .journal-card--refined { padding: 16px; }
  .home .project-card--refined h3, .home .journal-card--refined h3 { font-size: 20px; }
  .home .info-card--audience, .home .digital-card { padding: 20px; }
  .home .steps-grid--refined { gap: 12px; }
  .home .step-card--refined { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 4px 16px; padding: 20px; }
  .home .step-card--refined > span { grid-row: 1 / 3; margin: 0; width: 40px; height: 40px; }
  .home .step-card--refined h3, .home .step-card--refined p { grid-column: 2; min-width: 0; margin: 0; }
  .home .step-card--refined h3 { font-size: 19px; }
  .home .contact-block__form { min-width: 0; }
  .home .contact-block__form form { padding: 20px; }
  .home .site-brand__mark { flex: 0 0 42px; width: 42px; }
  .home .site-brand__text strong { font-size: 19px; }
  .home .site-brand__text > span { font-size: 12px; line-height: 1.2; }
  .home .site-header__inner { gap: 10px; }
  .home .site-nav { left: 16px; right: 16px; }
  .home .crii-max-chat-widget { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
  .home.home-chat-near-action .crii-max-chat-widget:not(.is-open) { visibility: hidden; }
  .home .privacy-consent--compact { padding: 8px; }
  .home .privacy-consent--compact .privacy-consent__dialog { display: block; padding: 16px; border-radius: 16px; max-height: calc(100dvh - 24px); overflow-y: auto; }
  .home .privacy-consent--compact .privacy-consent__title { font-size: 17px; }
  .home .privacy-consent--compact .privacy-consent__text { font-size: 13px; }
  .home .privacy-consent--compact .privacy-consent__actions { flex-direction: row; margin-top: 12px; gap: 8px; }
  .home .privacy-consent--compact .privacy-consent__button { width: auto; flex: 1 1 auto; padding: 10px 12px; font-size: 13px; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .home .menu-toggle > span { transition: none; }
}
