/* ==========================================================================
   Cross Kashmir — Site footer
   Requires tokens.css, base.css, typography.css, layout.css, components.css
   (for .container and the .icon / .icon-flip arrow).

   Layout
   - base (mobile): about on its own row, Explore + Services side by side,
     Connect on its own row.
   - 640px: about on its own row above three columns (Explore, Services,
     Connect). Shorter and more balanced than a 2 x 2 grid, and it keeps
     the visual order identical to the DOM (keyboard) order.
   - 1024px: four columns in one row, the about column slightly wider.
   Column order follows the DOM, so in RTL the about column is on the right.

   The footer is dark green, so it needs its own text colours and its own
   focus colour (the default green focus ring would vanish on dark green).
   Everything is mapped from existing tokens; nothing new is introduced.
   ========================================================================== */

.site-footer {
  --footer-bg:      var(--color-primary-dark);
  --footer-heading: var(--color-surface);
  --footer-text:    var(--color-primary-light);
  --footer-muted:   var(--color-border);
  --footer-rule:    var(--color-primary);
  --color-focus:    var(--color-accent);

  flex: none;
  padding-block-start: var(--space-8);
  background-color: var(--footer-bg);
  color: var(--footer-text);
}

/* Softer muted text and divider, derived from the surface token.
   Browsers without color-mix keep the solid fallbacks above. */
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .site-footer {
    --footer-muted: color-mix(in srgb, var(--color-surface) 72%, transparent);
    --footer-rule:  color-mix(in srgb, var(--color-surface) 20%, transparent);
  }
}

@media (min-width: 1024px) {
  .site-footer {
    padding-block-start: var(--space-12);
  }
}

/* ---- Grid ------------------------------------------------------------------- */
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.site-footer__about,
.site-footer__connect {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .site-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-8);
  }

  .site-footer__connect {
    grid-column: auto;
  }
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
    gap: var(--space-12);
  }

  .site-footer__about {
    grid-column: auto;
  }
}

/* ---- Headings and brand ------------------------------------------------------ */
.site-footer__heading {
  margin-block-end: var(--space-2);
  color: var(--footer-heading);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
}

/* Same gold marker as the header brand, so the two ends of the page match */
.site-footer__brand {
  display: flex;
  align-items: center;
  margin-block-end: var(--space-2);
  color: var(--footer-heading);
  font-size: var(--fs-section);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
}

.site-footer__brand::before {
  content: "";
  width: 4px;
  height: 1.25em;
  margin-inline-end: var(--space-2);
  background-color: var(--color-accent);
  border-radius: var(--radius-sm);
}

.site-footer__text {
  max-width: 34rem;
  font-size: var(--fs-nav);
  line-height: var(--lh-body);
}

/* ---- Link lists --------------------------------------------------------------- */
.site-footer__list {
  display: flex;
  flex-direction: column;
}

/* Rows share one height so the Explore and Services columns line up.
   Links get a full tap target; plain service names use the same row height. */
.site-footer__link,
.site-footer__item {
  display: flex;
  align-items: center;
  min-height: var(--tap-target);
  font-size: var(--fs-nav);
  line-height: var(--lh-ui);
}

@media (min-width: 1024px) {
  .site-footer__link,
  .site-footer__item {
    min-height: 2.25rem;
  }
}

.site-footer__link,
.site-footer__more {
  color: var(--footer-text);
  text-decoration: none;
}

.site-footer__link:hover,
.site-footer__more:hover {
  color: var(--footer-heading);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: var(--underline-offset);
}

.site-footer__more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap-target);
  margin-block-start: var(--space-1);
  color: var(--footer-heading);
  font-size: var(--fs-nav);
  font-weight: var(--fw-medium);
  line-height: var(--lh-ui);
}

/* ---- Social profile links: icon buttons, one row that wraps ------------------------------
   Each is a full tap target; the name is in aria-label/title (the icon is decorative). */
.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block-start: var(--space-2);
}

.site-footer__social-link {
  display: inline-grid;
  place-items: center;
  width: var(--tap-target);
  height: var(--tap-target);
  border: var(--border-width) solid var(--footer-rule);
  border-radius: var(--radius-md);
  color: var(--footer-text);
  font-size: 1.375rem;                 /* sizes the 1em .icon */
  line-height: 1;
  text-decoration: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.site-footer__social-link:hover {
  border-color: var(--color-accent);
  color: var(--footer-heading);
}

/* ---- Bottom bar ----------------------------------------------------------------- */
.site-footer__bottom {
  margin-block-start: var(--space-8);
  padding-block: var(--space-4);
  border-block-start: var(--border-width) solid var(--footer-rule);
  color: var(--footer-muted);
  font-size: var(--fs-meta);
  line-height: var(--lh-ui);
}

/* Policy pages (About, Editorial guidelines, Guest policy, Privacy, Contact): one wrapping row above the copyright line.
   The pages are English-only, so the links carry lang="en" dir="ltr" inside the Urdu edition too. */
.site-footer__legal {
  margin-block-end: var(--space-2);
}

.site-footer__legal-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-4);
}

.site-footer__legal-link {
  display: flex;
  align-items: center;
  min-height: var(--tap-target);
  color: var(--footer-text);
  font-size: var(--fs-nav);
  line-height: var(--lh-ui);
  text-decoration: none;
}

.site-footer__legal-link:hover {
  color: var(--footer-heading);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: var(--underline-offset);
}
