/* ============================================================
   FOOTER

   Was a centred stack with a heading at the same scale as the page
   titles — three words the size of a section header, which made the
   end of the page shout louder than anything in it. Rebuilt as a
   normal editorial footer: a modest closing line, then columns of
   actual information, then a legal strip.
   ============================================================ */

.footer {
  scroll-margin-top: clamp(60px, 10vh, 90px);
  position: relative;
  isolation: isolate;
  background-color: var(--c-bg);
  border-block-start: 1px solid var(--c-border);
  box-shadow: var(--shadow-footer);
  padding-block: var(--sp-section) var(--sp-xl);
  overflow: hidden;
}

.footer > .container {
  position: relative;
  z-index: 1;
}

/* ---- Ambient Glassmorphism Backdrop ----------------------------
   Balanced visibility: neither washed-out/fuzzy nor distracting.
   A delicate frosted canvas with 3 ambient floating orbs, a faint
   mesh grid, and a travelling hairline rim of light along the top.
   ---------------------------------------------------------------- */

.footer__glass-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.footer__glass-mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgb(var(--rgb-ink) / 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(var(--rgb-ink) / 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 85%);
  opacity: 0.8;
}

/* Three floating luminous glass orbs */
.footer__glass-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.20;
  will-change: transform;
}

:root[data-theme='light'] .footer__glass-orb {
  opacity: 0.14;
  mix-blend-mode: multiply;
  filter: blur(68px);
}

/* Orb 1: Violet/Indigo — upper-right ambient glow */
.footer__glass-orb--1 {
  inline-size: clamp(280px, 35vw, 520px);
  block-size: clamp(280px, 35vw, 520px);
  inset-block-start: -10%;
  inset-inline-end: 5%;
  background: radial-gradient(circle, #8E7BF2 0%, #9B5FD9 50%, transparent 72%);
  animation: footer-orb-float-1 22s ease-in-out infinite alternate;
}

/* Orb 2: Warm Amber/Gold — center/left warm contrast */
.footer__glass-orb--2 {
  inline-size: clamp(240px, 30vw, 440px);
  block-size: clamp(240px, 30vw, 440px);
  inset-block-start: 25%;
  inset-inline-start: -5%;
  background: radial-gradient(circle, #F0C45A 0%, #EE9F5C 50%, transparent 72%);
  animation: footer-orb-float-2 26s ease-in-out infinite alternate;
}

/* Orb 3: Cyan/Emerald — bottom subtle pulse */
.footer__glass-orb--3 {
  inline-size: clamp(220px, 28vw, 400px);
  block-size: clamp(220px, 28vw, 400px);
  inset-block-end: -10%;
  inset-inline-start: 40%;
  background: radial-gradient(circle, #50E3C2 0%, #4EA8DE 50%, transparent 72%);
  animation: footer-orb-float-3 18s ease-in-out infinite alternate;
}

@keyframes footer-orb-float-1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-12%, 18%) scale(1.12); }
  100% { transform: translate(-6%, 8%) scale(0.95); }
}

@keyframes footer-orb-float-2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(16%, -15%) scale(1.15); }
  100% { transform: translate(8%, -6%) scale(0.92); }
}

@keyframes footer-orb-float-3 {
  0% { transform: translate(0, 0) scale(0.94); opacity: 0.16; }
  50% { transform: translate(-10%, -12%) scale(1.18); opacity: 0.24; }
  100% { transform: translate(6%, 6%) scale(1); opacity: 0.18; }
}

/* Animated glass top rim */
.footer__glass-rim {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgb(var(--rgb-ink) / 0.10) 15%,
    color-mix(in srgb, #9B5FD9 60%, #50E3C2) 50%,
    rgb(var(--rgb-ink) / 0.10) 85%,
    transparent 100%);
  background-size: 200% 100%;
  animation: footer-rim-glide 14s linear infinite;
}

@keyframes footer-rim-glide {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ---- closing call (Frosted Glass Panel) ------------------------ */

.footer__cta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  padding: clamp(1.8rem, 4vw, 2.8rem);
  margin-block-end: var(--sp-2xl);
  border-radius: var(--r-section, 24px);

  /* Refined Frosted Glass Appearance */
  background: rgb(var(--rgb-raised) / 0.52);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgb(var(--rgb-ink) / 0.14);
  box-shadow:
    0 16px 40px rgb(var(--rgb-shadow) / 0.35),
    inset 0 1px 0 rgb(255 255 255 / 0.14),
    inset 0 0 20px rgb(255 255 255 / 0.02);
  overflow: hidden;
  z-index: 1;
}

/* Gentle inner reflection sheen */
.footer__cta::before {
  content: '';
  position: absolute;
  inset-block-start: -40%;
  inset-inline-start: -20%;
  inline-size: 140%;
  block-size: 180%;
  background: radial-gradient(ellipse at 35% 25%,
    rgb(255 255 255 / 0.06) 0%,
    transparent 60%);
  pointer-events: none;
}

