/* Лендинг ТГ-Агента. Токены — в site.css. Перенесено из прототипа «Лендинг v2» (инлайн-стили → классы). */

.hatch { position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(45deg, rgba(20, 18, 15, .035) 0 1px, transparent 1px 30px), repeating-linear-gradient(-45deg, rgba(20, 18, 15, .035) 0 1px, transparent 1px 30px); }
.hatch.light { background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 28px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 28px); }
.dark-sec .hatch.light { background-image: repeating-linear-gradient(45deg, rgba(245, 241, 230, .03) 0 1px, transparent 1px 30px), repeating-linear-gradient(-45deg, rgba(245, 241, 230, .03) 0 1px, transparent 1px 30px); }

/* герой */
.hero { position: relative; overflow: hidden; scroll-margin-top: 70px; }
.hero-glow { position: absolute; left: 50%; top: 58%; width: 1100px; height: 700px; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, oklch(0.8 0.11 50 / .55), oklch(0.85 0.08 60 / .25) 55%, transparent); }
.hero-in { position: relative; max-width: 860px; margin: 0 auto; padding: clamp(44px, 8vw, 110px) var(--gutter) clamp(44px, 7vw, 90px);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.pill-dark { display: flex; align-items: center; gap: 9px; background: var(--ink); color: var(--cream); border-radius: 99px; padding: 8px 15px 8px 12px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; max-width: 100%; }
.pill-dark span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: oklch(0.75 0.15 150); animation: pulse 1.8s infinite; flex: none; }
.hero-h { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(38px, 7vw, 76px); line-height: .98; letter-spacing: -2.4px; text-wrap: balance; }
.hero-h span { color: var(--accent-ink); }
.hero-p { margin: 0; font-size: clamp(15px, 1.7vw, 19px); line-height: 1.55; color: var(--ink-2); max-width: 32em; text-wrap: pretty; }

.ask { width: 100%; max-width: 740px; margin-top: 10px; background: var(--paper); border: 1px solid rgba(20, 18, 15, .12); border-radius: 20px;
  box-shadow: 0 30px 60px -30px rgba(80, 40, 10, .35), 6px 6px 0 rgba(20, 18, 15, .06); padding: 18px 18px 14px; text-align: left; transition: border-color .15s ease; }
.ask:focus-within { border-color: var(--accent); }
.ask textarea { width: 100%; border: none; outline: none; resize: none; background: none; font: inherit; font-size: clamp(16px, 1.8vw, 19px); line-height: 1.45;
  color: var(--ink); padding: 2px 4px; display: block; min-height: 3em; }
