/* ============================================================
   Grow A Classroom — footer: the drawing sheet.
   Prefix vocabulary: gac-foot-*, gac-block-*, gac-reg-*, gac-fw.
   (Kept distinct from splash / story / site class names.)
   ============================================================ */

.gac-footer {
  position: relative;
  background: var(--canopy);
  color: rgba(241,242,234,.8);
  padding: 6rem 0 4rem;
  overflow: hidden;
}

/* fine drafting grid, fading toward the edges — same language as the splash and story panels */
.gac-foot-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(241,242,234,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(241,242,234,.05) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse at 40% 35%, black 10%, transparent 80%);
          mask-image: radial-gradient(ellipse at 40% 35%, black 10%, transparent 80%);
  pointer-events: none;
}

/* sheet border + registration marks */
.gac-foot-frame {
  position: absolute;
  inset: .75rem;
  border: 1px solid rgba(241,242,234,.16);
  pointer-events: none;
}
@media (min-width: 768px) { .gac-foot-frame { inset: 1.25rem; } }
.gac-reg {
  position: absolute;
  width: 15px; height: 15px;
  background:
    linear-gradient(rgba(241,242,234,.45), rgba(241,242,234,.45)) center / 1px 100% no-repeat,
    linear-gradient(rgba(241,242,234,.45), rgba(241,242,234,.45)) center / 100% 1px no-repeat;
}
.gac-reg-tl { top: -7px;    left: -7px; }
.gac-reg-tr { top: -7px;    right: -7px; }
.gac-reg-bl { bottom: -7px; left: -7px; }
.gac-reg-br { bottom: -7px; right: -7px; }

.gac-foot-inner {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.75rem;
}
@media (min-width: 768px) { .gac-foot-inner { padding: 0 2.5rem; } }

/* ---------- top: the tagline, contact, and the section index ---------- */
.gac-foot-top {
  display: grid;
  gap: 3rem;
  align-items: end;
}
@media (min-width: 900px) {
  .gac-foot-top { grid-template-columns: minmax(0, 1.7fr) minmax(0, .6fr); gap: 4rem; }
}
.gac-foot-title {
  font-size: clamp(2.4rem, 5.2vw, 4.75rem);
  line-height: 1.04;
  color: var(--paper);
  max-width: 14ch;
}
.gac-fw {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .14em;
  margin-bottom: -.14em;
}
.gac-fw > span { display: inline-block; }

