/* ============================================================
   Proxymus — Single-Viewport Maintenance Page
   ============================================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary:    #07080f;
    --text-primary:  #e8eaf6;
    --text-secondary:#8a8fb5;
    --text-muted:    #4a4f73;
    --cyan:          #00f0ff;
    --purple:        #8b5cf6;
    --amber:         #f59e0b;
    --grad-accent:   linear-gradient(135deg, var(--cyan), var(--purple));
    --glass-bg:      rgba(14, 17, 40, 0.5);
    --glass-border:  rgba(255,255,255,0.07);
    --glass-blur:    18px;
    --radius:        16px;
    --radius-sm:     10px;
    --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

html, body {
    height: 100%;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
}

@media (max-width: 768px) {
    html, body {
        overflow: auto;
        overflow-x: hidden;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

.accent { color: var(--cyan); }

.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: var(--radius);
}

/* ============================================================
   BACKGROUND LAYERS
   ============================================================ */
#networkCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
}

.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,240,255,0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    will-change: transform;
}

/* Globe — inline after countdown */
.globe {
    position: relative;
    width: clamp(120px, 22vh, 220px);
    height: clamp(120px, 22vh, 220px);
    margin-top: clamp(14px, 2.5vh, 28px);
    flex-shrink: 0;
    animation: fadeIn 1s 0.3s var(--ease-out) both;
}
#globeCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}
.globe__glow {
    position: absolute;
    inset: -30%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,240,255,0.1) 0%, rgba(139,92,246,0.06) 40%, transparent 70%);
    filter: blur(30px);
    pointer-events: none;
    z-index: -1;
}

/* ============================================================
   PAGE — FLEX COLUMN, FULL VIEWPORT, CENTERED
   ============================================================ */
.page {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 0 clamp(20px, 5vw, 64px);
}

@media (max-width: 768px) {
    .page {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        padding-bottom: 0;
    }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(12px, 1.8vh, 20px) 0;
    flex-shrink: 0;
}
.nav__logo {
    display: flex;
    align-items: center;
}
.nav__logo-icon {
    height: 28px;
    width: auto;
}
.nav__right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.nav__status {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.nav__status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 8px var(--amber);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--amber); }
    50%      { opacity: 0.35; box-shadow: 0 0 2px var(--amber); }
}

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.lang-switch {
    display: flex;
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.lang-switch__btn {
    padding: 5px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    transition: all 0.3s var(--ease-out);
    position: relative;
}
.lang-switch__btn:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: var(--glass-border);
}
.lang-switch__btn:hover { color: var(--text-secondary); }
.lang-switch__btn.active {
    color: var(--cyan);
    background: rgba(0,240,255,0.08);
    text-shadow: 0 0 12px rgba(0,240,255,0.3);
}

/* ============================================================
   HERO — centered, takes available space
   ============================================================ */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: fadeInUp 0.7s var(--ease-out) both;
    min-height: 0;
}
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 100px;
    background: rgba(245,158,11,0.06);
    border: 1px solid rgba(245,158,11,0.18);
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.6rem, 1.2vw, 0.72rem);
    font-weight: 500;
    color: var(--amber);
    letter-spacing: 0.04em;
    margin-bottom: clamp(12px, 2vh, 24px);
}
.hero__badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--amber);
    animation: pulse 2s ease-in-out infinite;
}
.hero__title {
    font-size: clamp(1.8rem, 5vw, 3.6rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: clamp(10px, 1.5vh, 20px);
    max-width: 800px;
}
.hero__title-gradient {
    background: var(--grad-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero__subtitle {
    font-size: clamp(0.85rem, 1.5vw, 1.05rem);
    color: var(--text-secondary);
    max-width: 620px;
    line-height: 1.65;
    margin-bottom: clamp(16px, 3vh, 36px);
}

/* ============================================================
   COUNTDOWN — centered
   ============================================================ */
.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 1vw, 10px);
    animation: fadeInUp 0.7s 0.15s var(--ease-out) both;
}
.countdown__block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: clamp(56px, 8vw, 80px);
    padding: clamp(10px, 1.5vh, 16px) clamp(8px, 1.2vw, 16px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.countdown__number {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    font-weight: 700;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.countdown__label {
    font-size: clamp(0.52rem, 0.8vw, 0.62rem);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-top: 5px;
}
.countdown__sep {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--text-muted);
    padding-bottom: 16px;
    animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   INFO CARDS — full-width row
   ============================================================ */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(10px, 1.5vw, 18px);
    padding: clamp(10px, 1.5vh, 20px) 0;
    flex-shrink: 0;
    animation: fadeInUp 0.7s 0.25s var(--ease-out) both;
}
.card {
    display: flex;
    align-items: flex-start;
    gap: clamp(10px, 1.2vw, 16px);
    padding: clamp(16px, 2.2vh, 24px) clamp(16px, 2vw, 24px);
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
    position: relative;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,240,255,0.06), 0 0 0 1px rgba(0,240,255,0.1);
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,240,255,0.25), transparent);
    opacity: 0;
    transition: opacity 0.35s;
}
.card:hover::before { opacity: 1; }