.ask textarea::placeholder { color: #B4AE9E; }
.ask-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.ask-hint { flex: 1 1 160px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); padding-left: 4px; }
.ask-go { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; cursor: pointer; transition: background .15s ease, transform .12s ease; }
.ask-go.ready { background: var(--accent); }
.ask-go:active { transform: scale(.96); }
.ask-go:disabled { opacity: .55; cursor: default; }
.ask-login { height: 46px; padding: 0 20px; border-radius: 99px; border: 0; background: var(--accent); color: #fff; font-weight: 600; font-size: 15px; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink); transition: transform .12s ease, box-shadow .12s ease; }
.ask-login:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.ask-login:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.ask-login + .ask-go { width: 40px; height: 40px; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 760px; }
.chip { font: inherit; font-size: 13px; background: rgba(254, 252, 246, .75); border: 1px solid rgba(20, 18, 15, .12); padding: 9px 14px; border-radius: 99px; cursor: pointer; color: #3a352d; }
.chip:hover { background: var(--paper); border-color: var(--line-2); }

/* ответ помощника гостю */
.thread { width: 100%; max-width: 740px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.msg-me { align-self: flex-end; max-width: 85%; background: var(--ink); color: var(--cream); padding: 10px 14px; border-radius: 14px 14px 4px 14px; font-size: 15px; line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere; animation: rise .25s ease both; }
.msg-ai { align-self: stretch; animation: rise .3s ease both; }
.msg-text { background: var(--paper); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 12px 16px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.msg-opt { font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; }
.msg-opt:hover { border-color: var(--accent); color: var(--accent-ink); }
.msg-err { background: oklch(0.96 0.03 25); border: 1px solid oklch(0.85 0.07 25); color: oklch(0.42 0.14 25); border-radius: 14px; padding: 12px 16px; font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.msg-err button { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 8px; border: 0; background: var(--ink); color: var(--cream); cursor: pointer; }
.thinking { display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-size: 14px; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #EDE7D8; border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }

/* карточка плана: и в ответе гостю, и в примере */
.demo, .plan { background: var(--paper); border: 1px solid rgba(20, 18, 15, .1); border-radius: 16px; box-shadow: var(--shadow-block); overflow: hidden; text-align: left; }
.plan { box-shadow: 8px 8px 0 rgba(20, 18, 15, .08); }
.demo-task { padding: 16px 16px 14px; border-bottom: 1px solid rgba(20, 18, 15, .06); }
.demo-k { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--faint); }
.demo-typed { margin-top: 8px; font-size: 16px; line-height: 1.45; min-height: 46px; font-weight: 500; }
.caret { display: inline-block; width: 2px; height: 18px; background: var(--accent); vertical-align: -3px; margin-left: 2px; animation: blink 1s infinite; }
.demo-head { background: var(--ink); color: var(--cream); padding: 16px 18px; }
.demo-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.demo-k2 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--accent-soft); }
.demo-trig { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; border: 1px solid rgba(245, 241, 230, .25); padding: 4px 8px; border-radius: 99px; color: #CFC9BC; white-space: nowrap; }
.demo-title { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.3px; margin-top: 10px; line-height: 1.2; }
.demo-steps { padding: 4px 16px 6px; min-height: 236px; }
.plan .demo-steps { min-height: 0; }
.step { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(20, 18, 15, .06); animation: rise .35s ease both; }
.step:last-child { border-bottom: 0; }
.step-tile { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.step-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.step-t b { font-size: 14px; font-weight: 600; }
.step-t span { font-size: 12.5px; color: var(--muted); margin-top: 1px; overflow-wrap: anywhere; }
.demo .step-t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px 16px; }
.demo-foot > span:first-child { flex: 1; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.demo-run { background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; padding: 10px 16px; border-radius: 8px; flex: none; }
.plan-sum { padding: 0 16px 14px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.plan-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px 16px; border-top: 1px solid rgba(20, 18, 15, .06); }
.plan-foot span { flex: 1 1 200px; font-size: 13px; color: var(--muted); }
.plan-foot button { font: inherit; font-weight: 600; font-size: 14px; padding: 11px 18px; border-radius: 9px; border: 0; background: var(--accent); color: #fff; cursor: pointer; }
.plan-foot button:hover { background: oklch(0.57 0.17 45); }

/* секции */
.sec { padding: clamp(48px, 7vw, 96px) 0; scroll-margin-top: 60px; }
.sec#templates { padding-top: clamp(20px, 3vw, 40px); }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 30px; }
.sec-p { margin: 0; font-size: clamp(15px, 1.6vw, 17px); line-height: 1.55; color: var(--ink-2); max-width: 30em; text-wrap: pretty; }
.w14 { max-width: 14em; } .w18 { max-width: 18em; } .w26 { max-width: 26em; font-size: 15px; }
.cats { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--mono); font-size: 12px; font-weight: 600; }
.cat { font: inherit; padding: 8px 13px; border-radius: 7px; cursor: pointer; background: rgba(255, 255, 255, .42); color: var(--ink-2); border: 1px solid var(--line-2); }
.cat:hover { background: var(--paper); }
.cat.on { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: clamp(22px, 3vw, 34px); }
.tpl { font: inherit; text-align: left; padding: 0; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-card); overflow: hidden; color: var(--ink); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.tpl:hover { transform: translateY(-3px); box-shadow: 5px 5px 0 rgba(20, 18, 15, .08); }
.tpl[hidden] { display: none; }
.tpl-cover { height: 118px; background: var(--cover); position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; overflow: hidden; }
.tpl-cover::before { content: ''; position: absolute; inset: 0; background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 22px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 22px); }
.tpl-tile { position: relative; width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); }
.tpl-dash { position: relative; width: 12px; height: 2px; background: rgba(255, 255, 255, .5); }
.tpl-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tpl-name { font-size: 16px; font-weight: 600; line-height: 1.3; }
.tpl-desc { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.tpl-meta { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--faint); }

.split { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); align-items: center; }
.split-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.split-text .h2 { margin: 0; }
.split-side { flex: 1 1 380px; min-width: 0; max-width: 500px; margin: 0 auto; }
.mono-line { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: .04em; line-height: 1.6; }

.dark-sec { background: var(--ink); color: var(--cream); position: relative; overflow: hidden; scroll-margin-top: 60px; }
.dark-in { position: relative; padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(48px, 7vw, 96px); }
.dark-in .h2 { max-width: 16em; }
.eyebrow.soft { color: var(--accent-soft); }
.how { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(14px, 2vw, 22px); }
.how li { border-top: 1.5px solid rgba(245, 241, 230, .2); padding-top: 20px; }
.how-n { font-family: var(--display); font-size: 44px; font-weight: 800; color: var(--accent-soft); line-height: 1; display: block; }
.how h3 { font-family: var(--display); font-size: 21px; font-weight: 700; margin: 14px 0 0; }
.how p { font-size: 14.5px; line-height: 1.55; color: #CFC9BC; margin: 8px 0 0; text-wrap: pretty; }

.caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 14px; margin-top: clamp(28px, 4vw, 44px); }
.cap { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-card); padding: 22px; }
.cap-ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; }
.cap h3 { font-family: var(--display); font-size: 19px; font-weight: 700; margin: 18px 0 0; letter-spacing: -.3px; }
.cap p { font-size: 14px; color: var(--muted); line-height: 1.55; margin: 6px 0 0; }

