/* VDS.RENT — footer: the main page's finale («Запуск в пару кликов») and the footer base shared by every page.
   Figma «Футер · 1728» / «Футер · основание · 1728» and the phone «Футер · 390» / «Футер · основание · 390».
   Shared file (foundation). */

/* the footer continues the page's column of sections: it overlaps the last section of <main> like any section does */
main + .site-footer { margin-top: calc(-1 * var(--join)); }

/* ==================================================================================================== finale (main page) */
.finale { height: 613px; display: flex; justify-content: center; padding-top: 104px; }
.finale__in { display: flex; align-items: flex-start; gap: 70px; }
.finale__logo { width: 396px; height: 405px; flex: none; }
.finale__txt { width: 622px; padding-left: 2px; margin-top: 91px; }
.finale__h { font-size: 56px; line-height: 60px; font-weight: 600; letter-spacing: -0.035em; color: var(--t1); margin-left: -2px; }
.finale__sub { margin-top: 16px; font-size: 19px; line-height: 28px; letter-spacing: -0.006em; color: var(--t2); }
.finale__btns { display: flex; gap: 12px; margin-top: 40px; }

/* ==================================================================================================== base */
.foot { color: var(--t4); }
.foot__in { max-width: var(--wrap-max); margin: 0 auto; padding: 144px var(--M) 60px; }
.foot__note { font-size: 13px; line-height: 20px; letter-spacing: -0.001em; color: var(--t4); margin-bottom: 35px; }
.foot__crumbs { height: 20px; flex-wrap: nowrap; }
.foot__crumbs .crumbs__item { white-space: nowrap; }

/* the four key destinations: 4 × 408, dividers 1 × 112 white 10 %, titles 24/30 + chevron 18, text 16/24 */
.foot__keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 21px; padding: 47px 0 56px;
  border-top: 1px solid var(--hl-10); border-bottom: 1px solid var(--hl-10); }
.foot__keys > li { position: relative; padding-right: 32px; min-height: 112px; }
.foot__keys > li + li { padding-left: 32px; }
.foot__keys > li + li::before { content: ''; position: absolute; left: 0; top: 0; width: 1px; height: 112px; background: var(--hl-10); }
.fkey { display: block; color: inherit; }
.fkey__t { display: flex; width: max-content; max-width: 100%; align-items: flex-start; font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.012em; color: var(--t1); white-space: nowrap; }
.fkey__chev { margin: 7px 0 0 6px; color: var(--t2); transition: transform var(--t-med) var(--ease-out), color var(--t-fast) var(--ease); }
.fkey__d { display: block; margin-top: 10px; font-size: 16px; line-height: 24px; letter-spacing: -0.003em; color: var(--t4); transition: color var(--t-fast) var(--ease); }
.fkey--status .fkey__d { display: flex; align-items: flex-start; }
.fkey__dot { margin: 6px 8px 0 0; }
.fkey:focus-visible .fkey__chev { transform: translateX(2px); color: var(--t1); }
@media (hover: hover) and (pointer: fine) { .fkey:hover .fkey__chev { transform: translateX(2px); color: var(--t1); } }
.fkey:focus-visible .fkey__d { color: var(--t2); }
@media (hover: hover) and (pointer: fine) { .fkey:hover .fkey__d { color: var(--t2); } }

/* the directory: 5 × 326.4 (Ресурсы spans two), heads 14/20 #E8E8ED, links 14/20 on a 30 px step */
.foot__dir { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding-top: 43px; }
.fcol--resources { grid-column: span 2; }
.fcol__h { font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: -0.002em; color: var(--t-e8); }
.fcol__list { display: grid; row-gap: 10px; margin-top: 16px; }
.fcol__list > li { display: flex; }
.fcol--resources .fcol__list { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(5, auto); grid-auto-flow: column; }
.fcol__a { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; line-height: 20px; letter-spacing: -0.002em; color: var(--t4); white-space: nowrap;
  transition: color var(--t-fast) var(--ease); }
.fcol__a:focus-visible { color: var(--t1); }
@media (hover: hover) and (pointer: fine) { .fcol__a:hover { color: var(--t1); } }
.fcol__ico { color: var(--t4); }

/* the big VDS.RENT: Sora Bold, the content width (327 / 1632 of it), 74 % line height, #2A2A2C */
.foot__wm { margin-top: 90px; font-family: var(--brand); font-weight: 700; font-size: calc(var(--content) * 0.20037); line-height: 0.74;
  letter-spacing: -0.04em; color: var(--wordmark); text-align: center; white-space: nowrap; user-select: none; -webkit-user-select: none; }
.foot__about { margin-top: 40px; padding-top: 23px; border-top: 1px solid var(--hl-10); font-size: 13px; line-height: 21px; letter-spacing: -0.001em; color: var(--t4); }
.foot__about b, .foot__req b { color: var(--t2); }
.foot__about b { font-weight: 600; }
.foot__req b { font-weight: 500; }
.foot__legal { margin-top: 28px; padding-top: 27px; border-top: 1px solid var(--hl-06); font-size: 13px; line-height: 21px; letter-spacing: -0.001em; color: var(--t4); white-space: pre-wrap; }
.foot__sep { color: var(--t-sep); }
.foot__doc { color: var(--t2); white-space: nowrap; transition: color var(--t-fast) var(--ease); }
.foot__doc:focus-visible { color: var(--t1); }
@media (hover: hover) and (pointer: fine) { .foot__doc:hover { color: var(--t1); } }
.foot__req { margin-top: 12px; font-size: 13px; line-height: 21px; letter-spacing: -0.001em; color: var(--t4); }
.foot__mail { color: var(--t2); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color var(--t-fast) var(--ease); }
.foot__mail:focus-visible { color: var(--t1); }
@media (hover: hover) and (pointer: fine) { .foot__mail:hover { color: var(--t1); } }

