/* Component: GlobalFooter -------------------------------------------------- */
@layer components {
  .tp-footer {
    background: var(--tp-color-paper);
    border-top: var(--tp-border);
  }

  /* Mobile-only inset hairline (replaces border-top under 700px). */
  .tp-footer__divider {
    display: none;
  }

  .tp-footer__body {
    padding: 64px var(--tp-gutter) 42px;
  }

  .tp-footer__inner {
    max-width: var(--tp-container);
    margin-inline: auto;
  }

  .tp-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.06fr) minmax(0, 0.8fr) minmax(0, 1.28fr);
    gap: 42px 20px;
    align-items: start;
  }

  /* ---- Brand column ---------------------------------------------------- */
  .tp-footer__brand {
    width: var(--tp-footer-brand-width);
    max-width: 100%;
  }

  .tp-footer__logo {
    display: block;
    width: var(--tp-footer-logo-width);
    max-width: 100%;
    height: auto;
    margin: 0 auto 16px;
  }

  .tp-footer__social {
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    width: var(--tp-footer-brand-width);
    max-width: 100%;
    margin: 18px auto 0;
    padding: 0 8px;
    font-family: var(--tp-font-mono);
    font-size: var(--tp-size-label);
    letter-spacing: var(--tp-track-label);
    text-transform: uppercase;
    color: var(--tp-color-gold-text);
  }

  .tp-footer__social-link {
    color: var(--tp-color-gold-text);
  }

  .tp-footer__social-link:hover {
    color: var(--tp-color-cobalt);
  }

  .tp-footer__contact {
    display: flex;
    justify-content: center;
    margin-top: 18px;
  }

  /* ---- The Collection column ------------------------------------------- */
  .tp-footer__collection {
    display: grid;
    gap: 14px;
    align-content: start;
  }

  .tp-footer__eyebrow {
    font-family: var(--tp-font-mono);
    font-size: var(--tp-size-label-l);
    letter-spacing: var(--tp-track-eyebrow);
    text-transform: uppercase;
    color: var(--tp-color-gold-text);
  }

  .tp-footer__link {
    font-size: var(--tp-size-link-l);
    color: var(--tp-color-text);
  }

  .tp-footer__link:hover {
    color: var(--tp-color-cobalt);
  }

  /* Phase 9 — a finger-sized target without a bigger-looking link.
     These sit 22px tall in a column with clear space between them, so the hit
     area is extended DOWN INTO that existing gap and pulled back again with a
     negative margin. Nothing moves: the rendered rhythm, type and spacing are
     the approved ones, measured identical against the baseline. Touch only. */
  @media (hover: none) {
    .tp-footer__link,
    .tp-footer__legal-link,
    .tp-footer__social-link {
      display: inline-block;
      padding-block: 7px;
      margin-block: -7px;
    }
  }

  .tp-footer__link--emphasis {
    font-style: italic;
    font-weight: var(--tp-weight-semibold);
    color: var(--tp-color-ink);
  }

  /* ---- The Newsletter column ------------------------------------------- */
  .tp-footer__lead {
    margin: 12px 0 20px;
    font-size: var(--tp-size-newsletter);
    font-style: italic;
    font-weight: var(--tp-weight-light);
    line-height: var(--tp-leading-newsletter);
    color: var(--tp-color-text);
  }

  .tp-footer__form {
    max-width: 100%;
  }

  /* ---- Bottom bar ------------------------------------------------------ */
  .tp-footer__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: var(--tp-border);
    font-family: var(--tp-font-mono);
    font-size: var(--tp-size-label-l);
    letter-spacing: var(--tp-track-label);
    text-transform: uppercase;
    color: var(--tp-color-gold-text);
  }

  .tp-footer__legal {
    display: flex;
    gap: 26px;
  }

  .tp-footer__legal-link {
    color: var(--tp-color-gold-text);
  }

  .tp-footer__legal-link:hover {
    color: var(--tp-color-cobalt);
  }

  /* ---- Tablet 700–1099 ------------------------------------------------- */
  @media (max-width: 1099px) {
    .tp-footer__body {
      padding: 46px var(--tp-gutter) 32px;
    }

    .tp-footer__grid {
      gap: 38px 18px;
    }

    .tp-footer__link {
      font-size: var(--tp-size-link-m);
    }

    .tp-footer__lead {
      margin: 12px 0 18px;
      font-size: var(--tp-size-newsletter-tablet);
      line-height: var(--tp-leading-snug);
    }
  }

  /* ---- Mobile < 700 ---------------------------------------------------- */
  @media (max-width: 699px) {
    .tp-footer {
      border-top: 0;
    }

    .tp-footer__divider {
      display: block;
      height: 1px;
      margin: 0 var(--tp-gutter);
      background: var(--tp-color-line);
    }

    .tp-footer__body {
      padding: 38px var(--tp-gutter) 32px;
    }

    .tp-footer__grid {
      grid-template-columns: 1fr;
      gap: 30px;
      justify-items: center;
      text-align: center;
    }

    .tp-footer__brand {
      width: 100%;
      grid-column: 1 / -1;
      text-align: center;
    }

    .tp-footer__logo {
      width: 84%;
      max-width: var(--tp-footer-logo-width-mobile);
    }

    .tp-footer__social {
      width: auto;
      justify-content: center;
      gap: 16px;
      margin-top: 22px;
      padding: 0;
      font-size: var(--tp-size-label-l);
    }

    .tp-footer__contact {
      margin-top: 20px;
    }

    .tp-footer__collection {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 14px;
      text-align: center;
      min-width: 0;
    }

    .tp-footer__link {
      font-size: var(--tp-size-link-s);
      line-height: var(--tp-leading-newsletter);
    }

    .tp-footer__newsletter {
      grid-column: 1 / -1;
      width: 100%;
    }

    .tp-footer__lead {
      margin: 12px 0 20px;
      text-align: center;
      font-size: var(--tp-size-newsletter-mobile);
      line-height: var(--tp-leading-newsletter);
    }

    .tp-footer__form {
      width: 100%;
      max-width: 340px;
      margin: 0 auto;
    }

    .tp-footer__bar {
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 14px;
    }
  }
}

