/* ---------- Fonts (усі шрифти лежать на сайті — без запитів до Google) ---------- */
@font-face {
  font-family: "Alta";
  src: url("assets/fonts/alta-regular.ttf") format("truetype");
  font-weight: 400; font-display: swap;
}
/* Jost і Montserrat — змінні шрифти (один файл на всі товщини), тільки латиниця з æøå */
@font-face {
  font-family: "Jost";
  src: url("assets/fonts/jost-latin-var.woff2") format("woff2");
  font-weight: 300 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/montserrat-latin-var.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #1b1411;
  --ink-soft: #4a3f39;
  --cream: #f7f2ee;
  --terracotta: #b8775a;
  --terracotta-dark: #9a5e44;
  --white: #ffffff;

  --serif: Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --header-h: 84px;
  /* один відступ від краю для всього сайту — як у лого в шапці */
  --edge: clamp(16px, 2.8vw, 56px);
  --gutter: var(--edge);
  /* відстань від центру полотна до лінії, з якої починаються меню і заголовки */
  --axis: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  font: 400 13px/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 0;
  transition: background .3s, color .3s, border-color .3s;
  white-space: nowrap;
}
.btn-book { background: var(--white); color: var(--ink); }
.btn-book:hover { background: var(--terracotta); color: var(--white); }
/* Кнопка букінгу в секціях: того ж розміру, що в шапці, але темна — на світлому фоні */
.btn-cta { background: var(--ink); color: var(--white); }
.btn-cta:hover { background: var(--terracotta); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  color: var(--white);
  transition: background .4s, box-shadow .4s, backdrop-filter .4s;
}
.site-header.is-scrolled {
  background: rgba(27, 20, 17, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

/* Полотно ділиться навпіл: ліва половина — лого,
   права — група з трьох пунктів одразу за центром і кнопка букінгу в самому кінці */
.header-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  height: var(--header-h);
  padding: 0 var(--edge);
}
.logo { grid-column: 1; grid-row: 1; justify-self: start; }
.logo img { width: clamp(150px, 14vw, 210px); height: auto; }

.nav { display: contents; }
.nav-links {
  grid-column: 2; grid-row: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 32px;
  padding-left: var(--axis);
}
.btn-book {
  grid-column: 2; grid-row: 1;
  justify-self: end;
  margin-left: 64px;
}

.nav-link {
  position: relative;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 6px 0;
  white-space: nowrap;
}
.nav-link::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s ease;
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.burger, .btn-book-mobile { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--white);
  /* перший кадр відео як заставка — видно одразу, поки вантажиться саме відео */
  background: #2a1d17 url("assets/hero-poster.webp?v=2") center / cover no-repeat;
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-shade {
  position: absolute; inset: 0;
  /* затемнення під шапкою (меню) і знизу (текст hero) */
  background:
    linear-gradient(180deg, rgba(20,13,10,.45) 0%, rgba(20,13,10,0) 18%),
    linear-gradient(0deg, rgba(20,13,10,.6) 0%, rgba(20,13,10,.2) 30%, rgba(20,13,10,0) 50%); /* під текст знизу */
  pointer-events: none;
}
.hero-text {
  position: absolute;
  left: var(--edge);
  right: var(--edge);
  bottom: clamp(40px, 9vh, 96px);
  z-index: 1;
  color: var(--white);
  text-shadow: 0 1px 24px rgba(0, 0, 0, .25);
}
.hero-text h1 {
  margin: 0;
  font: 400 clamp(40px, 6.4vw, 108px)/1.02 "Alta", var(--serif);
  letter-spacing: .01em;
  text-transform: uppercase;
}
.hero-text p {
  margin: clamp(14px, 1.6vw, 24px) 0 0;
  font: 300 clamp(16px, 1.5vw, 22px)/1.4 var(--sans);
  letter-spacing: .04em;
  opacity: .92;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 5.5vw, 80px) 0; }
.tone-beige { background: var(--cream); }
.tone-white { background: var(--white); }
.container { padding: 0 var(--edge); }

/* Спільний заголовок секцій (шрифт як на старому сайті) */
.section-title {
  margin: 0 0 36px;
  text-align: center;
  font: 400 30px/1.2 "Alta", var(--serif);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #000;
}

