/* =========================================================
   Footer — logo card, reveal, animated top edge, hover effects,
   back-to-top button with scroll-progress ring
   ========================================================= */
.sfoot { overflow: hidden; isolation: isolate; }

/* light gliding along the top edge */
.sfoot::before {
  left: 0; right: 0;
  background: linear-gradient(90deg, transparent, rgba(190, 120, 255, .8), rgba(247, 196, 124, .95), rgba(190, 120, 255, .8), transparent) no-repeat;
  background-size: 40% 100%;
  background-position: -40% 0;
  animation: sfEdge 6s linear infinite;
}
/* soft aurora drifting behind the content */
.sfoot::after {
  content: "";
  position: absolute;
  inset: -60% -10%;
  z-index: -1;
  background:
    radial-gradient(30% 40% at 20% 40%, rgba(130, 40, 230, .16), transparent 70%),
    radial-gradient(25% 35% at 80% 60%, rgba(247, 196, 124, .07), transparent 70%);
  animation: sfAurora 18s ease-in-out infinite alternate;
  pointer-events: none;
}
.sfoot__inner { position: relative; }

/* ---------- logo on a white card ---------- */
.sfoot__logo--card {
  width: auto;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 6px 24px -8px rgba(138, 23, 255, .6), 0 0 0 1px rgba(255, 255, 255, .2);
  transition: transform .4s var(--ease, ease), box-shadow .4s;
}
.sfoot__logo--card img { width: auto; height: 46px; }
.sfoot__logo--card:hover, .sfoot__logo--card:focus-visible {
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 0 12px 32px -8px rgba(138, 23, 255, .9), 0 0 0 1px rgba(255, 255, 255, .35), 0 0 30px rgba(170, 90, 255, .35);
  filter: none;
  outline: none;
}

/* ---------- staggered reveal ---------- */
.sfoot__inner > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease, ease), transform .7s var(--ease, ease);
}
.sfoot.is-in .sfoot__inner > * { opacity: 1; transform: none; }
.sfoot.is-in .sfoot__inner > :nth-child(1) { transition-delay: .05s; }
.sfoot.is-in .sfoot__inner > :nth-child(2) { transition-delay: .15s; }
.sfoot.is-in .sfoot__inner > :nth-child(3) { transition-delay: .25s; }
.sfoot.is-in .sfoot__inner > :nth-child(4) { transition-delay: .35s; }
.sfoot.is-in .sfoot__inner > :nth-child(5) { transition-delay: .45s; }
.sfoot.is-in .sfoot__inner > :nth-child(6) { transition-delay: .55s; }
/* after the reveal, hover transforms respond instantly */
.sfoot.is-settled .sfoot__inner > * { transition-delay: 0s; }

