/* ---------- Reset & base ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #07070c;
    color: #e6e8ef;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    background: rgba(0, 255, 204, 0.08);
    color: #00ffcc;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    border: 1px solid rgba(0, 255, 204, 0.15);
}

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

/* ---------- Background ---------- */
.bg-gradient {
    position: fixed;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(0, 204, 255, 0.18), transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.16), transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(0, 255, 204, 0.14), transparent 50%),
        linear-gradient(180deg, #07070c 0%, #0a0a14 100%);
    animation: bg-shift 18s ease-in-out infinite alternate;
}

@keyframes bg-shift {
    0%   { background-position: 0% 0%, 100% 0%, 50% 100%, 0 0; }
    100% { background-position: 10% 10%, 90% 15%, 55% 95%, 0 0; }
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

.bg-orbs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    will-change: transform;
}
.orb-1 { width: 420px; height: 420px; top: -120px; left: -80px; background: #00ccff; animation: float 14s ease-in-out infinite; }
.orb-2 { width: 520px; height: 520px; top: 40%;    right: -140px; background: #a855f7; animation: float 17s ease-in-out infinite reverse; }
.orb-3 { width: 380px; height: 380px; bottom: -100px; left: 30%;  background: #00ffcc; animation: float 20s ease-in-out infinite; }

@keyframes float {
    0%,100% { transform: translate(0,0) scale(1); }
    50%     { transform: translate(40px,-30px) scale(1.08); }
}

/* ---------- Navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 48px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: rgba(7, 7, 12, 0.55);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    animation: slide-down 0.8s ease-out;
}

@keyframes slide-down {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}
.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    background: linear-gradient(135deg, #00ffcc, #00ccff);
    color: #07070c;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: 0 0 24px rgba(0, 255, 204, 0.4);
    animation: spin-slow 12s linear infinite;
}
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.brand-accent { color: #00ffcc; }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
    font-size: 0.9rem;
    color: #b4b9c9;
    position: relative;
    transition: color 0.25s ease;
}
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -4px;
    width: 0; height: 2px;
    background: linear-gradient(90deg, #00ffcc, #00ccff);
    transition: width 0.3s ease;
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }

/* ---------- Hero ---------- */
.hero {
    max-width: 1040px;
    margin: 0 auto;
    padding: 120px 32px 80px;
    text-align: center;
    animation: fade-up 1s ease-out;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border: 1px solid rgba(0, 255, 204, 0.25);
    border-radius: 999px;
    font-size: 0.82rem;
    color: #b4b9c9;
    background: rgba(0, 255, 204, 0.05);
    margin-bottom: 28px;
    backdrop-filter: blur(10px);
}
.pulse-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #00ffcc;
    box-shadow: 0 0 0 0 rgba(0, 255, 204, 0.7);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0   rgba(0, 255, 204, 0.7); }
    70%  { box-shadow: 0 0 0 12px rgba(0, 255, 204, 0); }
    100% { box-shadow: 0 0 0 0   rgba(0, 255, 204, 0); }
}

.hero-title {
    font-size: clamp(2.6rem, 6vw, 4.8rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin: 0 0 22px;
}
.gradient-text {
    background: linear-gradient(120deg, #00ffcc 0%, #00ccff 40%, #a855f7 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-shift 6s ease-in-out infinite;
}
@keyframes gradient-shift {
    0%,100% { background-position: 0% 50%; }
    50%     { background-position: 100% 50%; }
}

.hero-sub {
    font-size: 1.15rem;
    color: #a4aac0;
    max-width: 640px;
    margin: 0 auto 36px;
}

.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    cursor: pointer;
    border: 1px solid transparent;
}
.btn-primary {
    background: linear-gradient(135deg, #00ffcc, #00ccff);
    color: #07070c;
    box-shadow: 0 10px 30px -10px rgba(0, 255, 204, 0.5);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -10px rgba(0, 255, 204, 0.65); }
.btn-ghost {
    background: rgba(255,255,255,0.04);
    color: #e6e8ef;
    border-color: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); }

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 52px;
    flex-wrap: wrap;
}
.stat-num {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(120deg, #00ffcc, #00ccff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat-label {
    font-size: 0.8rem;
    color: #7e8498;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* ---------- Sections ---------- */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 32px;
}
.section-head { text-align: center; margin-bottom: 56px; }
.section-kicker {
    font-family: 'JetBrains Mono', monospace;
    color: #00ffcc;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}
.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}
.section-sub {
    color: #a4aac0;
    max-width: 580px;
    margin: 0 auto;
}

/* ---------- Card grid ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.card {
    position: relative;
    padding: 32px 28px 28px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(.2,.8,.2,1), border-color 0.3s ease;
    opacity: 0;
    transform: translateY(24px);
    animation: card-in 0.7s cubic-bezier(.2,.8,.2,1) forwards;
    animation-delay: calc(var(--i, 1) * 80ms);
    backdrop-filter: blur(12px);
}
@keyframes card-in { to { opacity: 1; transform: translateY(0); } }

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(0,255,204,0.4), transparent 40%, rgba(168,85,247,0.4));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.card:hover { transform: translateY(-6px); }
.card:hover::before { opacity: 1; }

.card-glow {
    position: absolute;
    top: -60%; left: -60%;
    width: 220%; height: 220%;
    background: radial-gradient(circle, rgba(0, 255, 204, 0.12), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.card:hover .card-glow { opacity: 1; }

.card-icon {
    font-size: 2rem;
    margin-bottom: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px; height: 54px;
    border-radius: 12px;
    background: rgba(0, 255, 204, 0.08);
    border: 1px solid rgba(0, 255, 204, 0.18);
    transition: transform 0.4s ease;
}
.card:hover .card-icon { transform: rotate(-5deg) scale(1.05); }

.card-tag {
    position: absolute;
    top: 22px; right: 22px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #7e8498;
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}
.card-desc {
    color: #a4aac0;
    font-size: 0.93rem;
    margin: 0 0 22px;
    min-height: 46px;
}
.card-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: #00ffcc;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.arrow { transition: transform 0.3s ease; display: inline-block; }
.card:hover .arrow { transform: translateX(5px); }

/* ---------- About ---------- */
.about-wrap { display: flex; justify-content: center; }
.about-card {
    max-width: 780px;
    padding: 44px 40px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
}
.about-card p { color: #b4b9c9; margin: 12px 0; }
.about-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* ---------- Footer ---------- */
.footer {
    margin-top: 80px;
    padding: 40px 32px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(7,7,12,0.4);
    backdrop-filter: blur(8px);
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    color: #8a90a4;
    font-size: 0.88rem;
}
.footer-meta { display: flex; gap: 10px; }
.footer-meta a { color: #00ffcc; }
.footer-meta a:hover { text-decoration: underline; }

/* ---------- Page template (subpages) ---------- */
.page-hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 32px 40px;
    text-align: center;
    animation: fade-up 0.8s ease-out;
}
.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 14px 0 16px;
}
.page-hero p { color: #a4aac0; max-width: 640px; margin: 0 auto; font-size: 1.05rem; }

.breadcrumb {
    display: inline-flex;
    gap: 8px;
    font-size: 0.82rem;
    color: #7e8498;
    font-family: 'JetBrains Mono', monospace;
}
.breadcrumb a { color: #00ffcc; }
.breadcrumb a:hover { text-decoration: underline; }

.placeholder {
    max-width: 900px;
    margin: 20px auto 80px;
    padding: 0 32px;
}
.placeholder-box {
    border: 1px dashed rgba(255,255,255,0.14);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    background: rgba(255,255,255,0.02);
    color: #8a90a4;
}
.placeholder-box strong { color: #e6e8ef; display: block; margin-bottom: 8px; font-size: 1.1rem; }

.subnav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 16px 0 40px;
}
.subnav a {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #b4b9c9;
    transition: all 0.25s ease;
}
.subnav a:hover { background: rgba(0,255,204,0.08); border-color: rgba(0,255,204,0.3); color: #fff; }

/* ---------- Telegram embed (rookies page) ---------- */
.tg-wrap {
    max-width: 900px;
    margin: 0 auto 80px;
    padding: 0 32px;
}
.tg-frame {
    width: 100%;
    height: 620px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: #17212b;
    overflow: hidden;
}
.tg-frame iframe { width: 100%; height: 100%; border: 0; }
.tg-note {
    color: #8a90a4;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
    .navbar { padding: 14px 20px; }
    .nav-links { gap: 18px; }
    .nav-links a:nth-child(1) { display: none; }
    .hero { padding: 80px 20px 60px; }
    .hero-stats { gap: 36px; }
    .section { padding: 60px 20px; }
    .about-card { padding: 32px 24px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