.section p { font: 400 16px/1.9 "Montserrat", var(--sans); color: #000; }

/* ---------- Om os ---------- */
.about-inner {
  display: flex;
  align-items: flex-start; /* верх тексту = верх фото */
  gap: clamp(32px, 4vw, 64px);
}
.about-photo {
  flex: none;
  width: clamp(240px, 26vw, 440px);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}
.about-text { max-width: 780px; }
/* прибираємо верхній «повітряний» відступ рядка, щоб перші літери стояли рівно по верху фото */
.about-text p { margin: 0 0 18px; }
.about-text strong { font-weight: 600; }
.about-text p:first-child { margin-top: -.45em; }
.about-text p:last-child { margin-bottom: 0; }

/* ---------- Behandlinger ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
#behandlinger { overflow: hidden; } /* фото, що «залітають», не створюють горизонтальної прокрутки */
.service { margin: 0; }
.service img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}
.service figcaption {
  margin-top: 16px;
  text-align: center;
  font: 400 14px/1.5 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
}
/* анімація: ліві фото залітають зліва, праві — справа (лише якщо працює JS і анімації не вимкнені) */
.js-reveal .service {
  opacity: 0;
  transform: translateX(-90px);
  transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i) * .12s);
}
.js-reveal .service:nth-child(n+3) { transform: translateX(90px); }
.js-reveal .services.in-view .service { opacity: 1; transform: none; }

/* ---------- Galleri ---------- */
/* та сама сітка, що й у послуг: однакові бокові відступи, 4 колонки, однаковий проміжок —
   колонки галереї стоять рівно під картками послуг */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.section-cta { margin-top: 36px; text-align: center; }

/* ---------- Anmeldelser (Trustpilot) ---------- */
.review-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: -18px 0 32px;
  font: 400 14px/1.4 "Montserrat", var(--sans);
  color: #000;
}
.review-score img { width: 120px; height: auto; }
.review-score:hover span { text-decoration: underline; }

.reviews {
  overflow: hidden;
  /* м'яке зникання карток по краях */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.reviews-track {
  display: flex;
  width: max-content;
  animation: reviews-scroll 90s linear infinite;
}
/* зупинка при наведенні курсора (і коли картка у фокусі з клавіатури) */
.reviews:hover .reviews-track,
.reviews:focus-within .reviews-track { animation-play-state: paused; }
@keyframes reviews-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); } /* рівно половина = перший набір карток */
}

