/* --------------------------------------------------------------------------
   1. ЗМІННІ
   -------------------------------------------------------------------------- */
:root {
  --bg: #ffffff;
  --sky: #bdf4ff;
  --sky-soft: #d6f8ff;
  --ink: #21515b; 
  --ink-soft: #2f6570;
  --muted: #5a828b;
  --line: #cfe9ee;

  --font: 'Instrument Sans', 'Segoe UI', system-ui, Arial, sans-serif;

  --container: 1360px;
  --gutter: 20px;
  --rail-w: 40%; /* ширина правого слайдера на десктопі */

  --ease: cubic-bezier(0.22, 0.68, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. RESET / БАЗА
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.15;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 10px 18px;
  background-color: var(--ink);
  color: #fff;
}
.skip-link:focus {
  left: 0;
}

body.is-locked {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   3. КОНТЕЙНЕР
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
@media (min-width: 1200px) {
  .container {
    padding-left: 40px;
    padding-right: 40px;
  }
}

/* --------------------------------------------------------------------------
   4. ХЕДЕР
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--sky);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
}
@media (min-width: 1200px) {
  .header__inner {
    justify-content: center;
    min-height: 66px;
  }
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  transition: transform 0.3s var(--ease);
}
.logo:hover {
  transform: scale(1.04);
}
@media (min-width: 1200px) {
  /* на десктопі меню центроване, логотипа в шапці немає (як у макеті) */
  .logo {
    display: none;
  }
}

/* --- бургер --- */
.burger {
  position: relative;
  z-index: 130;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 40px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background-color: var(--ink);
  cursor: pointer;
  transition: transform 0.3s var(--ease);
}
.burger:hover {
  transform: scale(1.06);
}
@media (min-width: 1200px) {
  .burger {
    display: none;
  }
}

.burger__line {
  display: block;
  height: 3px;
  border-radius: 2px;
  background-color: var(--sky);
  transition:
    transform 0.4s var(--ease),
    opacity 0.3s var(--ease);
}
.burger.is-open .burger__line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.burger.is-open .burger__line:nth-child(2) {
  opacity: 0;
}
.burger.is-open .burger__line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- навігація (мобільне повноекранне меню) --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding: 80px 24px 40px;
  background-color: var(--sky);
  transform: translateX(100%);
  visibility: hidden;
  transition:
    transform 0.45s var(--ease),
    visibility 0s linear 0.45s;
}
.nav.is-open {
  transform: translateX(0);
  visibility: visible;
  transition:
    transform 0.45s var(--ease),
    visibility 0s;
}
@media (min-width: 1200px) {
  .nav {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    background-color: transparent;
    transform: none;
    visibility: visible;
    transition: none;
  }
}

.nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
@media (min-width: 1200px) {
  .nav__list {
    flex-direction: row;
    gap: 44px;
  }
}

.nav__item {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.4s var(--ease),
    transform 0.4s var(--ease);
}
.nav.is-open .nav__item {
  opacity: 1;
  transform: none;
}
.nav.is-open .nav__item:nth-child(1) {
  transition-delay: 0.1s;
}
.nav.is-open .nav__item:nth-child(2) {
  transition-delay: 0.15s;
}
.nav.is-open .nav__item:nth-child(3) {
  transition-delay: 0.2s;
}
.nav.is-open .nav__item:nth-child(4) {
  transition-delay: 0.25s;
}
.nav.is-open .nav__item:nth-child(5) {
  transition-delay: 0.3s;
}
.nav.is-open .nav__item:nth-child(6) {
  transition-delay: 0.35s;
}
@media (min-width: 1200px) {
  .nav__item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.nav__link {
  display: block;
  padding: 6px 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition:
    opacity 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.nav__link:hover,
.nav__link:focus-visible {
  opacity: 0.6;
  transform: scale(1.04);
}
@media (min-width: 1200px) {
  .nav__link {
    padding: 4px 0;
    font-size: 13px;
    letter-spacing: 0.04em;
  }
}

/* --------------------------------------------------------------------------
   5. РОЗКЛАДКА: контент + правий слайдер
   -------------------------------------------------------------------------- */
.layout {
  display: block;
}
@media (min-width: 1200px) {
  .layout {
    display: flex;
    align-items: flex-start;
    gap: 0;
  }
}

.content {
  width: 100%;
}
@media (min-width: 1200px) {
  .content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 20px 0 60px;
  }
}

/* правий слайдер: на десктопі — sticky на всю висоту екрана */
.rail {
  display: none;
}
@media (min-width: 1200px) {
  .rail {
    display: block;
    flex: 0 0 var(--rail-w);
    align-self: stretch;
  }
  .rail__sticky {
    max-height: 2400px;
    height: 100%;
    max-width: 580px;
  }
}

/* --------------------------------------------------------------------------
   6. СЕКЦІЇ (контент)
   -------------------------------------------------------------------------- */
.sec {
  padding: 30px var(--gutter);
  transition: background-color 0.5s var(--ease);
}
@media (min-width: 1200px) {
  .sec {
    max-width: 820px;
    margin-left: auto;
    padding: 44px 48px;
  }
}

/* активна секція у в'юпорті — підсвічування (клас додає JS) */
.sec.is-active {
  background-color: var(--sky);
}

#home {
  padding-top: 34px;
}
@media (min-width: 1200px) {
  #home {
    padding-top: 54px;
  }
}

.sec__title {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
@media (min-width: 1200px) {
  .sec__title {
    font-size: 38px;
  }
}

#home .sec__title {
  font-size: 30px;
}
@media (min-width: 1200px) {
  #home .sec__title {
    font-size: 46px;
  }
}

