/* ───────── Public site ───────── */
.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
main { position: relative; z-index: 1; }

/* Nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, box-shadow .3s, backdrop-filter .3s; }
.nav.scrolled { background: rgba(0,0,0,.72); backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.nav-inner { height: 72px; display: flex; align-items: center; gap: 34px; }
.brand { display: flex; align-items: center; gap: 12px; font: 900 15px var(--display); letter-spacing: .12em; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font: 700 11px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--text2); transition: color .2s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; border-radius: 1px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.nav .spacer { flex: 1; }
@media (max-width: 720px) { .nav-links { display: none; } .nav-inner { gap: 16px; } }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 120px 0 80px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 22s ease-in-out infinite alternate; }
.blob.b1 { width: 620px; height: 620px; background: var(--accent); left: -8%; top: -12%; }
.blob.b2 { width: 520px; height: 520px; background: var(--violet); right: -6%; top: 20%; animation-duration: 26s; animation-delay: -6s; opacity: .45; }
.blob.b3 { width: 460px; height: 460px; background: #FF8A3D; left: 30%; bottom: -30%; animation-duration: 30s; animation-delay: -12s; opacity: .3; }
@keyframes drift { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,40px) scale(1.1); } 100% { transform: translate(-40px,70px) scale(.95); } }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px; mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%); opacity: .6; }
.spotlight { position: absolute; inset: 0; background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 40%), rgba(255,61,87,.14), transparent 60%); transition: background .1s; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 1000px) { .hero-inner { grid-template-columns: 1fr; } .mock-wrap { display: none; } }
.hero h1 { font-size: clamp(44px, 7vw, 92px); letter-spacing: -.01em; }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line span { display: inline-block; animation: rise-up 1s var(--ease) both; }
.hero h1 .line:nth-child(2) span { animation-delay: .08s; } .hero h1 .line:nth-child(3) span { animation-delay: .16s; }
@keyframes rise-up { from { transform: translateY(105%); } }
.glow-text { color: var(--accent); text-shadow: 0 0 40px var(--accent-glow); }
.hero .lead { font-size: 19px; color: var(--text2); max-width: 540px; margin: 26px 0 36px; animation: fade-up .9s .3s var(--ease) both; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; animation: fade-up .9s .4s var(--ease) both; }
.hero .meta { margin-top: 22px; display: flex; gap: 18px; flex-wrap: wrap; color: var(--text3); font-size: 13px; animation: fade-up .9s .5s var(--ease) both; }
.hero .meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero .meta svg { width: 15px; height: 15px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; padding: 7px 14px 7px 10px; border-radius: 20px;
    background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line2); color: var(--text2); animation: fade-up .8s var(--ease) both; }
.hero .eyebrow .dot { color: var(--ok); }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } }

/* App mock (illustration of the real UI) */
.mock-wrap { perspective: 1600px; animation: fade-up 1.1s .35s var(--ease) both; }
.mock { --rx: 6deg; --ry: -12deg; transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform .6s var(--ease);
    border-radius: 18px; background: #050505; box-shadow: 0 50px 120px rgba(0,0,0,.8), 0 0 0 1px var(--line2), 0 0 80px rgba(255,61,87,.12);
    display: grid; grid-template-columns: 150px 1fr; overflow: hidden; font-size: 11px; aspect-ratio: 16/10.5; }
