/* ══════════════════════════════════════════════════════════════════════════════
   FOOTER  — each breakpoint is fully self-contained, nothing cascades between them
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Shared base (colours, typography only — zero layout) ─────────────────── */
.site-footer {
  background: #0d0d0c;
  color: #fff;
}
.footer-container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.footer-logo { display: inline-flex; text-decoration: none; }
.footer-logo img { display: none; }
.footer-heading {
  font-size: 10px;
  font-weight: var(--weight-semi);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
}
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color var(--ease-fast);
}
.footer-nav a:hover { color: #fff; }
.footer-note { font-size: var(--text-xs) !important; color: rgba(255,255,255,.3) !important; }


/* ══════════════════════════════════════════════════════════════════════════════
   DESKTOP  ≥ 1025px
   Layout:
     Row 1 — "Work With Us" CTA band, full width
     Row 2 — brand (2fr) | Services | Company | Legal
   ══════════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1025px) {
  .site-footer { padding-block: var(--space-20) var(--space-10); }

  .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    grid-template-areas:
      "cta    cta  cta   cta"
      "brand  svc  co    legal";
    column-gap: var(--space-10);
    row-gap: var(--space-16);
    padding-bottom: var(--space-14);
    margin-bottom: var(--space-6);
    border-bottom: 1px solid rgba(255,255,255,.07);
  }

  /* grid-area assignments */
  .footer-brand          { grid-area: brand; }
  .footer-nav--services  { grid-area: svc; }
  .footer-nav--company   { grid-area: co; }
  .footer-contact        { grid-area: cta; }
  .footer-nav--legal     { grid-area: legal; }

  /* ── CTA band ── */
  .footer-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-12);
    padding: var(--space-8) var(--space-10);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-2xl);
    background: rgba(255,255,255,.04);
  }
  .footer-contact__body { flex: 1; min-width: 0; }
  .footer-contact .footer-heading {
    display: block;
    margin-bottom: var(--space-2);
    color: rgba(255,255,255,.4);
    font-size: 10px;
    letter-spacing: 0.12em;
  }
  .footer-contact p {
    font-size: clamp(var(--text-lg), 1.6vw, var(--text-xl));
    font-weight: var(--weight-semi);
    color: rgba(255,255,255,.9);
    line-height: var(--leading-snug);
    letter-spacing: -0.01em;
    margin: 0;
    max-width: 580px;
  }
  .footer-contact .btn--outline {
    flex-shrink: 0;
    padding: 0.875rem 1.75rem;
    font-size: var(--text-sm);
    font-weight: var(--weight-semi);
    color: rgba(255,255,255,.85);
    border-color: rgba(255,255,255,.2);
    white-space: nowrap;
    border-radius: var(--radius-md);
  }
  .footer-contact .btn--outline:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.5);
    color: #fff;
  }

  /* ── Brand ── */
  .footer-brand .footer-logo { margin-bottom: var(--space-4); }
  .footer-brand .footer-tagline {
    font-size: var(--text-sm);
    color: rgba(255,255,255,.4);
    line-height: var(--leading-relaxed);
    max-width: 240px;
    margin: 0;
  }

  /* ── Nav columns ── */
  .footer-nav { border-left: 1px solid rgba(255,255,255,.07); padding-left: var(--space-8); }
  .footer-heading { display: block; margin-bottom: var(--space-5); }
  .footer-nav ul { display: flex; flex-direction: column; gap: var(--space-3); }

  /* ── Bottom bar ── */
  .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .footer-bottom p { font-size: var(--text-xs); color: rgba(255,255,255,.3); }
}


/* ══════════════════════════════════════════════════════════════════════════════
   TABLET  641px – 1024px
   Layout:
     Row 1 — Brand (left, 1 col) | Work With Us card (right, 2 cols)
     Row 2 — Services | Company | Legal (3 equal cols)
   ══════════════════════════════════════════════════════════════════════════════ */