.review-card {
  flex: none;
  display: flex;
  flex-direction: column;
  width: 360px;
  margin-right: 24px; /* відступ саме margin, а не gap — так цикл без ривка на стику */
  padding: 32px 30px;
  background: var(--cream);
}
.review-stars { width: 96px; height: auto; margin-bottom: 18px; }
.review-title {
  margin: 0 0 12px;
  font: 700 16px/1.4 "Montserrat", var(--sans);
  color: #000;
}
.section .review-text {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.section .review-meta { margin: auto 0 0; /* ім'я завжди внизу картки */ font-size: 13px; line-height: 1.4; color: #6b625c; }
.review-name { color: #000; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .reviews { overflow-x: auto; }
  .reviews-track { animation: none; }
  .review-card[aria-hidden="true"] { display: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, .78);
  font: 400 14px/1.7 "Montserrat", var(--sans);
}
.site-footer a { transition: color .25s; }
.site-footer a:hover { color: var(--white); }
.footer-grid {
  display: grid;
  /* остання колонка завширшки з кнопку і притиснута до правого краю —
     так кнопка у футері стоїть рівно під кнопкою в шапці */
  grid-template-columns: 1.3fr 1fr min-content;
  gap: 48px;
  padding: 64px var(--edge) 48px;
}
.footer-brand img { width: 210px; height: auto; margin-bottom: 20px; }
.footer-brand p, .footer-col p { margin: 0 0 20px; }
.footer-ig, .made-by-inner a { display: inline-flex; align-items: center; gap: 8px; color: var(--white); }
.ig { width: 18px; height: 18px; flex: none; }
/* Instagram у футері — помітніший: більший текст та іконка */
.footer-ig { gap: 12px; font-size: 17px; letter-spacing: .01em; }
.footer-ig .ig { width: 26px; height: 26px; }
.footer-col h3 {
  margin: 0 0 18px;
  font: 400 13px/1.2 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--white);
}
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li + li { margin-top: 8px; }
.footer-col a { color: rgba(255, 255, 255, .78); }
/* та сама кнопка, що в шапці, без її позиціонування в сітці шапки */
.footer-book { justify-self: end; }
.footer-col .btn-book { margin-left: 0; color: var(--ink); }
.footer-col .btn-book:hover { color: var(--white); }


.made-by {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 26px 20px 32px;
  overflow: hidden;
  background: #120d0b;
  border-top: 1px solid rgba(255, 255, 255, .08);
  text-align: center;
}
.made-by .copyright { margin: 0; font-size: 12px; color: rgba(255, 255, 255, .5); }
.made-by .copyright a { color: rgba(255, 255, 255, .78); text-decoration: underline; text-underline-offset: 3px; }
.made-by .copyright a:hover { color: var(--white); }
.footer-col .footer-reg { margin-top: 18px; font-size: 13px; color: rgba(255, 255, 255, .6); }
.footer-col .footer-reg li + li { margin-top: 4px; }
.made-by-inner {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  font-size: 14px;
  color: rgba(255, 255, 255, .78);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  /* старт за правим краєм екрана, далі «пружинить» на місце */
  transform: translateX(calc(60% + 50vw));
  opacity: 0;
  transition: transform .7s cubic-bezier(.34, 1.56, .64, 1), opacity .45s;
}
.made-by.in-view .made-by-inner { transform: translateX(0); opacity: 1; }
.made-by-inner a { font-weight: 600; }

@media (max-width: 1200px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-book { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .made-by-inner { transform: none; opacity: 1; transition: none; }
}

/* ---------- Вікно консультації ---------- */
.promo {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  padding: 0;
  border: 0;
  overflow: auto;
  background: var(--cream);
  color: var(--ink);
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transition: opacity .25s ease, transform .3s ease;
}
.promo[open] { display: grid; grid-template-columns: 300px 1fr; }
.promo.is-open { opacity: 1; transform: none; }
.promo::backdrop { background: rgba(20, 13, 10, .6); }
.promo-photo { width: 100%; height: 100%; object-fit: cover; }
.promo-body { padding: 48px 40px 44px; align-self: center; }
.promo-eyebrow {
  margin: 0 0 14px;
  font: 400 12px/1.4 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--terracotta-dark);
}
.promo-title {
  margin: 0 0 16px;
  font: 400 30px/1.15 "Alta", var(--serif);
  text-transform: uppercase;
}
.promo-text { margin: 0 0 28px; font: 400 15px/1.8 "Montserrat", var(--sans); }
.promo-close {
  position: absolute; top: 10px; right: 10px;
  display: grid; place-items: center;
  width: 52px; height: 52px; padding: 0;
  color: var(--ink);
  background: rgba(247, 242, 238, .9);
  border: 0; border-radius: 50%;
  cursor: pointer;
}
.promo-close svg { width: 30px; height: 30px; }
.promo-close:hover { background: var(--white); }
@media (max-width: 640px) {
  .promo[open] { grid-template-columns: 1fr; }
  .promo-photo { height: 200px; object-position: center 25%; }
  .promo-body { padding: 28px 22px 30px; text-align: center; }
  .promo-title { font-size: 24px; }
  .promo-body .btn-cta { display: flex; width: fit-content; margin: 0 auto; font-size: 13px; padding: 16px 26px; }
}
@media (prefers-reduced-motion: reduce) { .promo { transition: none; } }

/* ---------- Tablet / mobile ---------- */
/* Вертикальні екрани (там грає вертикальне відео 9:16): hero точно в пропорціях відео,
   щоб браузер не обрізав боки й не «наближав» картинку. На дуже високих екранах hero нижчий за екран */
@media (max-aspect-ratio: 1/1) {
  .hero {
    background-image: url("assets/hero-poster-mobile.webp?v=4");
    min-height: 0;
    height: min(calc(100vw * 16 / 9), 100vh);
    height: min(calc(100vw * 16 / 9), 100svh);
  }
}

/* Om os: текст не повинен помітно виходити нижче фото — на вужчих екранах трохи менший кегль,
   а на планшеті фото стає над текстом */
@media (max-width: 1600px) {
  .about-text p { font-size: 15px; line-height: 1.8; }
}
@media (max-width: 1200px) {
  .about-inner { flex-direction: column; gap: 28px; }
  .about-photo { width: 100%; max-width: 420px; }
  .about-text p:first-child { margin-top: 0; }
}
/* Ноутбуки: трохи компактніше, щоб група все ще стояла за центром */
@media (max-width: 1680px) {
  :root { --axis: 16px; }
  .nav-links { gap: 26px; }
  .nav-link { font-size: 12px; letter-spacing: .12em; }
  .btn-book { font-size: 12px; letter-spacing: .12em; padding: 13px 20px; margin-left: 48px; }
  .btn-cta { font-size: 12px; letter-spacing: .12em; padding: 13px 20px; }
}
/* Коли права половина вже не вміщає пункти + кнопку — відмовляємось від лінії центру */
@media (max-width: 1340px) {
  .header-inner { display: flex; }
  .nav { display: flex; align-items: center; margin-left: auto; }
  .nav-links { padding-left: 0; gap: 26px; }
  .btn-book { margin-left: 52px; }
}
@media (max-width: 1080px) {
  .nav-links { gap: 20px; }
  .nav-link, .btn-book { font-size: 12px; letter-spacing: .12em; }
  .btn-book { padding: 12px 18px; margin-left: 36px; }
  .btn-cta { padding: 12px 18px; }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  /* послуги: 2×2, ліва колонка — зліва, права — справа */
  .services { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
  .service figcaption { margin-top: 10px; font-size: 12px; letter-spacing: .08em; }
  .js-reveal .service:nth-child(odd) { transform: translateX(-60px); }
  .js-reveal .service:nth-child(even) { transform: translateX(60px); }
  .js-reveal .services.in-view .service { transform: none; }
  /* лого · бургер · кнопка букінгу з однаковими проміжками між ними */
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .logo { position: relative; z-index: 2; }
  .logo img { width: clamp(108px, 30vw, 150px); }
  .header-inner .btn-book-mobile {
    display: inline-flex;
    position: relative; z-index: 2;
    margin: 0;
    padding: 10px 10px;
    font-size: 10.5px;
    letter-spacing: .06em;
  }
  /* blur шапки робить її «контейнером» для fixed-меню — через це меню стискалось до висоти шапки.
     Коли меню відкрите, blur вимикаємо, і меню займає весь екран */
  .site-header.menu-open {
    background: var(--ink);
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
    box-shadow: none;
  }

  .burger {
    display: grid; place-content: center; gap: 7px;
    position: relative; z-index: 2;
    width: 44px; height: 44px; padding: 0;
    background: none; border: 0; cursor: pointer;
  }
  .burger span { display: block; width: 26px; height: 1px; background: var(--white); transition: transform .3s; }
  .menu-open .burger span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-open .burger span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .nav {
    position: fixed; inset: 0; margin: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 28px;
    padding-top: var(--header-h);
    background: var(--ink);
    opacity: 0; visibility: hidden;
    transition: opacity .35s, visibility .35s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .nav-links { flex-direction: column; gap: 32px; }
  .nav-link { font-size: 17px; letter-spacing: .16em; }
  .nav .btn-book { display: none; } /* кнопка вже є в шапці */
  .btn-book { margin: 12px 0 0; font-size: 13px; padding: 16px 26px; }
  .btn-cta { font-size: 13px; padding: 16px 26px; }
  /* на телефоні всі кнопки букінгу — по центру свого блоку */
  .footer-col .btn-book { display: flex; width: fit-content; margin-left: auto; margin-right: auto; }

  .section-title { font-size: 26px; margin-bottom: 24px; }
  .hero-text { bottom: 28px; }
  .hero-text h1 { font-size: clamp(32px, 9.5vw, 44px); }
  .hero-text p { font-size: 15px; margin-top: 10px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; padding: 56px var(--edge) 40px; }
  /* Kontakt: адреса/телефон/пошта зліва, CVR і SIK — праворуч навпроти, щоб футер був коротшим */
  .footer-contact {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 20px;
    align-items: start;
  }
  .footer-contact h3 { grid-column: 1 / -1; }
  .footer-col .footer-reg { margin-top: 0; text-align: right; }
  .footer-col .footer-reg li + li { margin-top: 10px; }
  .footer-reg span { display: block; font-size: 11px; letter-spacing: .04em; color: rgba(255, 255, 255, .45); }
  .review-score { margin: -16px 0 32px; flex-direction: column; gap: 8px; font-size: 13px; }
  .review-card { width: 280px; padding: 26px 22px; }
  .review-card { margin-right: 14px; }
  .reviews-track { animation-duration: 70s; }
  /* на телефоні — по дві фото в рядку */
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
