/* AIDeal public site — shared stylesheet for / and /agencies.
   Tokens and values follow docs/design/landing-handoff/design_handoff_aideal/README.md. */

/* ---------- Fonts (self-hosted, Google-served variable subsets) ---------- */
@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;
}

/* ---------- Design tokens ---------- */
:root {
  --accent: #c2613e;          /* terracotta: strokes, sparkle, focus ring */
  --accent-text: #a34b2c;     /* darker terracotta for text on paper */
  --accent-hover: #7f3620;    /* agencies page link hover */
  --accent-soft: #e0906a;     /* "AI" in the brand mark on dark sections */
  --cream: #f4e4c2;
  --cream-hover: #eeddb0;
  --ink: #2b1811;             /* dark sections background and main text */
  --ink-hover: #40241a;
  --text-2: #5f5346;          /* secondary text */
  --text-3: #6b6b6b;          /* captions / small print on the landing */
  --face: #6b4a35;            /* assistant's eyes and mouth */
  --paper: #faf9f4;
  --paper-2: #efeee8;
  --on-dark: rgba(250, 249, 244, .82);
  --line-12: rgba(43, 24, 17, .12);
  --line-14: rgba(43, 24, 17, .14);
  --line-25: rgba(43, 24, 17, .25);
  --font-ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-hand: 'Caveat', cursive;
}

/* ---------- Base ---------- */
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.landing { text-wrap: pretty; }
body.agencies { line-height: 1.55; }
*, *::before, *::after { box-sizing: border-box; }
a { color: var(--accent-text); }
.landing a:hover { color: var(--accent); }
.agencies a:hover { color: var(--accent-hover); }
::selection { background: var(--cream); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
img, svg { display: block; }
svg { max-width: 100%; }
.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;
}

/* =====================================================================
   LANDING (/)
   ===================================================================== */
.wrap { max-width: 720px; width: 100%; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

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

.stack { display: flex; flex-direction: column; gap: 22px; }
.block { display: flex; flex-direction: column; gap: 12px; }

.section-dark { background: var(--ink); padding: 72px 0; }
.section-light { padding: 72px 20px; }

/* Type scale */
.h1 {
  font-weight: 800;
  font-size: clamp(28px, 6.8vw, 42px);
  line-height: 1.1;
  letter-spacing: -.03em;
  max-width: 19em;
}
.h1 em { font-style: normal; color: var(--accent-text); }
.h2 {
  font-weight: 800;
  font-size: clamp(26px, 6vw, 36px);
  line-height: 1.1;
  letter-spacing: -.028em;
}
.h2--cream { color: var(--cream); }
.h2--accent { color: var(--accent-text); }
.lead { font-size: 18px; line-height: 1.55; color: var(--text-2); max-width: 31em; }
.text { max-width: 31em; }
.text--dark { color: var(--on-dark); max-width: 31em; }
.accent-line { color: var(--cream); 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-top: 14px;
  color: var(--cream);
}
.note { font-size: 14px; color: var(--text-3); }

/* Hero */
.hero { padding-top: 34px; padding-bottom: 72px; }
.cta-group { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
.hero__tagline {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--accent-text);
  font-style: italic;
  text-align: center;
  max-width: 26em;
  align-self: center;
  text-wrap: balance;
}

/* Hand-drawn pill button */
.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: var(--cream);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  border-radius: 999px;
}
.pill:hover { background: var(--cream-hover); color: var(--accent-text); }
.pill__outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pill__outline .pill__underline { stroke-width: 1.4; opacity: .4; }
.pill__label { order: 1; position: relative; font-weight: 700; font-size: 17px; }
.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; color: var(--accent); }
.pill__ai { color: var(--accent); }
.pill__deal { color: var(--face); margin-left: -.2em; }

.pill--dark { background: rgba(244, 228, 194, .12); color: var(--cream); }
.pill--dark:hover { background: rgba(244, 228, 194, .24); color: var(--cream); }
.pill--dark .pill__outline { stroke: var(--cream); }
.pill--dark .pill__spark { color: var(--cream); }
.pill--dark .pill__ai { color: var(--accent-soft); }
.pill--dark .pill__deal { color: var(--paper); }

