/* Happy Finance — стилі. Концепція «Скріпка»: лого-скріпка тримає документи бізнесу в порядку.
   Кольори з брендбука: синій 45%, білий 45%, помаранчевий і бежевий по 5%. */

:root {
  --navy: #102662;
  --navy-deep: #0B1B47;
  --ink: #0D1120;
  --orange: #FB6835;
  --orange-deep: #E2481B;
  --beige: #CAAE99;
  --paper: #F4F1EC;
  --white: #FFFFFF;
  --text: #1A2240;
  --muted: #5F6680;
  --line: rgba(16, 38, 98, .13);

  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(88px, 11vw, 160px);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --shadow-sheet: 0 1px 2px rgba(16, 38, 98, .06), 0 24px 48px -18px rgba(16, 38, 98, .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, p, ol, ul, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
::selection { background: var(--orange); color: var(--white); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }

/* Lenis: плавна прокрутка керує скролом сама */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Загальне ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}
.eyebrow--light { color: rgba(255, 255, 255, .6); }
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.h2 {
  font-size: clamp(34px, 4.4vw, 62px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -.04em;
  color: var(--navy);
  text-wrap: balance;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 56px;
  padding: 0 30px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn--accent { background: var(--orange); color: var(--white); box-shadow: 0 10px 24px -10px rgba(251, 104, 53, .7); }
.btn--accent:hover { background: var(--orange-deep); box-shadow: 0 14px 30px -10px rgba(226, 72, 27, .75); }
.btn:active { transform: scale(.97); }
.btn--ghost { border: 1.5px solid rgba(16, 38, 98, .2); color: var(--navy); background: rgba(255, 255, 255, .5); }
.btn--ghost:hover { border-color: var(--navy); background: var(--white); }
.btn__icon { width: 20px; height: 20px; color: #2AABEE; }
.btn--sm { height: 46px; padding: 0 22px; font-size: 15px; box-shadow: none; }
.btn--lg { height: 64px; padding: 0 36px; font-size: 17px; }
.btn--block { width: 100%; }
.btn__arrow { width: 20px; height: 20px; transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ---------- Прелоадер ---------- */
.preloader { display: none; }
.is-pre body { overflow: hidden; }
.is-pre .preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(16, 38, 98, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 38, 98, .055) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center top;
  box-shadow: 0 30px 60px -10px rgba(16, 38, 98, .35);
}
.preloader__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.preloader__mark { width: 104px; height: 104px; color: var(--navy); overflow: visible; }
.preloader__mark > * { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s var(--ease) forwards; }
.preloader__mark rect:nth-child(2) { animation-delay: .22s; }
.preloader__mark rect:nth-child(3) { animation-delay: .36s; }
.preloader__arc { stroke: var(--orange); stroke-width: 3; animation-delay: .62s !important; }
.preloader__name { margin-top: 26px; font-size: 15px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--navy); }
.preloader__name span { display: inline-block; opacity: 0; animation: rise .6s var(--ease) .7s both; }
.preloader__name span + span { animation-delay: .8s; }
.preloader__tag { margin-top: 8px; font-size: 13px; color: var(--muted); opacity: 0; animation: rise .6s var(--ease) .92s both; }
.preloader.is-out { animation: pre-out .85s cubic-bezier(.76, 0, .24, 1) forwards; }
.preloader.is-out .preloader__inner { animation: pre-inner .5s cubic-bezier(.5, 0, .75, 0) forwards; }
@keyframes pre-out { to { translate: 0 -105%; } }
@keyframes pre-inner { to { opacity: 0; translate: 0 -40px; } }

/* ---------- Лого і шапка ---------- */
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); }
.logo__mark { width: 40px; height: 40px; flex: none; }
.logo__text { font-size: 14px; line-height: 1.05; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }

.header { position: fixed; inset: 0 0 auto; z-index: 40; transition: background .35s var(--ease), box-shadow .35s var(--ease); }
.header__inner { position: relative; z-index: 2; display: flex; align-items: center; gap: 40px; height: 84px; }
.header .logo { margin-right: auto; }
.header.is-scrolled, .menu-open .header { background: rgba(244, 241, 236, .97); box-shadow: 0 1px 0 var(--line); }
.nav { display: flex; gap: 34px; font-size: 15px; color: var(--muted); }
.nav a { position: relative; transition: color .25s; }
.nav a:hover { color: var(--navy); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px; background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover::after { transform: scaleX(1); }

.burger { display: none; position: relative; width: 48px; height: 48px; margin-right: -10px; }
.burger span { position: absolute; left: 13px; right: 13px; height: 1.8px; border-radius: 2px; background: var(--navy); transition: transform .4s var(--ease), top .4s var(--ease); }
.burger span:nth-child(1) { top: 19px; }
.burger span:nth-child(2) { top: 27px; }
.menu-open .burger span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { top: 23px; transform: rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 88px 0 calc(24px + env(safe-area-inset-bottom));
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility 0s linear .35s;
}
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
.menu__nav { display: flex; flex-direction: column; }
.menu__nav a {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -.03em;
  color: var(--navy);
  translate: 0 14px;
  opacity: 0;
  transition: translate .5s var(--ease), opacity .5s var(--ease);
}
.menu-open .menu__nav a { translate: 0 0; opacity: 1; }
.menu-open .menu__nav a:nth-child(2) { transition-delay: .04s; }
.menu-open .menu__nav a:nth-child(3) { transition-delay: .08s; }
.menu-open .menu__nav a:nth-child(4) { transition-delay: .12s; }
.menu-open .menu__nav a:nth-child(5) { transition-delay: .16s; }
.menu-open .menu__nav a:nth-child(6) { transition-delay: .2s; }
.menu__foot { display: flex; flex-direction: column; gap: 10px; }
body.menu-open { overflow: hidden; }

/* ---------- Перший екран ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 64px;
  background-color: var(--paper);
  /* клітинка бухгалтерського зошита */
  background-image:
    linear-gradient(rgba(16, 38, 98, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 38, 98, .055) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center top;
  overflow: hidden;
}
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 160px; background: linear-gradient(transparent, var(--paper)); pointer-events: none; }
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 5vw, 80px); align-items: center; }

.hero__title {
  font-size: clamp(46px, min(6.4vw, 10.6vh), 96px);
  line-height: .98;
  font-weight: 600;
  letter-spacing: -.05em;
  color: var(--navy);
  margin-bottom: 30px;
}
.hw { display: inline-block; }
.hero__accent { position: relative; display: inline-block; white-space: nowrap; }
.hero__accent svg { position: absolute; left: 0; right: 0; bottom: -.12em; width: 100%; height: .2em; overflow: visible; }
.hero__accent path { fill: none; stroke: var(--orange); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }

