/* AIDeal — main page v3. Only the main page uses this file; /agencies, /terms, /privacy
   and 404 stay on site.css. Cached for a year under /assets/: change = new file name. */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/assets/fonts/manrope-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/assets/fonts/manrope-latin.woff2) format('woff2');
  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: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/caveat-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/caveat-latin.woff2) format('woff2');
  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;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: #faf9f4; }
body {
  color: #2b1811;
  font-family: 'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}
a { color: #a34b2c; }
a:hover { color: #c2613e; }
::selection { background: #f4e4c2; }
:focus-visible { outline: 2px solid #c2613e; outline-offset: 2px; }
button { font: inherit; }
p { margin: 0; }

.wrap { max-width: 720px; width: 100%; margin: 0 auto; padding: 0 20px; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.block { display: flex; flex-direction: column; gap: 12px; }

/* ---------- header ---------- */
.site-header { padding-top: 22px; }
.site-header img { height: 40px; width: auto; display: block; }

/* ---------- type ---------- */
.h1 {
  font-weight: 800;
  font-size: clamp(28px, 6.8vw, 42px);
  line-height: 1.1;
  letter-spacing: -.03em;
  margin: 0;
  max-width: 19em;
}
.h1 em { font-style: normal; color: #a34b2c; }
.h2 {
  font-weight: 800;
  font-size: clamp(26px, 6vw, 36px);
  line-height: 1.1;
  letter-spacing: -.028em;
  margin: 0;
}
.h2--cream { color: #f4e4c2; }
.h2--accent { color: #a34b2c; }
.lead { font-size: 18px; line-height: 1.55; color: #5f5346; max-width: 31em; }
.text { max-width: 31em; }
.text--dark { color: rgba(250, 249, 244, .82); max-width: 31em; }
.note { font-size: 14px; color: #6b6b6b; }

/* ---------- "drawn" pill: Спробувати в Telegram ---------- */
.pill {
  position: relative;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 22px;
  flex-wrap: wrap;
  row-gap: 4px;
  background: #f4e4c2;
  color: #a34b2c;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  border-radius: 999px;
}
.pill:hover { background: #eeddb0; color: #a34b2c; }
.pill__outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.pill__brand {
  order: 3;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.025em;
}
.pill__spark { width: 17px; height: auto; flex: none; margin-top: -3px; }
.pill__ai { color: #c2613e; }
.pill__deal { color: #6b4a35; margin-left: -.2em; }
.pill__label { order: 1; position: relative; font-weight: 700; font-size: 17px; }

.pill--dark { background: rgba(244, 228, 194, .12); color: #f4e4c2; }
.pill--dark:hover { background: rgba(244, 228, 194, .24); color: #f4e4c2; }
.pill--dark .pill__ai { color: #e0906a; }
.pill--dark .pill__deal { color: #faf9f4; }

.pill--lg {
  align-self: auto;
  justify-content: center;
  gap: 14px;
  min-height: 66px;
  padding: 14px 26px;
  margin-top: 4px;
  font-size: 19px;
}
.pill--lg .pill__brand { gap: 7px; font-size: 21px; }
.pill--lg .pill__spark { width: 19px; }
.pill--lg .pill__label { font-size: 18px; }

.cta-group { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }

/* ---------- 01 hero ---------- */
.hero { padding-top: 34px; padding-bottom: 72px; }

/* ---------- sections ---------- */
.section-dark { background: #2b1811; padding: 72px 0; }
.section-light { padding-top: 72px; padding-bottom: 72px; }

.sketch { width: 100%; height: auto; display: block; margin-top: 4px; }
.sketch--narrow { max-width: 470px; margin-top: 8px; }

/* «подивись, як це працює:» + buttons that open the video modal */
.watch { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.watch__label {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  color: #a34b2c;
}
.watch--dark .watch__label { color: #f4e4c2; }
.watch__list { display: flex; flex-wrap: wrap; gap: 10px; }
.watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 18px 6px 6px;
  background: transparent;
  border: 1.5px solid rgba(43, 24, 17, .2);
  border-radius: 999px;
  color: #2b1811;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.watch-btn:hover { background: #f4e4c2; }
.watch--dark .watch-btn { border-color: rgba(244, 228, 194, .34); color: #f4e4c2; }
.watch--dark .watch-btn:hover { background: rgba(244, 228, 194, .1); }
.watch-btn__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #c2613e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

/* ---------- 03 Знайти ---------- */
.queries { display: flex; flex-direction: column; gap: 7px; margin: 2px 0; }
.queries span { font-size: 17px; line-height: 1.35; color: #a34b2c; font-style: italic; }

.features {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px 24px;
}
.features li { display: flex; gap: 11px; align-items: flex-start; font-size: 16px; line-height: 1.4; }
.features svg { flex: none; margin-top: 3px; }

.sketch-figure { margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; }
.sketch-figure .sketch { margin-top: 0; }
.sketch-figure figcaption { font-size: 14px; color: #6b6b6b; font-style: italic; }

/* ---------- 04 Домовитись ---------- */
.accent-line {
  color: #f4e4c2;
  font-size: clamp(18px, 3.4vw, 21px);
  line-height: 1.35;
  max-width: 26em;
}
.subhead {
  font-weight: 400;
  font-size: clamp(18px, 3.4vw, 21px);
  line-height: 1.35;
  letter-spacing: 0;
  margin: 14px 0 0;
  color: #f4e4c2;
}
.points {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #faf9f4;
}
.points li { display: flex; gap: 14px; align-items: flex-start; }
.points svg { flex: none; margin-top: 2px; }

/* ---------- 04b Як це виглядає в Telegram ---------- */
.demo { padding-top: 72px; padding-bottom: 8px; }

/* Carousel: 8 cards stacked in one stage; data-pos (set by the script) places each
   card: 0 = current, ±1 = neighbours peeking at the sides, ±2 = hidden on that side. */
.deck { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.deck__head { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.deck__nav {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(43, 24, 17, .2);
  background: transparent;
  color: #2b1811;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.deck__nav:hover { background: #f4e4c2; }
.deck__label {
  flex: 1;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.deck__group {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #a34b2c;
}
.deck__title { font-weight: 700; font-size: 19px; line-height: 1.2; }

.deck__stage {
  position: relative;
  width: calc(100% + 40px);
  margin: 0 -20px;
  height: min(500px, 116vw);
  overflow: hidden;
  touch-action: pan-y;
}
.deck__card {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(270px, 62vw);
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  overflow: hidden;
  background: #f4e4c2;
  box-shadow: 0 26px 44px -26px rgba(43, 24, 17, .7);
  cursor: pointer;
  transition: transform .45s cubic-bezier(.3, .7, .2, 1), opacity .45s, visibility 0s;
}
.deck__card[data-pos="0"] { transform: translateX(-50%); opacity: 1; z-index: 10; cursor: default; }
.deck__card[data-pos="1"] { transform: translateX(calc(-50% + 78%)) scale(.8) rotate(4deg); opacity: .45; z-index: 9; }
.deck__card[data-pos="-1"] { transform: translateX(calc(-50% - 78%)) scale(.8) rotate(-4deg); opacity: .45; z-index: 9; }
.deck__card[data-pos="2"],
.deck__card[data-pos="-2"] {
  opacity: 0;
  z-index: 8;
  visibility: hidden;
  pointer-events: none;
  /* stay visible while fading out, then drop out of focus/hit-testing */
  transition: transform .45s cubic-bezier(.3, .7, .2, 1), opacity .45s, visibility 0s .45s;
}
.deck__card[data-pos="2"] { transform: translateX(calc(-50% + 156%)) scale(.8) rotate(8deg); }
.deck__card[data-pos="-2"] { transform: translateX(calc(-50% - 156%)) scale(.8) rotate(-8deg); }
.deck__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #f4e4c2;
  pointer-events: none;
}
/* reduced motion: the current card carries native controls, which must be clickable */
.deck__card[data-pos="0"] .deck__video[controls] { pointer-events: auto; }

.deck__dots { display: flex; gap: 6px; align-items: center; }
.deck__dot {
  position: relative;
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 3px;
  background: #2b1811;
  opacity: .25;
  cursor: pointer;
  transition: width .3s, opacity .3s;
}
/* larger tap area than the 6px dot */
.deck__dot::before { content: ""; position: absolute; inset: -12px -3px; }
.deck__dot[aria-current="true"] { width: 22px; opacity: .85; }
.deck__caption {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 25px;
  line-height: 1.2;
  color: #a34b2c;
  text-align: center;
  max-width: 20em;
  text-wrap: balance;
}

@media (prefers-reduced-motion: reduce) {
  .deck__card,
  .deck__card[data-pos="2"],
  .deck__card[data-pos="-2"],
  .deck__dot { transition: none; }
}

/* ---------- 05 Агентства ---------- */
.card-agency {
  background: #f4e4c2;
  border-radius: 22px;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card-agency__sketch { width: 150px; height: auto; display: block; }
.card-agency h2 {
  font-weight: 800;
  font-size: clamp(24px, 5.4vw, 31px);
  line-height: 1.16;
  letter-spacing: -.02em;
  margin: 0;
}
.card-agency p { color: #5f5346; max-width: 31em; }
.btn-secondary {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  background: transparent;
  border: 2px solid rgba(43, 24, 17, .25);
  color: #2b1811;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
  padding: 13px 20px;
  border-radius: 12px;
  text-decoration: none;
}
.btn-secondary:hover { border-color: #a34b2c; color: #a34b2c; }

/* ---------- 07 Фінальний заклик ---------- */
.final {
  padding-bottom: 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}
.final__helper { width: 150px; height: auto; display: block; }
.final h2 {
  font-weight: 800;
  font-size: clamp(31px, 7.6vw, 46px);
  line-height: 1.08;
  letter-spacing: -.032em;
  margin: 0;
}
.final .lead { line-height: 1.5; max-width: 30em; }

/* ---------- footer ---------- */
.site-footer__inner {
  border-top: 1px solid rgba(43, 24, 17, .14);
  padding: 26px 0 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 14px;
  color: #6b6b6b;
}
.site-footer__inner a { color: #5f5346; text-decoration: none; }
.site-footer__inner a:hover { color: #a34b2c; }

/* ---------- video modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(43, 24, 17, .82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
}
.modal[hidden] { display: none; }
.modal__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 360px;
}
.modal__close {
  align-self: flex-end;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(244, 228, 194, .34);
  background: transparent;
  color: #f4e4c2;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.modal__close:hover { background: rgba(244, 228, 194, .12); }
.modal__video {
  display: block;
  width: max(200px, min(280px, 72vw, calc((100vh - 170px) * 9 / 16)));
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  background: #f4e4c2;
  box-shadow: 0 26px 50px -26px rgba(43, 24, 17, .45);
}
.modal__caption {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 25px;
  line-height: 1.2;
  color: #f4e4c2;
  text-align: center;
  text-wrap: balance;
}
.modal__all {
  min-height: 44px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #e0906a;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
