/* Ynamly AI — публичный сайт. Светлая тема: почти белый холодный фон, тёмно-синий текст, акценты Ynamly (синий градиент + оранжевый). */
@font-face { font-family: Manrope; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-cyrillic-wght-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116 }
@font-face { font-family: Manrope; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF }
@font-face { font-family: Manrope; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-latin-wght-normal.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 }

:root {
  --bg: #f6f8fc; --bg-2: #eef2f9; --ink: #0b1636; --mut: #4c5a7a; --faint: #8592ad;
  --line: rgba(20, 45, 110, .1); --glass: rgba(255, 255, 255, .72); --glass-2: rgba(255, 255, 255, .82);
  --shadow: 0 24px 60px -34px rgba(16, 40, 110, .35);
  --blue: #1c8cff; --cyan: #14d2ff; --deep: #1240e6; --orange: #ff8418; --amber: #ffb52a;
  --grad: linear-gradient(120deg, #14d2ff, #1c8cff 45%, #1240e6);
  --grad-o: linear-gradient(120deg, #ffb52a, #ff8418 55%, #d94a0a);
  --r: 20px; --gut: clamp(16px, 4vw, 56px);
  color-scheme: light;
}
* { box-sizing: border-box }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100% }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } }
html, body { margin: 0; background: var(--bg) }
body { color: var(--ink); font: 16px/1.6 Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh }
a { color: inherit }
code { font-family: ui-monospace, 'JetBrains Mono', 'Cascadia Code', Consolas, monospace; font-size: .88em; color: #0f4fd1; background: rgba(28, 140, 255, .08); border: 1px solid rgba(28, 140, 255, .18); padding: .08em .42em; border-radius: 7px; white-space: nowrap }
::selection { background: rgba(255, 132, 24, .28) }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 8px }

/* ---------- фон: WebGL-холст, запасной фон и виньетка ---------- */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; transition: opacity .6s }
.fallback-art { position: fixed; inset: 0; z-index: 0; display: none; pointer-events: none;
  background: radial-gradient(60% 50% at 78% 38%, rgba(28, 140, 255, .14), transparent 70%), radial-gradient(35% 30% at 85% 20%, rgba(255, 132, 24, .12), transparent 70%), radial-gradient(70% 60% at 10% 100%, rgba(18, 64, 230, .08), transparent 70%), var(--bg) }
.fallback-art img { position: absolute; right: 6vw; top: 18vh; width: min(38vw, 520px); opacity: .9; filter: drop-shadow(0 30px 60px rgba(28, 140, 255, .3)); border-radius: 22% }
.no-webgl #gl { display: none }
.no-webgl .fallback-art { display: block }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 60%, rgba(214, 224, 242, .55) 100%), linear-gradient(180deg, rgba(246, 248, 252, .6), transparent 16%, transparent 84%, rgba(246, 248, 252, .7)) }
#labels { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden }
.lbl { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); white-space: nowrap; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; color: #13234d;
  padding: 5px 11px 5px 9px; border-radius: 99px; background: rgba(255, 255, 255, .86); border: 1px solid rgba(20, 60, 160, .14); box-shadow: 0 8px 22px -14px rgba(16, 40, 110, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; gap: 7px; opacity: 0; transition: opacity .25s; will-change: transform }
