:root {
  --sun: #ffc83d;
  --sun-hover: #ffb800;
  --ink: #0f2547;
  --ink-soft: #2b3d61;
  --blue: #1167d6;
  --brand: #0193ff;
  --paper: #ffffff;
  --wash: #fff6e0;
  --line: #f0dfae;

  --step-hero: clamp(2.1rem, 1rem + 4.8vw, 4.8rem);
  --step-h2: clamp(1.6rem, 1rem + 2vw, 2.6rem);
  --step-body: clamp(1rem, .95rem + .2vw, 1.125rem);
  --space-section: clamp(4rem, 2.5rem + 6vw, 9rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --head: "Unbounded", "Onest", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font: var(--step-body)/1.6 var(--body); -webkit-font-smoothing: antialiased; }
::selection { background: var(--ink); color: var(--sun); }
html { scrollbar-color: var(--brand) var(--wash); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--wash); }
::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 8px; border: 3px solid var(--wash); }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible { outline-color: #fff; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
section { padding-block: var(--space-section); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; letter-spacing: -.03em; text-wrap: balance; }
h1 { font-size: var(--step-hero); line-height: 1.08; }
h2 { font-size: var(--step-h2); line-height: 1.12; }
p { max-width: 62ch; text-wrap: pretty; }
svg.i { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; padding: 1rem 1.7rem; border-radius: 12px; border: 0; background: var(--ink); color: #fff; text-decoration: none; font: 500 1rem/1.2 var(--body); cursor: pointer; transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); }
.btn:hover { transform: translateY(-2px); background: #1b3a6b; box-shadow: 0 10px 18px -8px rgba(0, 0, 0, .4); }
.btn:active { transform: translateY(0); box-shadow: 0 3px 8px -4px rgba(0, 0, 0, .4); }
.btn.line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.line:hover { background: var(--ink); color: #fff; }
.btn.white { background: #fff; color: var(--ink); }
.btn.white:hover { background: var(--sun); color: var(--ink); }

/* верх */
.top { background: var(--sun); padding-block: 1.2rem; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; font-family: var(--head); font-weight: 700; letter-spacing: .06em; font-size: .95rem; text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.top nav { display: flex; gap: 1.6rem; font-weight: 500; }
.top nav a { white-space: nowrap; text-decoration: none; padding: .3rem 0; box-shadow: inset 0 -2px 0 transparent; transition: box-shadow .25s var(--ease); }
.top nav a:hover, .top nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--ink); }

/* первый экран */
.hero { background: var(--sun); padding-block: clamp(2rem, 1rem + 4vw, 5rem) clamp(4rem, 3rem + 6vw, 8rem); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero p { font-size: 1.15rem; margin-top: 1.5rem; color: var(--ink-soft); }
.hero .actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.mark { width: 100%; max-width: 460px; justify-self: end; height: auto; overflow: visible; }
.mark .ln { stroke: var(--brand); stroke-width: 8; stroke-linecap: round; fill: none; }
.mark .c { fill: #fff; stroke: var(--ink); stroke-width: 7; transition: fill .35s var(--ease); }
.mark text { fill: var(--ink); font-family: var(--body); font-weight: 500; font-size: 84px; text-anchor: middle; dominant-baseline: central; transition: fill .35s var(--ease); }
.mark g.on .c { fill: var(--brand); }
.mark g.on text { fill: #fff; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(24px, 4vw, 56px); fill: var(--paper); }

/* карусель */
.showcase { padding-top: calc(var(--space-section) * .7); }
.head-row { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; margin-bottom: clamp(1.6rem, 3vw, 2.6rem); }
.head-row p { color: var(--ink-soft); font-size: 1rem; }
.track { display: flex; gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 1.2rem; }
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; position: relative; overflow: hidden; border-radius: 28px; background: var(--c, var(--blue)); color: #fff; display: grid; grid-template-columns: 1fr minmax(250px, 330px); gap: 2rem; padding: clamp(1.6rem, 4vw, 3.4rem) clamp(1.6rem, 4vw, 3.4rem) 0; min-height: 520px; }
.slide .txt { align-self: center; padding-bottom: clamp(1.6rem, 4vw, 3.4rem); }
.slide h3 { font-size: clamp(1.9rem, 1rem + 3.2vw, 3.4rem); line-height: 1.05; font-weight: 500; }
.slide h3 b { font-weight: 700; }
.slide h3 span { color: var(--sun); font-weight: 700; margin-left: .25em; }
.slide p { margin-top: 1.1rem; font-size: 1.1rem; color: #fff; max-width: 40ch; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.tag { padding: .3rem .85rem; border-radius: 99px; background: rgba(0, 0, 0, .24); font-size: .92rem; }
.slide .btn { margin-top: 1.8rem; }
.phone { align-self: end; justify-self: center; width: 100%; max-width: 300px; border: 9px solid var(--ink); border-bottom: 0; border-radius: 38px 38px 0 0; overflow: hidden; background: #fff; box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, .35); transform: rotate(2.5deg) translateY(10px); transform-origin: 50% 100%; transition: transform .6s var(--ease); }
.slide:hover .phone { transform: rotate(0) translateY(0); }
.phone img { display: block; width: 100%; height: auto; aspect-ratio: 750 / 880; object-fit: cover; object-position: top; }
.ctrl { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .4rem; }
.dots { display: flex; gap: .1rem; }
.dot { width: 28px; height: 28px; border: 0; background: none; padding: 0; cursor: pointer; position: relative; }
.dot::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 2px solid var(--ink); transition: background .25s, transform .25s var(--ease); }
.dot[aria-current="true"]::before { background: var(--ink); transform: scale(1.15); }
.arrows { display: flex; gap: .6rem; }
.arrow.pause { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.arrow.pause:hover { background: var(--ink); color: #fff; }
.arrow { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .25s var(--ease), background .25s; }
.arrow:hover { background: var(--blue); transform: scale(1.06); }
.arrow:active { transform: scale(.96); }
.all-link { margin-top: 2rem; }

/* как это работает */
.how { background: var(--wash); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: clamp(2.4rem, 4vw, 3.6rem); position: relative; }
.step { position: relative; }
.node { width: 64px; height: 64px; border-radius: 50%; border: 4px solid var(--ink); background: #fff; display: grid; place-items: center; font: 700 1.5rem/1 var(--head); position: relative; z-index: 1; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 30px; left: 64px; right: calc(-1 * clamp(1.5rem, 4vw, 3.5rem)); height: 4px; background: var(--brand); border-radius: 2px; }
.step h3 { font-size: 1.15rem; font-weight: 500; letter-spacing: -.01em; margin: 1.2rem 0 .4rem; }
.step p { color: var(--ink-soft); font-size: 1rem; }

/* под заказ */
.order { background: var(--sun); }
.order .panel { background: #fff; color: var(--ink); border-radius: 28px; padding: clamp(2rem, 5vw, 4.5rem); display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: end; box-shadow: 0 30px 50px -28px rgba(0, 20, 60, .6); }
.order h2 { font-size: clamp(1.5rem, 1rem + 1.7vw, 2.4rem); }
.order p { color: var(--ink-soft); margin-top: 1.2rem; }
.contacts { display: flex; flex-direction: column; gap: .8rem; }
.contacts .btn { justify-content: space-between; }

footer { background: #fff; border-top: 1px solid var(--line); padding-block: 2.2rem 2.6rem; font-size: .95rem; color: var(--ink-soft); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem 3rem; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* страница всех приложений */
.page-head { background: var(--sun); padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) clamp(3.5rem, 2rem + 5vw, 7rem); position: relative; }
.page-head p { margin-top: 1.2rem; font-size: 1.1rem; color: var(--ink-soft); }
.list { background: var(--wash); padding-block: clamp(2.5rem, 5vw, 5rem) var(--space-section); }
.items { list-style: none; padding: 0; display: grid; gap: clamp(1.4rem, 3vw, 2.4rem); }
.item { background: #fff; border-radius: 26px; display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: clamp(1.4rem, 4vw, 3.4rem); align-items: center; padding: clamp(1.2rem, 3vw, 2.2rem); box-shadow: 0 18px 30px -22px rgba(15, 37, 71, .35); }
.item:nth-child(even) { grid-template-columns: 1fr minmax(200px, 280px); }
.item:nth-child(even) .stage { order: 2; }
.stage { background: var(--c); border-radius: 20px; padding: 1.6rem 1.6rem 0; display: flex; justify-content: center; overflow: hidden; max-height: 360px; }
.stage .phone { max-width: 220px; border-width: 7px; border-radius: 30px 30px 0 0; transform: rotate(-2deg) translateY(8px); box-shadow: none; }
.item:hover .stage .phone { transform: rotate(0) translateY(0); }
.item h2 { font-size: clamp(1.5rem, 1rem + 1.8vw, 2.3rem); font-weight: 500; line-height: 1.1; }
.item h2 b { font-weight: 700; }
.item h2 span { color: var(--c); font-weight: 700; margin-left: .25em; }
.item p { margin-top: .8rem; color: var(--ink-soft); }
.item .tags { margin-top: 1.1rem; }
.item .tag { background: var(--wash); color: var(--ink); }
.item .btn { margin-top: 1.4rem; background: var(--c); }
.item .btn:hover { filter: brightness(.88); background: var(--c); }
.note { margin-top: 2rem; color: var(--ink-soft); font-size: .95rem; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .mark { justify-self: start; max-width: 240px; }
  .slide { grid-template-columns: 1fr; min-height: 0; gap: 1rem; flex-basis: 92%; }
  .slide .txt { padding-bottom: 0; }
  .phone { max-width: 250px; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .step { padding-left: 84px; min-height: 64px; }
  .node { position: absolute; left: 0; top: 0; }
  .step h3 { margin-top: .3rem; }
  .step:not(:last-child)::after { top: 64px; left: 30px; right: auto; width: 4px; height: calc(100% - 28px + 2rem); }
  .order .panel { grid-template-columns: 1fr; }
  .item, .item:nth-child(even) { grid-template-columns: 1fr; }
  .item:nth-child(even) .stage { order: 0; }
  .top nav { gap: 1rem; }
  .slide .btn, .item .btn { padding: 1rem 1.15rem; gap: .5rem; white-space: nowrap; }
  .brand { font-size: .82rem; letter-spacing: .04em; gap: .5rem; }
  .brand svg { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .phone { transform: none; }
}