.mock-side { padding: 38px 10px 10px; background: #000; display: grid; align-content: start; gap: 4px; }
.mock-row { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 10px; }
.mock-row.active { background: var(--l3); }
.mock-row .sq { width: 26px; height: 26px; border-radius: 7px; flex: none; }
.mock-row b { display: block; font: 900 8.5px var(--display); letter-spacing: .04em; text-transform: uppercase; }
.mock-row small { color: var(--text3); font-size: 9px; }
.mock-row .pd { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); margin-left: auto; }
.mock-main { display: grid; grid-template-rows: 46% 1fr; min-width: 0; }
.mock-hero { position: relative; padding: 16px 18px; display: flex; flex-direction: column; justify-content: flex-end; }
.mock-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, #050505); }
.mock-hero > * { position: relative; }
.mock-hero .pill { height: 18px; font-size: 7px; padding: 0 8px; width: max-content; margin-bottom: 8px; }
.mock-hero h4 { font: 900 22px var(--display); margin: 0 0 10px; }
.mock-hero .mbtn { width: 110px; height: 26px; border-radius: 7px; background: var(--accent); box-shadow: 0 0 20px var(--accent-glow); font: 700 7.5px var(--display); letter-spacing: .08em; display: grid; place-items: center; }
.mock-cards { padding: 10px 14px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.mock-card { background: var(--l1); border-radius: 10px; padding: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.mock-card .kc { height: 18px; min-width: 18px; font-size: 8.5px; padding: 0 6px; border-radius: 5px; }
.mock-card .keys { gap: 3px; }
.mock-card b { display: block; margin-top: 10px; font-size: 10px; }
.mock-card small { color: var(--text3); font-size: 8.5px; }
.float-key { position: absolute; z-index: 2; pointer-events: none; animation: bob 5s ease-in-out infinite; }
.float-key .kc { height: 46px; min-width: 46px; font-size: 15px; border-radius: 11px; box-shadow: inset 0 -3px 0 rgba(255,255,255,.08), 0 20px 40px rgba(0,0,0,.6), 0 0 0 1px var(--line2); }
.float-key.accent .kc { background: var(--accent); box-shadow: 0 0 30px var(--accent-glow), inset 0 -3px 0 rgba(0,0,0,.2); }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(var(--r, -6deg)); } 50% { transform: translateY(-14px) rotate(var(--r, -6deg)); } }

/* Marquee */
.marquee { position: relative; overflow: hidden; padding: 22px 0; border-block: 1px solid var(--line); background: rgba(255,255,255,.012);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 38px; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: flex; align-items: center; gap: 10px; color: var(--text2); white-space: nowrap; font-size: 14px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Sections */
.section { padding: 120px 0; position: relative; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 44px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(30px, 4.2vw, 52px); }
.section-head p { color: var(--text2); max-width: 460px; margin: 14px 0 0; }
.section-head .eyebrow { display: block; margin-bottom: 16px; color: var(--accent); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 22px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.stat { background: #030303; padding: 38px 32px; }
.stat .num { font: 900 clamp(38px, 5vw, 62px)/1 var(--display); font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff, rgba(255,255,255,.55)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .cap { margin-top: 12px; color: var(--text2); }
@media (max-width: 720px) { .stats { grid-template-columns: 1fr; } }

/* Feature bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.feature { --x: 50%; --y: 50%; grid-column: span 2; position: relative; padding: 30px; border-radius: 22px; background: var(--l1); overflow: hidden; min-height: 240px;
    box-shadow: inset 0 0 0 1px var(--line); transition: transform .4s var(--ease), box-shadow .4s; }
.feature::before { content: ""; position: absolute; inset: 0; background: radial-gradient(420px circle at var(--x) var(--y), rgba(255,61,87,.13), transparent 50%); opacity: 0; transition: opacity .3s; }
.feature:hover::before { opacity: 1; }
.feature:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(255,61,87,.35), 0 30px 60px rgba(0,0,0,.4); }
.feature.wide { grid-column: span 3; } .feature.xl { grid-column: span 4; }
.feature .ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 26px; box-shadow: 0 0 30px rgba(255,61,87,.15); }
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: 18px; margin-bottom: 12px; }
.feature p { color: var(--text2); margin: 0; max-width: 420px; }
.feature .demo { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.feature .demo .out { color: var(--text2); font-size: 13px; }
@media (max-width: 980px) { .feature, .feature.wide, .feature.xl { grid-column: span 3; } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; } .feature, .feature.wide, .feature.xl { grid-column: auto; } }

/* Profile cards */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.pcard { --pc: var(--accent); display: flex; flex-direction: column; border-radius: 20px; background: var(--l1); overflow: hidden;
    box-shadow: inset 0 0 0 1px var(--line); transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.pcard:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pc) 55%, transparent), 0 30px 70px rgba(0,0,0,.55), 0 0 60px color-mix(in srgb, var(--pc) 18%, transparent); }
.pcard .cover { aspect-ratio: 16/9.5; }
.pcard .cover-inner { position: absolute; inset: 0; transition: transform .8s var(--ease); background: inherit; }
.pcard .cover > .cover-img { transition: transform .8s var(--ease); }
.pcard:hover .cover-inner, .pcard:hover .cover > .cover-img { transform: scale(1.07); }
.pcard .cover .tags { position: absolute; left: 14px; top: 14px; right: 14px; display: flex; gap: 6px; z-index: 2; }
.pcard .cover .title { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 2; font: 900 20px/1.1 var(--display); text-transform: uppercase;
    text-shadow: 0 4px 24px rgba(0,0,0,.6); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pcard .cover::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,.1) 30%, rgba(0,0,0,.75)); }
