/* ============================================
   gs-footer — white bg, two-zone layout:
     top:    brand/certs/socials  |  4-col nav
     bottom: copyright             |  legal links
   Mobile collapses to single column.

   Color rule: every interactive element (links, socials) uses the
   UI-accent blue on hover. Coral (brand-editorial) is reserved for
   non-interactive brand moments — keeps the two-accent system clean.
   ============================================ */

.gs-footer {
  background: var(--color-bg);
  color: var(--color-fg-body);
  padding: 5rem 1.5rem 2rem;
  border-top: 1px solid var(--color-border);
}

.gs-footer__inner {
  /* --content-dense (1200) — the footer holds dense, multi-column
     scannable content (4-col nav + cert badges + socials). Slightly
     wider than --content-frame to keep columns from cramping, but
     narrower than --content-max so it doesn't compete with the
     header chrome. Sits in the same "dense matrix" tier as the
     calculator results table. */
  max-width: var(--content-dense);
  margin: 0 auto;
}

/* ============================================
   Top zone: about (left, ~1/3) + nav (right, ~2/3)
   ============================================ */

.gs-footer__top {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 2fr;
  gap: 4rem;
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
}

/* ─── About column ─── */

.gs-footer__heading {
  color: var(--color-fg);
  font-size: 1.0625rem;          /* 17px — bumped from 16px for prominence */
  font-weight: var(--weight-bold);
  margin: 0 0 1rem;
}

.gs-footer__certs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.gs-footer__certs img {
  height: 50px;
  width: auto;
  display: block;
}

.gs-footer__tagline {
  font-size: 1rem;               /* bumped 0.95 → 1rem (16px body scale) */
  line-height: var(--leading-relaxed);
  color: var(--color-fg-body);
  margin: 0 0 1.5rem;
  max-width: 320px;
}

/* ─── Socials — borderless filled circles, matching the calculator
   capability-pill bg pattern. Inactive #eeeeee73 → #e8f4ff on hover.
   Icon stays a constant dark color in both states; the bg-color shift
   is the hover signal. */

.gs-footer__socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.6rem;
}

.gs-footer__socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: #eeeeee73;
  color: var(--color-fg);
  transition: background 0.15s ease, color 0.15s ease;
}

/* Hover = bg lightens AND icon flips to coral (brand-accent). The
   SVG paths use fill="currentColor", so changing the parent's color
   recolors the glyph automatically. */
.gs-footer__socials a:hover {
  background: #e8f4ff;
  color: var(--color-brand-accent);
}

.gs-footer__socials svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* ─── Nav columns ─── */

.gs-footer__nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* Wider column gap so the four lists breathe; 2rem felt crowded
     when columns held longer labels (e.g. "From Challenges to
     Solutions" + "The Giant Swarm Advantage"). */
  gap: 3.5rem;
}

/* New site footer (footer-new.html): two columns, kept in the right
   half of the same four-column grid so the column width doesn't change.
   Below 640px the grid is two columns anyway. */
@media (min-width: 641px) {
  .gs-footer__nav--compact .gs-footer__col:first-child {
    grid-column: 3;
  }
}

.gs-footer__col-title {
  color: var(--color-fg);
  font-size: 1rem;               /* bumped 0.95 → 1rem */
  font-weight: var(--weight-bold);
  margin: 0 0 1rem;
}

.gs-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;                  /* slight bump for breathing room */
}

.gs-footer__col a {
  color: var(--color-fg-body);
  text-decoration: none;
  font-size: 0.95rem;            /* bumped 0.9 → 0.95rem */
  line-height: var(--leading-snug);
}

.gs-footer__col a {
  transition: color 0.15s ease;
}

/* Hover = coral text. No underline, no bold — color shift alone is
   the hover signal, matches the menu link treatment. */
.gs-footer__col a:hover {
  color: var(--color-brand-accent);
}

/* ============================================
   Bottom zone: copyright + legal links
   ============================================ */

.gs-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.gs-footer__copyright {
  font-size: 0.9rem;             /* bumped 0.85 → 0.9rem */
  color: var(--color-fg-muted);
  margin: 0;
}

