/* ==========================================================================
   LE BENIC — footer (all pages)

   The closing chapter. As the footer rises, the page above it loses focus,
   contrast and light (.lb-fade, driven by footer.js), fading out exactly where
   the footer begins; the footer's own content then emerges from that darkness.

   Typography only from the site: Instrument Serif (the wordmark face) and Jost
   (the navigation face). Warm ivory, muted ivory, a trace of warm gold.
   ========================================================================== */

/* ---------------------------------------------------------------- the dissolve */
.lb-fade {
  --end: 100vh;                        /* the footer's top edge on screen (footer.js) */
  --t: 0;                              /* 0 = no transition … 1 = fully dissolved */
  position: fixed;
  inset: 0;
  z-index: 88;                         /* above the page, below the header and its overlays */
  pointer-events: none;
  visibility: hidden;
  /* the layer covers exactly the page above the footer's top edge */
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 var(--end), transparent var(--end));
  mask-image: linear-gradient(to bottom, #000 0, #000 var(--end), transparent var(--end));
}
.lb-fade__focus,
.lb-fade__shade {
  position: absolute;
  inset: 0;
}
/* depth: a soft loss of focus, contrast and colour — its strength follows --t */
.lb-fade__focus {
  opacity: var(--t);
  -webkit-backdrop-filter: blur(7px) contrast(0.86);
  backdrop-filter: blur(7px) contrast(0.86);
}
/* light: the whole scene settles into the footer's warm near-black as --t grows, and always
   deepens completely toward the footer's edge, so the scene melts into it without a seam */
.lb-fade__shade {
  background: linear-gradient(to bottom,
    rgb(12 11 9 / calc(var(--t) * 0.72)) 0,
    rgb(12 11 9 / calc(var(--t) * 0.72)) calc(var(--end) - 62vh),
    rgb(12 11 9 / calc(0.35 + var(--t) * 0.5)) calc(var(--end) - 26vh),
    rgb(12 11 9 / 0.94) calc(var(--end) - 7vh),
    rgb(12 11 9) var(--end));
}
@media (max-width: 760px) {
  .lb-fade__focus { -webkit-backdrop-filter: blur(6px) contrast(0.88) saturate(0.8); backdrop-filter: blur(6px) contrast(0.88) saturate(0.8); }
}
@media (prefers-reduced-motion: reduce) {
  .lb-fade__focus { display: none; }
}

/* ---------------------------------------------------------------- the footer */
.lb-footer {
  --gold: #c59a5d;
  --ivory: #ece4d6;
  --ivory-soft: rgb(236 228 214 / 0.62);
  --ivory-quiet: rgb(236 228 214 / 0.42);
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: clamp(150px, 26vh, 280px) var(--gutter) clamp(30px, 4.5vh, 48px);
  color: var(--ivory);
  /* warm near-black with an almost subconscious depth: earth brown low left, deep olive low right,
     a quiet vignette so the centre stays clear */
  background:
    radial-gradient(ellipse 70% 60% at 50% 46%, rgb(14 13 11 / 0) 0%, rgb(8 7 6 / 0.55) 100%),
    radial-gradient(ellipse 55% 70% at 4% 100%, rgb(38 28 20 / 0.55), rgb(38 28 20 / 0) 70%),
    radial-gradient(ellipse 60% 75% at 100% 92%, rgb(30 34 22 / 0.6), rgb(30 34 22 / 0) 72%),
    #0c0b09;
}
/* the top of the footer is the same darkness the page dissolved into: no edge */
.lb-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: clamp(120px, 22vh, 240px);
  background: linear-gradient(to bottom, rgb(12 11 9) 0%, rgb(12 11 9 / 0) 100%);
  pointer-events: none;
}
.lb-footer__inner {
  position: relative;
  max-width: 76rem;
  margin: 0 auto;
}
/* emerges from the dissolve (footer.js sets --rise 0 → 1) */
.lb-footer__inner {
  --rise: 1;
  opacity: var(--rise);
  transform: translate3d(0, calc((1 - var(--rise)) * 26px), 0);
}