.card__icon {
    width: clamp(32px, 3.5vw, 40px);
    height: clamp(32px, 3.5vw, 40px);
    flex-shrink: 0;
}
.card__icon svg { width: 100%; height: 100%; }

.card__title {
    font-size: clamp(0.85rem, 1.3vw, 1.05rem);
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.card__text {
    font-size: clamp(0.75rem, 1.1vw, 0.88rem);
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ============================================================
   TELEGRAM CTA — centered
   ============================================================ */
.cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: clamp(10px, 1.8vh, 20px) 0;
    flex-shrink: 0;
    animation: fadeInUp 0.7s 0.35s var(--ease-out) both;
}
.cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: clamp(12px, 1.8vh, 16px) clamp(22px, 3vw, 32px);
    background: var(--grad-accent);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: clamp(0.85rem, 1.2vw, 0.95rem);
    color: var(--bg-primary);
    white-space: nowrap;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}
.cta__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,240,255,0.25);
}
.cta__btn:active { transform: translateY(0); }
.cta__btn-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s var(--ease-out);
}
.cta__btn:hover .cta__btn-arrow { transform: translateX(3px); }
.cta__handle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================================
   FOOTER — bottom
   ============================================================ */
.footer {
    padding: clamp(10px, 1.5vh, 16px) 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
    text-align: center;
    animation: fadeIn 0.7s 0.5s var(--ease-out) both;
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .hero {
        flex: none;
        padding-top: clamp(8px, 2vh, 20px);
        padding-bottom: clamp(8px, 2vh, 16px);
    }
    .hero__badge {
        margin-bottom: 12px;
    }
    .hero__title {
        font-size: clamp(1.5rem, 6.5vw, 2.2rem);
        margin-bottom: 10px;
    }
    .hero__subtitle {
        font-size: clamp(0.8rem, 3.5vw, 0.95rem);
        margin-bottom: 16px;
    }
    .globe {
        width: clamp(90px, 25vw, 140px);
        height: clamp(90px, 25vw, 140px);
        margin-top: 12px;
    }
    .cards {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .card {
        padding: 14px 16px;
    }
    .nav__status span:not(.nav__status-dot) {
        display: none;
    }
    .cta {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: clamp(1.3rem, 6.5vw, 1.8rem);
    }
    .hero__subtitle {
        font-size: 0.82rem;
        line-height: 1.5;
    }
    .countdown__block {
        min-width: 48px;
        padding: 10px 8px;
    }
    .countdown__number {
        font-size: 1.15rem;
    }
    .countdown__label {
        font-size: 0.5rem;
    }
    .countdown__sep {
        font-size: 0.9rem;
        padding-bottom: 12px;
    }
    .globe {
        width: 100px;
        height: 100px;
        margin-top: 10px;
    }
    .card {
        padding: 12px 14px;
        gap: 10px;
    }
    .card__icon {
        width: 30px;
        height: 30px;
    }
    .card__title {
        font-size: 0.85rem;
    }
    .card__text {
        font-size: 0.78rem;
    }
    .cta__btn {
        padding: 12px 24px;
        font-size: 0.88rem;
        width: 100%;
        justify-content: center;
    }
    .cta__handle {
        font-size: 0.7rem;
    }
    .footer {
        padding: 10px 0;
        font-size: 0.68rem;
    }
}

/* Short viewports — desktop only (mobile scrolls) */
@media (max-height: 650px) and (min-width: 769px) {
    .hero__subtitle {
        display: none;
    }
    .hero__badge {
        margin-bottom: 8px;
    }
    .hero__title {
        margin-bottom: 10px;
    }
    .countdown__block {
        padding: 8px 10px;
        min-width: 50px;
    }
    .countdown__number {
        font-size: 1.2rem;
    }
    .cards {
        padding: 8px 0;
    }
    .card {
        padding: 10px 14px;
    }
    .cta {
        padding: 8px 0;
    }
    .globe {
        width: clamp(80px, 14vh, 120px);
        height: clamp(80px, 14vh, 120px);
        margin-top: 8px;
    }
}

@media (max-height: 500px) and (min-width: 769px) {
    .cards {
        grid-template-columns: repeat(3, 1fr);
    }
    .card__text {
        display: none;
    }
    .hero__badge {
        display: none;
    }
    .card {
        padding: 8px 10px;
        gap: 8px;
    }
    .card__icon {
        width: 26px;
        height: 26px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    #networkCanvas { display: none; }
}
