/* YaVa AI: стиль із ролика 20 (video/out/20_agents_build) */
@font-face { font-family: "Onest"; src: url("assets/fonts/onest.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("assets/fonts/unbounded.woff2") format("woff2"); font-weight: 500 800; font-display: swap; }
/* запасні шрифти з метриками основних: при заміні текст не стрибає */
@font-face { font-family: "Onest Fb"; src: local("Arial"), local("Roboto"); size-adjust: 103.8%; ascent-override: 93.4%; descent-override: 29.4%; line-gap-override: 0%; }
@font-face { font-family: "Unbounded Fb"; src: local("Arial Bold"), local("Roboto Bold"); size-adjust: 132.2%; ascent-override: 75.3%; descent-override: 18.5%; line-gap-override: 0%; }

:root {
  --bg: #0E0E0E; --ink: #0E0E0E; --cream: #F4EFE6; --acc: #FF5B1F; --blue: #2F4BFF;
  --shell: #1E1C1A; --line: rgba(244,239,230,.14); --muted: rgba(244,239,230,.82); --sel: #3F7BFF; --dot: #a66cff;
  --head: "Unbounded", "Unbounded Fb", Arial, sans-serif;
  --text: "Onest", "Onest Fb", Arial, sans-serif;
  --gut: 48px; --sec: 128px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; background: var(--bg); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  font-family: var(--text); font-size: 18px; line-height: 1.45; color: var(--cream); background-color: var(--bg);
  background-image: linear-gradient(rgba(244,239,230,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(244,239,230,.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
main { overflow-x: clip; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1336px; margin: 0 auto; padding: 0 var(--gut); }

h1, h2, h3 { font-family: var(--head); letter-spacing: -0.03em; overflow-wrap: break-word; }
h1 { font-weight: 700; font-size: clamp(34px, min(5.1vw, 8.4vh), 76px); line-height: 1.08; letter-spacing: -0.04em; }
h2 { font-weight: 700; font-size: clamp(32px, 4.6vw, 64px); line-height: 1.08; letter-spacing: -0.04em; margin-bottom: 72px; }
h3 { font-weight: 700; font-size: 23px; line-height: 1.18; }
.lead { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.4; color: var(--muted); max-width: 40em; }

/* шапка */
.top { position: sticky; top: 0; z-index: 30; background: rgba(14,14,14,.92); border-bottom: 1px solid var(--line); }
.top-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 72px; }
.logo { font-family: var(--head); font-weight: 600; font-size: 22px; letter-spacing: -0.03em; text-decoration: none; white-space: nowrap; }
.dot { color: var(--dot); }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 60px; padding: 0 32px; border-radius: 30px;
  background: var(--acc); color: var(--ink); font-weight: 800; font-size: 18px; text-decoration: none; white-space: nowrap;
  box-shadow: 0 0 40px 2px rgba(255,91,31,.5), 0 0 110px 16px rgba(255,91,31,.2); transition: transform .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 15px; border-radius: 22px; box-shadow: 0 0 24px rgba(255,91,31,.4); }
.btn-ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 2px rgba(244,239,230,.5); }
.row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

/* перший екран */
.hero { padding: 40px 0 72px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 24px; min-height: min(calc(100svh - 184px), 700px); }
.lead { margin-top: 28px; }
.hero-vis { position: relative; justify-self: end; width: 100%; max-width: 620px; aspect-ratio: 1; }
.sphere { position: relative; width: 100%; }
.glow { position: absolute; inset: -22%; pointer-events: none; }
.glow-or { background: radial-gradient(circle closest-side at 50% 52%, rgba(255,91,31,.62), rgba(255,91,31,.2) 58%, transparent); }
.glow-mix { background: radial-gradient(circle closest-side at 40% 44%, rgba(255,91,31,.55), rgba(255,91,31,.16) 60%, transparent), radial-gradient(circle closest-side at 62% 60%, rgba(47,75,255,.6), rgba(47,75,255,.16) 60%, transparent); }

/* секції і сітки */
.sec { position: relative; padding: var(--sec) 0; }
.grid { display: grid; gap: 28px; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.objs { row-gap: 84px; margin-top: 60px; }

/* картки з об'єктом */
.card { position: relative; background: var(--shell); border-radius: 28px; padding: 150px 32px 34px; }
.card p { margin-top: 14px; color: var(--muted); font-size: 17px; }
.card .pic { position: absolute; right: 16px; top: -48px; width: 190px; }
/* світіння окремим шаром позаду всіх карток, щоб не лягало на сусідню */
.objs, .steps { isolation: isolate; }
.fill-blue::before, .fill-cream::before, .fill-orange::before, .step::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; }
.fill-blue { background: var(--blue); }
.fill-blue::before { box-shadow: 0 30px 120px rgba(47,75,255,.42); }
.fill-blue p { color: var(--cream); }
.fill-cream { background: var(--cream); color: var(--ink); }
.fill-cream::before { box-shadow: 0 30px 120px rgba(255,91,31,.24); }
.fill-orange { background: var(--acc); color: var(--ink); }
.fill-orange::before { box-shadow: 0 30px 130px rgba(255,91,31,.48); }
.fill-cream p, .fill-orange p { color: var(--ink); }

/* кейси: відкрита картка займає весь рядок, щоб текст не стискався в колонку */
.cases { grid-auto-flow: dense; align-items: start; }
.cases li:has(details[open]) { grid-column: 1 / -1; }
.case { background: var(--shell); border-radius: 24px; border: 1px solid transparent; }
.case[open] { border-color: var(--acc); }
.case summary { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; min-height: 184px; padding: 28px; cursor: pointer; list-style: none; border-radius: 24px; }
.case summary::-webkit-details-marker { display: none; }
.case summary::after {
  content: ""; flex: none; width: 36px; height: 36px; border-radius: 50%; background-color: var(--acc);
  background-image: linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink));
  background-size: 16px 2px, 2px 16px; background-position: center; background-repeat: no-repeat;
}
.case[open] summary { min-height: 0; }
.case[open] summary::after { background-size: 16px 2px, 0 0; }
.case h3 { font-size: 20px; line-height: 1.24; }
.case small { display: block; margin-top: 10px; font-family: var(--text); font-weight: 500; font-size: 15px; letter-spacing: 0; color: var(--muted); }
.case dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding: 4px 28px 30px; }
.case dt { font-family: var(--head); font-weight: 600; font-size: 14px; color: var(--acc); margin-bottom: 8px; }
.case dd { font-size: 17px; color: var(--muted); }
.case .stack { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--line); }