/* the closing signature */
.lb-footer__sign {
  text-align: center;
  margin-bottom: clamp(70px, 12vh, 130px);
}
.lb-footer__wordmark {
  display: block;
  font-family: var(--font-wordmark);
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 44px);
  line-height: 1;
  letter-spacing: 0.3em;
  margin-right: -0.3em;
  word-spacing: -0.1em;
  color: var(--ivory);
}
.lb-footer__tagline {
  display: block;
  margin-top: 1.1rem;
  font-family: var(--font-nav);
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 0.46em;
  margin-right: -0.46em;
  text-transform: uppercase;
  color: var(--ivory-soft);
}
.lb-footer__tagline::before,
.lb-footer__tagline::after {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  margin: 0 1.1em 0.3em;
  vertical-align: middle;
  background: rgb(197 154 93 / 0.45);
}

/* the three groups, side by side */
.lb-footer__groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(40px, 6vw, 120px);
  max-width: 62rem;
  margin: 0 auto;
}
.lb-footer__group { justify-self: center; min-width: 11rem; }
.lb-footer__heading {
  margin: 0 0 1.6rem;
  font-family: var(--font-nav);
  font-weight: 400;
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--ivory-quiet);
}
.lb-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.lb-footer__list li + li { margin-top: 0.75rem; }

/* links: muted ivory, brightening on hover, a fine warm-gold line drawing in beneath */
.lb-footer__link {
  position: relative;
  display: inline-block;
  padding-bottom: 3px;
  color: var(--ivory-soft);
  transition: color 0.7s var(--ease-cine);
}
.lb-footer__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgb(197 154 93 / 0.7);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s var(--ease-cine);
}
.lb-footer__link:hover,
.lb-footer__link:focus-visible { color: var(--ivory); }
.lb-footer__link:hover::after,
.lb-footer__link:focus-visible::after { transform: scaleX(1); }
.lb-footer__link:focus-visible { outline: none; }

.lb-footer__list .lb-footer__link {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.25vw, 1.4rem);
  line-height: 1.2;
}

/* the quieter legal layer */
.lb-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 2.2rem;
  margin: clamp(90px, 14vh, 150px) 0 0;
  padding: 0;
  list-style: none;
}
.lb-footer__legal .lb-footer__link,
.lb-footer__legal button.lb-footer__link {
  font-family: var(--font-nav);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ivory-quiet);
}
.lb-footer__legal .lb-footer__link:hover,
.lb-footer__legal .lb-footer__link:focus-visible { color: var(--ivory-soft); }

/* the final line */
.lb-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1.4rem;
  margin-top: clamp(28px, 4vh, 44px);
  padding-top: clamp(20px, 3vh, 30px);
  border-top: 1px solid rgb(236 228 214 / 0.07);
  font-family: var(--font-nav);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ivory-quiet);
}
.lb-footer__dot { color: rgb(197 154 93 / 0.6); }
/* reserved for verified business details later (company name, registration, VAT) */
.lb-footer__company:empty { display: none; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 760px) {
  .lb-footer { padding-top: clamp(120px, 20vh, 180px); }
  .lb-footer__sign { margin-bottom: 72px; }
  .lb-footer__wordmark { font-size: clamp(22px, 7vw, 30px); }
  .lb-footer__tagline { font-size: 10px; letter-spacing: 0.38em; margin-right: -0.38em; }
  .lb-footer__tagline::before,
  .lb-footer__tagline::after { width: 18px; margin: 0 0.8em 0.3em; }

  .lb-footer__groups { grid-template-columns: 1fr; gap: 54px; text-align: center; }
  .lb-footer__group { min-width: 0; }
  .lb-footer__heading { margin-bottom: 1.2rem; }
  .lb-footer__list li + li { margin-top: 0.7rem; }
  .lb-footer__list .lb-footer__link { font-size: 1.35rem; }

  .lb-footer__legal { margin-top: 84px; gap: 1rem 1.6rem; }
  .lb-footer__legal .lb-footer__link,
  .lb-footer__legal button.lb-footer__link { font-size: 12px; }
  .lb-footer__base { flex-direction: column; gap: 0.4rem; text-align: center; }
}