/* ---------- links ---------- */
.sfoot__links a { position: relative; transition: color .3s, background-size .35s var(--ease, ease), transform .3s var(--ease, ease); }
.sfoot__links a:hover { transform: translateY(-1px); color: #f7c47c; }
.sfoot__mail svg { transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), stroke .3s; }
.sfoot__mail:hover { color: #f7c47c; }
.sfoot__mail:hover svg { transform: rotate(-12deg) scale(1.2); animation: sfWiggle .6s ease; }
/* ---------- contact: phone + email stacked in one slot of the row ---------- */
.sfoot__contact {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  margin: 0;
  font-style: normal;
  padding-left: clamp(12px, 1.6vw, 22px);
  border-left: 1px solid rgba(200, 160, 255, .22);
}
.sfoot__contact .sfoot__mail { border-left: 0; padding-left: 0; }
.sfoot__phone { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
@media (max-width: 1180px) {          /* footer wraps: show both side by side, centred */
  .sfoot__contact { order: 3; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 22px; border-left: 0; padding-left: 0; }
}

/* ---------- back to top ---------- */
.sfoot__top {
  position: relative;
  flex: 0 0 auto;
  width: 44px; height: 44px;
  margin-left: 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  background: radial-gradient(circle at 35% 30%, #9a4dff, #5a12c4);
  box-shadow: 0 6px 20px rgba(112, 18, 230, .5);
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s;
}
.sfoot__top:hover, .sfoot__top:focus-visible { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(140, 40, 255, .75), 0 0 0 4px rgba(170, 90, 255, .2); outline: none; }
.sfoot__top:active { transform: translateY(-1px) scale(.94); }
.sfoot__ring { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); }
.sfoot__ring circle { fill: none; stroke-width: 2; }
.sfoot__ring-bg { stroke: rgba(255, 255, 255, .12); }
.sfoot__ring-fg { stroke: #f7c47c; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: var(--p, 100); filter: drop-shadow(0 0 3px rgba(247, 196, 124, .8)); transition: stroke-dashoffset .2s linear; }
.sfoot__arrow { position: relative; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sfoot__top:hover .sfoot__arrow { animation: sfLift .7s var(--ease, ease); }


@keyframes sfEdge   { to { background-position: 140% 0; } }
@keyframes sfAurora { from { transform: translate(-3%, 0); } to { transform: translate(3%, 4%); } }
@keyframes sfWiggle { 0%, 100% { transform: rotate(-12deg) scale(1.2); } 30% { transform: rotate(10deg) scale(1.2); } 60% { transform: rotate(-6deg) scale(1.2); } }
@keyframes sfLift   { 0% { transform: translateY(0); } 45% { transform: translateY(-14px); opacity: 0; } 46% { transform: translateY(14px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }

@media (max-width: 1180px) {
  .sfoot__copy { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sfoot::before, .sfoot::after, .sfoot__top .sfoot__arrow { animation: none !important; }
  .sfoot__inner > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- floating back-to-top (fixed bottom-right, appears after scrolling down) ---------- */
.sfoot__top {
  position: fixed;
  right: clamp(14px, 2vw, 28px);
  bottom: clamp(14px, 2vw, 28px);
  z-index: 800;
  width: 48px; height: 48px;
  margin: 0;
  translate: 0 calc(var(--lift, 0px) * -1);   /* set by content.js while the footer is on screen */
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px) scale(.6);
  transition: opacity .35s ease, transform .5s cubic-bezier(.34, 1.56, .64, 1), visibility 0s linear .5s, box-shadow .3s;
}
.sfoot__top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .35s ease, transform .5s cubic-bezier(.34, 1.56, .64, 1), visibility 0s, box-shadow .3s;
}
.sfoot__top.is-visible:hover, .sfoot__top.is-visible:focus-visible { transform: translateY(-4px); }
.sfoot__top.is-visible:active { transform: translateY(-1px) scale(.94); }
html.is-modal-open .sfoot__top { opacity: 0; visibility: hidden; }

/* ---------- social icons (stacked above the copyright, right end of the row) ---------- */
.sfoot__end {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  padding-left: clamp(12px, 1.6vw, 22px);
  border-left: 1px solid rgba(200, 160, 255, .22);
}
.sfoot__end .sfoot__copy { margin: 0; padding-left: 0; border-left: 0; }
.sfoot__social { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.soc {
  --brand: #8a17ff;
  position: relative;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #e7def2;
  border: 1px solid rgba(247, 196, 124, .35);
  background: rgba(255, 255, 255, .04);
  overflow: hidden;
  isolation: isolate;
  transition: color .3s, border-color .3s, transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s;
}
.soc::before {                           /* brand colour fills up from the bottom on hover */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--brand);
  transform: translateY(101%);
  transition: transform .35s var(--ease, ease);
}
.soc svg { width: 17px; height: 17px; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.soc:hover, .soc:focus-visible {
  color: #fff; border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -6px var(--brand);
  outline: none;
}
.soc:hover::before, .soc:focus-visible::before { transform: none; }
.soc:hover svg { transform: scale(1.12); }
.soc--ig { --brand: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.soc--ig::before { background: var(--brand); }
.soc--fb { --brand: #1877f2; }
.soc--yt { --brand: #ff0000; }
.soc--x  { --brand: #000; }
.soc--x:hover, .soc--x:focus-visible { border-color: rgba(255, 255, 255, .5); }
.soc--in { --brand: #0a66c2; }
.soc--ig:hover, .soc--ig:focus-visible { box-shadow: 0 8px 20px -6px #d6249f; }

@media (max-width: 1180px) {           /* footer wraps: centred, socials above the copyright */
  .sfoot__end { order: 4; flex-basis: 100%; align-items: center; margin: 0; padding-left: 0; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .soc, .soc::before, .soc svg { transition: none; }
}

/* ---------- bottom bar: copyright + full legal links ---------- */
.sfoot__end { gap: 0; }
.sfoot__bar {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px clamp(16px, 3vw, 40px) 18px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  border-top: 1px solid rgba(200, 160, 255, .14);
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-size: 13px;
  color: rgba(231, 222, 242, .7);
}
.sfoot__bar .sfoot__copy { margin: 0; padding: 0; border: 0; flex: none; }
.sfoot__legal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.sfoot__legal span { color: rgba(200, 160, 255, .35); }
.sfoot__legal a {
  color: #e7def2;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: color .3s, background-size .35s var(--ease, ease);
}
.sfoot__legal a:hover, .sfoot__legal a:focus-visible { color: #f7c47c; background-size: 100% 1px; outline: none; }
@media (max-width: 720px) {
  .sfoot__bar { flex-direction: column-reverse; justify-content: center; text-align: center; }
  .sfoot__legal { justify-content: center; }
}
