/* ══════════════════════════════════════════════════════════════
   SHARED FOOTER — alignment + responsive layout
   Loaded last on every page that has <footer class="ft">.
   Selectors start with "html body footer.ft" and use !important where a page's own
   footer block (also "html body … !important") would otherwise win.

   A. Wordmark "DROW DIGITAL": same left/right edges as the rest of the footer, at every width
   B. ≤1180px  brand row on top, all four link columns below (Policy + Markets were hidden ≤1060px)
   C. ≤720px   two link columns, stacked CTA / newsletter / bottom bar, bigger tap targets
   D. ≤480px   full-width CTA button, tighter type
   ══════════════════════════════════════════════════════════════ */

/* ── A. Wordmark ─────────────────────────────────────────────── */
html body footer.ft .ft-wordmark-wrap {
  --ft-pad: 52px;
  /* content box = the same 1180px column the CTA, newsletter and bottom bar use */
  padding: 0 max(var(--ft-pad), calc((100% - 1180px) / 2)) !important;
  container-type: inline-size;
}
html body footer.ft .ft-wordmark {
  /* same typeface on every page (shipping-and-delivery uses Plus Jakarta Sans elsewhere, which is wider) */
  font-family: 'Manrope', sans-serif !important;
  /* fallback for browsers without container units */
  font-size: min(176px, calc((100vw - 2 * var(--ft-pad) - 17px) / 6.7)) !important;
  /* the "D" has empty space on its left inside the font; pull it to the column edge */
  margin-left: -.06em;
}
@supports (font-size: 1cqw) {
  /* the word is 6.71em wide: it fills the column edge to edge and is never cut */
  html body footer.ft .ft-wordmark { font-size: calc(100cqw / 6.71) !important; }
}
@media (max-width: 768px) {
  html body footer.ft .ft-wordmark-wrap { --ft-pad: 20px; }
}

/* Legal links in the bottom bar (policy pages): they were dark grey at 25% on the blue footer, i.e. unreadable */
html body footer.ft .ft-legal-link { color: rgba(255, 255, 255, .78) !important; }
html body footer.ft .ft-legal-link:hover { color: #C8FF00 !important; }
@media (max-width: 720px) {
  html body footer.ft .ft-legal-links { gap: 6px 18px !important; }
}

/* ── B. Tablet and small laptop (721px – 1180px) ─────────────── */
@media (min-width: 721px) and (max-width: 1180px) {
  html body footer.ft .ft-cta-heading br { display: none; }
  html body footer.ft .ft-cta-inner { gap: 32px !important; }

  html body footer.ft .ft-body-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 40px 28px !important;
  }
  html body footer.ft .ft-body-grid > .ft-col { display: block !important; }
  html body footer.ft .ft-brand {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
    grid-template-areas: "logo badges" "desc badges" "social badges";
    column-gap: 48px;
    align-items: start;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
  }
  html body footer.ft .ft-logo { grid-area: logo; justify-self: start; }
  html body footer.ft .ft-brand-desc { grid-area: desc; max-width: 520px !important; margin-bottom: 20px !important; }
  html body footer.ft .ft-socials { grid-area: social; margin-bottom: 0 !important; }
  html body footer.ft .ft-badges { grid-area: badges; align-self: center; }
  html body footer.ft .ft-col-heading { font-size: 13px !important; letter-spacing: .16em !important; }
  /* tablets are touch devices: 28px tall link rows */
  html body footer.ft .ft-col-links { gap: 4px !important; }
  html body footer.ft .ft-col-link { padding: 5px 0 !important; }
  html body footer.ft .ft-bottom-inner a { padding: 4px 0; }

  html body footer.ft .ft-bottom-inner { justify-content: center !important; gap: 8px 28px !important; text-align: center; }
}

/* ── C. Mobile and small tablet (≤720px) ─────────────────────── */
@media (max-width: 720px) {
  /* CTA */
  html body footer.ft .ft-cta-heading br { display: none; }
  html body footer.ft .ft-cta-inner > * { min-width: 0; }
  html body footer.ft .ft-cta-sub { max-width: 520px !important; }

  /* brand + link columns */
  html body footer.ft .ft-body-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 32px 20px !important;
  }
  html body footer.ft .ft-body-grid > .ft-col { display: block !important; min-width: 0; }
  html body footer.ft .ft-brand {
    grid-column: 1 / -1;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
  }
  html body footer.ft .ft-brand-desc { max-width: 520px !important; margin-bottom: 22px !important; }
  html body footer.ft .ft-socials { margin-bottom: 22px !important; }
  html body footer.ft .ft-badges { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px !important; }
  html body footer.ft .ft-col-heading { font-size: 12.5px !important; letter-spacing: .16em !important; margin-bottom: 12px !important; }
  html body footer.ft .ft-col-links { gap: 2px !important; }
  /* 30px tall rows: easy to tap */
  html body footer.ft .ft-col-link { display: flex !important; padding: 6px 0 !important; font-size: 14px !important; line-height: 18px; }
  /* the hover dot is invisible on touch screens but still took 11px: links now line up with their heading */
  html body footer.ft .ft-col-link::before { display: none !important; }

  /* newsletter */
  html body footer.ft .ft-newsletter-inner { gap: 18px !important; }
  html body footer.ft .ft-nl-form { width: 100% !important; min-width: 0 !important; max-width: 520px; }
  html body footer.ft .ft-nl-input { min-width: 0 !important; width: 100%; }

  /* bottom bar: copyright on its own line, the rest flow in rows */
  html body footer.ft .ft-bottom-inner {
    flex-direction: row !important; flex-wrap: wrap !important;
    align-items: center !important; justify-content: flex-start !important;
    gap: 8px 22px !important;
  }
  html body footer.ft .ft-bottom-inner > .ft-copyright:first-child { flex: 1 1 100%; }
  html body footer.ft .ft-bottom-inner .footer-text-2 { display: none; }
  html body footer.ft .ft-bottom-inner a { padding: 4px 0; }
}

/* ── D. Phones (≤480px) ──────────────────────────────────────── */
@media (max-width: 480px) {
  html body footer.ft .ft-cta-right { align-items: stretch !important; }
  html body footer.ft .ft-cta-btn {
    width: 100%; justify-content: center;
    white-space: normal !important; text-align: center;
    padding: 15px 20px !important;
  }
  html body footer.ft .ft-cta-note { text-align: center; }
  html body footer.ft .ft-badges { grid-template-columns: 1fr; }
  html body footer.ft .ft-body-grid { gap: 28px 16px !important; }
  html body footer.ft .ft-nl-heading { font-size: 17px !important; }
}
@media (max-width: 380px) {
  html body footer.ft .ft-col-heading { letter-spacing: .1em !important; font-size: 12px !important; }
  html body footer.ft .ft-col-link { font-size: 13px !important; }
  html body footer.ft .ft-nl-form { padding-left: 16px !important; }
  html body footer.ft .ft-nl-btn { padding: 10px 16px !important; }
  html body footer.ft .ft-cta-tag { letter-spacing: .08em !important; }
}
