@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --brand: #3D81E3;
  --cyan: #00d2ff;
  --ice: #A4F4FD;
  --bg-dim: 0.55;
}

.acc { color: var(--ice); }

* { box-sizing: border-box; }

html, body {
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: #0c0c0c;
  color: #fff;
  margin: 0;
}

::selection { background: rgba(61,129,227,0.30); }

.serif { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; }
.mono  { font-family: 'JetBrains Mono', monospace; }

/* ---------- Shiny headline gradient ---------- */
.shiny-text {
  background-image: linear-gradient(to right,
    #091020 0%, #0B2551 12.5%, var(--ice) 32.5%, var(--cyan) 50%,
    #0B2551 67.5%, #091020 87.5%, #091020 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: url(#c3-noise);
}
.animate-shiny { animation: shiny 6s linear infinite; }
@keyframes shiny {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* ---------- Telegram pill button ---------- */
.tg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 9999px; background: #fff; color: #000;
  font-weight: 500; font-size: .875rem; padding: 12px 20px;
  transition: all .2s ease; white-space: nowrap;
}
.tg-btn:hover { background: rgba(255,255,255,.9); }
.tg-btn:active { transform: scale(.98); }
.tg-btn svg.tg-glyph { width: 16px; height: 16px; }
.tg-btn .tg-arrow { transition: transform .2s ease; }
.tg-btn:hover .tg-arrow { transform: translate(1px,-1px); }

/* ---------- Shared site navbar ---------- */
.site-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 24px;
}
.site-nav__brand { justify-self: start; }
.site-nav__links {
  justify-self: center;
  align-items: center;
  justify-content: center;
  gap: 32px;
  min-width: max-content;
}
.site-nav__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}
.dashboard-card {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.08);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.dashboard-card:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.22);
}
.dashboard-card:active { transform: scale(.98); }
@media (max-width: 767px) {
  .site-nav { grid-template-columns: 1fr auto; column-gap: 14px; }
}

