/* Base theme inspired by max.ru gradients but tailored to Xipher */
:root {
    --bg: #05060a;
    --bg-alt: #0c0f18;
    --card: rgba(255, 255, 255, 0.04);
    --card-strong: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --text: #f7f9ff;
    --text-muted: #b8c2d6;
    --accent-1: #7c4dff;
    --accent-2: #22d3ee;
    --accent-3: #f472b6;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 12px;
    --glass: backdrop-filter: blur(18px);
    --gradient: linear-gradient(120deg, #7c4dff 0%, #5b7bff 40%, #22d3ee 100%);
    --gradient-soft: radial-gradient(circle at 20% 20%, rgba(124, 77, 255, 0.35), transparent 40%),
                     radial-gradient(circle at 80% 50%, rgba(34, 211, 238, 0.28), transparent 45%),
                     radial-gradient(circle at 40% 80%, rgba(244, 114, 182, 0.25), transparent 40%);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.page-bg {
    position: fixed;
    inset: 0;
    background: var(--gradient-soft);
    z-index: 0;
    filter: blur(32px) saturate(130%);
    opacity: 0.9;
}

.container {
    width: min(1200px, 94vw);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: linear-gradient(180deg, rgba(5,6,10,0.9) 0%, rgba(5,6,10,0.6) 80%);
    border-bottom: 1px solid var(--border);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.brand { display: inline-flex; gap: 10px; align-items: center; }

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--gradient);
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #0c0f18;
    box-shadow: var(--shadow);
}

.brand-text { display: flex; flex-direction: column; gap: 2px; }

.brand-title { font-weight: 800; letter-spacing: -0.4px; }

.brand-tag {
    font-size: 12px;
    color: var(--text-muted);
    padding: 3px 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
    font-weight: 600;
}

.nav-links a { color: var(--text-muted); transition: color 0.2s ease, opacity 0.2s; }
.nav-links a:hover { color: var(--text); opacity: 1; }

.nav-link-ghost {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
    font-size: 15px;
}

.btn-primary {
    background: var(--gradient);
    color: #05060a;
    box-shadow: 0 10px 30px rgba(124, 77, 255, 0.45);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 40px rgba(124,77,255,0.55); }

.btn-ghost {
    background: rgba(255,255,255,0.03);
    color: var(--text);
    border-color: var(--border);
}

.btn-ghost:hover { background: rgba(255,255,255,0.06); transform: translateY(-1px); }

.btn.small { padding: 9px 12px; font-weight: 600; border-radius: 10px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.06);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}

/* Hero */
.hero {
    position: relative;
    padding: 80px 0 40px;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 48px;
    align-items: center;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 54px);
    line-height: 1.1;
    margin: 12px 0 16px;
    max-width: 640px;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 20px;
    max-width: 620px;
}

.eyebrow {
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 12px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0 18px; }
.download-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--text-muted); font-weight: 600; }
.download-label { color: var(--text); font-weight: 700; }

.trust { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-weight: 600;
}

.hero-visual { position: relative; min-height: 460px; }
.glass {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.phone-card {
    position: relative;
    padding: 20px;
    max-width: 440px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
}

.status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    color: var(--text);
    padding: 10px;
    border-radius: var(--radius-md);
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--border);
    gap: 14px;
}

