/* ── ita_footer ─────────────────────────────────────────────────────
   Light paper ground (not dark ink like IDA's footer) — matches the
   approved mockup exactly: a fixed 4-track grid (mark + 3 link
   columns), same convention IDA's footer uses (fixed 6-track).
   ⚠️ Do NOT mix an `fr` track with `repeat(auto-fit, …)` in the same
   grid-template-columns — that combination is invalid CSS Grid (the
   auto-fit column count becomes ambiguous once a flexible track is
   present) and gets silently dropped, collapsing the whole grid to
   one column with no warning. Learned the hard way building this
   block. If a 5th footer column is ever added, bump the repeat(3, …)
   below to match. Tokens only. */

.block-ita_footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  color: var(--color-fg-muted);
  padding: clamp(56px, 8vh, 76px) 0 34px;
}

.block-ita_footer .cf-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--space-section-x);
}

.block-ita_footer .cf-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: clamp(24px, 4vw, 40px);
  padding-bottom: clamp(36px, 6vh, 48px);
  border-bottom: 1px solid var(--color-border);
}

.block-ita_footer .cf-col-label {
  display: block; margin-bottom: 18px;
  color: var(--color-fg);
  font-family: var(--font-eyebrow); font-weight: 800;
  font-size: 11.5px; letter-spacing: 0.13em; text-transform: uppercase;
}
.block-ita_footer .cf-col-links {
  display: flex; flex-direction: column; gap: 12px;
  font-size: 14px; list-style: none; padding: 0; margin: 0;
}
.block-ita_footer .cf-col a { color: var(--color-fg-muted); transition: color 0.15s; }
.block-ita_footer .cf-col a:hover { color: var(--color-accent); }

.block-ita_footer .cf-logo { height: 26px; width: auto; margin-bottom: 16px; }
.block-ita_footer .cf-blurb {
  margin: 0; font-size: 14px; color: var(--color-fg-muted);
  line-height: 1.6; max-width: 30ch;
}

/* Social icons — each icon is an editor-uploaded image (not a fixed
   platform set), so the row just lays out however many links exist.
   `.cms-list-item-add` ("Add icon") is hidden on the public site by
   editor.css's own generic rule, so an empty list renders nothing
   visible here at all. */
.block-ita_footer .cf-social { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.block-ita_footer .cf-social-item { display: block; line-height: 0; }
.block-ita_footer .cf-social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--color-bg); border: 1px solid var(--color-border);
  transition: border-color 0.2s, transform 0.2s;
  overflow: hidden;
}
.block-ita_footer .cf-social-item:hover .cf-social-icon {
  border-color: var(--color-accent); transform: translateY(-2px);
}
.block-ita_footer .cf-social-icon img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block;
}
.block-ita_footer .cf-social-icon--empty {
  border-style: dashed;
}
.block-ita_footer .cf-social-hint {
  font-size: 16px; font-weight: 700; color: var(--color-muted-2); line-height: 1;
}
/* Editor always shows the empty-slot placeholder so there's something
   to click even before an icon is uploaded. Hidden on the public site
   at the list level instead (no icon uploaded = nothing worth linking
   to), via display:none rather than removing the item from the DOM. */
body:not(.cms-edit) .block-ita_footer .cf-social-item:has(.cf-social-icon--empty) { display: none; }

/* editor.css's generic "+ Add" button is an 80px dashed slab meant for
   card grids; shrink it to match the 34px circles it sits next to here
   (restored specifically for this global block — see editor.css's
   [data-cms-global] .cms-list-item-add carve-out). */
body.cms-edit .block-ita_footer .cf-social .cms-list-item-add {
  min-height: 0; width: 34px; height: 34px; padding: 0;
  border-radius: 50%; gap: 0;
}
body.cms-edit .block-ita_footer .cf-social .cms-list-item-add::before { font-size: 18px; }

.block-ita_footer .cf-newsletter-blurb {
  margin: 0 0 12px; font-size: 13px;
  color: var(--color-fg-muted); line-height: 1.55; max-width: 32ch;
}
.block-ita_footer .cf-newsletter {
  display: grid; grid-template-columns: 1fr auto; gap: 0; margin-top: 12px;
}
.block-ita_footer .cf-newsletter input {
  background: transparent; border: 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-fg); padding: 12px 0;
  font: inherit; font-size: 14px; outline: none;
  transition: border-color 0.25s;
}
.block-ita_footer .cf-newsletter input::placeholder { color: var(--color-muted-2); }
.block-ita_footer .cf-newsletter input:focus { border-color: var(--color-accent); }
.block-ita_footer .cf-newsletter button {
  background: transparent; border: 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-fg); padding: 12px 16px;
  font-family: var(--font-eyebrow); font-weight: 700;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; transition: color 0.25s, border-color 0.25s;
}
.block-ita_footer .cf-newsletter button:hover {
  color: var(--color-accent); border-color: var(--color-accent);
}

.block-ita_footer .cf-bottom {
  padding-top: 28px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start;
}
/* No offices configured (the common case for ITA) — collapse to the
   mockup's simple flex row: copyright left, tagline right. */
.block-ita_footer .cf-bottom--simple {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.block-ita_footer .cf-offices {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.block-ita_footer .cf-office { font-size: 13px; color: var(--color-fg-muted); line-height: 1.55; }
.block-ita_footer .cf-office strong {
  display: block; margin-bottom: 6px;
  font-family: var(--font-eyebrow); font-weight: 800;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-fg);
}
.block-ita_footer .cf-legal {
  font-size: 12.5px; color: var(--color-muted-2);
  display: flex; flex-direction: column; gap: 10px;
}
.block-ita_footer .cf-bottom--simple .cf-legal { flex-direction: row; align-items: center; }
.block-ita_footer .cf-legal-links { display: flex; gap: 18px; flex-wrap: wrap; }
.block-ita_footer .cf-legal-links a { color: inherit; transition: color 0.2s; }
.block-ita_footer .cf-legal-links a:hover { color: var(--color-accent); }
.block-ita_footer .cf-tagline {
  font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--color-fg-muted);
}

@media (max-width: 1100px) {
  .block-ita_footer .cf-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .block-ita_footer .cf-grid { grid-template-columns: repeat(2, 1fr); }
  .block-ita_footer .cf-bottom,
  .block-ita_footer .cf-offices { grid-template-columns: 1fr; }
  .block-ita_footer .cf-bottom--simple { flex-direction: column; align-items: flex-start; }
}