/* заливки на всю ширину */
.band { overflow: clip; }
.band-in { position: relative; }
.fill { position: absolute; inset: 0; }
.fill::after { content: ""; position: absolute; left: 100%; top: 0; width: 180px; height: 100%; margin-left: -1px; background-repeat: no-repeat; background-size: 100% 100%; }
.band-orange { color: var(--ink); }
.band-orange .fill { background: var(--acc); }
.band-orange .fill::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 1000' preserveAspectRatio='none'%3E%3Cpath d='M0 0H90C172 170 8 330 122 500S24 830 128 1000H0Z' fill='%23FF5B1F'/%3E%3C/svg%3E"); }
.band-blue .fill { background: var(--blue); }
.band-blue .fill::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 1000' preserveAspectRatio='none'%3E%3Cpath d='M0 0H90C172 170 8 330 122 500S24 830 128 1000H0Z' fill='%232F4BFF'/%3E%3C/svg%3E"); }

.how-pic { position: absolute; right: 190px; top: -64px; width: 220px; }
.steps { margin-top: 110px; }
.step { position: relative; background: var(--cream); color: var(--ink); border-radius: 24px; padding: 26px 28px 30px; }
.step::before { box-shadow: 0 26px 90px rgba(0,0,0,.28); }
.step .pic { position: absolute; right: 12px; top: -46px; width: 124px; }
.step .n { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%; background: var(--acc); font-family: var(--head); font-weight: 800; font-size: 28px; }
.step h3 { margin-top: 34px; font-size: 22px; }
.step p { margin-top: 10px; font-size: 17px; }

