/* =========================================================
   Gerbs Footer V2 — gerbs-footer-v2 enqueue handle
   Depends on: gerbs-tokens
   Built on the Gerbs Design System tokens.
   nuts.com-inspired layout: brand | link columns | signup
   Handoff: Footer V2-handoff/footer-v2/project/design_handoff_footer/footer-styles.css
   Reconciliations (plan §3):
     - --fw-black removed: 2 uses (col h5, card-eyebrow) replaced with var(--fw-bold)
     - var(--fw-regular) undefined: replaced with literal 400
     - @font-face + :root token block stripped (live in gerbs-tokens.css)
     - --gerbs-blue-press added to gerbs-tokens.css (step 1)
     - [DESIGN P2] success/error state CSS added
     - [DESIGN P6] 44px mobile touch targets
   ========================================================= */

.gfoot {
  background: var(--gerbs-blue);
  color: #fff;
  font-family: var(--ff-body);
  width: 100%;
  container-type: inline-size;
}
.gfoot__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px var(--space-8) 0;
}

/* ---- Brand block ---- */
.gfoot__brand-logo { width: 104px; height: auto; display: block; margin-bottom: var(--space-5); }
.gfoot__tag {
  font-family: var(--ff-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-20);
  line-height: var(--lh-snug);
  color: #fff;
  margin: 0;
  max-width: 18ch;
}

/* ---- Link columns ---- */
.gfoot__col h5 {
  font-family: var(--ff-body);
  font-size: var(--fs-12);
  font-weight: var(--fw-bold);     /* was var(--fw-black)/800 — token not in font subset */
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--gerbs-yellow);
  margin: 0 0 var(--space-5);
}
.gfoot__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.gfoot__col a {
  color: rgba(255,255,255,0.82);
  font-size: var(--fs-14);
  font-weight: 400;                 /* was var(--fw-regular) — undefined token */
  text-decoration: none;
  transition: color .15s;
}
.gfoot__col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Newsletter signup ---- */
.gfoot__signup-label {
  font-size: var(--fs-16);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  color: #fff;
  margin: 0 0 var(--space-5);
  max-width: 28ch;
}
.gfoot__form { display: flex; flex-direction: column; gap: var(--space-3); }
/* Divi injects `input[type="email"] { padding-left: 2px }` inline (specificity 0,0,1,1).
   Two-class selector (0,0,2,0) wins cleanly without !important. */
.gfoot .gfoot__input {
  width: 100%;
  font-family: var(--ff-body);
  font-size: var(--fs-16);
  color: var(--gerbs-ink);
  background: #fff;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  min-height: 52px;
  outline: none;
  transition: box-shadow .15s;
  box-sizing: border-box;
}
.gfoot .gfoot__input::placeholder { color: var(--gerbs-ink-50); }
.gfoot .gfoot__input:focus { box-shadow: 0 0 0 3px rgba(254,203,0,0.55); }
.gfoot__subscribe {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--gerbs-yellow);
  color: var(--gerbs-ink);
  font-family: var(--ff-body);
  font-size: var(--fs-16);
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition: background .15s;
}
.gfoot__subscribe:hover { background: var(--gerbs-gold); }
.gfoot__subscribe:disabled { opacity: 0.7; cursor: not-allowed; }