/* ==========================================================================
   Salon context modifier — LOCKED values from the Salon exports.
   Same component; only the values and the mobile bottom-bar order change.
   ========================================================================== */
@layer components {
  .tp-footer--salon .tp-footer__body {
    padding: 64px 6vw 42px;
  }

  .tp-footer--salon .tp-footer__lead {
    font-size: 25px;
    line-height: 1.35;
  }

  @media (max-width: 1099px) {
    .tp-footer--salon .tp-footer__body {
      padding: 48px 34px 34px;
    }

    .tp-footer--salon .tp-footer__lead {
      margin: 12px 0 20px;
      font-size: 23px;
      line-height: 1.35;
    }
  }

  @media (max-width: 699px) {
    .tp-footer--salon .tp-footer__divider {
      margin: 0 22px;
    }

    .tp-footer--salon .tp-footer__body {
      padding: 38px 22px 36px;
    }

    .tp-footer--salon .tp-footer__grid {
      gap: 0;
    }

    .tp-footer--salon .tp-footer__logo {
      width: 158px;
      max-width: 100%;
      margin: 0 auto 18px;
    }

    .tp-footer--salon .tp-footer__social {
      margin-top: 20px;
    }

    .tp-footer--salon .tp-footer__contact {
      margin-top: 20px;
    }

    .tp-footer--salon .tp-footer__collection {
      margin: 34px 0;
    }

    .tp-footer--salon .tp-footer__eyebrow {
      text-align: center;
    }

    .tp-footer--salon .tp-footer__lead {
      margin: 12px 0 18px;
      font-size: 21px;
      line-height: 1.35;
    }

    .tp-footer--salon .tp-footer__bar {
      display: grid;
      justify-items: center;
      gap: 18px;
      margin-top: 34px;
      padding-top: 24px;
      font-size: 10px;
    }

    /* Salon mobile order: ornament, Terms / Privacy, then copyright. */
    .tp-footer--salon .tp-footer__ornament {
      order: 1;
    }

    .tp-footer--salon .tp-footer__legal {
      order: 2;
    }

    .tp-footer--salon .tp-footer__copy {
      order: 3;
    }
  }

  /* The Salon column, added in Phase 5.5 alongside The Collection. */
  .tp-footer__salon {
    display: grid;
    gap: var(--tp-space-3);
    align-content: start;
  }

  @media (max-width: 1099px) {
    .tp-footer__grid {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
  }

  @media (max-width: 699px) {
    .tp-footer__grid {
      grid-template-columns: minmax(0, 1fr);
    }

    .tp-footer__salon {
      justify-items: center;
      text-align: center;
    }
  }
}
