/* ====================================================================
   site-footer.css – Shared Editorial Footer (LIGHT Aesthetic)
   NexStudio-style minimalist typography, open 3-column metadata,
   generous uppercase wordmark, fine hairlines, and purple hover accents.
   Fully scoped and self-contained to render identically on all pages.
   ==================================================================== */

/* Display font preloads / definitions */
/* ── Universal Footer Surface ────────────────────────────────────── */
.nex-footer,
.site-footer {
  background: var(--color-bg);
  color: var(--color-text);
  border-top: var(--border-width) solid color-mix(in srgb, var(--color-text) 14%, transparent);
  padding: clamp(var(--space-16), 8vw, 112px) clamp(var(--space-6), 4vw, var(--space-16)) var(--space-9);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  font-family: var(--font-heading);
  width: 100%;
  margin: 0;
}

.nex-footer *,
.site-footer * {
  box-sizing: border-box;
}

/* ── Inner Constrained Container ─────────────────────────────────── */
.nex-footer__inner,
.site-footer__inner {
  max-width: none;
  margin: 0;
  width: 100%;
  padding: 0;
  display: block;
}

/* ── 3-Column Editorial Grid ─────────────────────────────────────── */
.nex-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) repeat(2, minmax(0, 1fr));
  gap: clamp(var(--space-8), 6vw, 112px);
  align-items: start;
}

@media (max-width: 860px) {
  .nex-footer__grid {
  grid-template-columns: 1fr;
  gap: var(--space-10);
}
}

.nex-footer__col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── Column Headers (Clean hairline divider ABOVE title) ─────────── */
.nex-footer__col-head {
  border-top: var(--border-width) solid color-mix(in srgb, var(--color-text) 14%, transparent);
  border-bottom: none;
  padding-top: var(--space-3-5);
  padding-bottom: 0;
  margin-bottom: 22px;
}

.nex-footer__col-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: block;
  line-height: 1.2;
}

/* ── Column 1: Email & Tagline ───────────────────────────────────── */
.nex-footer__email {
  font-family: var(--font-heading);
  font-size: var(--fs-heading-md);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  text-decoration: none;
  display: inline-block;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-5);
  transition: color 200ms ease, transform 200ms ease;
}

.nex-footer__email:hover,
.nex-footer__email:focus-visible {
  color: var(--color-accent);
  transform: translateX(4px);
}

.nex-footer__email:focus-visible,
.nex-footer__link:focus-visible,
.nex-footer__back:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
}

.nex-footer__tagline {
  font-family: var(--font-heading);
  font-size: var(--fs-heading-md);
  font-weight: var(--weight-medium);
  line-height: 1.4;
  color: var(--color-text-secondary);
  max-width: 500px;
  margin: 0;
}

.nex-footer__tagline strong {
  font-weight: var(--weight-heavy);
  color: var(--color-accent);
}

/* ── Column 2 & 3: Link Lists (Never bulleted) ───────────────────── */
.nex-footer__links {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3-5);
}

.nex-footer__links li {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.nex-footer__link {
  font-family: var(--font-heading);
  font-size: var(--font-size-md);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  transition: color 200ms ease, transform 200ms ease;
}

.nex-footer__link:hover,
.nex-footer__link:focus-visible {
  color: var(--color-accent);
  transform: translateX(4px);
}

/* ── Giant Brand Typography ("LIGHT") ────────────────────────────── */
.nex-footer__brand-wrap {
  margin-top: clamp(var(--space-12), 6vw, var(--space-24));
  margin-bottom: clamp(var(--space-7), 4vw, var(--space-12));
  line-height: 0.8;
  overflow: hidden;
  text-align: left;
}

.nex-footer__giant-brand,
#footer-light-brand {
  display: inline-block;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  position: relative;
  font-family: var(--font-heading);
  font-size: var(--fs-display-xl);
  font-weight: var(--weight-heavy);
  letter-spacing: var(--letter-spacing-heading);
  line-height: 0.8;
  text-transform: uppercase;
  color: var(--color-text);
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  isolation: isolate;
  touch-action: pan-y;
  margin: 0;
  padding: 0;
  --mesh-origin-x: 50%;
  --mesh-origin-y: 50%;
  --mesh-tx: 0px;
  --mesh-ty: 0px;
  --mesh-scale-x: 1;
  --mesh-scale-y: 1;
  --mesh-skew-x: 0deg;
  --mesh-skew-y: 0deg;
  --mesh-cx: 0px;
  --mesh-cy: 0px;
  --mesh-ca: 0;
  transform-origin: var(--mesh-origin-x) var(--mesh-origin-y);
  -webkit-transform-origin: var(--mesh-origin-x) var(--mesh-origin-y);
  transform: translate3d(var(--mesh-tx), var(--mesh-ty), 0)
             scale(var(--mesh-scale-x), var(--mesh-scale-y))
             skew(var(--mesh-skew-x), var(--mesh-skew-y));
  -webkit-transform: translate3d(var(--mesh-tx), var(--mesh-ty), 0)
                     scale(var(--mesh-scale-x), var(--mesh-scale-y))
                     skew(var(--mesh-skew-x), var(--mesh-skew-y));
  will-change: transform;
}

/* Individual letter spans for localized spring hover deformation */
.nex-footer__giant-brand .mesh-letter,
#footer-light-brand .mesh-letter {
  display: inline-block;
  position: relative;
  will-change: transform;
  transform-origin: 50% 65%;
  -webkit-transform-origin: 50% 65%;
  --letter-dx: 0px;
  --letter-dy: 0px;
  --letter-scale: 1;
  --letter-skew: 0deg;
  transform: translate3d(var(--letter-dx), var(--letter-dy), 0)
             scale(var(--letter-scale))
             skewX(var(--letter-skew));
  -webkit-transform: translate3d(var(--letter-dx), var(--letter-dy), 0)
                     scale(var(--letter-scale))
                     skewX(var(--letter-skew));
}

.nex-footer__giant-brand::before,
.nex-footer__giant-brand::after,
#footer-light-brand::before,
#footer-light-brand::after {
  display: none;
  content: none;
}

/* ── Bottom Bar: Copyright & Back To Top ─────────────────────────── */
.nex-footer__bottom {
  border-top: var(--border-width) solid color-mix(in srgb, var(--color-text) 14%, transparent);
  margin-top: clamp(var(--space-10), 6vw, var(--space-16));
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.nex-footer__copyright {
  font-family: var(--font-heading);
  font-size: var(--font-size-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  margin: 0;
  letter-spacing: 0.02em;
}

.nex-footer__back {
  font-family: var(--font-heading);
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 200ms ease, transform 200ms ease;
  cursor: pointer;
}

.nex-footer__back:hover,
.nex-footer__back:focus-visible {
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* ── Accessibility & Reduced Motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .nex-footer__email,
  .nex-footer__link,
  .nex-footer__back {
  transition: none !important;
  transform: none !important;
}
  .nex-footer__giant-brand,
  #footer-light-brand,
  .nex-footer__giant-brand .mesh-letter,
  #footer-light-brand .mesh-letter {
  animation: none !important;
  transition: none !important;
  transform: none !important;
}
}
