/**
 * Home Page Section Styles
 * ------------------------------------------------------------
 * This file is loaded after main.css and is scoped to .index-page.
 * Keep home-only section CSS here so shared page styles stay easier to read.
 */

/* ============================================================
   Home Hero Section
   Purpose:
   - Match the approved home-screen hero reference.
   - Keep the left artwork frame, right dotted intro, and bottom CTA band separate.
   - Avoid changing hero/banner styles on service, industry, case-study, and inner pages.
============================================================ */

/* Hero spacing variable:
   This creates the requested "four-line" responsive breathing room between
   the fixed header and the hero image/text content. Edit this one value only
   when the top space needs to become larger or smaller.
*/
.index-page {
  --home-hero-top-gap: clamp(64px, 7vh, 96px);
}

/* Home page guard: prevents accidental side scroll from animated elements. */
body.index-page {
  overflow-x: hidden;
}

/* Home main wrapper: keeps the page inside the shared centered site shell. */
.index-page .main {
  overflow: hidden;
}

/* Hero shell:
   - Stays inside the same centered .main container used by the full website.
   - Removes earlier full-browser-width behavior that made the page feel disturbed.
*/
.index-page .home-hero {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: clamp(520px, 68vh, 700px);
  margin-top: var(--fixed-header-offset, 100px) !important;
  padding-top: var(--home-hero-top-gap) !important;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  overflow: hidden;
  isolation: isolate;
  background: #ffffff;
}

/* Left brand color block behind the carousel image. */
.index-page .home-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: 30%;
  background: #282d63;
  height: 70%;
}

/* Right dotted background:
   This creates the visible dot pattern shown in the reference screenshot.
   It belongs only to the Hero section and stays behind the welcome/title text.
*/
.index-page .home-hero::after {
  content: "";
  position: absolute;
  top: var(--home-hero-top-gap);
  right: 0;
  bottom: 0;
  z-index: 0;
  width: 57%;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(120, 98, 85, 0.24) 2px, transparent 2.6px);
  background-size: 18px 18px;
  background-position: 0 0;
  opacity: 1;
}

/* Hero container: fills the centered site shell without escaping it. */
.index-page .home-hero-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  padding: 0;
}

/* Hero grid: left visual column and right copy column stay independent. */
.index-page .home-hero-grid {
  display: grid;
  grid-template-columns: minmax(420px, 43%) minmax(0, 57%);
  min-height: calc(clamp(520px, 68vh, 700px) - var(--home-hero-top-gap));
}

/* Artwork column: centers the framed carousel inside the navy area.
   Only the carousel image proportions are controlled here; text sizing is unchanged. */
.index-page .home-hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 2vw, 28px) 0 clamp(18px, 2vw, 28px) clamp(24px, 3vw, 48px);
}

/* Carousel frame:
   Uses a portrait-style ratio so the engineering artwork does not look square.
   This matches the taller reference carousel without changing hero typography. */
.index-page .home-hero-carousel {
  width: min(100%, 610px);
  overflow: hidden;
  background: #ffffff;
  border: 8px solid #f28b22;
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.16);
}

/* Carousel transition: smoother than the default Bootstrap slide speed. */
.index-page .home-hero-carousel .carousel-item {
  transition: transform 1.35s ease-in-out, opacity 1.35s ease-in-out;
}

/* Carousel image:
   Fixed portrait ratio prevents the slide from becoming a square.
   object-fit: cover keeps each carousel image full-bleed inside the orange frame. */
.index-page .home-hero-slide-img {
  display: block;
  width: 100%;
  aspect-ratio: 0.82 / 1;
  height: auto;
  min-height: clamp(560px, 68vh, 760px);
  object-fit: cover;
}

/* Content column: headline block stays above the gradient CTA block. */
.index-page .home-hero-copy {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
}

/* White-to-transparent fade:
   Keeps the top dot pattern soft near the heading while still visible
   like the reference screenshot.
*/
.index-page .home-hero-copy::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.72));
}

/* Intro block:
   - Holds the welcome label and main headline together.
   - Uses a restrained right-to-left reveal that suits the corporate site style.
   - Keeps the text straight and readable throughout the animation.
*/
.index-page .home-hero-intro {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 760px;
  padding: clamp(34px, 4vw, 66px) clamp(24px, 3.2vw, 52px) clamp(24px, 3vw, 46px);
  will-change: transform, opacity;
  animation: homeHeroIntroProfessionalIn 2.1s ease-out 0.08s both;
}

/* Eyebrow row: three brand dots plus the welcome label. */
.index-page .home-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
}

/* Eyebrow dots: first and last dots use brand navy, middle dot uses black. */
.index-page .home-hero-dot {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border-radius: 50%;
  background: #282d63;
  box-shadow: 0 0 0 4px rgba(40, 45, 99, 0.08);
}

.index-page .home-hero-dot:nth-child(2) {
  background: #000000;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
}