@media (min-width: 641px) and (max-width: 1024px) {
  .site-footer { padding-block: var(--space-16) var(--space-8); }

  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas:
      "brand  cta    cta"
      "svc    co     legal";
    gap: var(--space-8);
    padding-bottom: var(--space-10);
    margin-bottom: var(--space-6);
    border-bottom: 1px solid rgba(255,255,255,.07);
  }

  .footer-brand          { grid-area: brand; }
  .footer-nav--services  { grid-area: svc; }
  .footer-nav--company   { grid-area: co; }
  .footer-contact        { grid-area: cta; }
  .footer-nav--legal     { grid-area: legal; }

  /* Brand — stacked, left-aligned */
  .footer-brand .footer-logo { margin-bottom: var(--space-4); display: inline-flex; }
  .footer-brand .footer-tagline {
    font-size: var(--text-sm);
    color: rgba(255,255,255,.45);
    line-height: var(--leading-relaxed);
    max-width: 220px;
    margin: 0;
  }

  /* Work With Us — vertical card filling its 2-col area */
  .footer-contact {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-6) var(--space-8);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-xl);
    background: rgba(255,255,255,.03);
    height: 100%;
    box-sizing: border-box;
  }
  .footer-contact__body { display: flex; flex-direction: column; gap: var(--space-2); }
  .footer-contact .footer-heading {
    display: block;
    font-size: 10px;
    color: rgba(255,255,255,.35);
    letter-spacing: 0.12em;
    margin-bottom: 0;
  }
  .footer-contact p {
    font-size: var(--text-base);
    font-weight: var(--weight-semi);
    color: rgba(255,255,255,.85);
    line-height: var(--leading-snug);
    letter-spacing: -0.01em;
    margin: 0;
  }
  .footer-contact .btn--outline {
    align-self: flex-start;
    white-space: nowrap;
    font-size: var(--text-sm);
    color: rgba(255,255,255,.75);
    border-color: rgba(255,255,255,.2);
    padding: 0.55rem 1.25rem;
    margin-top: var(--space-1);
  }
  .footer-contact .btn--outline:hover {
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.4);
    color: #fff;
  }

  /* Nav columns — divider between rows */
  .footer-grid > .footer-nav {
    padding-top: var(--space-2);
  }
  .footer-heading { display: block; margin-bottom: var(--space-4); }
  .footer-nav ul { display: flex; flex-direction: column; gap: var(--space-3); }

  /* Bottom bar */
  .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-6);
  }
  .footer-bottom p { font-size: var(--text-xs); color: rgba(255,255,255,.3); }
}


/* ══════════════════════════════════════════════════════════════════════════════
   MOBILE  ≤ 640px
   Layout:
     Brand (full)
     Services | Company (2 cols)
     Work With Us card (full)
     Legal links — horizontal wrapping (full)
     Copyright centred
   ══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .site-footer {
    padding-block: var(--space-12) calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "brand  brand"
      "svc    co"
      "cta    cta"
      "legal  legal";
    gap: var(--space-6);
    padding-bottom: var(--space-8);
    margin-bottom: var(--space-6);
    border-bottom: 1px solid rgba(255,255,255,.07);
  }

  .footer-brand          { grid-area: brand; }
  .footer-nav--services  { grid-area: svc; }
  .footer-nav--company   { grid-area: co; }
  .footer-contact        { grid-area: cta; }
  .footer-nav--legal     { grid-area: legal; }

  /* Brand */
  .footer-brand .footer-logo { margin-bottom: var(--space-3); }
  .footer-brand .footer-tagline {
    font-size: var(--text-xs);
    color: rgba(255,255,255,.4);
    line-height: var(--leading-relaxed);
    max-width: 100%;
    margin: 0;
  }

  /* Nav columns */
  .footer-heading { display: block; margin-bottom: var(--space-3); font-size: 10px; color: rgba(255,255,255,.35); }
  .footer-nav ul { display: flex; flex-direction: column; gap: var(--space-2); }
  .footer-nav a { font-size: var(--text-xs); color: rgba(255,255,255,.55); }

  /* Work With Us card */
  .footer-contact {
    padding: var(--space-5);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-xl);
    background: rgba(255,255,255,.03);
  }
  .footer-contact .footer-heading {
    display: block;
    font-size: 10px;
    color: rgba(255,255,255,.35);
    letter-spacing: 0.12em;
    margin-bottom: var(--space-2);
  }
  .footer-contact p {
    font-size: var(--text-xs);
    color: rgba(255,255,255,.45);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
  }
  .footer-contact .btn--outline {
    font-size: var(--text-xs);
    padding: 0.45rem 0.9rem;
    color: rgba(255,255,255,.75);
    border-color: rgba(255,255,255,.2);
  }
  .footer-contact .btn--outline:hover {
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.4);
    color: #fff;
  }

  /* Legal — horizontal wrapping */
  .footer-nav--legal .footer-heading { margin-bottom: var(--space-3); }
  .footer-nav--legal ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-4);
  }
  .footer-nav--legal a { font-size: 11px; color: rgba(255,255,255,.35); }
  .footer-nav--legal a:hover { color: rgba(255,255,255,.7); }

  /* Bottom bar */
  .footer-bottom {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    text-align: center;
    padding-top: var(--space-5);
  }
  .footer-bottom p { font-size: var(--text-xs); color: rgba(255,255,255,.3); }
}