.gs-footer__legal {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.gs-footer__legal a {
  color: var(--color-fg-muted);
  text-decoration: none;
  font-size: 0.9rem;             /* bumped 0.85 → 0.9rem */
  transition: color 0.15s ease;
}

/* Same coral hover rule as the column links — one consistent
   "text-link hover" treatment across the footer. No underline,
   no bold. */
.gs-footer__legal a:hover {
  color: var(--color-brand-accent);
}

/* ============================================
   Mobile
   ============================================ */

@media (max-width: 900px) {
  .gs-footer__top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  /* Single-column layout: center the about block's content so the
     certs row + heading + tagline + socials sit visually balanced
     across the viewport. Without this they hug the left edge and
     read as fragmented against the centered nav columns below. */
  .gs-footer__about {
    text-align: center;
  }
  .gs-footer__certs,
  .gs-footer__socials {
    justify-content: center;
  }
  .gs-footer__tagline {
    /* Tagline has its own max-width (320px), so text-align: center
       on the parent isn't enough — also center the block itself
       within the available width via margin: 0 auto. */
    margin-left: auto;
    margin-right: auto;
  }
  /* Divider between the centered about block (above) and the link
     columns (below). Border-top on the nav with matching padding-top
     gives equal breathing above + below the line — the grid `gap`
     above contributes the upper half. */
  .gs-footer__nav {
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
  }
  /* Bottom row also collapses + centers — same visual register as
     the about block above. Stack column-wise so copyright sits
     above the legal links instead of pushing them off-screen. */
  .gs-footer__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .gs-footer { padding: 3rem 1.5rem 2rem; }
  .gs-footer__nav {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
  }
  .gs-footer__certs img { height: 40px; }
  /* Bottom row alignment is set in the ≤900px block above — no need
     to override here (was previously `align-items: flex-start` which
     conflicted with the centered treatment we want everywhere on
     mobile). */
}

/* ============================================
   New site footer (footer-new.html, .gs-footer--new)
   One row of four - brand + Product / Resources / Company - with the
   certification badges and legal links in the bottom bar. Column labels
   follow the new pages' section vocabulary: coral mono label under a
   rule with a short coral tick. Badges and socials keep the live colours.
   ============================================ */

.gs-footer--new {
  padding: 4.5rem 1.5rem 2rem;
}

/* Same content width as the new pages' sections (1280 wrap less its
   1.5rem side padding), so the footer lines up with what's above it. */
.gs-footer--new .gs-footer__inner {
  max-width: calc(var(--content-max) - 3rem);
}

.gs-footer--new .gs-footer__top {
  grid-template-columns: 1.6fr 3fr;
  gap: 3rem;
  margin-bottom: 0;
  padding-bottom: 3.5rem;
  border-bottom: 0;
}

/* Left column: label, badges, line. Set apart from the link columns -
   no rule, a small dark headline - so it reads as a statement, not a
   fourth list. Its top sits on the columns' rules: line-height 1 and a
   small pull-up so the cap height, not the line box, meets the rule. */
.gs-footer--new .gs-footer__about-title {
  margin: -0.15em 0 0;
  padding: 0;
  font-size: 1.0625rem;
  font-weight: var(--weight-medium);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--color-fg);
}

.gs-footer--new .gs-footer__about .gs-footer__certs {
  margin: 1.5rem 0 0;
}

.gs-footer--new .gs-footer__tagline {
  max-width: 30ch;
  margin: 1.25rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.gs-footer--new .gs-footer__nav {
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.gs-footer--new .gs-footer__col-title {
  position: relative;
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(29, 35, 44, 0.25);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brand-accent);
}

.gs-footer--new .gs-footer__col-title::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background: var(--color-brand-accent);
}

.gs-footer--new .gs-footer__col ul {
  margin-top: 1.25rem;
  gap: 0.55rem;
}

.gs-footer--new .gs-footer__col a {
  font-size: 0.9375rem;
}

/* Bottom bar: copyright left, socials centred on the page, legal right.
   A 1fr / auto / 1fr grid keeps the socials truly centred whatever the
   widths of the two sides. */
.gs-footer--new .gs-footer__bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.gs-footer--new .gs-footer__legal {
  justify-self: end;
}

.gs-footer--new .gs-footer__certs {
  margin: 0;
}

.gs-footer--new .gs-footer__certs img {
  height: 44px;
}

.gs-footer--new .gs-footer__copyright,
.gs-footer--new .gs-footer__legal a {
  font-size: 0.8125rem;
}

.gs-footer--new .gs-footer__copyright {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.gs-footer--new .gs-footer__mark {
  display: block;
  width: 22px;
  height: 22px;
}

@media (max-width: 900px) {
  .gs-footer--new .gs-footer__top {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* Stacked: the certification block and the bottom bar centre; the
     link columns between them stay left-aligned in their row of three. */
  .gs-footer--new .gs-footer__about,
  .gs-footer--new .gs-footer__bottom {
    text-align: center;
  }

  .gs-footer--new .gs-footer__socials,
  .gs-footer--new .gs-footer__certs,
  .gs-footer--new .gs-footer__copyright,
  .gs-footer--new .gs-footer__legal {
    justify-content: center;
  }

  .gs-footer--new .gs-footer__tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .gs-footer--new .gs-footer__nav {
    padding-top: 0;
    border-top: 0;
  }

  .gs-footer--new .gs-footer__bottom {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .gs-footer--new .gs-footer__legal {
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .gs-footer--new {
    padding: 3.5rem 1.5rem 2rem;
  }

  /* The line under the badges runs the full width, not 30ch in the
     middle of the screen. */
  .gs-footer--new .gs-footer__tagline {
    max-width: none;
    text-wrap: balance;
  }

  /* All three link columns on one row: slightly smaller links and
     labels so "Documentation" fits a third of a phone screen. */
  .gs-footer--new .gs-footer__nav {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .gs-footer--new .gs-footer__col-title {
    letter-spacing: 0.1em;
  }

  .gs-footer--new .gs-footer__col a {
    font-size: 0.875rem;
  }
}