.gac-foot-contact { margin-top: 2.25rem; }
.gac-foot-mail {
  display: inline-block;
  color: var(--paper);
  font-size: 1.125rem;
  padding-bottom: 2px;
  background: linear-gradient(var(--sprout), var(--sprout)) left bottom / 100% 1px no-repeat;
  transition: background-size .4s cubic-bezier(.65,0,.35,1), color .3s ease;
}
.gac-foot-mail:hover { background-size: 100% 2px; color: #fff; }
.gac-foot-contact p { margin-top: .75rem; font-size: .9375rem; color: rgba(241,242,234,.6); }
.gac-foot-contact strong { font-weight: 500; color: rgba(241,242,234,.9); }

.gac-foot-index { display: flex; flex-direction: column; gap: .35rem; }
.gac-foot-index a {
  display: flex;
  align-items: baseline;
  gap: .9rem;
  padding: .55rem 0;
  border-bottom: 1px solid rgba(241,242,234,.14);
  color: rgba(241,242,234,.88);
  font-size: 1.0625rem;
  transition: color .3s ease, padding-left .35s cubic-bezier(.22,.61,.36,1), border-color .3s ease;
}
.gac-foot-index a span {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  color: var(--sprout);
  min-width: 1rem;
}
.gac-foot-index a:hover { color: #fff; padding-left: .5rem; border-color: var(--sprout); }
.gac-foot-index a:focus-visible,
.gac-foot-mail:focus-visible { outline: 2px solid var(--sprout); outline-offset: 4px; }

/* ---------- the title block ---------- */
.gac-block { position: relative; margin-top: 4.5rem; }
.gac-block::before,
.gac-block::after {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  border: 2px solid var(--sprout);
  pointer-events: none;
  z-index: 1;
}
.gac-block::before { top: -11px;    left: -11px;  border-right: none; border-bottom: none; }
.gac-block::after  { bottom: -11px; right: -11px; border-left: none;  border-top: none; }

.gac-block-sheet {
  position: relative;
  isolation: isolate; /* keeps the logos' multiply blend inside the block */
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(28,28,22,.2);
}
.gac-block-cell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 8rem;
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(28,28,22,.16);
}
/* mobile: logos and social each get a full-width row; scope | horizon share one */
.gac-block-cell--gac, .gac-block-cell--aak, .gac-block-cell--social { grid-column: 1 / -1; }
.gac-block-cell--gac { border-top: none; }
.gac-block-cell--logo { min-height: 0; }
.gac-block-cell--horizon { border-left: 1px solid rgba(28,28,22,.16); }

/* desktop: row 1 = the two logos, half the sheet each; row 2 = scope, horizon, social */
@media (min-width: 900px) {
  .gac-block-sheet { grid-template-columns: repeat(4, 1fr); }
  .gac-block-cell--gac, .gac-block-cell--aak, .gac-block-cell--social { grid-column: span 2; }
  .gac-block-cell { min-height: 9rem; }
  .gac-block-cell--logo { min-height: 10.5rem; }
  .gac-block-cell--aak { border-top: none; border-left: 1px solid rgba(28,28,22,.16); }
  .gac-block-cell--social { border-left: 1px solid rgba(28,28,22,.16); }
}

.gac-block-label {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: .8125rem;
  color: rgba(13,102,56,.75);
}
/* Logos are sized by WIDTH and left to find their own height, so the aspect
   ratio can never be broken. (Previously a fixed height + a clamped width
   squashed them on narrow cells.) object-fit is a safety net: if a file is
   ever unusually tall, it letterboxes instead of stretching. */
.gac-block-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 6rem;
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: multiply; /* a logo carrying a white background dissolves into the paper */
}
.gac-block-logo--gac { max-width: 17rem; }
.gac-block-logo--aak { max-width: 19rem; }
@media (min-width: 900px) {
  .gac-block-logo { max-height: 7rem; }
  .gac-block-logo--gac { max-width: 21rem; }
  .gac-block-logo--aak { max-width: 23rem; }
}

