/* 10 «Footer» — Figma node 50:481 (1800 × 1230).
   Interaction follows the notes «09–10 — інтерактив для верстки». */

.footer {
  padding: calc(112 * var(--ui)) 0 0;
  background: var(--color-bg-strong);
  color: var(--color-text-inverse);
  overflow: clip;
}
.footer :focus-visible { outline: 2px solid var(--color-bg-accent); outline-offset: 3px; }
.footer > :not(.wordmark) { padding-inline: calc(64 * var(--u)); }

/* links: a yellow line draws itself from the left */
.u-line { position: relative; }
.u-line::after {
  content: "";
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  height: 1.5px;
  background: var(--color-bg-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.23, 1, .32, 1);
}
a:focus-visible > .u-line::after, a.u-line:focus-visible::after { transform: none; }
@media (hover: hover) {
  a:hover > .u-line::after, a.u-line:hover::after { transform: none; }
}
.office--hotline .u-line::after { background: var(--color-bg-strong); }
.office .u-line::after { top: calc(100% + 2px); }

/* ───────────── Slogan and newsletter ───────────── */
.footer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: calc(40 * var(--ui)); }
.footer__slogan { margin-left: calc(-4 * var(--ui)); font-family: var(--font-display); font-weight: 500; font-size: calc(88 * var(--ui)); line-height: calc(84 * var(--ui)); letter-spacing: -.035em; white-space: nowrap; }
.subscribe { display: flex; flex-direction: column; gap: calc(16 * var(--ui)); width: calc(600 * var(--ui)); margin-top: calc(8 * var(--ui)); }
.footer__label { position: relative; top: calc(1 * var(--ui)); font-weight: 600; font-size: calc(14 * var(--ui)); line-height: calc(17 * var(--ui)); letter-spacing: .04em; text-transform: uppercase; color: var(--color-text-inverse-subtle); }
.subscribe__text { font-size: calc(18 * var(--ui)); line-height: calc(24 * var(--ui)); color: var(--color-text-inverse-muted); }
.subscribe__field {
  position: relative;
  display: flex;
  align-items: center;
  gap: calc(12 * var(--ui));
  height: calc(62 * var(--ui));
  padding: 0 calc(8 * var(--ui)) 0 calc(24 * var(--ui));
  border: 1px solid rgb(251 247 239 / .15);
  border-radius: var(--radius-full);
  background: var(--color-bg-inverse);
  transition: border-color .2s ease;
}
.subscribe__field:focus-within { border-color: rgb(251 247 239 / .5); }
.subscribe__field.is-invalid { border-color: #ff8a80; }
.subscribe__field input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: none; font: 500 calc(15 * var(--ui)) / 1.5 var(--font-ui); color: var(--color-text-inverse); }
.footer .subscribe__field input:focus-visible { outline: 0; } /* the whole field lights up instead */
.subscribe__field input::placeholder { color: var(--color-text-inverse-subtle); opacity: 1; }
.subscribe__field .btn { flex: none; min-width: calc(138 * var(--ui)); border: 0; cursor: pointer; }
.subscribe__field > * { transition: opacity .25s ease, visibility .25s; }
.subscribe__done {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-left: calc(24 * var(--ui));
  font-size: calc(15 * var(--ui));
  color: var(--color-bg-accent);
  opacity: 0;
  visibility: hidden;
  translate: 0 6px;
}
.footer .subscribe__done:focus { outline: 0; }
.subscribe__field.is-done > * { opacity: 0; visibility: hidden; }
.subscribe__field.is-done > .subscribe__done { opacity: 1; visibility: visible; translate: none; transition: opacity .35s ease .15s, translate .5s cubic-bezier(.23, 1, .32, 1) .15s, visibility .35s .15s; }
.subscribe__note { font-size: calc(12 * var(--ui)); line-height: calc(15 * var(--ui)); color: var(--color-text-inverse-subtle); }
.subscribe__note.is-error { color: #ff8a80; }

.footer__rule { height: 1px; margin-top: calc(64 * var(--ui)); background: linear-gradient(rgb(251 247 239 / .15), rgb(251 247 239 / .15)) content-box; }

/* ───────────── Columns (x 64 · 604 · 952 · 1260 · 1648 in the 1672 of content) ───────────── */
.footer__columns { display: grid; grid-template-columns: 540fr 348fr 308fr 388fr 88fr; align-items: start; margin-top: calc(55 * var(--ui)); min-height: calc(288 * var(--ui)); }
.footer__contacts { display: flex; flex-direction: column; align-items: flex-start; gap: calc(12 * var(--ui)); width: calc(420 * var(--ui)); max-width: calc(100% - 24px); }
.footer__phone { margin-top: calc(17 * var(--ui)); font-family: var(--font-display); font-weight: 500; font-size: calc(44 * var(--ui)); line-height: calc(46 * var(--ui)); letter-spacing: -.025em; color: var(--color-bg-accent); white-space: nowrap; }
.footer__caption { margin-top: calc(-1 * var(--ui)); font-size: calc(13 * var(--ui)); line-height: calc(16 * var(--ui)); color: var(--color-text-inverse-muted); }
.footer__lines { display: flex; flex-direction: column; align-self: stretch; gap: calc(12 * var(--ui)); }
.footer__lines li { display: flex; justify-content: space-between; gap: 12px; font-size: calc(15 * var(--ui)); line-height: calc(23 * var(--ui)); white-space: nowrap; }
.footer__lines span { color: var(--color-text-inverse-muted); }
.footer__hours { font-size: calc(12 * var(--ui)); line-height: calc(15 * var(--ui)); color: var(--color-text-inverse-subtle); }
.footer__social { display: flex; gap: calc(8 * var(--ui)); padding-top: calc(12 * var(--ui)); }
.social { display: grid; place-items: center; width: calc(48 * var(--ui)); height: calc(48 * var(--ui)); border: 1px solid rgb(251 247 239 / .15); border-radius: 50%; transition: border-color .25s ease, background-color .25s ease; }
@media (hover: hover) { .social:hover { border-color: var(--color-bg-accent); background: rgb(244 217 78 / .1); } }
.social i { width: calc(20 * var(--ui)); height: calc(20 * var(--ui)); background: center / contain no-repeat; }
.social--instagram i { background: url("../assets/footer/instagram.svg") center / calc(15.87 * var(--ui)) calc(15.87 * var(--ui)) no-repeat; }
.social--facebook i { background: url("../assets/footer/facebook.svg") calc(4.57 * var(--ui)) calc(2.07 * var(--ui)) / calc(9.45 * var(--ui)) calc(15.95 * var(--ui)) no-repeat; }
.social--youtube i { background: url("../assets/footer/youtube.svg") center / calc(17.53 * var(--ui)) calc(12.53 * var(--ui)) no-repeat; }
.social--telegram i { background: url("../assets/footer/telegram.svg") calc(1.48 * var(--ui)) calc(2.65 * var(--ui)) / calc(16.87 * var(--ui)) calc(14.45 * var(--ui)) no-repeat; }

.footer__nav ul { display: flex; flex-direction: column; align-items: flex-start; gap: calc(12 * var(--ui)); margin-top: calc(28 * var(--ui)); }
.footer__nav li { font-size: calc(15 * var(--ui)); line-height: calc(23 * var(--ui)); color: var(--color-text-inverse-muted); }
.footer__nav a { transition: color .2s ease; }
.footer__nav a:focus-visible { color: var(--color-text-inverse); }
@media (hover: hover) { .footer__nav a:hover { color: var(--color-text-inverse); } }

/* ───────────── «Вгору» (magnetic: footer.js moves the button towards the pointer) ───────────── */
.totop { display: flex; flex-direction: column; align-items: center; justify-self: end; gap: calc(12 * var(--ui)); width: calc(88 * var(--ui)); }
.totop__btn {
  display: grid;
  place-items: center;
  width: calc(88 * var(--ui));
  height: calc(88 * var(--ui));
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-bg-accent);
  cursor: pointer;
  transition: translate .35s cubic-bezier(.23, 1, .32, 1), background-color .2s ease, scale .15s ease;
}
.totop__btn:active { scale: .95; }
@media (hover: hover) { .totop__btn:hover { background: var(--color-bg-accent-hover); } }
.totop__btn i { width: calc(28 * var(--ui)); height: calc(28 * var(--ui)); background: url("../assets/footer/up.svg") center / calc(15.7 * var(--ui)) calc(18.03 * var(--ui)) no-repeat; }
.totop span { font-size: calc(12 * var(--ui)); line-height: calc(15 * var(--ui)); color: var(--color-text-inverse-subtle); }

