/* Homepage hero: preserve the three-part layout, existing copy and destinations. */
body.homepage .home-hero {
  --hero-ink: var(--synapse-ink);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #f8fdff;
  font-family: Arial;
  border-bottom: 1px solid #e2f0f5;
}
body.homepage .home-hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 55%;
  height: 76%;
  top: -32%;
  right: -12%;
  border-radius: 44% 56% 67% 33% / 54% 39% 61% 46%;
  background: #eff6f8;
  transform: rotate(-15deg);
  pointer-events: none;
}
body.homepage .home-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: 30px;
  bottom: 26px;
  width: 16px;
  height: 16px;
  border: 3px solid #79e3fc;
  border-top-color: transparent;
  border-radius: 50%;
  transform: rotate(-25deg);
  opacity: .65;
  pointer-events: none;
}
body.homepage .home-hero-layout { padding: 34px 28px; }
body.homepage #content .home-hero :is(h1, h2, h3) { font-weight: 700 !important; }

/* Open typography on a light canvas, using the existing Balas palette. */
body.homepage .hero-message {
  position: relative;
  padding: 32px 26px 32px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.homepage #content .hero-message h1 { color: var(--synapse-ink); font-size: clamp(28px, 2.42vw, 38px); line-height: 1.16; letter-spacing: -.035em; text-wrap: pretty; }
body.homepage .hero-highlight { color: var(--synapse-action); }
body.homepage #content .hero-message .intro { color: #496477; font-size: 14px; line-height: 1.65; margin-top: 24px; }
body.homepage .hero-message .actions { gap: 12px; margin-top: 26px; }
html body.homepage #content .hero-message .button {
  min-height: 46px; max-width: 100%; padding: 12px 18px; gap: 14px;
  border-radius: 6px; font-size: 13px; line-height: 1.35;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
html body.homepage #content .hero-message .button:not(.secondary) { background: var(--synapse-primary) !important; border-color: var(--synapse-primary) !important; color: #fff !important; box-shadow: 0 7px 18px #0097d622; }
html body.homepage #content .hero-message .button:not(.secondary):hover { background: var(--synapse-action) !important; box-shadow: 0 9px 22px #0097d633; transform: translateY(-2px); }
html body.homepage #content .hero-message .button.secondary { background: transparent !important; border-color: #b4d9e8 !important; color: var(--synapse-ink) !important; border-radius: 999px !important; }
html body.homepage #content .hero-message .button.secondary:hover { background: var(--synapse-surface) !important; border-color: var(--synapse-primary) !important; }
html body.homepage .hero-message .button::after {
  content: none;
  display: none;
}
body.homepage #content .hero-message .hero-note { color: #496477; padding-left: 13px; border-left: 2px solid var(--synapse-accent); margin-top: 28px; font-size: 12px; line-height: 1.65; }

/* Six equal industry cards, in the original reading order. */
body.homepage .hero-expertise { padding: 18px 20px 18px 12px; background: transparent; border: 0; }
body.homepage .expertise-heading { margin-bottom: 20px; }
body.homepage .expertise-heading .eyebrow { display: flex; align-items: center; gap: 10px; color: #326580; font-size: 10px; letter-spacing: .16em; margin-bottom: 9px; }
body.homepage .expertise-heading .eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--synapse-primary); }
body.homepage #content .expertise-heading h2 { color: var(--hero-ink); font-size: 22px; line-height: 1.25; text-wrap: balance; }
body.homepage .hero-sector-grid.hero-sector-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(150px, 1fr)); gap: 12px; }
body.homepage .hero-sector-bento .hero-sector {
  display: flex; flex-direction: column; grid-column: auto; grid-row: auto; padding: 18px;
  align-items: center; justify-content: center; text-align: center;
  background: #ffffffd9; border: 1px solid #deedf3; border-radius: 12px;
  box-shadow: 0 6px 18px -12px #003c631c;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}
body.homepage .hero-sector-bento .hero-sector::after { content: none; display: none; }
body.homepage .home-hero .hero-sector-bento .hero-sector .industry-symbol {
  display: grid; place-items: center; width: 42px; height: 42px; margin: 0 0 14px; align-self: center;
  color: var(--synapse-action); background: var(--synapse-surface); border: 1px solid #d5f2fa; border-radius: 50%;
  transition: background .22s ease, color .22s ease;
}
body.homepage .home-hero .hero-sector-bento .hero-sector .industry-symbol svg { width: 26px; height: 26px; color: inherit; }
body.homepage #content .hero-sector-bento .hero-sector h3 { margin: 0 0 6px; padding: 0; font-size: 17px; line-height: 1.25; color: var(--hero-ink); }
body.homepage #content .hero-sector-bento .hero-sector p { font-size: 13px; line-height: 1.5; color: #49677c; }
body.homepage .hero-sector-bento .hero-sector:is(:hover, :focus-visible) { transform: translateY(-4px); background: #fff; border-color: #6cbcd9; box-shadow: 0 12px 24px -12px #07527d40; }
body.homepage .home-hero .hero-sector-bento .hero-sector:is(:hover, :focus-visible) .industry-symbol { background: var(--synapse-action); color: #fff; }
html body.homepage .home-hero a:focus-visible { outline: 3px solid #008fbe; outline-offset: 4px; }
html body.homepage .hero-message a:focus-visible { outline-color: var(--synapse-action); }

/* Organic photograph and fine blue contour, inspired by the reference. */
body.homepage .hero-portrait {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  align-self: stretch;
  min-height: 0;
  max-height: none;
  padding: 28px 12px 34px 10px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.homepage .hero-portrait-frame {
  position: relative;
  width: 100%;
  aspect-ratio: .78;
  max-height: 540px;
  isolation: isolate;
}
body.homepage .hero-portrait-frame::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -12px -8px 4px -12px;
  background: #e6fcff;
  border-radius: 57% 43% 42% 58% / 40% 35% 65% 60%;
  transform: rotate(6deg);
}
body.homepage .hero-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: 58% center;
  border-radius: 57% 43% 42% 58% / 40% 35% 65% 60%;
  -webkit-mask-image: none;
  mask-image: none;
}
body.homepage .hero-portrait-frame::after {
  content: '';
  position: absolute;
  inset: -10px -7px -8px -10px;
  border: 1px solid var(--synapse-primary);
  border-radius: 57% 43% 42% 58% / 40% 35% 65% 60%;
  transform: rotate(-5deg);
  opacity: .65;
  pointer-events: none;
}
body.homepage .hero-portrait::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 10px;
  left: 8%;
  width: 122px;
  height: 142px;
  border-radius: 60% 40% 62% 38%;
  background: repeating-linear-gradient(125deg, transparent 0 5px, #0097d640 5px 6px);
  transform: rotate(12deg);
  pointer-events: none;
}
body.homepage .hero-portrait::after {
  content: '';
  position: absolute;
  left: 7%;
  bottom: 7%;
  width: 82px;
  height: 60px;
  border-radius: 42% 58% 66% 34% / 38% 35% 65% 62%;
  background: var(--synapse-primary);
  opacity: .78;
  transform: rotate(18deg);
  pointer-events: none;
}

/* Reveal on entry, so mobile content animates when it is actually visible.
   Ambient movement settles within five seconds; hover remains available. */
@keyframes hero-arrive { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes hero-photo-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}
@keyframes hero-contour-sway {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(-1deg); }
}
@keyframes hero-detail-drift {
  0%, 100% { translate: 0 0; }
  50% { translate: 7px -10px; }
}
@keyframes hero-symbol-pop {
  0%, 100% { transform: rotate(0) scale(1); }
  45% { transform: rotate(-8deg) scale(1.12); }
}
@media (prefers-reduced-motion: no-preference) {
  body.homepage .home-hero .hero-reveal-pending { opacity: 0; }
  body.homepage .home-hero .hero-reveal-visible {
    animation: hero-arrive .7s var(--hero-reveal-delay, 0s) cubic-bezier(.22, 1, .36, 1) both;
  }
  body.homepage .hero-message .intro { --hero-reveal-delay: .1s; }
  body.homepage .hero-message .actions { --hero-reveal-delay: .18s; }
  body.homepage .hero-message .hero-note { --hero-reveal-delay: .26s; }
  body.homepage .hero-sector:nth-child(2) { --hero-reveal-delay: .06s; }
  body.homepage .hero-sector:nth-child(3) { --hero-reveal-delay: .12s; }
  body.homepage .hero-sector:nth-child(4) { --hero-reveal-delay: .18s; }
  body.homepage .hero-sector:nth-child(5) { --hero-reveal-delay: .24s; }
  body.homepage .hero-sector:nth-child(6) { --hero-reveal-delay: .3s; }
  body.homepage .hero-portrait.hero-reveal-visible .hero-portrait-frame {
    animation: hero-photo-float 4.8s ease-in-out;
  }
  body.homepage .hero-portrait.hero-reveal-visible .hero-portrait-frame::after {
    animation: hero-contour-sway 4.8s ease-in-out;
  }
  body.homepage .hero-portrait.hero-reveal-visible::before,
  body.homepage .hero-portrait.hero-reveal-visible::after {
    animation: hero-detail-drift 4.8s ease-in-out;
  }
  body.homepage .hero-portrait.hero-reveal-visible::after { animation-direction: reverse; }
  body.homepage .hero-sector:is(:hover, :focus-visible) .industry-symbol svg {
    animation: hero-symbol-pop .45s ease;
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body.homepage .hero-portrait-frame { transition: transform .65s cubic-bezier(.22, 1, .36, 1); }
  body.homepage .hero-portrait:hover .hero-portrait-frame { transform: translateY(-5px) rotate(1deg); }
}
/* Desktop keeps all three parts together. Cards use their content height;
   the photo receives more width, and short laptop windows use tighter spacing.
   78px accounts for the navigation and the header/hero bottom borders. */
@media (min-width: 1151px) {
  body.homepage .home-hero-layout {
    grid-template-columns: minmax(0, 31fr) minmax(0, 34fr) minmax(0, 35fr);
    min-height: min(650px, calc(100svh - 78px));
    padding: 24px 28px;
  }
  body.homepage .hero-message { padding: 16px 22px 16px 20px; }
  body.homepage .hero-expertise { padding: 12px 18px 12px 10px; justify-content: center; }
  body.homepage .expertise-heading { margin-bottom: 16px; }
  body.homepage #content .expertise-heading h2 { font-size: 20px; }
  body.homepage .hero-sector-grid.hero-sector-bento {
    flex: 0 0 auto;
    grid-template-rows: repeat(3, minmax(138px, auto));
    gap: 10px;
  }
  body.homepage .hero-sector-bento .hero-sector { padding: 12px; }
  body.homepage .home-hero .hero-sector-bento .hero-sector .industry-symbol {
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
  }
  body.homepage .home-hero .hero-sector-bento .hero-sector .industry-symbol svg { width: 23px; height: 23px; }
  body.homepage #content .hero-sector-bento .hero-sector h3 { font-size: 16px; }
  body.homepage #content .hero-sector-bento .hero-sector p { font-size: 12px; line-height: 1.4; }
  body.homepage .hero-portrait { padding: 10px 8px 10px 4px; }
  body.homepage .hero-portrait-frame { aspect-ratio: .84; max-height: min(560px, calc(100svh - 129px)); }
  body.homepage .hero-portrait::before { width: 104px; height: 124px; top: 0; }
}
@media (min-width: 1151px) and (max-height: 800px) {
  body.homepage .home-hero-layout { padding-top: 16px; padding-bottom: 16px; }
  body.homepage #content .hero-message h1 { font-size: clamp(28px, 2.3vw, 33px); }
  body.homepage #content .hero-message .intro { margin-top: 16px; font-size: 13px; line-height: 1.55; }
  body.homepage .hero-message .actions { margin-top: 18px; gap: 10px; }
  body.homepage #content .hero-message .hero-note { margin-top: 18px; }
  body.homepage .hero-expertise { padding-top: 8px; padding-bottom: 8px; }
  body.homepage .hero-sector-grid.hero-sector-bento { grid-template-rows: repeat(3, minmax(120px, auto)); }
  body.homepage .hero-sector-bento .hero-sector { padding: 10px; }
  body.homepage .home-hero .hero-sector-bento .hero-sector .industry-symbol { width: 32px; height: 32px; margin-bottom: 6px; }
  body.homepage .home-hero .hero-sector-bento .hero-sector .industry-symbol svg { width: 21px; height: 21px; }
  body.homepage #content .hero-sector-bento .hero-sector h3 { font-size: 15px; margin-bottom: 4px; }
}
/* Extra room for laptop windows with browser zoom or a shorter content area. */
@media (min-width: 1151px) and (max-height: 650px) {
  body.homepage .hero-message { padding-top: 12px; padding-bottom: 12px; }
  body.homepage .hero-expertise { padding-top: 4px; padding-bottom: 4px; }
  body.homepage .expertise-heading { margin-bottom: 12px; }
  body.homepage #content .expertise-heading h2 { font-size: 18px; }
  body.homepage .hero-sector-grid.hero-sector-bento { gap: 8px; }
  body.homepage .hero-sector-bento .hero-sector { padding: 8px; }
  body.homepage .home-hero .hero-sector-bento .hero-sector .industry-symbol { margin-bottom: 4px; }
}
@media (max-width: 1150px) {
  body.homepage .home-hero::after { display: none; }
  body.homepage .hero-message { margin-right: 20px; }
  body.homepage .hero-portrait { max-height: none; }
  body.homepage .hero-expertise { padding: 28px 0 0; }
}
@media (max-width: 760px) {
  body.homepage .home-hero-layout { padding: 16px; gap: 0; }
  body.homepage .hero-message { margin: 0; padding: 30px 8px; }
  body.homepage #content .hero-message h1 { font-size: 32px; }
  body.homepage .hero-expertise { padding: 28px 0; }
  body.homepage .hero-portrait { padding: 30px 20px 40px; }
  body.homepage .hero-portrait-frame { max-width: 420px; margin: auto; }
  body.homepage .hero-portrait::before { top: 0; left: 14%; }
  body.homepage .hero-portrait::after { left: 12%; bottom: 5%; }
  body.homepage .home-hero::after { display: none; }
}
@media (max-width: 540px) {
  body.homepage .hero-sector-grid.hero-sector-bento { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: 1fr; }
  body.homepage .hero-sector-bento .hero-sector { min-height: 160px; padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html body.homepage .home-hero *,
  html body.homepage .home-hero *::before,
  html body.homepage .home-hero *::after { animation: none !important; transition: none !important; }
}
