/* Griffin Guard: black and grey like brawldeck. Sections take turns between #0a0a0a (.dark) and #111 (.alt);
   the only bright thing is white: text, the chosen thing, the main button. Headings in Rubik (close to Telegram's
   wordmark), text in Roboto as in the Telegram app. Answers to the pointer are quick (.15s). */
:root {
  --display: "Rubik", "Roboto", -apple-system, "Segoe UI", sans-serif;
  --font: "Roboto", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --fast: .15s;
  --white: #fafafa;
}
.dark { --bg: #0a0a0a; --fg: #fafafa; --muted: #8f8f8f; --dim: #5c5c5c; --line: #262626; --line-2: #3a3a3a;
  --card: #111111; --card-2: #191919; --soft: rgb(255 255 255 / .04); }
.alt { --bg: #111111; --fg: #fafafa; --muted: #8f8f8f; --dim: #5c5c5c; --line: #262626; --line-2: #3a3a3a;
  --card: #191919; --card-2: #242424; --soft: rgb(255 255 255 / .05); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: #0a0a0a; color: var(--white); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
section, header, footer, .ticker { background: var(--bg); color: var(--fg); }
main > section, main > .ticker, .foot { border-top: 1px solid #262626; }
h1, h2, h3 { margin: 0; font-family: var(--display); color: var(--fg); }
h2 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.05; font-weight: 700; letter-spacing: -0.025em; }
h3 { font-size: 21px; line-height: 1.25; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 0.2em; }
button, summary, .btn, .ticker, .stat { -webkit-user-select: none; user-select: none; }
::selection { background: var(--white); color: #0a0a0a; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: none; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--white); color: #0a0a0a; padding: 8px 12px; }
.section-lead { margin-top: 16px; font-size: 19px; color: var(--muted); max-width: 34em; }

/* The mark: the shield in the text colour with the griffin cut out of it */
.mark { width: 1em; height: 1.31em; flex: none; }
.mark .mark-ink { fill: currentColor; }
.mark .mark-cut { fill: var(--bg); }
.mark .mark-line { stroke: var(--bg); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px;
  font: 600 17px/1 var(--display); text-decoration: none; border: 1px solid transparent;
  transition: background var(--fast), color var(--fast), border-color var(--fast), transform var(--fast) var(--ease); }
.btn:active { transform: scale(.97); }
.btn-white { background: var(--white); color: #0a0a0a; border-color: var(--white); }
.btn-white:hover { background: #d4d4d4; border-color: #d4d4d4; }
.btn-line { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-line:hover { background: var(--card-2); border-color: var(--muted); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 15px; border-radius: 999px; background: var(--white); color: #0a0a0a; }
.btn-small:hover { background: #d4d4d4; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgb(10 10 10 / .94); }
.nav-row { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 20px/1 var(--display); color: var(--fg); }
.brand .mark { font-size: 24px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 7px 14px; border-radius: 999px;
  transition: color var(--fast), background var(--fast); }
.nav-links a:hover { color: var(--fg); background: #191919; }

/* Hero */
.hero { position: relative; padding: 96px 0 112px; overflow: hidden; isolation: isolate; }
.hero-grid { position: relative; z-index: 1; }
/* Mist: soft silver clouds drifting behind the headline and the emblem */
.mist { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.mist i { position: absolute; border-radius: 50%; filter: blur(80px); background: radial-gradient(circle, #ffffff, transparent 65%); }
.mist i:nth-child(1) { width: 720px; height: 720px; right: -160px; top: -220px; opacity: .17; }
.mist i:nth-child(2) { width: 560px; height: 560px; left: -220px; bottom: -300px; opacity: .11; }
.mist i:nth-child(3) { width: 420px; height: 420px; right: 22%; bottom: -260px; opacity: .08; }
.motion .mist i:nth-child(1) { animation: mist-a 22s ease-in-out infinite alternate; }
.motion .mist i:nth-child(2) { animation: mist-b 28s ease-in-out infinite alternate; }
.motion .mist i:nth-child(3) { animation: mist-c 34s ease-in-out infinite alternate; }
@keyframes mist-a { to { transform: translate(-160px, 120px) scale(1.15); } }
@keyframes mist-b { to { transform: translate(220px, -90px) scale(1.2); } }
@keyframes mist-c { to { transform: translate(-200px, -140px) scale(.9); } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(54px, 8.4vw, 112px); line-height: .96; font-weight: 800; letter-spacing: -0.035em; max-width: 7.5ch; }
h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
h1 .w > span { display: inline-block; }
.motion h1 .w > span { animation: word .8s var(--ease) both; }
.motion h1 .w:nth-child(2) > span { animation-delay: .1s; }
.motion h1 .w:nth-child(3) > span { animation-delay: .2s; }
@keyframes word { from { transform: translateY(105%); } }
.motion .rise { animation: rise .7s var(--ease) var(--d, 0s) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.lead { margin-top: 28px; font-size: 20px; line-height: 1.55; max-width: 30em; color: #d6d6d6; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-note { margin-top: 20px; font-size: 15px; color: var(--muted); }
.hero-emblem { display: flex; justify-content: center; }
.emblem { width: min(100%, 420px); height: auto; overflow: visible; }
.em-field { fill: var(--white); }
.em-griffin { fill: #0a0a0a; }
.em-detail { fill: var(--white); }
.em-line { stroke: var(--white); }
.em-shield { fill: none; stroke: var(--white); stroke-width: 4; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.em-glint { opacity: 0; }
.em-fill { transform-origin: 50% 50%; transform-box: fill-box; }
.motion .em-shield { animation: draw 1.6s var(--ease) .1s both; }
.motion .em-fill { animation: appear .9s ease 1.2s both; }
.motion .em-glint { animation: glint 7s ease-in-out 3s infinite; }
.motion .hero-emblem { animation: float 9s ease-in-out 2.5s infinite; }
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes appear { from { opacity: 0; transform: scale(.97); } }
@keyframes glint {
  0% { opacity: 1; transform: skewX(-18deg) translateX(-200px); }
  22% { opacity: 1; transform: skewX(-18deg) translateX(1000px); }
  23%, 100% { opacity: 0; transform: skewX(-18deg) translateX(1000px); } }
@keyframes float { 50% { transform: translateY(-10px); } }

/* The ticker: what the bot strikes out, sliding by without stopping */
.ticker { overflow: hidden; padding: 18px 0; border-bottom: 1px solid var(--line); }
.ticker-track { display: flex; width: max-content; }
.ticker-track span { position: relative; display: inline-flex; align-items: center; font: 600 clamp(20px, 2.4vw, 30px)/1 var(--display);
  color: var(--muted); padding: 0 28px; white-space: nowrap; }
.ticker-track span::before { content: ""; position: absolute; left: 22px; right: 22px; top: 52%; height: 2px; background: var(--fg); }
.ticker-track span::after { content: "✕"; position: absolute; right: -6px; font-size: 13px; color: var(--fg); opacity: .45; }
.motion .ticker-track { animation: ticker 40s linear infinite; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Numbers: they count up when they come into view */
.stats { padding: 64px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 26px 24px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  transition: border-color var(--fast), background var(--fast), transform var(--fast) var(--ease); }
.stat:hover { border-color: var(--line-2); background: var(--card-2); transform: translateY(-3px); }
.stat b { display: block; font: 800 clamp(48px, 6vw, 72px)/1 var(--display); letter-spacing: -0.04em; color: var(--fg);
  font-variant-numeric: tabular-nums; }
.stat > span { display: block; margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.4; }

/* What the bot does */
.features { padding: 104px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; margin-top: 52px; }
.feature-grid article { position: relative; padding: 28px 0 32px; }
.feature-grid article::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-2);
  transform-origin: left; transition: transform .9s var(--ease) calc(var(--i, 0) * 60ms); }
.feature-grid article::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 1px; background: var(--fg);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.feature-grid article:hover::after { transform: scaleX(1); }
.motion .feature-grid article[data-reveal]:not(.in)::before { transform: scaleX(0); }
.feature-grid h3 { transition: transform var(--fast) var(--ease); }
.feature-grid article:hover h3 { transform: translateX(6px); }
.feature-grid p { margin-top: 10px; color: var(--muted); max-width: 32em; }
.feature-grid .cmd { margin-top: 14px; display: inline-block; font: 500 14px/1 ui-monospace, "SF Mono", "Roboto Mono", Consolas, monospace;
  color: var(--fg); background: var(--soft); border: 1px solid var(--line); padding: 7px 10px; border-radius: 8px; }

/* Why: cards that lift and light up at once under the pointer */
.why { padding: 104px 0; }
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 52px; }
.why-grid article { position: relative; padding: 30px 28px 32px; border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  overflow: hidden; transition: border-color var(--fast), background var(--fast), transform var(--fast) var(--ease); }
.why-grid article::before { content: ""; position: absolute; left: 28px; right: 28px; top: 0; height: 2px; background: var(--fg);
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.why-grid article:hover { border-color: var(--line-2); background: var(--card-2); transform: translateY(-4px); }
.why-grid article:hover::before { transform: scaleX(1); }
.why-grid h3 { font-size: 23px; letter-spacing: -0.01em; }
.why-grid p { margin-top: 12px; color: var(--muted); transition: color var(--fast); }
.why-grid article:hover p { color: #c4c4c4; }

/* Premium */
.premium { padding: 104px 0; }
.premium-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin: 22px 0 22px; }
.price b { font: 800 88px/1 var(--display); letter-spacing: -0.04em; }
.price > span { font-size: 19px; color: var(--muted); }
/* The words under the price always take their own line: «в месяц» and «за 12 месяцев · 70 ★ в месяц» differ in
   length, and a line that comes and goes would move the block's edge on every switch of the plan. */
.price > [data-term] { flex-basis: 100%; margin-top: -4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.premium-head > p:not(.price) { max-width: 28em; margin-bottom: 32px; color: var(--muted); }
/* Plans: the longer, the cheaper a month. One column: the term and its saving on the left, prices lined up right */
/* A plan is picked with a tap: one white pill slides under it (site.js), the price above rolls to its total and the
   button leads to the bot with that plan's invoice. */
.plans { position: relative; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; max-width: 24em; }
.plan-pill { position: absolute; z-index: 0; top: 0; left: 0; border-radius: 999px; background: var(--fg); pointer-events: none;
  box-shadow: 0 10px 30px -12px rgb(255 255 255 / .45); }
.plan-pill.moving { transition: transform .5s cubic-bezier(.3,1.25,.45,1), height .3s var(--ease); }
.plan { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 22px; border: 1px solid var(--line-2);
  border-radius: 999px; background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; white-space: nowrap;
  transition: border-color var(--fast), color .3s var(--ease); -webkit-tap-highlight-color: transparent; }
.plan > * { position: relative; z-index: 1; }
@media (hover: hover) { .plan:hover { border-color: var(--muted); } }
.plan:active { transform: scale(.985); }
.plan span { color: var(--muted); font-size: 15px; transition: color .3s var(--ease); }
.plan em { order: 1; font-style: normal; font-size: 12.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: var(--fg); color: var(--bg); transition: background .3s var(--ease), color .3s var(--ease); }
.plan b { order: 2; margin-left: auto; font: 700 17px/1 var(--display); }
.plan[aria-checked="true"] { border-color: var(--fg); color: var(--bg); }
.plan[aria-checked="true"] span { color: #4a4a4a; }
.plan[aria-checked="true"] em { background: var(--bg); color: var(--fg); }
/* Without the script (or before it runs) the chosen plan is simply white */
.plans:not(.live) .plan[aria-checked="true"] { background: var(--fg); }
.price [data-term] { transition: opacity .15s; }
.price .odo { display: inline-flex; }
.price .odo-d { display: inline-block; height: 1em; overflow: hidden; }
.price .odo-col { display: flex; flex-direction: column; transition: transform .75s cubic-bezier(.2,.9,.25,1); }
.price .odo-col span { display: block; height: 1em; line-height: 1; text-align: center; }
.premium-list { list-style: none; margin: 0; padding: 0; }
.premium-list li { position: relative; padding: 24px 0; border-top: 1px solid var(--line-2); }
.premium-list li:last-child { border-bottom: 1px solid var(--line-2); }
.premium-list li::before { content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 1px; background: var(--fg);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
/* The text slides with transform, so its lines never wrap differently under the pointer */
.premium-list li > * { transition: transform var(--fast) var(--ease); }
.premium-list li:hover > * { transform: translateX(10px); }
.premium-list li:hover::before { transform: scaleX(1); }
.premium-list p { margin-top: 8px; color: var(--muted); }

/* How to start: a real sequence, so numbered; each number sits in an SVG circle, centred by the SVG itself */
.start { padding: 104px 0; }
.steps { list-style: none; padding: 0; margin: 52px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px;
  position: relative; }
.steps::before { content: ""; position: absolute; top: 28px; left: 28px; right: calc(33.3% - 28px); height: 1px; background: var(--line-2);
  transform-origin: left; transition: transform 1.2s var(--ease) .2s; }
.motion .steps:not(.in)::before { transform: scaleX(0); }
.steps li { position: relative; }
.step-num { position: relative; display: block; width: 56px; height: 56px; margin-bottom: 22px; overflow: visible; }
.step-num circle { fill: var(--bg); stroke: var(--fg); stroke-width: 2; shape-rendering: geometricPrecision;
  transition: fill var(--fast); }
.step-num text { fill: var(--fg); font: 800 22px var(--display); transition: fill var(--fast); }
.steps li:hover .step-num circle { fill: var(--fg); }
.steps li:hover .step-num text { fill: var(--bg); }
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--muted); }

/* What's next */
.roadmap { padding: 104px 0; }
.road { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 52px; }
.road-col { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 24px 24px 12px;
  transition: border-color var(--fast); }
.road-col:hover { border-color: var(--line-2); }
.road-head { display: flex; align-items: center; gap: 10px; font: 600 13px/1 var(--font); letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px; }
.road-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.done .road-head { color: var(--fg); }
.done .road-dot { background: var(--fg); border-color: var(--fg); }
.soon .road-dot { border-color: var(--fg); background: linear-gradient(90deg, var(--fg) 50%, transparent 50%); }
.motion .soon .road-dot { animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 50% { box-shadow: 0 0 0 5px rgb(255 255 255 / .12); } }
.later .road-dot { border-color: var(--dim); }
.road ul { list-style: none; margin: 0; padding: 0; }
.road li { position: relative; padding: 12px 0 12px 22px; border-top: 1px solid var(--line); color: #d6d6d6; line-height: 1.45;
  transition: color var(--fast), transform var(--fast) var(--ease); }
.road li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--dim); }
.done li::before { content: "✓"; border: 0; width: auto; height: auto; top: 12px; left: 0; color: var(--fg); font-size: 14px; }
.soon li::before { border-color: var(--fg); }
.later li { color: var(--muted); }
.road li:hover { color: var(--fg); transform: translateX(4px); }

/* Questions: the answer grows and shrinks (site.js animates the height) */
.faq { padding: 104px 0; }
.faq-grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 56px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 0; font: 500 19px/1.35 var(--display); transition: color var(--fast); }
.faq-list summary:hover { color: #ffffff; }
.faq-list summary::-webkit-details-marker { display: none; }
/* The mark stays still: a white disc grows from its centre over the grey ring while the plus turns into a cross.
   The two bars are one layer blended by difference, so they turn black exactly where the disc covers them, never
   a muddy grey, and their crossing stays solid. */
.faq-mark { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2);
  isolation: isolate; }
.faq-mark::before { content: ""; position: absolute; inset: -1px; border-radius: 50%; background: var(--fg); transform: scale(0);
  transition: transform .3s var(--ease); }
.faq-mark b { position: absolute; inset: 0; mix-blend-mode: difference; }
.faq-mark b::before, .faq-mark b::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px;
  margin: -1px 0 0 -6px; border-radius: 1px; background: #ffffff; transition: transform .3s var(--ease); }
.faq-mark b::after { transform: rotate(90deg); }
.faq-list summary:hover .faq-mark { border-color: var(--muted); }
.faq-list details.shown .faq-mark::before { transform: scale(1); }
.faq-list details.shown .faq-mark b::before { transform: rotate(45deg); }
.faq-list details.shown .faq-mark b::after { transform: rotate(135deg); }
/* The answer's box has no padding of its own, so its height can shrink all the way to 0 */
.faq-a { overflow: hidden; }
.faq-list details p { padding: 0 48px 24px 0; color: var(--muted); max-width: 40em; }

/* Licences page */
.credits { padding: 72px 0 104px; }
.page-title { font-size: clamp(40px, 6vw, 64px); line-height: 1; font-weight: 800; letter-spacing: -0.035em; }
.credit-item { margin-top: 36px; padding: 26px 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); max-width: 46em; }
.credit-item h2 { font-size: 23px; letter-spacing: -0.01em; }
.credit-item p { margin-top: 10px; color: var(--muted); }
.credit-item a { color: var(--fg); }
.credits .btn { margin-top: 36px; }

/* Footer */
.foot { padding: 32px 0 44px; font-size: 14px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.foot .brand { font-size: 17px; }
.foot .brand .mark { font-size: 20px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-links a { color: var(--muted); text-decoration: none; transition: color var(--fast); }
.foot-links a:hover { color: var(--fg); }

/* Reveal on scroll: only with scripts and motion on, so without them nothing stays hidden. An animation, not a
   transition: once it has played, hover effects answer at their own quick speed. */
.motion [data-reveal]:not(.in) { opacity: 0; }
.motion [data-reveal].in { animation: reveal .6s var(--ease) calc(var(--i, 0) * 60ms) backwards; }
@keyframes reveal { from { opacity: 0; transform: translateY(22px); } }

@media (max-width: 960px) {
  .hero { padding: 64px 0 80px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-emblem { justify-content: flex-start; }
  .emblem { width: min(70%, 300px); }
  .why-grid, .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .road { grid-template-columns: 1fr; }
  .premium-grid, .faq-grid { grid-template-columns: 1fr; gap: 40px; }
  .nav-links { display: none; }
  .nav-row { justify-content: space-between; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .lead { font-size: 18px; }
  .features, .why, .premium, .start, .faq, .roadmap { padding: 72px 0; }
  .stats { padding: 48px 0; }
  .stat { padding: 20px 18px 18px; }
  .stat > span { font-size: 14px; }
  .feature-grid, .why-grid, .steps { grid-template-columns: 1fr; }
  .steps { gap: 32px; }
  .steps::before { top: 28px; bottom: 28px; left: 28px; right: auto; width: 1px; height: auto; transform-origin: top; }
  .motion .steps:not(.in)::before { transform: scaleY(0); }
  .steps li { padding-left: 80px; }
  .step-num { position: absolute; left: 0; top: 0; margin: 0; }
  .price b { font-size: 72px; }
  .nav .btn-small { display: none; }
  .faq-list details p { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