/* ───────────── Bottom bar ───────────── */
.footer__rule--bar { margin-top: calc(72 * var(--ui)); }
.footer__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: calc(27 * var(--ui)); min-height: calc(33 * var(--ui)); font-size: calc(13 * var(--ui)); line-height: calc(16 * var(--ui)); }
.footer__copy { position: relative; top: calc(-1 * var(--ui)); color: var(--color-text-inverse-subtle); }
.footer__legal { display: flex; flex-wrap: wrap; gap: calc(12 * var(--ui)) calc(32 * var(--ui)); color: var(--color-text-inverse-muted); }
.footer__lang { display: flex; gap: calc(4 * var(--ui)); padding: calc(4 * var(--ui)); border: 1px solid rgb(251 247 239 / .15); border-radius: var(--radius-full); }
.footer__lang a { padding: calc(4 * var(--ui)) calc(12 * var(--ui)); border-radius: var(--radius-full); font-size: calc(12 * var(--ui)); line-height: calc(15 * var(--ui)); color: var(--color-text-inverse-muted); }
.footer__lang a[aria-current] { background: var(--color-bg-accent); color: var(--color-text-primary); }

/* ───────────── SOLARIS: Onest 500, one photo seen through all seven letters ─────────────
   --w: one design pixel of the 1800-wide wordmark; it always spans the screen.
   --x, --a: each letter's place and width in the frame (measured). The photo covers the text box
   (1733 × 315 at x 34), as in Figma. --zoom, --px, --py: the cursor parallax (footer.js). */