.lbl::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue) }
.lbl.o::before { background: var(--orange) }
.lbl.core { font-size: 11px; color: #b44d00; letter-spacing: .14em; text-transform: uppercase; background: rgba(255, 246, 236, .92); border-color: rgba(255, 132, 24, .35) }
.lbl.core::before { background: var(--orange) }

/* ---------- навигация ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 14px var(--gut);
  transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent }
.nav.solid { background: rgba(246, 248, 252, .8); border-bottom-color: var(--line); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3) }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.01em }
.brand img { border-radius: 10px; box-shadow: 0 6px 18px -8px rgba(28, 100, 255, .45) }
.brand b { background: var(--grad-o); -webkit-background-clip: text; background-clip: text; color: transparent }
.links { display: flex; gap: 4px; margin-left: auto }
.links a { text-decoration: none; color: var(--mut); font-weight: 600; font-size: 14.5px; padding: 8px 13px; border-radius: 10px; transition: color .2s, background .2s }
.links a:hover { color: var(--ink); background: rgba(20, 60, 160, .06) }

.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 15.5px; border-radius: 14px; padding: 14px 22px; transition: transform .2s, box-shadow .25s, background .25s, border-color .25s; white-space: nowrap }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s }
.btn:hover svg { transform: translateX(3px) }
.btn-primary { color: #fff; text-shadow: 0 1px 0 rgba(140, 50, 0, .25); background: var(--grad-o); box-shadow: 0 14px 36px -14px rgba(255, 132, 24, .75), inset 0 1px 0 rgba(255, 255, 255, .35) }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -14px rgba(255, 132, 24, .9), inset 0 1px 0 rgba(255, 255, 255, .35) }
.btn-ghost { color: var(--ink); background: rgba(255, 255, 255, .75); border: 1px solid rgba(20, 60, 160, .16); box-shadow: 0 10px 26px -18px rgba(16, 40, 110, .5) }
.btn-ghost:hover { background: #fff; border-color: rgba(28, 140, 255, .45); transform: translateY(-2px) }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 12px }

/* ---------- общая раскладка ---------- */
main { position: relative; z-index: 3 }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gut) }
.sect { min-height: 100vh; display: flex; align-items: center; padding: 120px 0 }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center }
.split.rev .col-text:first-child { order: 0 }
.narrow { max-width: 640px }
.kicker { margin: 0 0 14px; font-size: 13px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #e26a00 }
h1, h2, h3 { margin: 0; text-wrap: balance }
h2 { font-size: clamp(32px, 4.6vw, 58px); line-height: 1.04; font-weight: 800; letter-spacing: -.035em }
.sub { color: var(--mut); font-size: clamp(16px, 1.4vw, 18.5px); margin: 20px 0 0; max-width: 560px; text-wrap: pretty }
.grad { background: linear-gradient(100deg, #ff9a1a 0%, #f2700a 30%, #e2531a 46%, #1c8cff 62%, #1240e6 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 9s ease-in-out infinite }
@keyframes sheen { 0%, 100% { background-position: 0% 50% } 50% { background-position: 100% 50% } }

/* ---------- герой ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px 0 40px; position: relative }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 26px; padding: 7px 14px 7px 11px; border-radius: 99px; font-size: 13.5px; font-weight: 700; color: #23345e;
  background: rgba(255, 255, 255, .78); border: 1px solid rgba(20, 60, 160, .12); box-shadow: 0 8px 22px -16px rgba(16, 40, 110, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px) }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 132, 24, .18); animation: beat 2.4s ease-in-out infinite }
@keyframes beat { 0%, 100% { box-shadow: 0 0 0 3px rgba(255, 132, 24, .22) } 50% { box-shadow: 0 0 0 7px rgba(255, 132, 24, 0) } }
h1 { font-size: clamp(46px, 8.4vw, 124px); line-height: .94; font-weight: 800; letter-spacing: -.05em; max-width: 9.5em }
.lead { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; color: #37466a; max-width: 560px; margin: 28px 0 0; text-wrap: pretty }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px }
.hint { margin: 14px 0 0; font-size: 13px; color: var(--faint) }
.hero > .wrap:first-child { position: relative }

.pulse { margin-top: auto; padding-top: 56px }
.pulse-status { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--mut); letter-spacing: .02em; margin-bottom: 12px }
.led { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none }
.led.ok { background: #13b77a; box-shadow: 0 0 0 0 rgba(47, 224, 160, .5); animation: led 2s ease-out infinite }
.led.bad { background: #e0453a }
@keyframes led { 0% { box-shadow: 0 0 0 0 rgba(47, 224, 160, .55) } 100% { box-shadow: 0 0 0 10px rgba(47, 224, 160, 0) } }
.pulse-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 255, 255, .72); box-shadow: var(--shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); overflow: hidden }
.pulse-grid > div { padding: 16px 20px; border-left: 1px solid var(--line); min-width: 0 }
.pulse-grid > div:first-child { border-left: 0 }
.pulse-grid dt { font-size: 12px; color: var(--mut); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.pulse-grid dd { margin: 4px 0 0; font-size: clamp(20px, 2.1vw, 28px); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap }
.pulse.off .pulse-grid dd { color: var(--faint) }
.scroll-cue { position: absolute; left: 50%; bottom: 14px; width: 24px; height: 38px; margin-left: -12px; border: 2px solid rgba(20, 60, 160, .25); border-radius: 14px; display: none }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--amber); animation: cue 1.8s ease-in-out infinite }
@keyframes cue { 0% { transform: translateY(0); opacity: 1 } 70% { transform: translateY(12px); opacity: 0 } 100% { opacity: 0 } }

/* ---------- продукты ---------- */
.products { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 10px; max-width: 560px }
.products li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: border-color .25s, transform .25s }
.products li:hover { border-color: rgba(28, 140, 255, .4); transform: translateX(4px) }
.products b { display: block; font-size: 15.5px }
.products span { color: var(--mut); font-size: 14px }
.pi { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 7px }
.pi-b { background: var(--blue); box-shadow: 0 0 0 4px rgba(28, 140, 255, .14) }
.pi-o { background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 132, 24, .16) }
.pi-g { background: transparent; border: 2px dashed rgba(20, 60, 160, .35) }

/* ---------- шаги и терминал ---------- */
.steps { list-style: none; counter-reset: s; margin: 30px 0 0; padding: 0; display: grid; gap: 22px; max-width: 540px }
.steps li { counter-increment: s; display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 14px }
.steps li::before { content: "0" counter(s); grid-row: span 2; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; font-weight: 800; font-size: 15px; color: #fff;
  background: var(--grad); box-shadow: 0 10px 24px -12px rgba(28, 100, 255, .7) }
.steps li:last-child::before { background: var(--grad-o); box-shadow: 0 10px 24px -12px rgba(255, 110, 20, .7) }
.steps b { font-size: 17px; margin-top: 2px }
.steps span { color: var(--mut); font-size: 15px }
.split.rev { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) }
.term-col { display: flex; justify-content: flex-end }
.term { width: 100%; max-width: 560px; border-radius: var(--r); overflow: hidden; background: #0a1330; border: 1px solid rgba(20, 45, 110, .25); box-shadow: 0 40px 80px -36px rgba(10, 30, 90, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px) }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(150, 175, 235, .13); background: rgba(255, 255, 255, .025) }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a3658 }
.term-bar i:first-child { background: #ff8418 }
.term-bar span { margin-left: 10px; font-size: 12.5px; color: #6b7aa0; font-weight: 600 }
.term-body { margin: 0; padding: 18px 20px 22px; min-height: 330px; font: 13.5px/1.7 ui-monospace, 'JetBrains Mono', Consolas, monospace; color: #cfe0ff; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere }
.c-mut { color: #6b7aa0 } .c-o { color: #ffc27a } .c-b { color: #6fd3ff } .c-g { color: #5fe0a8 }
.caret { display: inline-block; width: .55em; height: 1.1em; vertical-align: -.2em; background: var(--amber); animation: blink 1s steps(2) infinite }
@keyframes blink { 50% { opacity: 0 } }

/* ---------- карточки возможностей ---------- */
.cards { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px }
.card { position: relative; padding: 26px 24px 24px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: hidden;
  transition: border-color .3s, transform .35s cubic-bezier(.2, .7, .2, 1); transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) }
.card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(28, 140, 255, .1), transparent 45%) }
.card:hover { border-color: rgba(28, 140, 255, .35) }
.card:hover::before { opacity: 1 }
.card svg { width: 40px; height: 40px; padding: 9px; border-radius: 12px; fill: none; stroke: #1460e8; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; background: rgba(28, 140, 255, .09); border: 1px solid rgba(28, 140, 255, .18) }
.card:nth-child(3) svg, .card:nth-child(6) svg { stroke: #e26a00; background: rgba(255, 132, 24, .1); border-color: rgba(255, 132, 24, .22) }
.card h3 { font-size: 19px; margin: 18px 0 8px; letter-spacing: -.01em }
.card p { margin: 0; color: var(--mut); font-size: 15px; text-wrap: pretty }

/* ---------- модели ---------- */
.models { margin-top: 44px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px }
.model { position: relative; padding: 24px; border-radius: var(--r); background: var(--glass-2); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; gap: 10px; min-height: 230px; box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .3s, border-color .3s }
.model:hover { transform: translateY(-4px); border-color: rgba(28, 140, 255, .3) }
.model::after { content: ""; position: absolute; right: -60px; top: -60px; width: 170px; height: 170px; border-radius: 50%; filter: blur(34px); opacity: .22 }
.m-opus::after { background: #ff8418 } .m-sonnet::after { background: #1c8cff } .m-haiku::after { background: #14d2ff } .m-auto::after { background: #6d4dff; opacity: .22 }
.model h3 { font-size: 21px; letter-spacing: -.02em }
.model code { align-self: flex-start }
.model p { margin: auto 0 0; color: var(--mut); font-size: 14.5px }
.tag { align-self: flex-start; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #e26a00 }
.m-sonnet .tag, .m-haiku .tag { color: #1460e8 } .m-auto .tag { color: #5b3fe0 }

/* ---------- документация ---------- */
.docs { margin-top: 40px; max-width: 900px }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px }
.tabs button { all: unset; cursor: pointer; padding: 9px 16px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--mut); border: 1px solid transparent; transition: .2s }
.tabs button:hover { color: var(--ink) }
.tabs button[aria-selected="true"] { color: #0f4fd1; background: rgba(28, 140, 255, .1); border-color: rgba(28, 140, 255, .3) }
.tabs button:focus-visible { outline: 2px solid var(--orange) }
.code { position: relative; border-radius: var(--r); background: #0a1330; border: 1px solid rgba(20, 45, 110, .25); box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px) }
.code pre { margin: 0; padding: 22px 22px 24px; overflow-x: auto; font: 13.5px/1.7 ui-monospace, 'JetBrains Mono', Consolas, monospace; color: #d6e4ff }
.code pre code { all: unset; white-space: pre }
.copy { position: absolute; right: 12px; top: 12px; z-index: 1; cursor: pointer; font: 700 12.5px Manrope, sans-serif; color: #cfe0ff; background: rgba(255, 255, 255, .06); border: 1px solid rgba(160, 190, 255, .22); border-radius: 9px; padding: 6px 12px }
.copy:hover { background: rgba(28, 140, 255, .18) }
.copy.done { color: #5fe0a8; border-color: rgba(95, 224, 168, .4) }
.docs-notes { margin: 20px 0 0; padding: 0 0 0 20px; color: var(--mut); font-size: 15px; display: grid; gap: 6px }
.pill { white-space: nowrap }

/* ---------- подвал ---------- */
.foot { position: relative; z-index: 3; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px) }
.foot-in { display: flex; align-items: center; gap: 20px; padding-top: 26px; padding-bottom: 26px; flex-wrap: wrap }
.foot p { margin: 0; color: var(--faint); font-size: 14px; flex: 1 }
.foot a:last-child { color: var(--mut); font-weight: 600; text-decoration: none }
.foot a:last-child:hover { color: var(--ink) }

/* ---------- появление при прокрутке ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s) }
.js .reveal.in { opacity: 1; transform: none }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none }
  .grad, .eyebrow .dot, .led.ok, .scroll-cue span, .caret { animation: none }
  .card { transform: none !important }
}

/* ---------- адаптив ---------- */
@media (min-height: 760px) and (min-width: 901px) { .scroll-cue { display: block } }
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .models { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}
@media (max-width: 900px) {
  .links { display: none }
  .nav .btn-sm { margin-left: auto }
  .split, .split.rev { grid-template-columns: minmax(0, 1fr); gap: 32px }
  .col-art { min-height: 46vh; order: -1 }
  .term-col { justify-content: stretch }
  .pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .pulse-grid > div { border-left: 0; border-top: 1px solid var(--line) }
  .pulse-grid > div:nth-child(even) { border-left: 1px solid var(--line) }
  .pulse-grid > div:nth-child(-n+2) { border-top: 0 }
  .pulse-grid > div:last-child { grid-column: span 2; border-left: 0 }
  .sect { padding: 90px 0; min-height: auto }
  .hero { padding-top: 104px }
  .fallback-art img { right: auto; left: 50%; top: 12vh; width: min(56vw, 300px); transform: translateX(-50%); opacity: .4 }
}
@media (max-width: 900px) and (orientation: portrait) {
  .hero { padding-top: max(104px, 36vh) }
}
@media (max-width: 600px) {
  body { font-size: 15.5px }
  .cards, .models { grid-template-columns: minmax(0, 1fr) }
  .model { min-height: 0 }
  .cta .btn { flex: 1 1 auto; justify-content: center }
  .term-body { min-height: 300px; font-size: 12.5px; padding: 16px }
  .code pre { font-size: 12.5px; padding: 50px 16px 20px }
  .copy { top: 8px; right: 8px }
  .pulse-grid dd { font-size: 21px }
  .pulse-grid > div { padding: 13px 14px }
  .lbl { font-size: 11px; padding: 4px 9px 4px 7px }
  .brand { font-size: 17px }
}