/* ---------- Liquid glass ---------- */
.liquid-glass {
  background: rgba(255,255,255,0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}
.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%,
    rgba(255,255,255,0.15) 80%, rgba(255,255,255,0.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Scroll reveal (only hide when JS is active) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* entrance helpers (replicate motion delays) — only when JS active */
@keyframes fade-down { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes fade-up   { from { opacity: 0; transform: translateY(40px); }  to { opacity: 1; transform: none; } }
.js .anim-down { opacity: 0; animation: fade-down .6s cubic-bezier(.22,1,.36,1) forwards; }
.js .anim-up   { opacity: 0; animation: fade-up .8s cubic-bezier(.22,1,.36,1) forwards; }

/* ---------- Loading screen ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: #0c0c0c;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
  transition: opacity .8s ease, visibility .8s ease;
}
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-words { height: clamp(3rem, 9vw, 6.2rem); overflow: hidden; position: relative; display:flex; align-items:center; justify-content:center; }
.loader-words .w {
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: clamp(2.6rem, 8vw, 5.5rem); line-height: 1.1;
  position: absolute; inset: 0; text-align: center;
  opacity: 0; transform: translateY(60%);
  transition: opacity .5s ease, transform .5s ease;
}
.loader-words .w.active { opacity: 1; transform: none; }
.loader-counter { font-size: .8rem; letter-spacing: .35em; color: rgba(255,255,255,.5); }

/* ---------- Bento grid ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.bento .card { border-radius: 22px; padding: 34px; min-height: 260px; display: flex; flex-direction: column; }
.col-7 { grid-column: span 7; }
.col-5 { grid-column: span 5; }
@media (max-width: 860px) {
  .col-7, .col-5 { grid-column: span 12; }
  .bento .card { min-height: 0; padding: 28px; }
}

/* ---------- Journal pills ---------- */
.pill-row {
  display: flex; align-items: flex-start; gap: 28px;
  border-radius: 20px; padding: 30px 34px;
}
.pill-num { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 2.4rem; color: rgba(255,255,255,.35); line-height: 1; flex-shrink: 0; min-width: 56px; }
.pill-meta { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.4); }
@media (max-width: 700px) { .pill-row { flex-direction: column; gap: 14px; padding: 26px; } }

/* ---------- Parallax feature cards ---------- */
.para-card { border-radius: 22px; padding: 32px; will-change: transform; }
.para-idx { font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: var(--ice); letter-spacing: .1em; }

/* ---------- Product mockup scrollbars ---------- */
.mock-scroll::-webkit-scrollbar { width: 0; height: 0; }

/* ---------- Docs layout + code blocks ---------- */
.docs-grid { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: start; }
.docs-side { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; padding-right: 8px; }
.docs-side::-webkit-scrollbar { width: 0; }
.docs-side .grp { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.4); margin: 22px 0 10px; }
.docs-side a { display: block; font-size: .85rem; color: rgba(255,255,255,.55); padding: 5px 0 5px 14px; border-left: 1px solid rgba(255,255,255,.1); transition: color .2s, border-color .2s; }
.docs-side a:hover { color: #fff; border-color: var(--ice); }
.code-block { background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 20px 22px; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: .82rem; line-height: 1.6; color: rgba(255,255,255,.82); white-space: pre; }
.code-block .k { color: var(--ice); }
.code-block::-webkit-scrollbar { height: 6px; }
.code-block::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
.method { font-family: 'JetBrains Mono', monospace; font-size: .72rem; font-weight: 500; padding: 2px 8px; border-radius: 6px; background: rgba(124,90,224,.18); color: var(--ice); border: 1px solid rgba(255,255,255,.12); }
@media (max-width: 900px) { .docs-grid { grid-template-columns: 1fr; gap: 28px; } .docs-side { position: static; max-height: none; } }

/* docs scrollspy + anchors */
.docs-side a.active { color: #fff; border-color: var(--ice); }
[data-doc-anchor] { scroll-margin-top: 24px; }

/* one-topic-per-page docs reader */
.doc-topic { display: none; }
.doc-topic.active { display: block; }
.doc-topic-head { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ice); }
.doc-pager { display: flex; gap: 16px; margin-top: 56px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.1); }
.doc-pager a { flex: 1 1 0; min-width: 0; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 16px 20px; transition: background .2s, border-color .2s; display: block; }
.doc-pager a:hover { background: rgba(255,255,255,.05); border-color: var(--ice); }
.doc-pager a.next { text-align: right; }
.doc-pager .dir { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); display: flex; align-items: center; gap: 6px; }
.doc-pager a.next .dir { justify-content: flex-end; }
.doc-pager .ttl { margin-top: 6px; font-weight: 600; color: #fff; font-size: .98rem; }
.doc-pager .ph { flex: 1 1 0; }
.doc-mobile-nav { display: none; }
.doc-mobile-nav select { width: 100%; background: rgba(20,20,22,0.9); color: #fff; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 12px 14px; font-size: .9rem; outline: none; -webkit-appearance: none; appearance: none; }
@media (max-width: 900px) { .doc-mobile-nav { display: block; margin-bottom: 24px; } }

.pre-block { background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 18px 20px; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: .72rem; line-height: 1.5; color: rgba(255,255,255,.72); white-space: pre; }
.pre-block::-webkit-scrollbar { height: 6px; }
.pre-block::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.doc-table th { text-align: left; color: rgba(255,255,255,.45); font-weight: 500; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; padding: 0 16px 10px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.doc-table td { padding: 11px 16px 11px 0; border-bottom: 1px solid rgba(255,255,255,.06); color: rgba(255,255,255,.72); vertical-align: top; }
.doc-table td:first-child { color: #fff; }
.doc-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.doc-divider { height: 1px; background: rgba(255,255,255,.08); margin: 28px 0; border: none; }
.addr { font-family: 'JetBrains Mono', monospace; font-size: .76rem; color: var(--ice); word-break: break-all; }

/* ================= PRICING (verbatim c3 system) ================= */
.c3-pricing-section { position: relative; padding: 40px 20px 80px; display: flex; flex-direction: column; align-items: center; overflow-x: hidden; }
.c3-watermark-container { position: relative; width: 100%; max-width: 1100px; text-align: center; margin-top: 40px; z-index: 2; }
.c3-watermark-main { font-size: 9rem; font-weight: 800; line-height: 0.9; letter-spacing: -0.05em; filter: url(#c3-noise); display: flex; flex-direction: column; align-items: center; }
.c3-watermark-line-1 { color: #fff; }
.c3-watermark-line-2 { background: linear-gradient(to right, #091020 0%, #0B2551 25%, #A4F4FD 65%, #00d2ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.c3-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; width: 100%; max-width: 1100px; margin-top: 60px; transform: translateX(20px); position: relative; z-index: 3; }
.c3-card { background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(0,0,0,0.4)); backdrop-filter: blur(14px) brightness(0.91); -webkit-backdrop-filter: blur(14px) brightness(0.91); border: 1px solid rgba(255,255,255,1); border-radius: 44px; padding: 50px 24px; min-height: 580px; display: flex; flex-direction: column; transition: all 0.6s cubic-bezier(.22,1,.36,1); overflow: hidden; position: relative; }
.c3-card::before { content:''; position:absolute; inset:0; border-radius:inherit; background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 50%); pointer-events:none; }
.c3-card:hover { background: rgba(15,15,15,0.6); border-color: rgba(34,211,238,0.7); transform: translateY(-12px) scale(1.01); }
.c3-card-pro { background: linear-gradient(135deg, rgba(0,0,0,0.85), rgba(0,0,0,0.55)); }
.c3-tier-small { font-size: 1.1rem; font-weight: 400; color: rgba(255,255,255,0.6); }
.c3-tier-large { font-size: 2.8rem; font-weight: 500; letter-spacing: -0.02em; color: #fff; margin-top: 8px; }
.c3-price-sub { font-size: .8rem; color: rgba(255,255,255,.4); margin-top: 4px; }
.c3-desc { font-size: 0.88rem; color: rgba(255,255,255,0.45); min-height: 3.2em; margin-top: 16px; margin-bottom: 40px; line-height: 1.5; }
.c3-list { list-style: none; padding: 0; margin: 0; }
.c3-list li { display:flex; align-items:flex-start; gap: 14px; font-size: 0.92rem; color: rgba(255,255,255,0.8); margin-bottom: 18px; line-height: 1.4; }
.c3-check { width:28px; height:28px; border-radius:50%; background: rgba(255,255,255,0.15); display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
.c3-btn { background:#fff; color:#000; padding: 10px 32px; border-radius: 100px; font-weight:600; font-size: 0.88rem; margin-top:auto; border:none; cursor:pointer; align-self:center; transition: all 0.3s cubic-bezier(.22,1,.36,1); }
.c3-btn:hover { background:#f5f5f5; transform:scale(1.02); box-shadow: 0 8px 24px rgba(255,255,255,0.15); }
.c3-toggle-wrap { display:flex; align-items:center; justify-content:flex-end; gap:12px; width:100%; max-width:1100px; margin-top:32px; padding-right:20px; }
.c3-toggle-label { font-size: .85rem; color: rgba(255,255,255,.6); }
.c3-toggle { width:52px; height:28px; background:#fff; border-radius:100px; position:relative; cursor:pointer; border:none; transition: background 0.3s cubic-bezier(.4,0,.2,1); padding:0; }
.c3-toggle-knob { width:20px; height:20px; background:#000; border-radius:50%; position:absolute; top:4px; left:4px; transition: all 0.3s cubic-bezier(.4,0,.2,1); }
.c3-toggle.active { background: rgba(255,255,255,0.2); }
.c3-toggle.active .c3-toggle-knob { transform: translateX(24px); background:#fff; }
@media (max-width:1024px) {
  .c3-watermark-main { font-size: 3.5rem; filter:none; }
  .c3-watermark-line-2 { background:none; -webkit-text-fill-color:#00d2ff; color:#00d2ff; }
  .c3-grid { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; transform:none; width:100vw; padding:0 20px; gap:16px; scrollbar-width:none; }
  .c3-card { flex: 0 0 320px; scroll-snap-align:center; }
  .c3-grid::-webkit-scrollbar { display:none; }
  .c3-toggle-wrap { justify-content:center; padding-right:0; }
}
