/* ==========================================================================
   ZYDEX HOMEPAGE STYLES
   --------------------------------------------------------------------------
   Layout and styling specific to index.html only. Relies on tokens and
   components defined in zydex-design-system.css and zydex-components.css.
   ========================================================================== */

/* -----------------------------------------------------------------------
   HERO
   v2.1: one large rounded "hero card" (see .zx-hero__card) holds both
   the text area and the image panel — the section itself is just a
   transparent wrapper with top clearance for the fixed nav and generous
   margin so the light-grey page background shows around the card.
   ----------------------------------------------------------------------- */
.zx-hero {
  position: relative;
  padding-top: calc(var(--zx-space-4xl) + 1rem);
}

.zx-hero__card {
  display: flex;
  flex-direction: column;
  gap: var(--zx-space-xl);
}

.zx-hero__intro {
  max-width: 780px;
}

.zx-hero__eyebrow {
  color: var(--zx-color-accent-dark);
  margin-bottom: var(--zx-space-lg);
}

.zx-hero__heading {
  color: var(--zx-color-text-primary);
  max-width: 16ch;
  margin-bottom: var(--zx-space-lg);
}

.zx-hero__body {
  position: relative;
  max-width: 46ch;
  padding-left: var(--zx-space-md);
  border-left: 1px solid var(--zx-color-border);
  color: var(--zx-color-text-secondary);
  font-size: var(--zx-fs-body-lg);
  margin-bottom: var(--zx-space-xl);
}

.zx-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zx-space-md);
}

/* Guarantee comfortable full-width buttons on the smallest phones
   rather than relying on organic wrapping, which can still squeeze two
   short-ish buttons onto one cramped row. */
@media (max-width: 399px) {
  .zx-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .zx-hero__actions .zx-btn {
    width: 100%;
    justify-content: center;
  }
}

.zx-hero__media {
  position: relative;
  width: 100%;
  height: 48vh;
  min-height: 340px;
  max-height: 620px;
}

.zx-hero__media video,
.zx-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The image sits inside the rounded card frame with no text overlaid
     on it, so composition is balanced rather than biased toward a
     headline-safe corner. Re-check once real photography replaces the
     placeholder. */
  object-position: center 40%;
  /* A single, restrained load-in moment — the image settles from a
     slight scale rather than arriving static. Not a looping effect. */
  animation: zx-hero-settle 2.4s var(--zx-ease-out) both;
}

@keyframes zx-hero-settle {
  from {
    transform: scale(1.05);
  }
  to {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .zx-hero__media video,
  .zx-hero__media img {
    animation: none;
  }
}

.zx-hero__scroll-cue {
  display: flex;
  align-items: center;
  gap: var(--zx-space-sm);
  justify-content: center;
  padding-block: var(--zx-space-lg);
  color: var(--zx-color-text-muted);
  font-size: var(--zx-fs-small);
}

.zx-hero__scroll-line {
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, var(--zx-color-accent), transparent);
  position: relative;
  overflow: hidden;
}

.zx-hero__scroll-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--zx-color-accent);
  animation: zx-scroll-cue 2.4s var(--zx-ease) infinite;
}

@keyframes zx-scroll-cue {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .zx-hero__scroll-line::after {
    animation: none;
    top: 0;
  }
}

@media (min-width: 768px) {
  .zx-hero__heading {
    max-width: 20ch;
  }
}

/* Two-column hero only once there's genuinely enough width for the
   text column not to cramp the display headline — matches the nav's
   breakpoint reasoning. flex-basis (not a fixed %) with a sensible
   min-width means the text column never gets crushed narrower than it
   needs, even right at the breakpoint edge. */
@media (min-width: 1180px) {
  .zx-hero__card {
    flex-direction: row;
    align-items: center;
    gap: var(--zx-space-2xl);
  }

  .zx-hero__intro {
    flex: 1 1 380px;
    min-width: 340px;
  }

  .zx-hero__media {
    flex: 1.3 1 400px;
    min-width: 0;
    height: auto;
    aspect-ratio: 16 / 11;
    max-height: none;
  }
}

/* -----------------------------------------------------------------------
   CREDIBILITY STRIP
   Light, architectural presentation: typography, generous spacing and a
   single hairline divider per stat — no dark bar, no boxed stat cards.
   ----------------------------------------------------------------------- */
.zx-credibility {
  background-color: var(--zx-color-surface);
  padding-block: calc(var(--zx-section-padding-y-sm) * 0.85);
}

