[data-theme="dark"], :root {
  color-scheme: dark;
  --bg: #080810;
  --surface: #10111a;
  --surface-2: #151725;
  --surface-3: #1b1d2c;
  --text: #f6f3fb;
  --muted: #9994ad;
  --border: rgba(214, 177, 255, 0.13);
  --border-strong: rgba(232, 121, 249, 0.32);
  --pink: #f34fa9;
  --pink-soft: #f472b6;
  --violet: #a855f7;
  --green: #39db9a;
  --nav-bg: rgba(8, 8, 16, 0.78);
  --shadow: rgba(0, 0, 0, 0.4);
  --max: 1240px;
  --nav-h: 72px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f3fa;
  --surface: #ffffff;
  --surface-2: #f0eaf5;
  --surface-3: #e8dff0;
  --text: #211728;
  --muted: #6f6278;
  --border: rgba(115, 57, 145, 0.14);
  --border-strong: rgba(168, 85, 247, 0.3);
  --pink: #d62f8e;
  --pink-soft: #c82c7f;
  --violet: #7c3ec8;
  --green: #12855b;
  --nav-bg: rgba(247, 243, 250, 0.86);
  --shadow: rgba(65, 32, 84, 0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { min-height: 100vh; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: 'DM Sans', system-ui, sans-serif; line-height: 1.55; transition: background .25s, color .25s; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.aurora { position: fixed; z-index: 0; pointer-events: none; border-radius: 999px; filter: blur(120px); opacity: .18; }
.aurora--violet { width: 680px; height: 680px; top: -310px; right: -180px; background: var(--violet); animation: float 18s ease-in-out infinite; }
.aurora--pink { width: 520px; height: 520px; top: 42%; left: -300px; background: var(--pink); animation: float 21s ease-in-out infinite reverse; }
.grain { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .025; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
@keyframes float { 50% { transform: translate(35px, 25px) scale(1.06); } }

.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); display: flex; align-items: center; gap: 1rem; padding: 0 clamp(1.25rem, 4vw, 3rem); border-bottom: 1px solid var(--border); background: var(--nav-bg); backdrop-filter: blur(20px); }
.brand { display: inline-flex; align-items: center; gap: .68rem; font-family: 'Manrope', sans-serif; font-weight: 700; letter-spacing: -.025em; }
.brand b { color: var(--pink-soft); }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(244, 114, 182, .35); border-radius: 11px; background: linear-gradient(145deg, rgba(168,85,247,.16), rgba(243,79,169,.12)); color: var(--pink-soft); box-shadow: 0 0 25px rgba(243,79,169,.12); }
.brand-mark svg { width: 28px; height: 28px; }
.nav-end { display: flex; align-items: center; gap: .55rem; margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: clamp(.9rem, 2vw, 1.7rem); margin-left: .5rem; color: var(--muted); font-size: .86rem; font-weight: 600; }
.nav-links a { transition: color .18s; }
.nav-links a:hover { color: var(--pink-soft); }
.nav-cta { padding: .58rem .88rem; border: 1px solid rgba(244,114,182,.3); border-radius: 9px; background: rgba(244,114,182,.08); color: var(--text) !important; }
.lang-toggle, .theme-toggle { display: grid; place-items: center; height: 36px; min-width: 36px; padding: 0 .48rem; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); cursor: pointer; }
.lang-toggle { font-size: .7rem; font-weight: 700; }
.lang-toggle:hover, .theme-toggle:hover { border-color: var(--border-strong); color: var(--pink-soft); }
html[lang="ru"] .lang-label--en { display: none; }
html[lang="en"] .lang-label--ru { display: none; }
[data-theme="dark"] .theme-icon--sun { display: none; }
[data-theme="light"] .theme-icon--moon { display: none; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 5px; border: 0; background: transparent; cursor: pointer; }
.nav-toggle span { width: 21px; height: 2px; border-radius: 2px; background: var(--text); transition: .2s; }