:root[data-theme='light'] .footer__cta {
  background: rgb(255 255 255 / 0.65);
  border-color: rgb(var(--rgb-ink) / 0.12);
  box-shadow:
    0 16px 36px rgb(var(--rgb-shadow) / 0.08),
    inset 0 1px 0 rgb(255 255 255 / 0.9);
}

/* Deliberately NOT .section__title. This is a closing line, not a
   section header — at the old 10rem it out-shouted the content
   above it. */
.footer__title {
  font-size: var(--fs-subhead);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
  max-width: 18ch;
}

/* ---- columns ---------------------------------------------------
   auto-fit rather than fixed columns: the four blocks reflow to
   2x2 and then to a single column without a breakpoint each.
   ---------------------------------------------------------------- */

.footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: var(--sp-2xl) var(--sp-lg);
  padding-block: var(--sp-3xl);
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

/* The brand column gets more room than the link columns. */
.footer__col--brand {
  grid-column: span 1;
  gap: var(--sp-md);
}

.footer__logo {
  width: clamp(150px, 16vw, 190px);
  height: auto;
}

.footer__about {
  max-width: 32ch;
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  line-height: var(--lh-body);
  color: var(--c-text-dim);
}

.footer__heading {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--c-text);
  margin-block-end: var(--sp-2xs);
}

.footer__link,
.footer__text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  line-height: var(--lh-body);
  color: var(--c-text-dim);
  transition: color var(--dur-fast) var(--ease);
}

.footer__link:hover {
  color: var(--c-text);
}

/* Latin-script values (email, phone) sit inside an RTL paragraph.
   Without an explicit direction the browser reorders the trailing
   punctuation and the address renders with its pieces shuffled. */
.footer__ltr {
  direction: ltr;
  display: inline-block;
  unicode-bidi: isolate;
}

/* ---- social ---------------------------------------------------- */

.footer__social {
  display: flex;
  gap: var(--sp-sm);
  margin-block-start: var(--sp-2xs);
}

/* 44px, not 40: below that a finger misses as often as it hits.
   The icon inside stays 18px — the extra is padding, not scale. */
.footer__social a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;

  background: rgb(var(--rgb-ink) / 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--c-border);
  border-radius: 50%;
  color: var(--c-text-dim);
  box-shadow: 0 4px 12px rgb(var(--rgb-shadow) / 0.15);

  transition:
    color        var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    background   var(--dur-fast) var(--ease),
    box-shadow   var(--dur-fast) var(--ease),
    transform    var(--dur-fast) var(--ease-out);
}

.footer__social a:hover {
  color: var(--c-text);
  background: rgb(var(--rgb-ink) / 0.10);
  border-color: rgb(var(--rgb-ink) / 0.35);
  box-shadow: 0 6px 18px rgb(var(--rgb-shadow) / 0.25), 0 0 12px rgb(var(--rgb-ink) / 0.15);
  transform: translateY(-3px) scale(1.05);
}

.footer__social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ---- legal strip ------------------------------------------------ */

.footer__legal {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  padding-block-start: var(--sp-lg);
  border-block-start: 1px solid var(--c-border);
}

.footer__contact-person {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-text);
  margin-block-end: var(--sp-xs);
  line-height: 1.5;
}

.footer__contact-label {
  font-size: var(--fs-xs);
  color: var(--c-text-dim);
  margin-inline-end: 6px;
}

.footer__address {
  font-size: var(--fs-sm);
  color: var(--c-text-dim);
  line-height: 1.6;
  margin-block: 0.35rem;
}

.footer__address-val {
  color: var(--c-text);
  font-weight: var(--fw-medium);
}

.footer__note {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: var(--fs-xs);
  color: var(--c-text-dim);
  margin-inline: auto;
}

.footer__heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-inline: 4px;
  color: #ff3366;
  animation: footer-heartbeat 1.35s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  transform-origin: center;
}

.footer__heart svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  filter: drop-shadow(0 0 6px rgba(255, 51, 102, 0.55));
}

@keyframes footer-heartbeat {
  0%   { transform: scale(1); }
  14%  { transform: scale(1.35); }
  28%  { transform: scale(1); }
  42%  { transform: scale(1.22); }
  70%  { transform: scale(1); }
  100% { transform: scale(1); }
}

.footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
}

/* Padded to clear the 24px floor in WCAG 2.5.8. Measured at 21px
   before this, and the exemption for links inline in a sentence
   does not apply — these sit alone in a <nav>, not inside a run of
   prose.

   The padding is vertical only and pulled back out with a negative
   margin, so the row keeps the same height and the gap between the
   two links is still the one --sp-md sets. */
.footer__legal-links a {
  display: inline-block;
  padding-block: 6px;
  margin-block: -6px;
  font-size: var(--fs-xs);
  color: var(--c-text-dim);
  transition: color var(--dur-fast) var(--ease);
}

.footer__legal-links a:hover {
  color: var(--c-text);
}

@media (max-width: 639px) {
  .footer__cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer__glass-orb,
  .footer__glass-rim {
    animation: none !important;
  }
}