.zx-credibility__intro {
  display: flex;
  flex-direction: column;
  gap: var(--zx-space-sm);
  margin-bottom: var(--zx-space-lg);
  max-width: 60ch;
}

/* -----------------------------------------------------------------------
   CORPORATE POSITIONING (editorial)
   ----------------------------------------------------------------------- */
.zx-positioning__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--zx-space-xl);
  align-items: start;
}

.zx-positioning__lede {
  display: flex;
  flex-direction: column;
  gap: var(--zx-space-lg);
}

.zx-positioning__copy {
  display: flex;
  flex-direction: column;
  gap: var(--zx-space-md);
  max-width: 52ch;
}

.zx-positioning__values {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--zx-space-md) var(--zx-space-lg);
  margin-top: var(--zx-space-sm);
}

@media (min-width: 420px) {
  .zx-positioning__values {
    grid-template-columns: repeat(2, 1fr);
  }
}

.zx-positioning__value {
  padding-top: var(--zx-space-sm);
  border-top: 1px solid var(--zx-color-border);
}

.zx-positioning__value-name {
  font-weight: var(--zx-fw-semibold);
  font-size: var(--zx-fs-body);
  color: var(--zx-color-text-primary);
  display: block;
  margin-bottom: 2px;
}

.zx-positioning__value-desc {
  font-size: var(--zx-fs-small);
  color: var(--zx-color-text-secondary);
}

.zx-positioning__media {
  aspect-ratio: 5 / 6;
}

@media (min-width: 1024px) {
  .zx-positioning__grid {
    grid-template-columns: 0.8fr 1fr;
    gap: var(--zx-space-xl);
    align-items: stretch;
  }

  .zx-positioning__values {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* -----------------------------------------------------------------------
   OUR BUSINESSES — section wrapper. No background override: cards sit
   directly on the page's light-grey background (--zx-color-background)
   so each pastel card reads as a distinct surface above it.
   ----------------------------------------------------------------------- */
.zx-businesses .zx-section-header {
  margin-bottom: var(--zx-space-xl);
}

/* -----------------------------------------------------------------------
   INNOVATION / R&D
   ----------------------------------------------------------------------- */
.zx-innovation__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--zx-space-xl);
  align-items: center;
}

.zx-innovation__media-group {
  position: relative;
}

.zx-innovation__media {
  aspect-ratio: 4 / 5;
}

.zx-innovation__media-accent {
  display: none;
}

@media (min-width: 640px) {
  .zx-innovation__media-accent {
    display: block;
    position: absolute;
    width: 38%;
    aspect-ratio: 1 / 1;
    /* Offset kept comfortably inside the parent card's minimum padding
       (--zx-card-padding-lg is never less than 32px) so this
       intentionally-overlapping accent never gets clipped by the
       card's own overflow:hidden. Do not increase this past
       --zx-space-md without also checking the card padding minimum. */
    right: calc(var(--zx-space-md) * -1);
    bottom: calc(var(--zx-space-md) * -1);
    border: 6px solid var(--zx-color-surface);
    box-shadow: var(--zx-shadow-md);
  }
}

@media (min-width: 1024px) {
  .zx-innovation__media-accent {
    right: calc(var(--zx-space-md) * -1);
    bottom: calc(var(--zx-space-md) * -1);
  }
}

.zx-innovation__copy {
  display: flex;
  flex-direction: column;
  gap: var(--zx-space-lg);
}

.zx-innovation__pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--zx-space-md);
  margin-block: var(--zx-space-sm);
}

.zx-innovation__pillar {
  display: flex;
  flex-direction: column;
  gap: var(--zx-space-2xs);
  padding-block: var(--zx-space-sm);
  border-top: 1px solid var(--zx-color-border);
}

.zx-innovation__pillar-name {
  font-weight: var(--zx-fw-semibold);
  font-size: var(--zx-fs-small);
  color: var(--zx-color-primary);
}

.zx-innovation__pillar-desc {
  font-size: var(--zx-fs-small);
  color: var(--zx-color-text-secondary);
}

@media (min-width: 480px) {
  .zx-innovation__pillar {
    flex-direction: row;
    gap: var(--zx-space-sm);
  }

  .zx-innovation__pillar-name {
    flex-shrink: 0;
    width: 9rem;
  }
}