/* ---------- social: small drafting "stamps" on the paper ---------- */
.gac-social { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.gac-social a {
  display: grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  color: var(--canopy);
  border: 1px solid rgba(28,28,22,.24);
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, transform .35s cubic-bezier(.22,.61,.36,1);
}
.gac-social svg { width: 1.25rem; height: 1.25rem; display: block; }
.gac-social a:hover { background: var(--canopy); color: var(--paper); border-color: var(--canopy); transform: translateY(-3px); }
.gac-social a:focus-visible { outline: 2px solid var(--canopy); outline-offset: 3px; }
@media (min-width: 900px) { .gac-social a { width: 2.5rem; height: 2.5rem; } }
@media (prefers-reduced-motion: reduce) { .gac-social a:hover { transform: none; } }

.gac-block-figure { font-size: 1.5rem; line-height: 1.1; color: var(--canopy); }
.gac-block-note { margin-top: .35rem; font-size: .8125rem; line-height: 1.4; color: rgba(28,28,22,.6); }

.gac-block-foot {
  grid-column: 1 / -1;
  padding: .75rem 1.5rem;
  border-top: 1px solid rgba(28,28,22,.16);
  background: rgba(13,102,56,.07);
  font-size: .75rem;
  color: rgba(28,28,22,.55);
}

/* ---------- entrance: armed by footer.js, so with JS off nothing is hidden ---------- */
.gac-footer.is-armed .gac-fw > span { transform: translateY(115%); }
.gac-footer.is-armed .gac-foot-frame { opacity: 0; transition: opacity 1.2s ease; }
.gac-footer.is-armed .gac-foot-contact,
.gac-footer.is-armed .gac-foot-index a { opacity: 0; transform: translateY(14px); }
.gac-footer.is-armed .gac-block-sheet { clip-path: inset(100% 0 0 0); }
.gac-footer.is-armed .gac-block::before,
.gac-footer.is-armed .gac-block::after { opacity: 0; }
.gac-footer.is-armed .gac-block-cell > * { opacity: 0; transform: translateY(10px); }
.gac-footer.is-armed .gac-block-foot { opacity: 0; }

.gac-footer.is-in .gac-foot-frame { opacity: 1; }
.gac-footer.is-in .gac-fw > span {
  transform: none;
  transition: transform .95s cubic-bezier(.22,.61,.36,1) calc(.1s + var(--i, 0) * .07s);
}
.gac-footer.is-in .gac-foot-contact {
  opacity: 1; transform: none;
  transition: opacity .8s ease .75s, transform .9s cubic-bezier(.22,.61,.36,1) .75s;
}
.gac-footer.is-in .gac-foot-index a {
  opacity: 1; transform: none;
  transition: opacity .7s ease, transform .8s cubic-bezier(.22,.61,.36,1), color .3s ease, padding-left .35s cubic-bezier(.22,.61,.36,1), border-color .3s ease;
}
.gac-footer.is-in .gac-foot-index a:nth-child(1) { transition-delay: .55s, .55s, 0s, 0s, 0s; }
.gac-footer.is-in .gac-foot-index a:nth-child(2) { transition-delay: .65s, .65s, 0s, 0s, 0s; }
.gac-footer.is-in .gac-foot-index a:nth-child(3) { transition-delay: .75s, .75s, 0s, 0s, 0s; }
.gac-footer.is-in .gac-foot-index a:nth-child(4) { transition-delay: .85s, .85s, 0s, 0s, 0s; }

.gac-footer.is-in .gac-block-sheet {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.2s cubic-bezier(.65,0,.35,1) .5s;
}
.gac-footer.is-in .gac-block::before,
.gac-footer.is-in .gac-block::after { opacity: 1; transition: opacity .6s ease 1.5s; }
.gac-footer.is-in .gac-block-cell > * {
  opacity: 1; transform: none;
  transition: opacity .8s ease, transform .8s cubic-bezier(.22,.61,.36,1);
}
.gac-footer.is-in .gac-block-cell:nth-child(1) > * { transition-delay: 1.15s; }
.gac-footer.is-in .gac-block-cell:nth-child(2) > * { transition-delay: 1.3s; }
.gac-footer.is-in .gac-block-cell:nth-child(3) > * { transition-delay: 1.45s; }
.gac-footer.is-in .gac-block-cell:nth-child(4) > * { transition-delay: 1.6s; }
.gac-footer.is-in .gac-block-cell:nth-child(5) > * { transition-delay: 1.75s; }
.gac-footer.is-in .gac-block-foot { opacity: 1; transition: opacity .8s ease 1.95s; }

@media (prefers-reduced-motion: reduce) {
  .gac-footer.is-armed .gac-fw > span,
  .gac-footer.is-armed .gac-foot-contact,
  .gac-footer.is-armed .gac-foot-index a,
  .gac-footer.is-armed .gac-block-cell > * { transform: none; }
  .gac-footer.is-armed .gac-block-sheet { clip-path: none; opacity: 0; }
  .gac-footer.is-in .gac-block-sheet { opacity: 1; clip-path: none; transition: opacity .5s ease; }
  .gac-footer.is-in .gac-fw > span,
  .gac-footer.is-in .gac-foot-contact,
  .gac-footer.is-in .gac-foot-index a,
  .gac-footer.is-in .gac-block-cell > * { transition-duration: .4s; transition-delay: 0s; }
}