/* ==================================================================================================== below the composition */
@media (max-width: 1279px) {
  .foot__keys { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .foot__keys > li:nth-child(odd) { padding-left: 0; }
  .foot__keys > li:nth-child(odd)::before { display: none; }
  .foot__keys > li:nth-child(even) { padding-left: 32px; }
}
/* the finale keeps the desktop row down to 1184 (1088 px wide); below it the logo gets smaller and the headline stays on one line */
@media (max-width: 1183px) and (min-width: 1024px) {
  .finale { align-items: center; padding-top: 0; }
  .finale__in { gap: 48px; align-items: center; }
  .finale__logo { width: 240px; height: auto; }
  .finale__txt { width: 600px; margin-top: 0; }
}
@media (max-width: 1023px) {
  .finale { height: auto; padding: 120px var(--M); }
  .finale__in { flex-direction: column; gap: 32px; margin: 0; text-align: center; }
  .finale__logo { width: 260px; }
  .finale__txt { width: auto; max-width: 620px; padding-left: 0; margin-top: 0; }
  .finale__h { margin-left: 0; }
  .finale__btns { justify-content: center; }
  .foot__dir { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; row-gap: 24px; }
  .fcol--products { order: 1; } .fcol--company { order: 2; } .fcol--resources { order: 3; grid-column: 1 / -1; } .fcol--community { order: 4; }
  .fcol--resources .fcol__list { column-gap: 16px; }
}

/* ==================================================================================================== phone (the 390 frame) */
@media (max-width: 600px) {
  /* finale: logo 214 × 218 at the top (72 − 8), H2 32/36, sub 16/24, two full-width actions */
  .finale { display: block; height: auto; padding: 64px var(--M) 88px; }
  .finale__in { display: flex; flex-direction: column; align-items: center; gap: 0; }
  .finale__logo { width: 214px; height: 218px; }
  .finale__txt { width: 100%; max-width: none; padding-left: 0; text-align: center; }
  .finale__h { margin-top: 28px; font-size: 32px; line-height: 36px; letter-spacing: -0.028em; }
  .finale__sub { margin: 16px auto 0; max-width: 310px; font-size: 16px; line-height: 24px; letter-spacing: -0.004em; }
  .finale__btns { flex-direction: column; gap: 10px; margin-top: 32px; }
  .finale__btns .btn { --h: 48px; --px: 18px; width: 100%; font-size: 16px; letter-spacing: -0.004em; }

  .foot__in { padding: 80px var(--M) 48px; }
  .foot__note { margin-bottom: 27px; }
  .foot__crumbs { font-size: 14px; height: auto; min-height: 20px; flex-wrap: wrap; } /* a long trail moves its last item down at 320 */
  /* key destinations: rows split by hairlines, title 20/26 + chevron 16, text 15/22 */
  .foot__keys { display: block; margin-top: 21px; padding: 0; border-top: 0; border-bottom: 0; }
  .foot__keys > li, .foot__keys > li + li, .foot__keys > li:nth-child(even) { min-height: 0; padding: 23px 0 24px; border-top: 1px solid var(--hl-10); }
  .foot__keys > li:last-child { border-bottom: 1px solid var(--hl-10); }
  .foot__keys > li::before { display: none; }
  .fkey__t { font-size: 20px; line-height: 26px; letter-spacing: -0.01em; }
  .fkey__chev { --sz: 16; margin: 5px 0 0 6px; }
  .fkey__d { margin-top: 8px; font-size: 15px; line-height: 22px; letter-spacing: -0.003em; }
  .fkey__dot { margin-top: 7px; }
  /* directory: Продукты | Компания, Ресурсы across both columns, Сообщества; every link a 44 px row */
  .foot__dir { padding-top: 35px; row-gap: 24px; }
  .fcol__h { font-size: 15px; line-height: 20px; }
  .fcol__list { row-gap: 0; margin-top: 10px; }
  .fcol__a { display: flex; min-height: 44px; min-width: 44px; font-size: 15px; line-height: 20px; white-space: normal; }   /* «О нас» is 39 wide */
  .foot__wm { margin-top: 32px; }
  .foot__about { margin-top: 28px; }
  .foot__legal { margin-top: 24px; padding-top: 23px; white-space: normal; }
  .foot__sep { display: none; }
  .foot__copy { display: block; margin-bottom: 10px; }
  .foot__doc { display: flex; align-items: center; min-height: 44px; padding: 12px 0; font-size: 14px; line-height: 20px; white-space: normal; }
  .foot__legal + .foot__req { margin-top: 16px; }
  /* the e-mail links inside the paragraph: a 44 px tall hit box centred on the line (positioned, so it also wins over the text of
     the neighbouring lines); nothing moves */
  .foot__mail { position: relative; }
  .foot__mail::after { content: ''; position: absolute; left: -2px; right: -2px; top: 50%; height: 44px; margin-top: -22px; }
}