.hero__lead { max-width: 540px; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; color: var(--muted); margin-bottom: 40px; }
.hero__cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.hero__micro { font-size: 14px; line-height: 1.45; color: var(--muted); margin-bottom: 44px; }
.hero__facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; padding-top: 24px; border-top: 1px solid var(--line); max-width: 620px; }
.hero__facts li { display: flex; flex-direction: column; gap: 4px; padding-right: 28px; }
.hero__facts li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.hero__facts b { font-size: 28px; line-height: 1.05; font-weight: 600; letter-spacing: -.03em; color: var(--navy); }
.hero__facts b i { display: inline-block; font-style: normal; font-variant-numeric: tabular-nums; }
.hero__facts span { font-size: 13px; line-height: 1.35; color: var(--muted); max-width: 170px; }

/* Стос документів зі скріпкою. --k зменшує розліт аркушів на малих екранах. */
.stack {
  --s: 0;
  --mx: 0;
  --my: 0;
  --k: 1;
  position: relative;
  width: min(440px, 100%);
  aspect-ratio: 440 / 560;
  justify-self: center;
}
.sheet {
  position: absolute;
  inset: 0;
  padding: 34px 32px;
  background: var(--white);
  border-radius: 6px;
  box-shadow: var(--shadow-sheet);
  transition: transform .9s var(--ease);
}
.sheet--3 {
  background: #FBFAF7;
  transform: translate(calc((-46px - var(--s) * 70px + var(--mx) * -10px) * var(--k)), calc((34px + var(--s) * 30px) * var(--k))) rotate(calc(-8deg - var(--s) * 6deg));
}
.sheet--2 {
  background: #FDFCFA;
  transform: translate(calc((40px + var(--s) * 80px + var(--mx) * 10px) * var(--k)), calc((-26px - var(--s) * 20px) * var(--k))) rotate(calc(5deg + var(--s) * 5deg));
}
.sheet--1 { transform: translate(calc(var(--mx) * 6px), calc(var(--my) * 6px)) rotate(calc(-1.5deg + var(--s) * 1deg)); }