/* ---- Social icons ---- */
.gfoot__social { display: flex; gap: var(--space-3); margin-top: var(--space-6); }
.gfoot__social a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.12);
  transition: background .15s, transform .15s;
}
.gfoot__social a:hover { background: var(--gerbs-yellow); transform: translateY(-2px); }
.gfoot__social svg { width: 18px; height: 18px; fill: #fff; transition: fill .15s; }
.gfoot__social a:hover svg { fill: var(--gerbs-ink); }

/* ---- Legal bar ---- */
.gfoot__legal {
  max-width: 1200px;
  margin: var(--space-12) auto 0;
  padding: var(--space-5) var(--space-8) var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.gfoot__legal-copy { font-size: var(--fs-12); color: rgba(255,255,255,0.7); }
.gfoot__legal-right { display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap; }
.gfoot__legal-links { display: flex; gap: var(--space-5); }
.gfoot__legal-links a { font-size: var(--fs-12); color: rgba(255,255,255,0.7); text-decoration: none; white-space: nowrap; }
.gfoot__legal-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.gfoot__feedback {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-family: var(--ff-body); font-size: var(--fs-12); font-weight: var(--fw-semibold);
  color: #fff;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius-pill);
  padding: 8px 16px; min-height: 34px;
  text-decoration: none;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.gfoot__feedback:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.5); color: #fff; text-decoration: none; }
.gfoot__feedback svg { width: 14px; height: 14px; fill: #fff; flex-shrink: 0; }

/* =========================================================
   V2 — Yellow highlight card for the signup
   ========================================================= */
.gfoot--v2 .gfoot__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr 1.5fr;
  gap: var(--space-10);
  align-items: start;
}
.gfoot--v2 .gfoot__card {
  background: var(--gerbs-yellow);
  color: var(--gerbs-ink);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
}
.gfoot--v2 .gfoot__card .gfoot__signup-label { color: var(--gerbs-ink); max-width: none; }
.gfoot--v2 .gfoot__card-eyebrow {
  font-size: var(--fs-12); font-weight: var(--fw-bold);  /* was var(--fw-black)/800 */
  letter-spacing: var(--ls-caps); text-transform: uppercase;
  color: var(--gerbs-blue); margin: 0 0 var(--space-2);
}
.gfoot--v2 .gfoot__card .gfoot__input { border-color: rgba(30,30,30,0.14); }
.gfoot--v2 .gfoot__card .gfoot__input:focus { box-shadow: 0 0 0 3px rgba(38,114,255,0.3); }
.gfoot--v2 .gfoot__card .gfoot__subscribe {
  background: var(--gerbs-blue); color: #fff;
}
.gfoot--v2 .gfoot__card .gfoot__subscribe:hover { background: var(--gerbs-blue-press); }
.gfoot--v2 .gfoot__social { justify-content: flex-start; }

/* ---- Consent microcopy ---- */
.gfoot__card-consent {
  font-size: var(--fs-12);
  color: rgba(17,17,17,0.65);
  margin: var(--space-3) 0 0;
  line-height: var(--lh-normal);
}
.gfoot__card-consent a { color: var(--gerbs-blue); text-decoration: underline; }
.gfoot__card-consent a:hover { color: var(--gerbs-blue-press); }

/* ---- [DESIGN P2] Success state — replaces form inside yellow card ---- */
.gfoot__card-success { text-align: center; padding: var(--space-4) 0; }
.gfoot__card-success svg { width: 40px; height: 40px; fill: var(--gerbs-blue); margin: 0 auto var(--space-3); display: block; }
.gfoot__success-head { font-weight: var(--fw-bold); font-size: var(--fs-18); color: var(--gerbs-ink); margin: 0 0 var(--space-1); }
.gfoot__success-sub  { font-size: var(--fs-14); color: var(--gerbs-ink-70); margin: 0; }

/* ---- [DESIGN P2] Error — NEVER red on yellow card (red-on-yellow fails contrast). Dark ink. ---- */
.gfoot__card-error {
  margin-top: var(--space-2);
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  color: var(--gerbs-ink);         /* not --gerbs-error: #c0392b on #fecb00 fails contrast */
}

/* Honeypot field — always hidden */
.gfoot__hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* =========================================================
   Responsive — container queries (footer's own width)
   ========================================================= */

/* Tablet: condensed link grid */
@container (max-width: 900px) {
  .gfoot__inner { padding: var(--space-12) var(--space-6) 0; }
  .gfoot--v2 .gfoot__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-8) var(--space-6); }
  .gfoot--v2 .gfoot__signup { grid-column: 1 / -1; }
  .gfoot--v2 .gfoot__card { max-width: 520px; }
}

/* Phone: single column stack */
@container (max-width: 600px) {
  .gfoot__inner { padding: var(--space-10) var(--space-5) 0; }
  .gfoot--v2 .gfoot__grid { grid-template-columns: 1fr; gap: var(--space-8); }

  .gfoot__brand-logo { width: 92px; }
  .gfoot__signup-label { max-width: none; }

  .gfoot--v2 .gfoot__card { max-width: none; padding: var(--space-5); }

  .gfoot__social { gap: var(--space-2); margin-top: var(--space-5); }

  /* [DESIGN P6] 44px minimum touch targets on mobile */
  .gfoot__social a { width: 44px; height: 44px; }
  .gfoot__feedback { min-height: 44px; }

  .gfoot__legal {
    flex-direction: column; align-items: flex-start; gap: var(--space-4);
    margin-top: var(--space-10); padding: var(--space-5) var(--space-5) var(--space-8);
  }
  .gfoot__legal-right { width: 100%; flex-direction: column-reverse; align-items: flex-start; gap: var(--space-4); }
  .gfoot__legal-links { flex-wrap: wrap; }
}

/* Focus rings — accessible visible outline */
.gfoot__col a:focus-visible,
.gfoot__feedback:focus-visible,
.gfoot__legal-links a:focus-visible,
.gfoot__social a:focus-visible,
.gfoot__subscribe:focus-visible,
.gfoot__input:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}