/* Welcome label: kept separate from the main headline for easy editing. */
.index-page .home-hero-eyebrow h5 {
  margin: 0 0 0 8px;
  color: #111111;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.25;
}

/* Main hero headline: reduced professional scale for the contained layout. */
.index-page .home-hero-title {
  max-width: 720px;
  margin: 0;
  color: #080808;
  font-size: clamp(38px, 2.95vw, 46px);
  font-weight: 800;
  line-height: 1.12;
}

/* CTA band: bottom right gradient panel for summary copy and the About action. */
.index-page .home-hero-cta-band {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: clamp(210px, 27vh, 300px);
  padding: clamp(30px, 3.4vw, 52px) clamp(24px, 3.2vw, 52px);
  background: linear-gradient(100deg, #282d63 0%, #4b3f5f 36%, #e87d18 100%);
}

/* CTA inner wrapper: keeps paragraph and button aligned like the screenshot. */
.index-page .home-hero-cta-inner {
  width: min(100%, 1060px);
  will-change: transform, opacity;
  animation: homeHeroSummaryProfessionalIn 1.9s ease-out 0.42s both;
}

/* CTA summary: white text only inside the gradient panel. */
.index-page .home-hero-summary {
  max-width: 760px;
  margin: 0 0 clamp(28px, 3.8vh, 52px);
  color: #ffffff;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.52;
}

/* Hero title animation:
   A clean, professional reveal from the right side.
   No rotation is used, so the headline never looks broken or clipped. */
@keyframes homeHeroIntroProfessionalIn {
  0% {
    opacity: 0;
    transform: translateX(74px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Hero summary animation:
   The supporting line follows the headline with a shorter right-to-left reveal. */
@keyframes homeHeroSummaryProfessionalIn {
  0% {
    opacity: 0;
    transform: translateX(58px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Accessibility: remove motion for users who request reduced animation. */
@media (prefers-reduced-motion: reduce) {
  .index-page .home-hero-intro,
  .index-page .home-hero-cta-inner {
    animation: none;
    transform: none;
  }
}

/* CTA button: white pill with a navy circular arrow icon. */
.index-page .home-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-width: 230px;
  min-height: 66px;
  margin-left: 30%;
  padding: 9px 10px 9px 42px;
  border-radius: 999px;
  color: #050505;
  background: #ffffff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* CTA icon: Bootstrap icon sits in a fixed navy circle. */
.index-page .home-hero-btn i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  color: #ffffff;
  background: #282d63;
  font-size: 21px;
}

/* CTA hover: small lift only, so the reference layout does not shift. */
.index-page .home-hero-btn:hover {
  color: #050505;
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.2);
}

/* Tablet layout: stack the hero while preserving the left artwork first. */
@media (max-width: 1199px) {
  .index-page {
    --home-hero-top-gap: clamp(44px, 6vh, 72px);
  }

  .index-page .home-hero {
    min-height: auto;
  }

  .index-page .home-hero::before {
    width: 100%;
    height: 46%;
  }

  .index-page .home-hero::after {
    width: 100%;
    height: 58%;
  }

  .index-page .home-hero-grid {
    grid-template-columns: 1fr;
  }

  .index-page .home-hero-media {
    padding: 28px var(--site-gutter, 24px);
  }

  .index-page .home-hero-carousel {
    width: min(100%, 620px);
  }

  .index-page .home-hero-slide-img {
    height: clamp(470px, 78vw, 720px);
  }

  .index-page .home-hero-intro {
    padding: 44px var(--site-gutter, 24px) 34px;
  }

  .index-page .home-hero-cta-band {
    padding-right: var(--site-gutter, 24px);
    padding-left: var(--site-gutter, 24px);
  }

  .index-page .home-hero-btn {
    margin-left: 0;
  }

  .index-page .home-hero-eyebrow h5 {
    font-size: 20px;
  }

  .index-page .home-hero-title {
    font-size: 40px;
  }

  .index-page .home-hero-summary {
    font-size: 21px;
  }
}

/* Mobile layout: reduce artwork height and keep text/buttons inside the viewport. */
@media (max-width: 575px) {
  .index-page {
    --home-hero-top-gap: 32px;
  }

  .index-page .home-hero-carousel {
    border-width: 6px;
  }

  .index-page .home-hero-slide-img {
    height: clamp(360px, 118vw, 520px);
  }

  .index-page .home-hero-eyebrow {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
  }

  .index-page .home-hero-eyebrow h5 {
    flex-basis: 100%;
    margin-left: 0;
    font-size: 18px;
  }

  .index-page .home-hero-title {
    font-size: 34px;
  }

  .index-page .home-hero-summary {
    font-size: 20px;
  }

  .index-page .home-hero-btn {
    min-width: 230px;
    min-height: 64px;
    padding-left: 36px;
    font-size: 18px;
  }

  .index-page .home-hero-btn i {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    font-size: 20px;
  }
}