.sec__subtitle {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
@media (min-width: 1200px) {
  .sec__subtitle {
    margin-top: 12px;
    font-size: 21px;
  }
}

.sec__text {
  margin-top: 14px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
  text-align: justify;
}
@media (min-width: 1200px) {
  .sec__text {
    margin-top: 16px;
    font-size: 15px;
  }
}

/* --------------------------------------------------------------------------
   7. СЛАЙДЕР (спільне)
   -------------------------------------------------------------------------- */
.slider {
  position: relative;
  overflow: hidden;
}

.slider__track {
  display: flex;
  width: 100%;
  transition: transform 0.6s var(--ease);
  will-change: transform;
}

.slider__slide {
  flex: 0 0 100%;
  width: 100%;
}

.slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* крапки */
.slider__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}
@media (min-width: 1200px) {
  .slider__dots {
    bottom: 20px;
  }
}

.slider__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition:
    transform 0.3s var(--ease),
    background-color 0.3s var(--ease),
    width 0.3s var(--ease);
}
.slider__dot:hover {
  transform: scale(1.25);
}
.slider__dot.is-active {
  width: 22px;
  border-radius: 999px;
  background-color: #fff;
}

/* --- слайдер у контенті (тільки мобільний) --- */
.slider--mobile {
  width: 100%;
  max-width: 400px;
  height: 667px;
  margin: 4px auto;
  background-color: var(--sky-soft);
}
.slider--mobile .slider__track {
  height: 100%;
}
.slider--mobile .slider__slide {
  height: 100%;
}
@media (min-width: 1200px) {
  .slider--mobile {
    display: none;
  }
}

/* --- правий слайдер на всю висоту (десктоп) --- */
.slider--rail {
  display: none;
}
@media (min-width: 1200px) {
  .slider--rail {
    display: block;
    height: 100%;
    background-color: var(--sky-soft);
  }
  .slider--rail .slider__track {
    height: 100%;
  }
  .slider--rail .slider__slide {
    height: 100%;
  }
}

/* --------------------------------------------------------------------------
   8. ФУТЕР
   -------------------------------------------------------------------------- */
.footer {
  background-color: var(--bg);
}

.footer__topnav {
  background-color: var(--sky);
  padding: 16px 0;
}

.footer__topnav-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 28px;
}
@media (min-width: 1200px) {
  .footer__topnav-inner {
    gap: 44px;
  }
}

.footer__navlink {
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition:
    opacity 0.25s var(--ease),
    transform 0.25s var(--ease);
  display: inline-block;
}
.footer__navlink:hover,
.footer__navlink:focus-visible {
  opacity: 0.6;
  transform: scale(1.05);
}
@media (min-width: 1200px) {
  .footer__navlink {
    font-size: 13px;
  }
}

.footer__band {
  padding: 16px 0;
  background-color: var(--ink);
}

.footer__desc {
  color: var(--sky);
  font-size: 12px;
  text-align: center;
  letter-spacing: 0.02em;
}
@media (min-width: 1200px) {
  .footer__desc {
    font-size: 13.5px;
    text-transform: uppercase;
  }
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: 30px;
  padding-bottom: 36px;
  text-align: center;
}
@media (min-width: 1200px) {
  .footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 44px;
    padding-bottom: 50px;
  }
}

.footer__legal {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  transition:
    transform 0.3s var(--ease),
    opacity 0.3s var(--ease);
}
.footer__legal:hover,
.footer__legal:focus-visible {
  transform: scale(1.03);
  opacity: 0.8;
}
@media (min-width: 1200px) {
  .footer__legal {
    font-size: 34px;
  }
}

.footer__copy {
  order: -1;
  color: var(--muted);
  font-size: 12px;
}
@media (min-width: 1200px) {
  .footer__copy {
    order: 0;
    font-size: 13px;
  }
}

/* --------------------------------------------------------------------------
   9. СТОРІНКИ PRIVACY / TERMS — просто чорний фон
   -------------------------------------------------------------------------- */

body.legal .header,
body.legal .footer__topnav {
  background-color: var(--sky);
}

.page {
  padding: 40px 0 60px;
  min-height: 60vh;
  color: var(--ink);
}
@media (min-width: 1200px) {
  .page {
    padding: 70px 0 100px;
  }
}

.page__title {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #23343a;
  font-size: 30px;
  font-weight: 700;
}
@media (min-width: 1200px) {
  .page__title {
    margin-bottom: 36px;
    font-size: 44px;
  }
}

.page__content {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.85;
}
@media (min-width: 1200px) {
  .page__content {
    font-size: 15px;
  }
}

.page__content h2 {
  margin: 28px 0 10px;
  font-size: 20px;
}
@media (min-width: 1200px) {
  .page__content h2 {
    margin: 40px 0 12px;
    font-size: 24px;
  }
}

.page__content h3 {
  margin: 20px 0 8px;
  font-size: 15px;
}
@media (min-width: 1200px) {
  .page__content h3 {
    margin: 26px 0 10px;
    font-size: 16px;
  }
}

.page__content p {
  margin-bottom: 14px;
}
@media (min-width: 1200px) {
  .page__content p {
    margin-bottom: 16px;
  }
}

.page__content ul,
.page__content ol {
  margin: 0 0 16px 20px;
  list-style: disc;
}
@media (min-width: 1200px) {
  .page__content ul,
  .page__content ol {
    margin-bottom: 20px;
  }
}

.page__content li {
  margin-bottom: 6px;
}

.page__content a {
  color: var(--sky);
  text-decoration: underline;
}