.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__outline { stroke-width: 2.8; }
.pill--lg .pill__outline .pill__underline { stroke-width: 1.6; }
.pill--lg .pill__label { font-size: 18px; }
.pill--lg .pill__brand { gap: 7px; font-size: 21px; }
.pill--lg .pill__spark { width: 19px; }

/* Hero scene: assistant among six things to sell */
.scene {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  min-height: 600px;
  margin-top: 26px;
  margin-bottom: 8px;
}
.scene__item {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scene__item svg {
  width: 100%;
  height: auto;
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scene__item figcaption {
  font-size: 14px;
  line-height: 1.35;
  color: var(--text-3);
  font-style: italic;
  text-align: center;
}
.scene__item--chair  { left: 46%; top: 13%; width: 33%; transform: translate(-50%, -50%) rotate(-8deg); }
.scene__item--fridge { left: 84%; top: 27%; width: 26%; transform: translate(-50%, -50%) rotate(7deg); }
.scene__item--phone  { left: 86%; top: 62%; width: 16%; transform: translate(-50%, -50%) rotate(-13deg); }
.scene__item--flat   { left: 63%; top: 86%; width: 34%; transform: translate(-50%, -50%) rotate(6deg); }
.scene__item--car    { left: 22%; top: 84%; width: 25%; transform: translate(-50%, -50%) rotate(-5deg); }
.scene__item--bike   { left: 18%; top: 40%; width: 30%; transform: translate(-50%, -50%) rotate(11deg); }
.scene__helper {
  position: absolute;
  left: 49%;
  top: 51%;
  width: 26%;
  min-width: 104px;
  transform: translate(-50%, -50%) rotate(-2deg);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.scene__helper svg { width: 100%; height: auto; }

/* Sketches (inline SVG illustrations) */
.sketch {
  width: 100%;
  height: auto;
  margin-top: 4px;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sketch--cream { stroke: var(--cream); }
.sketch--ink { stroke: var(--ink); stroke-width: 2.6; margin-top: 0; }
.sketch--narrow { max-width: 470px; margin-top: 8px; }
.sketch-figure { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.sketch-figure figcaption { font-size: 14px; color: var(--text-3); font-style: italic; }

/* "Знайти": example queries + feature list */
.queries { display: flex; flex-direction: column; gap: 7px; margin: 2px 0; }
.queries span { font-size: 17px; line-height: 1.35; color: var(--accent-text); font-style: italic; }
.features {
  list-style: none;
  padding: 0;
  margin-top: 6px;
  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, .points svg {
  flex: none;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.features svg { width: 22px; height: 22px; margin-top: 3px; stroke: var(--accent); }

/* "Домовитись": rules list */
.points {
  list-style: none;
  padding: 0;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--paper);
}
.points li { display: flex; gap: 14px; align-items: flex-start; }
.points svg { width: 24px; height: 24px; margin-top: 2px; stroke: var(--cream); }

/* Agencies card on the landing */
.card-agency {
  background: var(--cream);
  border-radius: 22px;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card-agency__sketch {
  width: 150px;
  height: auto;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-agency h2 {
  font-weight: 800;
  font-size: clamp(24px, 5.4vw, 31px);
  line-height: 1.16;
  letter-spacing: -.02em;
}
.card-agency p { color: var(--text-2); max-width: 31em; }
.btn-secondary {
  align-self: flex-start;
  margin-top: 4px;
  background: transparent;
  border: 2px solid var(--line-25);
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  padding: 13px 20px;
  border-radius: 12px;
  text-decoration: none;
}
.btn-secondary:hover { border-color: var(--accent-text); color: var(--accent-text); }

/* Final call */
.final {
  padding-bottom: 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}
.final__helper { width: 150px; height: auto; }
.final h2 {
  font-weight: 800;
  font-size: clamp(31px, 7.6vw, 46px);
  line-height: 1.08;
  letter-spacing: -.032em;
}
.final p.lead { max-width: 30em; line-height: 1.5; }

/* Footer (landing) */
.site-footer__inner {
  border-top: 1px solid var(--line-14);
  padding: 26px 0 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 14px;
  color: var(--text-3);
}
.site-footer__inner a { color: var(--text-2); text-decoration: none; }
.site-footer__inner a:hover { color: var(--accent-text); }

/* =====================================================================
   AGENCIES (/agencies)
   ===================================================================== */
.container { max-width: 1080px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.ag-header { border-bottom: 1px solid var(--line-12); }
.ag-header .container {
  padding-top: 18px;
  padding-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.ag-header__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.ag-header__brand:hover { color: var(--ink); }
.ag-header__brand img { height: 26px; width: auto; }
.ag-header__brand span { font-weight: 700; font-size: 15px; letter-spacing: .02em; color: var(--text-2); }

.btn-dark {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 26px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  border-radius: 999px;
}
.btn-dark:hover { background: var(--ink-hover); color: var(--paper); }
.btn-dark--lg { min-height: 56px; padding: 14px 28px; font-size: 18px; }
.btn-outline {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  border: 1.5px solid var(--line-25);
  border-radius: 999px;
}
.btn-outline:hover { background: var(--cream); border-color: var(--accent); color: var(--ink); }
.btn-outline--sm { font-size: 15px; padding: 9px 18px; }
.btn-outline--lg { min-height: 56px; padding: 14px 26px; font-size: 17px; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  align-items: start;
}
.stack-20 { display: flex; flex-direction: column; gap: 20px; }

.ag-hero .container { padding-top: 64px; padding-bottom: 40px; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }
.ag-h1 {
  font-weight: 800;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.08;
  letter-spacing: -.03em;
  max-width: 16em;
}
.ag-lead { font-size: 18px; color: var(--text-2); max-width: 32em; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.btn-row--wide { gap: 20px; align-items: center; }

.steps-table {
  list-style: none;
  padding: 0;
  border: 1px solid var(--line-14);
  display: grid;
  gap: 1px;
  background: var(--line-14);
}
.steps-table li { background: var(--paper); padding: 22px 24px; display: flex; gap: 16px; align-items: flex-start; }
.num-circle {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1.5px solid rgba(194, 97, 62, .5);
  color: var(--accent-text);
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-title { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.steps-table p { margin-top: 4px; font-size: 16px; color: var(--text-2); }

.ag-h2 {
  font-weight: 800;
  font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.14;
  letter-spacing: -.025em;
}
.ag-h2--lg {
  font-size: clamp(26px, 3.6vw, 36px);
  line-height: 1.1;
  letter-spacing: -.028em;
  max-width: 20em;
}
.ag-text { color: var(--text-2); max-width: 34em; }

.ag-cabinet .container { padding-top: 24px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 18px; }

.shot { display: flex; flex-direction: column; gap: 10px; }
.shot__frame { border: 1px solid var(--line-14); border-radius: 12px; overflow: hidden; background: #fff; }
.shot__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(43, 24, 17, .1);
  background: var(--paper-2);
}
.shot__dot { width: 9px; height: 9px; border-radius: 999px; background: rgba(43, 24, 17, .2); display: block; }
.shot__url { margin-left: 12px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.shot img { width: 100%; height: auto; }
.shot figcaption { font-size: 14px; color: var(--text-2); }

.ag-features { background: var(--paper-2); border-top: 1px solid var(--line-12); border-bottom: 1px solid var(--line-12); }
.ag-features .container { padding-top: 60px; padding-bottom: 60px; display: flex; flex-direction: column; gap: 32px; }
.feature-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line-14);
  border: 1px solid var(--line-14);
}
.feature-grid li { background: var(--paper); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.feature-grid h3 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.feature-grid p { font-size: 16px; color: var(--text-2); }

.ag-access .container {
  padding-top: 60px;
  padding-bottom: 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  align-items: start;
}
.steps-num { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps-num li { display: flex; gap: 14px; align-items: baseline; font-size: 17px; color: var(--ink); }
.steps-num .num { flex: none; font-weight: 800; color: var(--accent-text); font-variant-numeric: tabular-nums; }

.ag-footer { border-top: 1px solid var(--line-12); }
.ag-footer .container {
  padding-top: 22px;
  padding-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-2);
}
.ag-footer a { text-decoration: none; }

/* =====================================================================
   404
   ===================================================================== */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.error-page main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px 96px;
}
.error-page .h1 { max-width: 16em; }