.pcard .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard .desc { color: var(--text2); font-size: 14px; margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.9em; }
.pcard .foot { margin-top: auto; display: flex; align-items: center; gap: 14px; color: var(--text3); font-size: 13px; }
.pcard .foot span { display: inline-flex; align-items: center; gap: 6px; }
.pcard .foot svg { width: 15px; height: 15px; }
.author { display: flex; align-items: center; gap: 9px; color: var(--text2); font-size: 13px; min-width: 0; }
.avatar { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
    font: 900 10px var(--display); }
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { padding: 30px; border-radius: 22px; background: var(--l1); box-shadow: inset 0 0 0 1px var(--line); position: relative; overflow: hidden; }
.step::before { counter-increment: s; content: "0" counter(s); position: absolute; right: 18px; top: 4px; font: 900 96px var(--display); color: rgba(255,255,255,.035); }
.step h3 { font-size: 16px; margin: 18px 0 10px; }
.step p { color: var(--text2); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* CTA */
.cta { position: relative; border-radius: 30px; overflow: hidden; padding: 80px 40px; text-align: center; background: #070707; box-shadow: inset 0 0 0 1px var(--line2); }
.cta::before { content: ""; position: absolute; width: 700px; height: 400px; left: 50%; top: 100%; transform: translate(-50%,-50%); background: var(--accent); filter: blur(120px); opacity: .45; }
.cta > * { position: relative; }
.cta h2 { font-size: clamp(32px, 5vw, 64px); }
.cta p { color: var(--text2); margin: 18px auto 34px; max-width: 520px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 44px 0 60px; margin-top: 80px; color: var(--text3); font-size: 13px; }
.footer .row { justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer a:hover { color: #fff; }

/* Catalog */
.page-head { padding: 140px 0 40px; position: relative; }
.page-head::before { content: ""; position: absolute; width: 800px; height: 500px; left: -200px; top: -250px; background: var(--accent); filter: blur(140px); opacity: .22; z-index: -1; }
.page-head h1 { font-size: clamp(38px, 6vw, 76px); }
.page-head p { color: var(--text2); margin: 16px 0 0; font-size: 17px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 34px 0 30px; }
.search { position: relative; flex: 1; min-width: 260px; max-width: 520px; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text3); pointer-events: none; }
.search input { height: 54px; padding-left: 48px; border-radius: 15px; font-size: 15px; background: rgba(255,255,255,.03); }
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--l1); box-shadow: inset 0 0 0 1px var(--line); }
.seg a { height: 44px; padding: 0 18px; display: grid; place-items: center; border-radius: 11px; color: var(--text2); font: 700 10.5px var(--display); letter-spacing: .08em; text-transform: uppercase; transition: color .2s, background .2s; }
.seg a:hover { color: #fff; }
.seg a.on { background: #fff; color: #000; }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 44px; }
.pager a { min-width: 44px; height: 44px; padding: 0 14px; display: grid; place-items: center; border-radius: 12px; background: var(--l1); color: var(--text2); box-shadow: inset 0 0 0 1px var(--line); }
.pager a.on { background: #fff; color: #000; }
.pager a:hover:not(.on) { color: #fff; }
.empty { text-align: center; padding: 90px 20px; color: var(--text2); }
.empty .big { font: 900 28px var(--display); color: #fff; text-transform: uppercase; margin-bottom: 10px; }

/* Profile page */
.p-hero { position: relative; min-height: 460px; display: flex; align-items: flex-end; padding: 140px 0 44px; }
.p-hero .cover { position: absolute; inset: 0; z-index: -1; }
.p-hero .cover::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.35) 45%, #000 100%), linear-gradient(90deg, rgba(0,0,0,.6), transparent 70%); }
.p-hero h1 { font-size: clamp(38px, 6.5vw, 84px); text-shadow: 0 8px 40px rgba(0,0,0,.5); animation: fade-up .8s var(--ease) both; }
.p-hero .back { display: inline-flex; align-items: center; gap: 8px; color: var(--text2); font-size: 14px; margin-bottom: 26px; }
.p-hero .back:hover { color: #fff; }
.p-hero .back svg { width: 16px; height: 16px; }
.p-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 20px; animation: fade-up .8s .1s var(--ease) both; }
.p-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
@media (max-width: 980px) { .p-layout { grid-template-columns: 1fr; } .p-side { order: -1; } }
.p-side { position: sticky; top: 96px; }
.get { padding: 26px; border-radius: 22px; background: var(--l1); box-shadow: inset 0 0 0 1px var(--line2), 0 30px 80px rgba(0,0,0,.5); position: relative; overflow: hidden; }
.get::before { content: ""; position: absolute; width: 300px; height: 200px; right: -100px; top: -120px; background: var(--pc, var(--accent)); filter: blur(80px); opacity: .35; }
.get > * { position: relative; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 16px 20px; border-radius: 16px; background: #000; box-shadow: inset 0 0 0 1px var(--line2); margin: 12px 0 16px; }
.code-box .code { font: 900 28px var(--display); letter-spacing: .1em; color: var(--accent); text-shadow: 0 0 24px var(--accent-glow); }
.get .btn { width: 100%; }
.get .btn + .btn { margin-top: 10px; }
.get .hint { margin-top: 16px; font-size: 13px; color: var(--text3); }
.get .hint.show { color: var(--warn); }
.kinds { display: flex; gap: 8px; flex-wrap: wrap; }
.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; margin-top: 18px; }
.rule { padding: 18px; border-radius: 16px; background: var(--l1); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 14px;
    transition: transform .3s var(--ease), box-shadow .3s; }
.rule:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(255,61,87,.35); }
.rule.off { opacity: .5; }
.rule .name { font-weight: 600; }
.rule .what { color: var(--text2); font-size: 13px; display: grid; gap: 4px; }
.rule .what b { color: var(--text3); font-weight: 400; }
.rule .ctx { font-size: 12px; color: var(--text3); display: flex; align-items: center; gap: 6px; }
.rule .ctx svg { width: 13px; height: 13px; }
.block { margin-top: 44px; }
.block h2 { font-size: 20px; margin-bottom: 8px; }
.prose { color: var(--text2); font-size: 16px; white-space: pre-line; margin: 14px 0 0; }

/* Centered auth / status cards */
.center-page { min-height: 100svh; display: grid; place-items: center; padding: 110px 20px 60px; position: relative; }
.center-page::before { content: ""; position: absolute; width: 600px; height: 400px; left: 50%; top: 30%; transform: translate(-50%,-50%); background: var(--accent); filter: blur(150px); opacity: .18; z-index: -1; }
.panel { width: min(460px, 100%); padding: 38px; border-radius: 24px; background: var(--l1); box-shadow: inset 0 0 0 1px var(--line2), 0 40px 100px rgba(0,0,0,.6); animation: fade-up .6s var(--ease) both; }
.panel h1 { font-size: 24px; margin: 22px 0 10px; }
.panel p { color: var(--text2); margin: 0 0 22px; }
.panel .btn { width: 100%; margin-top: 22px; }
.panel .error { color: var(--danger); font-size: 14px; margin-top: 14px; }
.big-status { font: 900 clamp(90px, 18vw, 180px)/1 var(--display); background: linear-gradient(180deg, #fff, rgba(255,255,255,.15)); -webkit-background-clip: text; background-clip: text; color: transparent; }