#principles { padding: 88px 0; }
#principles h2 { margin-bottom: 40px; }
.princ li { font-family: var(--head); font-weight: 600; font-size: clamp(18px, 1.7vw, 24px); line-height: 1.3; letter-spacing: -0.02em; padding-top: 18px; border-top: 2px solid rgba(244,239,230,.55); }

/* заклик */
.cta-in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 24px; }
.cta h2 { margin-bottom: 0; }
.cta .btn { margin-top: 40px; }
.sign { margin-top: 18px; color: var(--muted); font-size: 16px; }
.cta-vis { position: relative; justify-self: end; width: 100%; max-width: 520px; aspect-ratio: 1; }
.cta-vis .pic { position: relative; width: 100%; }
.cta-vis .cta-orb { position: absolute; left: -6%; bottom: 2%; width: 34%; }

/* футер */
.foot { padding: 0 0 40px; }
.foot-in { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 32px; background: var(--cream); color: var(--ink); border-radius: 24px; padding: 34px 40px; font-family: var(--head); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.foot-in a { min-height: 24px; overflow-wrap: anywhere; }

/* стан до збірки: ставиться лише секціям нижче першого екрана */
.armed .b, .armed .pic { opacity: 0; }
.armed .fill { transform: translateX(calc(-100% - 190px)); }

/* оснастка збірки */
.rig { position: absolute; inset: 0; z-index: 8; pointer-events: none; overflow: clip; }
.rig > * { position: absolute; left: 0; top: 0; }
.rig .e { background: var(--sel); transform-origin: 0 0; }
.rig .e-h { height: 2px; }
.rig .e-v { width: 2px; }
.rig i { width: 12px; height: 12px; background: #fff; border: 2px solid var(--sel); }
.rig .g-o { background: var(--acc); transform-origin: 0 0; }
.rig .g-b { background: var(--blue); transform-origin: 0 0; }
.rig.ink .e, .rig.ink .g-o, .rig.ink .g-b { background: var(--ink); }
.rig.ink i { border-color: var(--ink); }
.cur svg { display: block; width: 30px; height: 35px; }
.cur span { position: absolute; left: 26px; top: 28px; font-weight: 700; font-size: 14px; color: var(--cream); background: #181818; padding: 3px 10px; border-radius: 7px; border: 2px solid; white-space: nowrap; }

/* планшет */
@media (max-width: 1080px) {
  :root { --gut: 32px; --sec: 104px; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 72px; }
  .princ { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .case dl { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}

/* телефон */
@media (max-width: 768px) {
  :root { --gut: 16px; --sec: 72px; }
  body { font-size: 17px; }
  h2 { margin-bottom: 44px; }
  .top-in { height: 64px; }
  .logo { font-size: 18px; }
  .btn { min-height: 56px; padding: 0 26px; font-size: 17px; }
  .btn-sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .hero { padding: 28px 0 40px; }
  .hero-in, .cta-in { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-vis { justify-self: center; max-width: min(72vw, 340px); }
  .row .btn { flex: 1 1 100%; }
  .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .objs { margin-top: 56px; row-gap: 72px; }
  .card { padding: 126px 22px 28px; }
  .card .pic { width: 160px; top: -40px; }
  .case summary { min-height: 0; padding: 22px; }
  .case h3 { font-size: 18px; }
  .case dl { padding: 2px 22px 24px; }
  .how-pic { width: 76px; right: 124px; top: 40px; }
  .steps { margin-top: 84px; row-gap: 64px; }
  .step { padding: 22px; }
  .step .pic { width: 100px; top: -34px; }
  .step h3 { margin-top: 24px; }
  #principles { padding: 64px 0; }
  .cta-vis { justify-self: center; max-width: min(72vw, 340px); }
  .foot-in { padding: 26px 22px; font-size: 16px; }
}

@media print {
  .armed .b, .armed .pic { opacity: 1; }
  .armed .fill { transform: none; }
}
