/* Ghan House — global footer
   Rendered by Astra's Footer Builder (Customize → Footer Builder).
   - Primary row: 4 widget areas containing gh/footer-brand + gh/footer-column blocks.
   - Below row: copyright element + an HTML element for affiliations.
   This file styles Astra's footer wrappers + the markup our blocks emit. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&family=DM+Sans:wght@400;500;600&display=swap');

/* Tokens scoped to the Astra footer so we don't pollute :root. */
.site-footer {
  --gh-navy-deep:   oklch(0.185 0.022 250);
  --gh-cream:       oklch(0.965 0.010 85);
  --gh-gold:        oklch(0.70 0.075 75);
  /* Defer to the global :root tokens (--serif / --sans) which the
     customizer sets — falls back to the historic defaults if the
     customizer never ran (e.g. on an unconfigured fresh install). */
  --gh-serif: var(--serif, "Cormorant Garamond", "EB Garamond", Georgia, serif);
  --gh-sans:  var(--sans,  "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif);
  --gh-max: 1240px;

  background: var(--gh-navy-deep);
  color: rgba(245,240,232,.7);
  /* Default font for any text in the footer that isn't matched by
     a more specific rule below (e.g. the copyright + affiliations
     row). Brand / tag / heading / link slots each have their own
     vars further down. */
  font-family: var(--gh-footer-link-family, var(--gh-sans));
  font-size: calc(var(--gh-footer-link-scale, 1) * 14px);
  line-height: 1.6;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--gh-gold); }

/* Astra builder rows — backgrounds are set via the builder's bg-obj
   settings (see migrate-footer-builder.php); we only own spacing + the
   divider between primary and below. */
.site-primary-footer-wrap {
  padding: 80px 32px 48px;
}
.site-below-footer-wrap {
  padding: 32px 32px 40px;
  border-top: 1px solid rgba(245,240,232,.12);
}

/* Constrain inner rows to our content max-width. */
.site-primary-footer-wrap .ast-builder-grid-row-container-inner,
.site-below-footer-wrap   .ast-builder-grid-row-container-inner {
  max-width: var(--gh-max);
  margin-inline: auto;
}

/* Primary row — 4 columns with the brand cell weighted wider. */
.site-primary-footer-wrap .ast-builder-grid-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Strip Astra's widget chrome (we render our own structure inside). */
.site-footer .footer-widget-area,
.site-footer .footer-widget-area-inner,
.site-footer .widget {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}
.site-footer .widget-content { margin: 0; }
.site-footer .widget-title { display: none; } /* our blocks render their own h4 */

/* Brand block */
.gh-ft-brand-block { color: rgba(245,240,232,.7); }
.gh-ft-brand {
  font-family: var(--gh-footer-brand-family, var(--gh-sans));
  font-size: calc(var(--gh-footer-brand-scale, 1) * 18px);
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--gh-cream);
  margin: 0 0 14px;
  font-weight: 500;
}
.gh-ft-tag {
  font-family: var(--gh-footer-tag-family, var(--gh-serif));
  font-style: italic;
  font-size: calc(var(--gh-footer-tag-scale, 1) * 18px);
  color: rgba(245,240,232,.6);
  max-width: 30ch;
  margin: 0;
}

/* Link / contact columns */
.gh-ft-col h4 {
  font-family: var(--gh-footer-heading-family, var(--gh-sans));
  font-size: calc(var(--gh-footer-heading-scale, 1) * 10.5px);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(245,240,232,.5);
  margin: 0 0 14px;
  font-weight: 500;
}
.gh-ft-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--gh-footer-link-family, var(--gh-sans));
  font-size: calc(var(--gh-footer-link-scale, 1) * 14px);
}

/* Below row — copyright left, affiliations right. */
.site-below-footer-wrap .ast-builder-grid-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.site-below-footer-wrap .ast-footer-copyright,
.site-below-footer-wrap .ast-builder-html-element {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(245,240,232,.55);
}
/* The site-wide `p { color: var(--gh-charcoal) }` in WPCode targets the <p>
   element directly, so the wrapper colour above only reaches it via
   inheritance — which a direct rule on <p> overrides. Force inheritance. */
.site-below-footer-wrap p {
  color: inherit;
  margin: 0;
}

@media (max-width: 980px) {
  .site-primary-footer-wrap .ast-builder-grid-row {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .site-below-footer-wrap .ast-builder-grid-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .site-primary-footer-wrap .ast-builder-grid-row {
    grid-template-columns: 1fr;
  }
}