.status-actions { display: flex; gap: 10px; color: var(--text-muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.online { background: #10b981; box-shadow: 0 0 12px rgba(16,185,129,0.8); }

.chat-preview { margin: 18px 0; display: flex; flex-direction: column; gap: 12px; }
.bubble {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
}

.bubble.outgoing { grid-template-columns: 1fr auto; text-align: right; }
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gradient);
}

.avatar.self { background: linear-gradient(120deg, #22d3ee, #7c4dff); }

.bubble .name { font-weight: 700; display: block; }
.bubble p { margin: 4px 0 0; color: var(--text-muted); }

.cta-tile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(124,77,255,0.06);
    border: 1px solid rgba(124,77,255,0.25);
}

.mini-title { font-weight: 700; color: var(--text); }

.floating-card {
    position: absolute;
    padding: 16px;
    width: 240px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(5,6,10,0.82);
    box-shadow: var(--shadow);
}

.floating-card.gradient { background: linear-gradient(160deg, rgba(124,77,255,0.35), rgba(34,211,238,0.3)); }
.mini-label { color: var(--text-muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    font-weight: 700;
    color: var(--text);
    font-size: 13px;
}

.price-row { display: flex; align-items: center; justify-content: space-between; font-weight: 700; }

/* Sections */
.section { padding: 70px 0; position: relative; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.section-sub { color: var(--text-muted); max-width: 720px; margin-top: 8px; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.feature {
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(124,77,255,0.18);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.feature h3 { margin: 4px 0 6px; }
.feature p { color: var(--text-muted); margin: 0; }

.split { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.04)); }
.split-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }

.panel { padding: 22px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: rgba(255,255,255,0.04); box-shadow: var(--shadow); }
.panel.accent { background: linear-gradient(160deg, rgba(124,77,255,0.18), rgba(5,6,10,0.9)); }
.panel-head h3 { margin: 8px 0 6px; }
.panel-head p { color: var(--text-muted); margin: 0 0 10px; }

.panel-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 12px; color: var(--text-muted); }
.panel-list li { display: flex; gap: 8px; align-items: flex-start; }
.panel-list i { color: var(--accent-2); margin-top: 2px; }
.panel-list.tight { gap: 10px; }

.panel-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.demo-card { display: grid; gap: 12px; margin-top: 12px; }
.demo-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.05);
    align-items: center;
}
.demo-row.shop { grid-template-columns: 1fr auto; }
.demo-text strong { display: block; }
.demo-text p { margin: 4px 0 0; color: var(--text-muted); }
.progress { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.08); margin-top: 8px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--gradient); border-radius: 999px; }

/* Automation */
.automation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 18px; }
.automation-card { padding: 18px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: rgba(255,255,255,0.04); }
.card-head h3 { margin: 6px 0 8px; }
.card-text { color: var(--text-muted); margin: 10px 0 0; }

.nodes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.node {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px dashed var(--border);
    background: rgba(255,255,255,0.05);
    font-weight: 700;
}

.integrations { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* Download CTA */
.download { padding-bottom: 90px; }
.download-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    align-items: center;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.05);
}

.download-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.download-buttons .btn { flex: 1 1 200px; justify-content: center; }

.download-visual { position: relative; min-height: 200px; display: grid; place-items: center; }
.logo-orb {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--gradient);
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 40px;
    color: #05060a;
    box-shadow: 0 18px 50px rgba(124,77,255,0.35);
}

.orbit {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    animation: spin 12s linear infinite;
}

/* Footer */
.footer { border-top: 1px solid var(--border); background: rgba(5,6,10,0.9); padding: 24px 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.footer-links { display: grid; gap: 8px; color: var(--text-muted); }
.muted { color: var(--text-muted); margin-top: 8px; }

/* Rotating words */
.rotating-word {
    display: inline-flex;
    position: relative;
    width: 180px;
    vertical-align: text-bottom;
    overflow: hidden;
}

.rotating-word span {
    position: absolute;
    left: 0;
    width: 100%;
    animation: rotateWords 12s linear infinite;
    opacity: 0;
}

.rotating-word span:nth-child(1) { animation-delay: 0s; }
.rotating-word span:nth-child(2) { animation-delay: 3s; }
.rotating-word span:nth-child(3) { animation-delay: 6s; }
.rotating-word span:nth-child(4) { animation-delay: 9s; }

@keyframes rotateWords {
    0% { opacity: 0; transform: translateY(100%); }
    10% { opacity: 1; transform: translateY(0); }
    25% { opacity: 1; transform: translateY(0); }
    35% { opacity: 0; transform: translateY(-80%); }
    100% { opacity: 0; }
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 960px) {
    .nav-links { display: none; position: absolute; inset: 66px 16px auto 16px; background: rgba(5,6,10,0.95); padding: 14px; border-radius: var(--radius-md); flex-direction: column; }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .hero { padding-top: 50px; }
}

@media (max-width: 640px) {
    .brand-mark { width: 38px; height: 38px; }
    .phone-card { max-width: 100%; }
    .floating-card { display: none; }
    .download-buttons .btn { flex: 1 1 100%; }
    .section { padding: 60px 0; }
    .hero h1 { width: 100%; }
}