@media (min-width: 1024px) {
  .zx-innovation__grid {
    grid-template-columns: 0.85fr 1.15fr;
    gap: var(--zx-space-3xl);
  }

  .zx-innovation__pillars {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* -----------------------------------------------------------------------
   SUSTAINABILITY
   v2.1: one large statement card (pastel sage) + four smaller pastel
   application cards. No per-item dark fills; each card carries its own
   restrained pastel surface (see index.html for the per-item pastel
   assignment) plus a thin accent tick mark for hierarchy.
   ----------------------------------------------------------------------- */
.zx-sustainability__statement {
  margin-bottom: var(--zx-card-gap-lg);
}

.zx-sustainability__heading {
  max-width: 62ch;
  margin-bottom: var(--zx-space-md);
}

.zx-sustainability__intro {
  max-width: 62ch;
  color: var(--zx-color-text-secondary);
}

.zx-sustainability__note {
  margin-top: var(--zx-space-lg);
  color: var(--zx-color-text-secondary);
}

.zx-sustainability__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--zx-card-gap);
}

.zx-sustainability__item {
  position: relative;
  padding-top: calc(var(--zx-space-md) + var(--zx-space-2xs));
  display: flex;
  flex-direction: column;
  gap: var(--zx-space-sm);
}

.zx-sustainability__item::before {
  content: "";
  position: absolute;
  top: var(--zx-space-md);
  left: var(--zx-space-md);
  width: 28px;
  height: 2px;
  background-color: var(--zx-color-accent-dark);
}

.zx-sustainability__item-name {
  font-family: var(--zx-font-display);
  font-size: var(--zx-fs-h4);
  letter-spacing: var(--zx-ls-tight);
  color: var(--zx-color-text-primary);
}

.zx-sustainability__item-desc {
  font-size: var(--zx-fs-small);
  color: var(--zx-color-text-secondary);
}

@media (min-width: 768px) {
  .zx-sustainability__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .zx-sustainability__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* -----------------------------------------------------------------------
   GLOBAL PRESENCE
   ----------------------------------------------------------------------- */
.zx-presence__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--zx-space-2xl);
  align-items: center;
}

.zx-presence__copy {
  display: flex;
  flex-direction: column;
  gap: var(--zx-space-lg);
}

.zx-presence__map {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
}

.zx-presence__map img {
  width: 100%;
  height: 100%;
}

.zx-presence__map-note {
  margin-top: var(--zx-space-sm);
  font-size: var(--zx-fs-small);
  color: var(--zx-color-text-secondary);
}

.zx-presence__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zx-space-lg) var(--zx-space-xl);
  padding-top: var(--zx-space-md);
  border-top: 1px solid var(--zx-color-border);
}

.zx-presence__stats > div {
  min-width: 0;
  max-width: 100%;
}

.zx-presence__stat-value {
  font-family: var(--zx-font-display);
  font-size: var(--zx-fs-h2);
  color: var(--zx-color-primary);
}

.zx-presence__stat-label {
  font-size: var(--zx-fs-small);
  color: var(--zx-color-text-secondary);
}

@media (min-width: 1024px) {
  .zx-presence__grid {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

/* -----------------------------------------------------------------------
   REAL-WORLD IMPACT — uses .zx-case-grid from components
   ----------------------------------------------------------------------- */

/* -----------------------------------------------------------------------
   INSIGHTS — uses .zx-insight-grid from components
   ----------------------------------------------------------------------- */

/* -----------------------------------------------------------------------
   CAREERS
   Light split composition: text column + large image panel, replacing
   the previous full-bleed dark-overlay photograph.
   ----------------------------------------------------------------------- */
.zx-careers__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--zx-space-2xl);
  align-items: center;
}

.zx-careers__inner {
  display: flex;
  flex-direction: column;
  gap: var(--zx-space-lg);
  max-width: 44ch;
}

.zx-careers__body {
  color: var(--zx-color-text-secondary);
}

.zx-careers__media {
  aspect-ratio: 4 / 5;
}

@media (min-width: 1024px) {
  .zx-careers__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--zx-space-3xl);
  }
}

/* -----------------------------------------------------------------------
   FINAL CTA
   ----------------------------------------------------------------------- */
/* -----------------------------------------------------------------------
   FINAL CTA
   v2.1: the dark brand treatment now lives on the card itself
   (.zx-card--dark), not the section — see index.html. The section is a
   plain wrapper so the card reads as one deliberate dark moment
   floating on the light page, not a full-bleed dark band.
   ----------------------------------------------------------------------- */