.wordmark {
  --w: calc(100cqw / 1800);
  --zoom: 1;
  --px: 0px;
  --py: 0px;
  position: relative;
  height: calc(353 * var(--w));
  margin-top: calc(56 * var(--ui) - 30 * var(--w));
  overflow: clip;
  font-family: var(--font-nav);
  font-weight: 500;
  user-select: none;
}
.wordmark span {
  position: absolute;
  top: 0;
  left: calc(var(--x) * var(--w));
  box-sizing: content-box;
  width: calc(var(--a) * var(--w));
  height: calc(315.24 * var(--w));
  padding-top: calc(30 * var(--w)); /* room for the round letters' overshoot */
  font-size: calc(426 * var(--w));
  line-height: calc(315.24 * var(--w));
  white-space: nowrap;
  color: transparent;
  background-image: url("../assets/footer/wordmark.jpg");
  background-repeat: no-repeat;
  background-size: calc(1733 * var(--w) * var(--zoom)) auto;
  background-position:
    calc((34 - var(--x)) * var(--w) - 866.5 * var(--w) * (var(--zoom) - 1) + var(--px))
    calc(-306.5 * var(--w) - 494 * var(--w) * (var(--zoom) - 1) + var(--py));
  -webkit-background-clip: text;
  background-clip: text;
}
.footer--wait .wordmark span { translate: 0 calc(360 * var(--w)); }
.footer--rise .wordmark span { transition: translate 1.1s cubic-bezier(.16, 1, .3, 1) calc(var(--i) * 80ms); }

/* ───────────── Narrower windows (Figma has only the 1800 frame) ───────────── */
@media (max-width: 1279px) {
  .footer__head { flex-direction: column; }
  .subscribe { width: min(100%, 600px); margin-top: 0; }
  .footer__columns { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
  .footer__contacts { grid-column: 1 / 3; }
  .totop { grid-column: 3; grid-row: 1; }
  .footer__bar { flex-wrap: wrap; }
}
@media (max-width: 1099px) {
  .footer { padding-top: 72px; }
  .footer > :not(.wordmark) { padding-inline: 20px; }
  .footer__slogan { margin-left: 0; font-size: clamp(34px, 10.4cqw, 80px); line-height: 1; white-space: normal; }
  .footer__rule { margin-top: 40px; }
  .footer__columns { margin-top: 40px; }
  .subscribe__field input { font-size: 16px; }
  .footer__bar { margin-top: 24px; font-size: 13px; line-height: 18px; }
  .footer__rule--bar { margin-top: 48px; }
  .wordmark { margin-top: 32px; }
}
@media (max-width: 699px) {
  .footer__columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__contacts { grid-column: 1 / -1; width: 100%; max-width: 360px; }
  .totop { grid-column: 1 / -1; grid-row: auto; justify-self: center; margin-top: 8px; }
  .subscribe__text { font-size: 16px; line-height: 1.45; }
  .subscribe__field { height: 56px; padding-left: 18px; }
  .subscribe__field .btn { min-width: 0; padding-inline: 16px; }
  .subscribe__done { padding-left: 18px; }
  .footer__bar { flex-direction: column; align-items: flex-start; gap: 16px; }
}
@media (min-width: 600px) and (max-width: 1099px) {
  .footer > :not(.wordmark) { padding-inline: 40px; }
}