.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band .sec { padding-left: var(--gutter); padding-right: var(--gutter); }
.scens { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; margin-top: clamp(28px, 4vw, 44px); }
.scen { font: inherit; text-align: left; color: var(--ink); cursor: pointer; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-card);
  padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: transform .15s ease, box-shadow .15s ease; }
.scen:hover { transform: translateY(-3px); box-shadow: 5px 5px 0 rgba(20, 18, 15, .08); }
.scen-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scen-trig { font-family: var(--mono); font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; border: 1px solid rgba(20, 18, 15, .14); padding: 5px 9px; border-radius: 99px; color: var(--muted); }
.scen-live { display: flex; align-items: center; gap: 6px; font-size: 12px; color: oklch(0.42 0.11 150); font-weight: 600; }
.dot-ok { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse 1.8s infinite; }
.scen-name { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.3px; line-height: 1.15; }
.scen-desc { font-size: 14px; color: var(--muted); line-height: 1.5; }
.scen-steps { display: flex; flex-direction: column; border-top: 1px solid rgba(20, 18, 15, .06); padding-top: 14px; }
.scen-step { display: flex; gap: 12px; }
.scen-rail { display: flex; flex-direction: column; align-items: center; flex: none; }
.scen-tile { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; }
.scen-tile svg { width: 15px; height: 15px; }
.scen-line { width: 2px; height: 12px; background: #EDE7D8; margin: 3px 0; }
.scen-label { font-size: 14px; font-weight: 600; padding-top: 6px; }

.safe { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.safe li { display: flex; flex-direction: column; gap: 3px; padding-left: 26px; position: relative; }
.safe li::before { content: '→'; position: absolute; left: 0; top: 1px; font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.safe b { font-size: 16px; font-weight: 600; }
.safe span { font-size: 14px; color: var(--muted); line-height: 1.5; }
.accs { background: var(--ink); color: var(--cream); border-radius: 16px; padding: 20px 20px 8px; box-shadow: var(--shadow-block); }
.accs-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--accent-soft); margin-bottom: 12px; }
.accs-head span:last-child { color: #A8A296; letter-spacing: 1px; }
.acc { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(245, 241, 230, .1); }
.acc-ava { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.acc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.acc-t b { font-size: 14px; font-weight: 600; }
.acc-t span { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #B0AA9A; margin-top: 2px; }
.acc-t i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.st-ok { background: oklch(0.65 0.15 150); } .st-busy { background: oklch(0.72 0.13 45); } .st-limit { background: oklch(0.62 0.18 25); } .st-off { background: #6E695D; }
.acc-use { width: 96px; flex: none; font-family: var(--mono); font-size: 11px; color: #CFC9BC; text-align: right; }
.bar { display: block; height: 4px; border-radius: 99px; background: rgba(245, 241, 230, .12); margin-top: 6px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: oklch(0.72 0.13 45); }
.bar .bar-limit { background: oklch(0.62 0.18 25); } .bar .bar-off { background: #6E695D; }

.cta-wrap { padding-bottom: clamp(48px, 7vw, 96px); }
.cta { background: var(--accent); color: #fff; border-radius: 18px; padding: clamp(28px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px 40px; box-shadow: 8px 8px 0 var(--ink); position: relative; overflow: hidden; }
.cta-t { position: relative; flex: 1 1 380px; }
.cta h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4.4vw, 46px); line-height: 1.02; letter-spacing: -1.3px; text-wrap: balance; }
.cta p { font-size: 16px; line-height: 1.5; margin: 10px 0 0; max-width: 30em; color: #FFF4EA; }
.cta-btn { position: relative; background: var(--ink); color: var(--cream); padding: 18px 28px; border-radius: 10px; font-size: 16px; font-weight: 600; flex: none; }
.cta-btn:hover { color: var(--cream); background: #2A2620; }

@media (max-width: 560px) {
  .hero-h { letter-spacing: -1.4px; }
  .ask { padding: 14px 14px 12px; border-radius: 16px; }
  .ask-hint { display: none; }
  .ask-login { flex: 1; }
  .split-side, .split-text { flex-basis: 100%; }
  .acc-use { width: 72px; }
  .demo-typed { min-height: 66px; }
  .gallery { gap: 10px; }
  .tpl { flex-direction: row; align-items: stretch; }
  .tpl-cover { height: auto; width: 76px; flex: none; flex-direction: column; gap: 4px; padding: 10px 0; }
  .tpl-tile { width: 34px; height: 34px; border-radius: 9px; }
  .tpl-tile svg { width: 17px; height: 17px; }
  .tpl-dash { width: 2px; height: 6px; }
  .tpl-body { padding: 12px 14px; }
  .tpl-tile:nth-of-type(n+4), .tpl-dash:nth-of-type(n+3) { display: none; }
}