main, .footer { position: relative; z-index: 2; }
main { width: min(100%, var(--max)); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem) 5rem; }
.hero { min-height: calc(100vh - var(--nav-h)); display: grid; grid-template-columns: minmax(0, .86fr) minmax(560px, 1.14fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); padding: clamp(4rem, 9vw, 7rem) 0; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.25rem; padding: .4rem .72rem; border: 1px solid var(--border); border-radius: 999px; background: rgba(168,85,247,.05); color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.hero h1 { font-family: 'Manrope', sans-serif; font-size: clamp(3.2rem, 6vw, 5.9rem); line-height: .96; letter-spacing: -.065em; }
.gradient-text { background: linear-gradient(105deg, #a855f7 0%, #e85dc1 46%, #ff7ab6 100%); background-clip: text; -webkit-background-clip: text; color: transparent; }
.hero-lead { max-width: 610px; margin-top: 1.55rem; color: var(--muted); font-size: clamp(1rem, 1.7vw, 1.16rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: .6rem; min-height: 48px; padding: .82rem 1.18rem; border: 1px solid transparent; border-radius: 11px; font-weight: 700; transition: transform .18s, border-color .18s, box-shadow .18s; }
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 19px; height: 19px; }
.btn-primary { background: linear-gradient(115deg, var(--violet), var(--pink)); color: #fff; box-shadow: 0 14px 35px rgba(208,55,158,.2); }
.btn-primary:hover { box-shadow: 0 18px 42px rgba(208,55,158,.32); }
.btn-secondary { border-color: var(--border); background: var(--surface); }
.btn-secondary:hover { border-color: var(--border-strong); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 1.7rem; margin-top: 2.2rem; }
.hero-meta span { display: flex; flex-direction: column; }
.hero-meta b { font-size: .85rem; }
.hero-meta small { color: var(--muted); font-size: .68rem; }

.app-shell { overflow: hidden; border: 1px solid rgba(232,121,249,.23); border-radius: 17px; background: #0b0c13; box-shadow: 0 30px 100px rgba(0,0,0,.48), 0 0 70px rgba(168,85,247,.1); transform: perspective(1200px) rotateY(-2deg) rotateX(1deg); }
.window-bar { height: 34px; display: flex; align-items: center; gap: .45rem; padding: 0 .75rem; border-bottom: 1px solid #242532; background: #191a20; color: #aaa7b4; font-size: .63rem; }
.window-logo { color: var(--pink-soft); }
.window-actions { margin-left: auto; letter-spacing: .35rem; color: #777480; }
.app-grid { height: 430px; display: grid; grid-template-columns: 52px 170px minmax(250px, 1fr) 110px; font-size: .65rem; color: #d7d5df; }
.server-rail, .channel-rail, .members { background: #0c0d14; }
.server-rail { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding-top: .75rem; border-right: 1px solid #1e202a; }
.server-bubble { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #463048; border-radius: 11px; background: #181923; font-weight: 700; font-size: .62rem; }
.server-bubble--active { background: linear-gradient(145deg, #a855f7, #f34fa9); color: #fff; font-size: 1rem; }
.server-bubble--add { margin-top: auto; margin-bottom: .75rem; color: #59e1ab; border-color: #214d42; font-size: 1rem; }
.channel-rail { position: relative; border-right: 1px solid #1e202a; }
.server-title { height: 64px; display: flex; flex-direction: column; justify-content: center; padding: 0 .85rem; border-bottom: 1px solid #1e202a; }
.server-title small, .channel-group small, .members > small { color: #74748d; font-size: .48rem; letter-spacing: .09em; }
.server-title strong { font-size: .77rem; }
.channel-group { display: flex; flex-direction: column; gap: .32rem; padding: .75rem .62rem 0; }
.channel { display: flex; align-items: center; gap: .35rem; padding: .43rem .55rem; border-radius: 6px; color: #8e91aa; }
.channel--active { background: #211527; color: #f1eafa; }
.channel--voice { color: #f36bb2; }
.channel--voice i { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: #4ade9b; box-shadow: 0 0 7px #4ade9b; }
.member-mini { padding-left: 1.6rem; color: #777a91; }
.voice-dock { position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem; border-top: 1px solid #174235; background: #0c1717; }
.voice-dock > div:first-child { display: flex; align-items: center; gap: .45rem; color: #4ade9b; }
.voice-dock p { display: flex; flex-direction: column; }
.voice-dock small { color: #718b83; font-size: .48rem; }
.dock-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .28rem; margin-top: .5rem; }
.dock-actions span { display: grid; place-items: center; height: 25px; border-radius: 5px; background: #151f22; color: #b6bac4; }
.chat-stage { display: flex; flex-direction: column; min-width: 0; background: #101119; }
.chat-stage header { height: 64px; display: flex; align-items: center; gap: .55rem; padding: 0 1rem; border-bottom: 1px solid #22232e; }
.chat-stage header > span { color: #f34fa9; font-size: 1.15rem; }
.chat-stage header div { display: flex; flex-direction: column; }
.chat-stage header small { color: #6f7187; font-size: .48rem; }
.welcome { margin-top: auto; padding: 1rem; }
.welcome > span { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: .6rem; border-radius: 11px; background: #1c1e2b; color: #f34fa9; font-size: 1.35rem; }
.welcome h3 { font-family: 'Manrope', sans-serif; font-size: .95rem; }
.welcome p { color: #787a90; }
.message { display: flex; gap: .55rem; padding: .44rem 1rem; }
.avatar { display: grid; flex: 0 0 auto; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #8b5cf6; color: #130d1a; font-weight: 700; }
.avatar--pink { background: #f34fa9; }
.message p { line-height: 1.35; }
.message small { margin-left: .35rem; color: #64667a; font-size: .45rem; }
.composer { display: flex; align-items: center; gap: .55rem; margin: .65rem 1rem 1rem; padding: .65rem .75rem; border-radius: 8px; background: #1a1c29; color: #6d7086; }
.composer b { margin-left: auto; }
.members { padding: .9rem .65rem; border-left: 1px solid #1e202a; }
.members > div { display: flex; align-items: center; gap: .4rem; margin-top: .65rem; }
.members .avatar { width: 24px; height: 24px; }
.members p { display: flex; flex-direction: column; }
.members small { color: #4ade9b; font-size: .45rem; }

.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section-head { max-width: 720px; margin-bottom: 2rem; }
.section-tag { display: inline-block; margin-bottom: .65rem; color: var(--pink-soft); font-size: .7rem; font-weight: 800; letter-spacing: .13em; }
.section h2, .final-cta h2 { font-family: 'Manrope', sans-serif; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.08; letter-spacing: -.045em; }
.section-head p, .inside-copy > p, .download-copy > p { max-width: 650px; margin-top: .85rem; color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.feature-grid article { min-height: 210px; padding: 1.35rem; border: 1px solid var(--border); border-radius: 15px; background: linear-gradient(145deg, var(--surface), rgba(168,85,247,.025)); transition: transform .2s, border-color .2s; }
.feature-grid article:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.feature-icon { position: relative; display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 1.1rem; overflow: hidden; border: 1px solid rgba(244,114,182,.28); border-radius: 13px; background: linear-gradient(145deg, rgba(168,85,247,.15), rgba(243,79,169,.09)); color: var(--pink-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 8px 24px rgba(168,85,247,.08); }
.feature-icon::after { content: ''; position: absolute; width: 22px; height: 22px; top: -10px; right: -8px; border-radius: 50%; background: var(--pink); opacity: .2; filter: blur(9px); }
.feature-icon svg { position: relative; z-index: 1; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature-grid article:nth-child(2n) .feature-icon { border-color: rgba(168,85,247,.32); color: #c084fc; background: linear-gradient(145deg, rgba(168,85,247,.17), rgba(243,79,169,.07)); }
.feature-grid article:hover .feature-icon { border-color: rgba(244,114,182,.48); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 10px 28px rgba(216,70,170,.14); }
.feature-grid h3 { font-size: 1rem; margin-bottom: .5rem; }
.feature-grid p { color: var(--muted); font-size: .87rem; }

.section--inside { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 7vw, 7rem); }
.inside-copy ul { display: grid; gap: .72rem; margin-top: 1.6rem; list-style: none; color: var(--muted); }
.inside-copy li::before { content: '✦'; margin-right: .7rem; color: var(--pink-soft); }
.inside-stack { position: relative; min-height: 360px; }
.glass-card { position: absolute; left: 6%; right: 0; display: flex; align-items: center; gap: 1rem; min-height: 100px; padding: 1.25rem; border: 1px solid var(--border); border-radius: 15px; background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: 0 20px 45px var(--shadow); backdrop-filter: blur(14px); }
.glass-card > span { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(140deg, rgba(168,85,247,.22), rgba(243,79,169,.14)); color: var(--pink-soft); font-weight: 800; }
.glass-card p { margin-top: .22rem; color: var(--muted); font-size: .85rem; }
.glass-card--top { top: 5px; right: 12%; transform: rotate(-2deg); }
.glass-card:not(.glass-card--top):not(.glass-card--bottom) { top: 125px; left: 12%; z-index: 2; }
.glass-card--bottom { top: 245px; right: 7%; transform: rotate(2deg); }

.download-card { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: center; padding: clamp(1.7rem, 4vw, 3rem); border: 1px solid rgba(232,121,249,.28); border-radius: 22px; background: radial-gradient(circle at 85% 0%, rgba(243,79,169,.14), transparent 35%), linear-gradient(145deg, var(--surface), rgba(168,85,247,.055)); box-shadow: 0 25px 80px var(--shadow); }
.requirements { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.4rem; }
.requirements span { padding: .35rem .58rem; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .72rem; }
.download-actions { display: flex; flex-direction: column; align-items: stretch; text-align: center; }
.btn-large { min-height: 58px; font-size: 1rem; }
.download-actions small { margin-top: .7rem; color: var(--muted); font-size: .7rem; }
.web-link { margin-top: 1.1rem; color: var(--pink-soft); font-size: .85rem; font-weight: 700; }
.web-link:hover { text-decoration: underline; }

.final-cta { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin: 1rem 0 3rem; padding: 2rem 0; }
.final-cta > div > span { color: var(--pink-soft); }
.final-cta p { margin-top: .55rem; color: var(--muted); }

.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.2rem; padding: 1.6rem clamp(1.25rem, 4vw, 3rem); border-top: 1px solid var(--border); color: var(--muted); font-size: .75rem; }
.brand--small .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
.footer > div { display: flex; gap: 1.2rem; }
.footer a:hover { color: var(--pink-soft); }

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: 760px; }
  .app-shell { width: min(100%, 780px); margin: 0 auto; transform: none; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links { position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: .15rem; padding: .8rem 1.25rem 1.1rem; border-bottom: 1px solid var(--border); background: var(--nav-bg); backdrop-filter: blur(20px); transform: translateY(-130%); opacity: 0; pointer-events: none; transition: .22s; }
  .nav-links a { padding: .65rem; }
  .nav-links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero { padding-top: 3.5rem; }
  .hero h1 { font-size: clamp(2.8rem, 15vw, 4.4rem); }
  .app-grid { grid-template-columns: 44px 145px minmax(245px, 1fr); overflow: hidden; }
  .members { display: none; }
  .feature-grid, .section--inside, .download-card { grid-template-columns: 1fr; }
  .section--inside { gap: 1.5rem; }
  .final-cta { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
  .brand > span:last-child { font-size: .86rem; }
  .hero-actions .btn { width: 100%; }
  .hero-meta { gap: .8rem 1.2rem; }
  .app-shell { margin-left: -5px; width: calc(100% + 10px); }
  .app-grid { height: 390px; grid-template-columns: 42px 118px minmax(225px, 1fr); }
  .channel-rail { font-size: .56rem; }
  .chat-stage { font-size: .58rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .inside-stack { min-height: 385px; }
  .glass-card { left: 0 !important; right: 0 !important; transform: none; }
  .download-card { padding: 1.4rem; }
  .footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