.sheet__kicker { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sheet--2 .sheet__kicker, .sheet--3 .sheet__kicker { position: absolute; right: 32px; top: 30px; text-align: right; }
.sheet__line { position: absolute; left: 32px; right: 32px; height: 6px; border-radius: 3px; background: #EEF0F5; }
.sheet__line:nth-of-type(1) { top: 70px; }
.sheet__line:nth-of-type(2) { top: 88px; }
.sheet__line--short { top: 106px; right: 45%; }
.sheet__bars { position: absolute; right: 32px; top: 64px; width: 150px; height: 70px; display: flex; align-items: flex-end; gap: 6px; }
.sheet__bars i { flex: 1; height: var(--h); background: #E4E7EF; border-radius: 2px; }
.sheet__bars i:last-child { background: var(--beige); }

.sheet__head { display: flex; justify-content: space-between; align-items: flex-start; padding: 38px 0 22px; border-bottom: 2px solid var(--navy); margin-bottom: 8px; }
.sheet__title { font-size: 24px; font-weight: 600; letter-spacing: -.03em; color: var(--navy); margin-top: 4px; }
.sheet__logo { width: 36px; height: 36px; color: var(--navy); }
.sheet__table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.sheet__table td { padding: 11px 0; border-bottom: 1px dashed var(--line); color: var(--muted); }
.sheet__table td:last-child { text-align: right; color: var(--text); font-weight: 500; }
.sheet__table .is-total td { border-bottom: 0; padding-top: 14px; color: var(--navy); font-weight: 600; font-size: 17px; }
.sheet__limit { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.sheet__limit i { grid-column: 1 / -1; height: 5px; border-radius: 5px; background: #EEF0F5; overflow: hidden; }
.sheet__limit b { display: block; height: 100%; width: var(--w); background: var(--navy); border-radius: inherit; }

.clip {
  position: absolute;
  left: 34px;
  top: -40px;
  width: 38px;
  height: 100px;
  color: var(--navy);
  filter: drop-shadow(0 3px 2px rgba(16, 38, 98, .25));
  transform: translate(calc(var(--mx) * 6px), calc(var(--my) * 6px)) rotate(-1.5deg);
  z-index: 2;
}

/* Печатка: штемпель опускається, тисне і піднімається, лишаючи відбиток */
.stamp { position: absolute; right: 22px; bottom: 26px; width: 112px; height: 112px; color: var(--orange); z-index: 3; }
.stamp__print { position: absolute; inset: 0; rotate: -16deg; mix-blend-mode: multiply; }
.stamp__print svg { width: 100%; height: 100%; fill: none; stroke: currentColor; }
.stamp__print circle:first-child { stroke-width: 3; }
.stamp__print circle:nth-child(2) { stroke-width: 1.5; }
.stamp__print text { fill: currentColor; stroke: none; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; }
.stamp__print span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 700; letter-spacing: .02em; }
.stamper { position: absolute; left: 50%; bottom: -20%; width: 132%; aspect-ratio: 120 / 160; margin-left: -66%; transform-origin: 50% 100%; opacity: 0; pointer-events: none; filter: drop-shadow(0 18px 14px rgba(16, 38, 98, .28)); }
.js .stamp .stamp__print { opacity: 0; }
.stamp.is-stamping .stamper { animation: stamper 1.25s var(--d, 0s) both; }
.stamp.is-stamping .stamp__print { animation: print .35s calc(var(--d, 0s) + .56s) both; }
@keyframes stamper {
  0% { opacity: 0; translate: 0 -55%; animation-timing-function: cubic-bezier(.3, 0, .7, 1); }
  18% { opacity: 1; translate: 0 -42%; animation-timing-function: cubic-bezier(.55, 0, .9, .6); }
  45% { translate: 0 0; scale: 1 1; animation-timing-function: ease-out; }
  54% { translate: 0 0; scale: 1.03 .92; animation-timing-function: ease-in-out; }
  64% { translate: 0 0; scale: 1 1; opacity: 1; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  100% { opacity: 0; translate: 6% -78%; scale: 1 1; }
}
@keyframes print { from { opacity: 0; scale: 1.06; } to { opacity: .94; scale: 1; } }

/* Поява першого екрана: стартує, коли завантажився шрифт (клас .is-ready), — без стрибків тексту */
.js .hero [data-in] { opacity: 0; }
.is-ready .hero [data-in] { animation: rise .9s var(--ease) var(--t, 0s) both; }
.is-ready .hero .sheet[data-in] { animation: sheet-in 1s var(--ease) var(--t, 0s) both; }
.is-ready .hero .clip[data-in] { animation: clip-in .6s var(--ease) var(--t, 0s) both; }
.is-ready .hero__accent path { animation: draw .9s var(--ease) .8s forwards; }
@keyframes rise { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
@keyframes sheet-in { from { opacity: 0; translate: 0 -44px; rotate: var(--r, 4deg); } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes clip-in { from { opacity: 0; translate: 0 -28px; } to { opacity: 1; translate: 0 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Болі ---------- */
.pains { padding: var(--section) 0; background: var(--white); }
.pains__inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.pains__head { position: sticky; top: 130px; }
.pains__lead { margin-top: 26px; color: var(--muted); max-width: 440px; font-size: 18px; }
.pains__list { counter-reset: pain; border-top: 1px solid var(--line); }
.pains__list li { counter-increment: pain; position: relative; padding: 30px 0 30px 56px; border-bottom: 1px solid var(--line); }
.pains__list li::before {
  content: counter(pain, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 36px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pains__text {
  position: relative;
  display: inline;
  font-size: clamp(21px, 2.1vw, 29px);
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -.025em;
  color: var(--navy);
  transition: color .6s var(--ease);
  background-image: linear-gradient(var(--orange), var(--orange));
  background-repeat: no-repeat;
  background-position: 0 58%;
  background-size: 0% 3px;
}
.pains__fix {
  display: flex;
  align-items: center;
  gap: 10px;
  /* Місце під рішення зарезервоване одразу — висота блоку не змінюється, наступні блоки не смикаються */
  margin-top: 12px;
  opacity: 0;
  translate: 0 8px;
  font-size: 16px;
  font-weight: 500;
  color: #C63C0E;
  transition: opacity .5s ease .4s, translate .6s var(--ease) .35s;
}
.pains__fix::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 10.5 3 3L14.5 7'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.pains__list li.is-done .pains__text { color: rgba(16, 38, 98, .38); background-size: 100% 3px; transition: color .6s var(--ease), background-size .7s var(--ease); }
.pains__list li.is-done .pains__fix { opacity: 1; translate: 0 0; }

/* ---------- Послуги: папка з документами ---------- */
.services { position: relative; padding: var(--section) 0; background: var(--navy); color: var(--white); overflow: hidden; }
.services::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
  pointer-events: none;
}
.services__head { position: relative; margin-bottom: clamp(40px, 5vw, 64px); }
.services__head .h2 { color: var(--white); max-width: 760px; }

.folder { position: relative; }
.folder__tabs { position: relative; z-index: 2; display: flex; gap: 6px; padding-left: 28px; }
.folder__tab {
  position: relative;
  height: 54px;
  padding: 0 26px;
  border-radius: 14px 14px 0 0;
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .75);
  font-weight: 500;
  transition: background .3s var(--ease), color .3s var(--ease), height .3s var(--ease);
  align-self: flex-end;
}
.folder__tab:hover { background: rgba(255, 255, 255, .18); color: var(--white); }
.folder__tab.is-active { height: 62px; background: var(--paper); color: var(--navy); }
.folder__body {
  position: relative;
  padding: clamp(14px, 2vw, 22px);
  border-radius: 0 22px 22px 22px;
  background: var(--paper);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .6);
}
.folder__body::before {
  /* другий аркуш, що визирає зі стосу */
  content: "";
  position: absolute;
  inset: 26px 10px -10px 26px;
  border-radius: 8px;
  background: #E9E4DC;
  z-index: 0;
}
.clip--folder { left: auto; right: 72px; top: -36px; width: 40px; height: 104px; transform: rotate(4deg); z-index: 3; }

.doc {
  position: relative;
  z-index: 1;
  padding: clamp(28px, 4vw, 56px);
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-sheet);
}
.doc.is-entering { animation: doc-in .6s var(--ease); }
@keyframes doc-in { from { opacity: 0; transform: translateY(26px) rotate(.6deg); } }
.doc__head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; align-items: end; padding-bottom: 28px; border-bottom: 2px solid var(--navy); }
.doc__kicker { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.doc__title { font-size: clamp(28px, 3vw, 42px); line-height: 1.05; font-weight: 600; letter-spacing: -.04em; color: var(--navy); }
.doc__note { color: var(--muted); max-width: 440px; justify-self: end; }
.doc__list { counter-reset: doc; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 56px; }
.doc__list li { counter-increment: doc; position: relative; padding: 26px 0 26px 52px; border-bottom: 1px dashed var(--line); }
.doc__list li::before { content: counter(doc, decimal-leading-zero); position: absolute; left: 0; top: 29px; font-size: 13px; font-weight: 500; color: var(--orange-deep); font-variant-numeric: tabular-nums; }
.doc__list h4 { margin: 0 0 6px; font-size: 20px; font-weight: 500; letter-spacing: -.02em; color: var(--navy); }
.doc__list p { font-size: 15px; color: var(--muted); }

/* ---------- Про засновницю: трудова книжка ---------- */
.about { padding: var(--section) 0; background: var(--paper); }
.about__inner { display: grid; grid-template-columns: 360px 1fr; grid-template-areas: "card head" "card body"; column-gap: clamp(40px, 7vw, 110px); align-items: start; }
.about__head { grid-area: head; }
.about__body { grid-area: body; }
.about__card { grid-area: card; position: sticky; top: 120px; }
.idphoto { position: relative; width: 78%; padding: 14px 14px 46px; background: var(--white); box-shadow: var(--shadow-sheet); transform: rotate(-3deg); margin: 30px 0 36px 6px; }
.idphoto__img {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(160deg, #E7E2DA, #D5CCC0);
  color: rgba(16, 38, 98, .4);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.idphoto__img { position: relative; background: linear-gradient(160deg, #EDE8E0, #DCD3C7); }
.idphoto__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.clip--photo { left: 26px; top: -34px; width: 34px; height: 88px; transform: rotate(3deg); }
.about__name { font-size: 26px; font-weight: 600; letter-spacing: -.03em; color: var(--navy); }
.about__role { margin-top: 4px; font-size: 15px; color: var(--muted); }
.about__quote { margin: 24px 0 0; padding-left: 20px; border-left: 2px solid var(--orange); font-size: 17px; line-height: 1.55; color: var(--text); }
.about__lead { margin: 24px 0 48px; font-size: 18px; color: var(--muted); max-width: 620px; }

.book { background: var(--white); border-radius: 8px; box-shadow: var(--shadow-sheet); padding: 8px clamp(20px, 3vw, 36px); }
.book__title { display: flex; justify-content: space-between; padding: 22px 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); }
.book__title span { font-weight: 400; color: var(--muted); letter-spacing: .06em; }
.book__row { display: grid; grid-template-columns: 82px 1fr 1.7fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: center; }
.book__row:last-child { border-bottom: 0; }
.book__row span:first-child { font-size: 14px; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.book__row span:nth-child(2) { font-size: 15px; color: var(--navy); font-weight: 500; }
.book__row span:nth-child(3) { font-size: 15px; color: var(--muted); }
.book__row b { color: var(--text); font-weight: 600; }
.book__row--head { align-items: end; padding: 16px 0 12px; border-bottom: 2px solid var(--navy); }
.book__row--head span, .book__row--head span:nth-child(n) { font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.book__row.is-now span:first-child { color: var(--orange-deep); font-weight: 600; }
.book__row.is-now { position: relative; }
.book__row.is-now::after { content: ""; position: absolute; left: -12px; top: 20px; bottom: 20px; width: 3px; border-radius: 3px; background: var(--orange); }


/* ---------- Команда: бейджі на помаранчевих стрічках (як у брендбуку) ---------- */
.team { position: relative; padding: var(--section) 0 calc(var(--section) + 20px); background: var(--navy); color: var(--white); overflow: hidden; }
.team::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.team__head { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 80px; align-items: end; margin-bottom: 8px; }
.team .h2 { color: var(--white); }
.team__lead { font-size: 18px; color: rgba(255, 255, 255, .7); max-width: 480px; }
.badges { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: start; }
.badge { position: relative; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; transform: rotate(var(--swing, 0deg)); animation: sway calc(6s + var(--i) * .9s) ease-in-out calc(var(--i) * -1.3s) infinite alternate; }
.badge:nth-child(even) { padding-top: 34px; }
@keyframes sway { from { rotate: -1.4deg; } to { rotate: 1.4deg; } }
.badge__strap { position: relative; width: 26px; height: 110px; margin-bottom: -6px; background: linear-gradient(90deg, var(--orange-deep), var(--orange) 40%, var(--orange) 60%, var(--orange-deep)); }
.badge__strap::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 18px; height: 22px; margin-left: -9px; border-radius: 4px; background: #C9CCD6; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.badge__card {
  position: relative;
  width: 100%;
  max-width: 290px;
  padding: 0 24px 26px;
  border-radius: 16px;
  background: var(--white);
  color: var(--text);
  box-shadow: 0 40px 60px -30px rgba(0, 0, 0, .6);
  transition: translate .45s var(--ease), box-shadow .45s var(--ease);
}
.badge__card::before { content: ""; position: absolute; top: 14px; left: 50%; width: 44px; height: 8px; margin-left: -22px; border-radius: 8px; background: var(--paper); box-shadow: inset 0 1px 2px rgba(16, 38, 98, .2); }
.badge:hover .badge__card { translate: 0 -6px; box-shadow: 0 50px 70px -30px rgba(0, 0, 0, .7); }
.badge__top { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 34px 0 16px; margin: 0 -24px 22px; border-bottom: 1px dashed var(--line); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--navy); }
.badge__logo { width: 18px; height: 18px; color: var(--navy); }
/* Місце під фото, як на справжньому пропуску: фото (ч/б, при наведенні — колір) або ініціали того ж розміру */
.badge__photo { position: relative; width: 104px; aspect-ratio: 3 / 4; margin: 0 0 18px; border-radius: 8px; overflow: hidden; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.badge__photo img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06); transition: filter .6s var(--ease); }
.badge:hover .badge__photo img { filter: none; }
.badge__photo--initials { display: grid; place-items: center; background: var(--navy); }
.badge__photo--initials b { font-size: 34px; font-weight: 600; letter-spacing: -.05em; color: var(--beige); }
.badge__photo--initials svg { position: absolute; right: 7px; bottom: 7px; width: 16px; height: 16px; color: var(--white); opacity: .35; }
.badge__name { font-size: 22px; line-height: 1.1; font-weight: 600; letter-spacing: -.03em; color: var(--navy); }
.badge__role { margin-top: 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-deep); }
.badge__exp { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.badge__fact { margin-top: 14px; font-size: 14px; line-height: 1.45; color: var(--text); }
.badge__fact span { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Фото Марії-«полароїд», притиснуте скріпкою до стосу документів */
.polaroid {
  position: absolute;
  top: -78px;
  right: -13%;
  z-index: 4;
  width: 31%;
  margin: 0;
  padding: 8px 8px 0;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(16, 38, 98, .08), 0 22px 40px -16px rgba(16, 38, 98, .4);
  transform: translate(calc((var(--mx) * -8px + var(--s) * 46px) * var(--k)), calc((var(--my) * -8px - var(--s) * 26px) * var(--k))) rotate(calc(6deg + var(--s) * 5deg));
  transition: transform .9s var(--ease);
}
.polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.polaroid figcaption { padding: 7px 2px 9px; font-size: 11px; line-height: 1.25; font-weight: 500; text-align: center; color: var(--muted); }
.clip--polaroid { left: 50%; top: -28px; width: 24px; height: 64px; margin-left: -12px; transform: rotate(-4deg); filter: drop-shadow(0 2px 1px rgba(16, 38, 98, .25)); }
.is-ready .hero .polaroid[data-in] { animation: sheet-in 1s var(--ease) var(--t, 0s) both; }

/* ---------- Кейси: акти виконаних робіт ---------- */
.cases { padding: var(--section) 0; background: var(--paper); }
.cases__head { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 80px; align-items: end; margin-bottom: clamp(36px, 5vw, 60px); }
.cases__lead { font-size: 18px; color: var(--muted); max-width: 460px; }
.acts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.act { position: relative; padding: 28px 32px 30px; background: var(--white); border-radius: 6px; box-shadow: var(--shadow-sheet); }
.act:nth-child(4n + 1) { rotate: -.6deg; }
.act:nth-child(4n + 2) { rotate: .5deg; }
.act:nth-child(4n + 3) { rotate: .4deg; }
.act:nth-child(4n) { rotate: -.5deg; }
.act__head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 2px solid var(--navy); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
.act__head span { font-weight: 500; letter-spacing: .04em; color: var(--muted); }
.act__biz { margin: 18px 0 6px; font-size: clamp(21px, 2vw, 26px); line-height: 1.15; font-weight: 600; letter-spacing: -.03em; color: var(--navy); }
.act__rows { margin: 0; }
.act__rows > div { display: grid; grid-template-columns: 86px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.act__rows dt { padding-top: 2px; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.act__rows dd { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text); }
.act__result { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-top: 18px; padding-right: 100px; min-height: 76px; align-content: center; }
.act__result b { display: inline-flex; align-items: baseline; gap: 8px; font-size: clamp(28px, 2.8vw, 38px); line-height: 1; font-weight: 600; letter-spacing: -.04em; color: var(--orange-deep); white-space: nowrap; }
.act__result b s { color: var(--muted); font-weight: 400; text-decoration-thickness: 2px; text-decoration-color: var(--orange); }
.act__result b i { font-style: normal; color: var(--orange); }
.act__result span { font-size: 14px; color: var(--muted); }
.stamp--act { right: 20px; bottom: 16px; top: auto; width: 92px; height: 92px; }
.stamp--act .stamp__print span { font-size: 20px; }

/* ---------- Клієнти: полиця з папками ---------- */
.clients { padding: var(--section) 0; background: var(--white); }
.clients__top { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px 80px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.clients__stat { display: flex; align-items: center; gap: 22px; }
.clients__stat b { font-size: clamp(56px, 6vw, 84px); line-height: .85; font-weight: 600; letter-spacing: -.05em; color: var(--orange); }
.clients__stat p { color: var(--muted); font-size: 16px; }
.clients__stat span { color: var(--navy); font-weight: 600; }

.shelf { display: flex; gap: 8px; height: 420px; container-type: inline-size; }
/* Анімуємо лише flex-grow (0 → 1) при сталій базі 84px — розкриття плавне, без стрибків */
.spine { display: flex; flex: 0 0 84px; min-width: 0; border-radius: 12px; overflow: hidden; background: var(--paper); transition: flex-grow .75s cubic-bezier(.65, 0, .25, 1), background .5s ease, box-shadow .5s ease; will-change: flex-grow; }
.spine.is-open { flex-grow: 1; background: var(--white); box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -30px rgba(16, 38, 98, .35); }
.spine__btn {
  position: relative;
  flex: 0 0 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  background: var(--navy);
  color: var(--white);
  transition: background .3s;
}
.spine:nth-child(even) .spine__btn { background: #1A3373; }
.spine__btn:hover { background: var(--navy-deep); }
.spine.is-open .spine__btn { background: var(--orange); cursor: default; }
.spine__no { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: .8; }
.spine__name { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 19px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.spine__form { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .75; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.spine__panel { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.spine__inner { width: calc(100cqw - 6 * 84px - 5 * 8px); height: 100%; display: flex; flex-direction: column; padding: 40px 44px; opacity: 0; transform: translateX(-12px); transition: opacity .25s ease, transform .25s ease; }
.spine.is-open .spine__inner { opacity: 1; transform: none; transition: opacity .5s ease .35s, transform .7s var(--ease) .35s; }
.spine__kicker { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.spine__title { margin-top: 10px; font-size: clamp(32px, 3.4vw, 48px); line-height: 1; font-weight: 600; letter-spacing: -.04em; color: var(--navy); }
.spine__meta { display: flex; gap: 48px; margin: auto 0 0; padding: 24px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.spine__meta dt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.spine__meta dd { margin: 6px 0 0; font-size: 20px; font-weight: 600; color: var(--navy); }
.spine__what { padding-top: 22px; font-size: 18px; color: var(--text); }
.spine__what span { display: block; margin-bottom: 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Цінності: один робочий день (годинник іде під час скролу) ---------- */
.day { --bg: var(--paper); --fg: var(--navy); --sub: var(--muted); --ln: var(--line); background: var(--bg); color: var(--fg); transition: background .9s var(--ease); }
.day.is-evening { --bg: #0E1630; --fg: var(--white); --sub: rgba(255, 255, 255, .62); --ln: rgba(255, 255, 255, .16); }
.day__track { height: 320vh; }
.day__sticky { position: sticky; top: 0; height: 100vh; min-height: 640px; display: flex; align-items: center; padding-top: 60px; }
.day__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: center; }
.day .h2 { color: var(--fg); transition: color .9s var(--ease); }
.day__lead { margin: 18px 0 clamp(28px, 4vh, 48px); font-size: 18px; color: var(--sub); max-width: 440px; transition: color .9s var(--ease); }

.clock { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.clock svg { width: clamp(220px, 24vw, 340px); height: auto; flex: none; overflow: visible; }
.clock__face { fill: var(--white); stroke: var(--ln); stroke-width: 1.5; transition: fill .9s var(--ease); }
.day.is-evening .clock__face { fill: rgba(255, 255, 255, .04); }
.clock__photo { opacity: 0; transition: opacity 1.1s var(--ease); }
.day.is-evening .clock__photo { opacity: 1; }
.clock__arc { fill: none; stroke: rgba(202, 174, 153, .35); stroke-width: 10; stroke-linecap: round; }
.clock__arc--fill { stroke: var(--orange); stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 0)); }
.clock__ticks line { stroke: var(--fg); stroke-linecap: round; transition: stroke .9s var(--ease); }
.clock__ticks .t-h { stroke-width: 3; }
.clock__ticks .t-m { stroke-width: 1.2; opacity: .35; }
.clock__hour { stroke: var(--fg); stroke-width: 9; stroke-linecap: round; transition: stroke .9s var(--ease); }
.clock__min { stroke: var(--orange); stroke-width: 4; stroke-linecap: round; }
.clock__pin { fill: var(--fg); stroke: var(--bg); stroke-width: 3; transition: fill .9s var(--ease); }
.clock__digital { display: flex; flex-direction: column; gap: 6px; }
.clock__digital span { font-size: clamp(44px, 4.6vw, 68px); line-height: 1; font-weight: 600; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.clock__digital small { font-size: 14px; color: var(--sub); max-width: 190px; line-height: 1.4; transition: color .9s var(--ease); }

.day__rules { position: relative; border-left: 1px solid var(--ln); transition: border-color .9s var(--ease); }
.rule { position: relative; padding: 0 0 clamp(22px, 3.4vh, 38px) 40px; opacity: .28; transition: opacity .5s var(--ease); }
.rule:last-child { padding-bottom: 0; }
.rule::before { content: ""; position: absolute; left: -7px; top: 6px; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--ln); transition: background .4s, border-color .4s; }
.rule.is-past { opacity: .55; }
.rule.is-now { opacity: 1; }
.rule.is-past::before, .rule.is-now::before { background: var(--orange); border-color: var(--orange); }
.rule.is-now::before { box-shadow: 0 0 0 6px rgba(251, 104, 53, .18); }
.rule__time { display: flex; align-items: baseline; gap: 12px; font-size: 15px; font-weight: 600; color: var(--orange-deep); font-variant-numeric: tabular-nums; }
.day.is-evening .rule__time { color: var(--orange); }
.rule__time span { font-weight: 500; color: var(--sub); }
.rule h3 { margin: 6px 0 6px; font-size: clamp(22px, 2.1vw, 30px); line-height: 1.15; font-weight: 600; letter-spacing: -.03em; color: var(--fg); transition: color .9s var(--ease); }
.rule p:not(.rule__time) { font-size: 16px; color: var(--sub); max-width: 480px; transition: color .9s var(--ease); }
.rule__now { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 8px 14px; border-radius: 100px; background: rgba(202, 174, 153, .22); font-size: 14px !important; font-weight: 500; color: var(--fg) !important; }
.rule__now::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--now, #23A55A); box-shadow: 0 0 0 4px rgba(35, 165, 90, .18); }
.rule__now.is-off { --now: var(--beige); }

/* ---------- Часті питання: чат з Марією ---------- */
.faq { padding: var(--section) 0; background: var(--white); }
.faq__inner { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.faq__head { position: sticky; top: 120px; }
.faq__lead { margin: 18px 0 30px; font-size: 18px; color: var(--muted); }
.faq__chips { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.faq__chip {
  position: relative;
  padding: 14px 20px 14px 18px;
  border-radius: 16px 16px 16px 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--navy);
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  transition: background .25s, color .25s, border-color .25s, translate .3s var(--ease);
}
.faq__chip:hover { border-color: var(--navy); translate: 4px 0; }
.faq__chip.is-asked { color: var(--muted); }
.faq__chip.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); translate: 4px 0; }

.chat { border-radius: 24px; overflow: hidden; background: var(--white); box-shadow: inset 0 0 0 1px var(--line), 0 50px 80px -40px rgba(16, 38, 98, .35); }
.chat__head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--navy); color: var(--white); }
.chat__avatar { width: 48px; height: 48px; flex: none; border-radius: 50%; object-fit: cover; object-position: 50% 15%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.chat__who { display: flex; flex-direction: column; line-height: 1.25; }
.chat__who b { font-size: 16px; font-weight: 600; }
.chat__who span { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: rgba(255, 255, 255, .7); }
.chat__who span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3DD68C; }
.chat__who span.is-off::before { background: var(--beige); }
.chat__mark { width: 28px; height: 28px; margin-left: auto; color: var(--white); opacity: .4; }
.chat__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 470px;
  padding: 24px 22px;
  overflow-y: auto;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(16, 38, 98, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 38, 98, .045) 1px, transparent 1px);
  background-size: 28px 28px;
  scrollbar-width: thin;
}
.msg { max-width: 84%; padding: 13px 17px; font-size: 15.5px; line-height: 1.5; animation: msg-in .45s var(--ease) both; }
.msg--in { align-self: flex-start; border-radius: 18px 18px 18px 6px; background: var(--white); color: var(--text); box-shadow: 0 6px 16px -10px rgba(16, 38, 98, .35); }
.msg--out { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: var(--navy); color: var(--white); }
.msg--typing { display: inline-flex; gap: 5px; padding: 16px 18px; }
.msg--typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .35; animation: typing 1s infinite; }
.msg--typing i:nth-child(2) { animation-delay: .15s; }
.msg--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes msg-in { from { opacity: 0; translate: 0 10px; } }
@keyframes typing { 30% { opacity: 1; translate: 0 -3px; } }

/* ---------- Фінал ---------- */
.final { padding: var(--section) 0; background: var(--paper); }
.final__inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.final__lead { margin: 24px 0 40px; font-size: 18px; color: var(--muted); max-width: 480px; }
.final__contacts { border-top: 1px solid var(--line); max-width: 480px; }
.final__contacts li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.final__contacts span { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.final__contacts a, .final__contacts p { font-size: 19px; font-weight: 500; color: var(--navy); }
.final__contacts a { background: linear-gradient(var(--orange), var(--orange)) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease); }
.final__contacts a:hover { background-size: 100% 1.5px; }

.case-wrap { position: relative; padding-top: 268px; }
.case__pin { position: absolute; top: 0; right: 24px; z-index: 3; width: 200px; margin: 0; padding: 9px 9px 30px; background: var(--white); box-shadow: var(--shadow-sheet); rotate: 4deg; }
.case__pin img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.clip--pin { left: 22px; top: -30px; width: 30px; height: 80px; transform: rotate(-6deg); }
.case { display: flex; border-radius: 14px; overflow: hidden; background: var(--white); box-shadow: 0 50px 90px -40px rgba(16, 38, 98, .45); }
.case__spine {
  flex: 0 0 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
  background: var(--orange);
  color: var(--white);
}
.case__clock { width: 34px; height: 34px; }
.case__spine b, .case__spine i { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.case__spine b { font-size: 22px; font-weight: 500; }
.case__spine i { font-style: normal; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.case__sheet { flex: 1; min-width: 0; padding: clamp(28px, 4vw, 52px); }
.case__kicker { padding-bottom: 18px; margin-bottom: 8px; border-bottom: 2px solid var(--navy); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); }
.case__form { display: flex; flex-direction: column; gap: 6px; }
.case__form .lead__msg { margin: 18px 0 20px; }
.line-field { display: flex; flex-direction: column; padding-top: 18px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.line-field input { height: 48px; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--navy); font: inherit; font-size: 20px; font-weight: 500; letter-spacing: -.01em; text-transform: none; transition: border-color .25s; }
.line-field input::placeholder { color: rgba(16, 38, 98, .25); }
.line-field input:focus { outline: none; border-bottom: 2px solid var(--orange); }
.case .lead__done { padding: 24px 0; }

/* ---------- Підвал ---------- */
.footer { padding: 72px 0 32px; background: var(--navy); color: rgba(255, 255, 255, .65); font-size: 15px; }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.logo--light { color: var(--white); }
.footer__brand p { margin-top: 20px; max-width: 320px; }
.footer__nav { display: flex; flex-direction: column; gap: 12px; }
.footer__nav a { transition: color .25s; justify-self: start; }
.footer__nav a:hover { color: var(--white); }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 13px; color: rgba(255, 255, 255, .45); }

/* ---------- Форма заявки ---------- */
.lead {
  width: min(480px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 40px 36px 32px;
  border: 0;
  border-radius: 22px;
  background: var(--paper);
  color: var(--text);
  box-shadow: 0 40px 80px -20px rgba(13, 17, 32, .5);
}
.lead[open] { animation: lead-in .45s var(--ease); }
.lead::backdrop { background: rgba(13, 17, 32, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@keyframes lead-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.lead__close { position: absolute; right: 16px; top: 16px; width: 44px; height: 44px; border-radius: 50%; transition: background .2s; }
.lead__close:hover { background: rgba(16, 38, 98, .07); }
.lead__close::before, .lead__close::after { content: ""; position: absolute; left: 14px; right: 14px; top: 21px; height: 1.6px; background: var(--navy); transform: rotate(45deg); }
.lead__close::after { transform: rotate(-45deg); }
.lead__mark { width: 44px; height: 44px; color: var(--navy); margin-bottom: 20px; }
.lead__title { font-size: 28px; line-height: 1.12; font-weight: 600; letter-spacing: -.03em; color: var(--navy); margin-bottom: 10px; padding-right: 30px; }
.lead__text { font-size: 15px; color: var(--muted); margin-bottom: 26px; }
.lead__form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.field input {
  height: 56px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(16, 38, 98, .08); }
.lead__msg { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.lead__msg legend { width: 100%; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.lead__msg label { position: relative; cursor: pointer; }
.lead__msg input { position: absolute; opacity: 0; }
.lead__msg span { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 100px; border: 1px solid var(--line); background: var(--white); font-size: 15px; transition: background .2s, color .2s, border-color .2s; }
.lead__msg input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.lead__msg input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.lead__hint { text-align: center; font-size: 13px; color: var(--muted); }
.lead__hint.is-error { color: var(--orange-deep); }
.lead__done { text-align: center; padding: 12px 0 8px; }
.stamp--done { position: relative; right: auto; bottom: auto; margin: 70px auto 22px; width: 116px; height: 116px; }

/* ---------- Конверсійні дрібниці: телефон у шапці, дія після послуг, довіра біля форми, згода ---------- */
.header__phone { font-size: 15px; font-weight: 600; color: var(--navy); white-space: nowrap; margin-right: -12px; }
.header__phone:hover { color: var(--orange-deep); }
.services__cta { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; margin-top: 40px; padding: 26px 30px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .16); }
.services__cta p { max-width: 640px; font-size: 17px; color: rgba(255, 255, 255, .72); }
.services__cta b { color: var(--white); font-weight: 500; }
.lead__consent { margin-top: 4px; text-align: center; font-size: 12px; line-height: 1.45; color: var(--muted); opacity: .85; }

/* ---------- Адаптив ---------- */
/* Невисокі ноутбуки: перший екран має вміститися у вікно */
@media (min-width: 1081px) and (max-height: 820px) {
  .hero { padding: 104px 0 40px; }
  .hero__title { margin-bottom: 22px; }
  .hero__lead { margin-bottom: 28px; }
  .hero__micro { margin-bottom: 26px; }
  .hero__facts { padding-top: 18px; }
  .stack { zoom: .84; }
}
@media (min-width: 1081px) and (max-height: 700px) {
  .stack { zoom: .74; }
}

@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; }
  .header__phone { display: none; }
  .stack { width: min(400px, 80%); margin: 40px auto 0; }
  .pains__inner { grid-template-columns: 1fr; }
  .pains__head { position: static; }
  .clients__top { grid-template-columns: 1fr; }
  .cases__head { grid-template-columns: 1fr; }
  .faq__inner { grid-template-columns: minmax(0, 1fr); }
  .faq__inner > * { min-width: 0; }
  .faq__inner { gap: 28px; }
  .faq__head { position: static; }
  /* Питання стають «швидкими відповідями» під чатом, як у месенджері */
  .faq__head { display: contents; }
  .faq__inner { gap: 0; }
  .faq__lead { margin: 14px 0 24px; }
  .chat { order: 3; border-radius: 24px 24px 0 0; box-shadow: inset 0 0 0 1px var(--line); }
  .faq__chips { order: 4; flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 14px 14px 16px; border-radius: 0 0 24px 24px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line), 0 40px 60px -40px rgba(16, 38, 98, .35); }
  .faq__chips::before { content: "Оберіть питання"; width: 100%; margin-bottom: 2px; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .faq__chip { padding: 10px 14px; border-radius: 100px; font-size: 14px; line-height: 1.3; }
  .faq__chip:hover, .faq__chip.is-active { translate: none; }
  .faq__chip.is-asked:not(.is-active) { background: var(--white); }
  .faq__chip.is-asked:not(.is-active)::before { content: "✓ "; color: var(--orange-deep); }
  .team__head { grid-template-columns: 1fr; }
  .badges { grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
  .badge:nth-child(even) { padding-top: 34px; }
  .final__inner { grid-template-columns: 1fr; }
  .about__inner { grid-template-columns: 1fr; grid-template-areas: "head" "card" "body"; }
  .about__card { position: static; display: grid; grid-template-columns: 200px 1fr; grid-template-areas: "photo name" "photo role" "photo quote"; gap: 0 32px; align-items: start; margin: 32px 0 40px; }
  .idphoto { grid-area: photo; width: 100%; margin: 24px 0 0; }
  .about__name { grid-area: name; align-self: end; margin-top: 24px; }
  .about__role { grid-area: role; }
  .about__quote { grid-area: quote; }
  /* Годинник: без «липкого» скролу — на планшетах і телефонах контент вищий за екран */
  .day__track { height: auto; }
  .day__sticky { position: static; height: auto; min-height: 0; padding: var(--section) 0; }
  .day__inner { grid-template-columns: 1fr; gap: 0; }
  .rule { opacity: .5; }
  .rule.is-now { opacity: 1; }
  /* Годинник — компактна липка плашка під шапкою: видно, як іде час, поки гортаєш правила */
  .day__left { display: contents; }
  .day__lead { margin: 18px 0 24px; }
  .clock { position: sticky; top: 96px; z-index: 4; gap: 18px; padding: 12px 18px; border-radius: 18px; background: var(--white); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line), 0 16px 30px -20px rgba(16, 38, 98, .45); transition: background .7s var(--ease), color .7s var(--ease); }
  .clock svg { width: 84px; }
  .day__rules { margin-top: 32px; }
  /* «Вечір» на планшеті й телефоні настає лише в плашці годинника, а не на всьому блоці */
  .day.is-evening { --bg: var(--paper); --fg: var(--navy); --sub: var(--muted); --ln: var(--line); }
  .day.is-evening .clock { --fg: var(--white); --sub: rgba(255, 255, 255, .7); --ln: rgba(255, 255, 255, .2); --bg: #0E1630; background: #0E1630; }
}

@media (max-width: 760px) {
  :root { --section: 76px; }
  body { font-size: 16px; }
  .h2 { font-size: clamp(30px, 8.6vw, 40px); line-height: 1.08; }

  .nav { display: none; }
  .header__inner { gap: 10px; }
  .header__cta { height: 40px; padding: 0 16px; font-size: 14px; box-shadow: 0 6px 16px -8px rgba(251, 104, 53, .8); }
  .burger { display: block; }
  .menu { display: flex; }
  .header__inner { height: 64px; }
  .logo__mark { width: 34px; height: 34px; }
  .logo__text { font-size: 12.5px; }

  .hero { min-height: 0; padding: 92px 0 36px; }
  .hero__eyebrow { margin-bottom: 18px; font-size: 11px; letter-spacing: .1em; }
  .hero__title { font-size: clamp(40px, 11.4vw, 54px); line-height: 1; margin-bottom: 20px; }
  .hero__lead { font-size: 16.5px; margin-bottom: 28px; }
  .hero__cta { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 14px; }
  .hero__cta .btn { height: 56px; }
  .hero__micro { text-align: center; font-size: 13px; margin-bottom: 30px; }
  .hero__facts { grid-template-columns: repeat(3, 1fr); padding-top: 20px; }
  .hero__facts li { padding-right: 12px; }
  .hero__facts li + li { padding-left: 12px; }
  .hero__facts b { font-size: 23px; }
  .hero__facts span { font-size: 12px; }

  .stack { --k: .36; width: min(320px, 82%); aspect-ratio: 440 / 590; margin: 44px auto 12px; }
  .sheet { padding: 20px 20px; }
  .sheet__head { padding: 28px 0 14px; }
  .sheet__kicker { font-size: 10px; }
  .sheet__title { font-size: 19px; }
  .sheet__logo { width: 30px; height: 30px; }
  .sheet__table { font-size: 13.5px; }
  .sheet__table td { padding: 8px 0; }
  .sheet__table .is-total td { font-size: 15px; padding-top: 10px; }
  .sheet__limit { font-size: 12px; margin-top: 10px; }
  .sheet__bars { width: 96px; height: 46px; right: 20px; top: 50px; }
  .sheet--2 .sheet__kicker, .sheet--3 .sheet__kicker { right: 20px; top: 20px; }
  .sheet__line { left: 20px; right: 20px; }
  .clip { left: 22px; width: 28px; height: 74px; top: -30px; }
  .stamp { width: 80px; height: 80px; right: -14px; bottom: -20px; }
  .stamp__print span { font-size: 18px; }

  .pains__list li { padding: 22px 0 22px 36px; }
  .pains__list li::before { top: 27px; }
  .pains__text { font-size: 20px; background-size: 0% 2px; }
  .pains__list li.is-done .pains__text { background-size: 100% 2px; }
  .pains__fix { font-size: 15px; align-items: flex-start; }
  .pains__fix::before { margin-top: 1px; }

  .folder__tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding-left: 0; }
  .folder__tab { height: 50px; padding: 0 6px; font-size: 13.5px; text-align: center; }
  .folder__tab.is-active { height: 56px; }
  .folder__body { border-radius: 0 0 16px 16px; padding: 8px; }
  .clip--folder { display: none; }
  .doc { padding: 24px 18px 8px; }
  .doc__head { grid-template-columns: 1fr; gap: 10px; padding-bottom: 20px; }
  .doc__title { font-size: 26px; }
  .doc__note { justify-self: start; font-size: 15px; }
  .doc__list { grid-template-columns: 1fr; }
  .doc__list li { padding: 18px 0 18px 34px; }
  .doc__list li::before { top: 21px; }
  .doc__list h4 { font-size: 17.5px; }
  .doc__list li:last-child { border-bottom: 0; }

  .about__card { grid-template-columns: 112px 1fr; gap: 0 18px; margin: 28px 0 32px; }
  .idphoto { padding: 7px 7px 22px; margin: 18px 0 0 4px; }
  .clip--photo { left: 12px; width: 22px; height: 56px; top: -22px; }
  .about__name { font-size: 21px; margin-top: 0; align-self: end; }
  .about__role { font-size: 14px; }
  .about__quote { grid-area: 3 / 1 / 4 / 3; margin-top: 24px; font-size: 16px; padding-left: 16px; }
  .about__card { grid-template-areas: "photo name" "photo role"; }
  .about__lead { font-size: 16.5px; margin: 18px 0 0; }
  .book { padding: 4px 18px; }
  .book__title { padding-top: 18px; }
  .book__row--head { display: none; }
  .book__row { grid-template-columns: 1fr; gap: 4px; padding: 16px 0; }
  .book__row span:first-child { font-size: 13px; color: var(--orange-deep); }
  .book__row.is-now::after { left: -10px; }

  .team__lead { font-size: 16.5px; }
  .badges { display: flex; gap: 14px; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
  .badges::-webkit-scrollbar { display: none; }
  .badge { flex: 0 0 78%; scroll-snap-align: start; animation: none; }
  .badge:nth-child(even) { padding-top: 0; }
  .badge__strap { height: 64px; width: 22px; }
  .badge__card { max-width: none; padding: 0 20px 22px; }
  .badge__top { margin: 0 -20px 18px; }
  .badge__photo { width: 92px; }
  .badge__name { font-size: 20px; }
  .polaroid { top: -54px; right: -8%; width: 30%; padding: 5px 5px 0; }
  .polaroid figcaption { padding: 5px 0 6px; font-size: 8.5px; }
  .clip--polaroid { top: -20px; width: 18px; height: 46px; margin-left: -9px; }
  .stack { margin-top: 72px; }
  .cases__lead { font-size: 16.5px; }
  .acts { display: flex; gap: 14px; margin: 0 calc(var(--gutter) * -1); padding: 6px var(--gutter) 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
  .acts::-webkit-scrollbar { display: none; }
  .act { flex: 0 0 86%; scroll-snap-align: start; padding: 22px 20px 24px; rotate: none !important; }
  .act__biz { font-size: 20px; }
  .act__result { padding-right: 76px; min-height: 64px; }
  .act__rows > div { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
  .act__rows dd { font-size: 14.5px; }
  .stamp--act { right: 12px; bottom: 14px; width: 70px; height: 70px; }
  .stamp--act .stamp__print span { font-size: 16px; }
  .clients__stat b { font-size: 56px; }
  .clients__stat p { font-size: 15px; }
  .shelf { flex-direction: column; height: auto; gap: 6px; }
  .spine { flex-direction: column; flex: none; }
  .spine.is-open { flex: none; }
  .spine__btn { flex: none; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 0 18px; height: 58px; }
  .spine.is-open .spine__btn { cursor: pointer; }
  .spine__name, .spine__form { writing-mode: horizontal-tb; transform: none; }
  .spine__name { font-size: 16.5px; }
  .spine__form { margin-left: auto; }
  .spine__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
  .spine.is-open .spine__panel { grid-template-rows: 1fr; }
  .spine__inner { width: 100%; min-height: 0; overflow: hidden; padding: 0 18px; transform: none; }
  .spine.is-open .spine__inner { padding: 18px 18px 22px; }
  .spine__kicker { display: none; }
  .spine__title { font-size: 24px; margin-top: 0; }
  .spine__meta { margin-top: 16px; gap: 28px; padding: 14px 0; }
  .spine__meta dd { font-size: 17px; }
  .spine__what { font-size: 15.5px; padding-top: 14px; }

  .day__lead { font-size: 16.5px; margin-bottom: 28px; }
  .clock { top: 76px; padding: 10px 14px; gap: 14px; }
  .clock svg { width: 64px; }
  .clock__digital span { font-size: 32px; }
  .clock__digital small { font-size: 12.5px; max-width: none; }
  .rule { padding-left: 26px; padding-bottom: 26px; }
  .rule h3 { font-size: 21px; }
  .rule p:not(.rule__time) { font-size: 15.5px; }
  .rule__now { font-size: 13px !important; }

  .faq__lead { font-size: 16.5px; margin: 14px 0 20px; }
  .faq__chip { font-size: 13.5px; padding: 9px 13px; }
  .chat__body { height: 360px; padding: 18px 14px; }
  .msg { max-width: 90%; font-size: 15px; }
  .case__clock { width: 26px; height: 26px; }
  .services__cta { padding: 20px; margin-top: 28px; }
  .services__cta p { font-size: 15.5px; }
  .services__cta .btn { width: 100%; }
      .final__lead { font-size: 16.5px; margin: 18px 0 28px; }
  .final__contacts a, .final__contacts p { font-size: 16.5px; }
  .final__contacts li { padding: 15px 0; }
  .case { flex-direction: column; margin-top: 8px; }
  .case-wrap { padding-top: 168px; }
  .case__pin { width: 128px; right: 14px; padding: 7px 7px 22px; }
  .clip--pin { left: 14px; top: -24px; width: 24px; height: 62px; }
  .case__spine i { display: none; }
  .case__spine { flex: none; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 0 20px; height: 56px; }
  .case__spine b, .case__spine i { writing-mode: horizontal-tb; transform: none; }
  .case__spine b { font-size: 16.5px; }
  .case__spine i { margin-left: auto; }
  .case__sheet { padding: 22px 20px 24px; }
  .line-field input { font-size: 18px; }

  .footer { padding: 56px 0 32px; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 32px 24px; padding-bottom: 40px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; gap: 6px; }

  .lead__msg { display: grid; grid-template-columns: 1fr 1fr; }
  .lead__msg span { width: 100%; justify-content: center; }
  .lead { padding: 30px 20px 22px; }
  .lead__title { font-size: 23px; }
}

@media (max-width: 370px) {
  .header__cta { padding: 0 12px; font-size: 13px; }
  .logo__text { font-size: 11px; }
  .logo { gap: 8px; }
  .hero__title { font-size: 38px; }
  .hero__facts b { font-size: 20px; }
  .folder__tab { font-size: 12.5px; }
  .clock svg { width: 56px; }
  .clock__digital span { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
  .js .hero [data-in], .js .stamp .stamp__print { opacity: 1 !important; }
  .hero__accent path { stroke-dashoffset: 0; }
}
