/* Sova Scanner — sovascanner.ru */

/* Light theme (default) */
:root {
    --bg: #ffffff;
    --bg-section: #f7f8fa;
    --bg-card: #ffffff;
    --bg-card-hover: #fafafa;
    --border: #e8e8ee;
    --border-hover: #d0d0da;
    --text: #1a1a2e;
    --text-muted: #6b7280;
    --accent: #f77f00;
    --accent-hover: #e06f00;
    --accent-light: #fff0e0;
    --accent-blue: #3b82f6;
    --success: #10b981;
    --radius: 12px;
    --header-bg: rgba(255, 255, 255, 0.92);
    --hero-gradient: linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%);
    --cta-gradient: linear-gradient(135deg, #e0f7fa 0%, #e8f5e9 50%, #fff3e0 100%);
    --particle-color: 59, 130, 246;
    --particle-opacity: 0.1;
    --particle-mouse: 247, 127, 0;
    --device-logo-bg: #eef2ff;
    --shadow-card: rgba(0, 0, 0, 0.06);
    --dropdown-shadow: rgba(0, 0, 0, 0.1);
}

/* Dark theme */
[data-theme="dark"] {
    --bg: #0a0a0f;
    --bg-section: #08080d;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --border: #1e1e2e;
    --border-hover: #2e2e40;
    --text: #e0e0e8;
    --text-muted: #8888a0;
    --accent: #f77f00;
    --accent-hover: #ff9020;
    --accent-light: rgba(247, 127, 0, 0.12);
    --accent-blue: #6c9bff;
    --success: #00b894;
    --header-bg: rgba(10, 10, 15, 0.85);
    --hero-gradient: linear-gradient(180deg, #0e0e18 0%, #0a0a0f 100%);
    --cta-gradient: linear-gradient(135deg, rgba(247, 127, 0, 0.08) 0%, rgba(10, 10, 15, 0) 100%);
    --particle-color: 108, 155, 255;
    --particle-opacity: 0.15;
    --particle-mouse: 247, 127, 0;
    --device-logo-bg: rgba(59, 130, 246, 0.1);
    --shadow-card: rgba(0, 0, 0, 0.2);
    --dropdown-shadow: rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* === Canvas particles === */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* === Container === */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* === Header === */
.header {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.logo span {
    color: var(--accent);
}

.nav {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav a {
    color: var(--text-muted);
    margin-left: 28px;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--text);
    text-decoration: none;
}

/* Theme toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
    margin-left: 20px;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }

:root .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* === Hero === */
.hero {
    padding: 80px 0 40px;
    text-align: center;
    position: relative;
    background: var(--hero-gradient);
}

.hero-badge {
    display: inline-block;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 16px;
    color: var(--text);
    -webkit-text-fill-color: unset;
    background: none;
}

.hero > .container > p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* === Scan visualization === */
.scan-visual {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 40px;
}

.scan-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(var(--particle-color), 0.2);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring-1 {
    width: 100px;
    height: 100px;
    animation: scan-pulse 3s ease-out infinite;
}

.ring-2 {
    width: 180px;
    height: 180px;
    animation: scan-pulse 3s ease-out infinite 0.6s;
}

.ring-3 {
    width: 260px;
    height: 260px;
    animation: scan-pulse 3s ease-out infinite 1.2s;
}

@keyframes scan-pulse {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
        border-color: rgba(var(--particle-color), 0.5);
    }
    50% {
        opacity: 1;
        border-color: rgba(var(--particle-color), 0.25);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.1);
        border-color: rgba(var(--particle-color), 0);
    }
}

.scan-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-blue);
    animation: scan-rotate 8s linear infinite;
}

@keyframes scan-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.scan-device {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    opacity: 0;
    font-weight: 500;
}

.device-1 {
    top: 15%;
    right: 0;
    animation: device-appear 0.5s ease forwards 2s;
}

.device-2 {
    bottom: 20%;
    left: -10px;
    animation: device-appear 0.5s ease forwards 3s;
}

.device-3 {
    top: 50%;
    right: -20px;
    animation: device-appear 0.5s ease forwards 4s;
}

.device-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
    animation: dot-blink 2s ease-in-out infinite;
}

@keyframes device-appear {
    to { opacity: 1; }
}

@keyframes dot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    border: none;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(247, 127, 0, 0.25);
}

.btn-large {
    padding: 18px 44px;
    font-size: 18px;
    border-radius: 10px;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-secondary:hover {
    color: var(--text);
    border-color: var(--border-hover);
    background: var(--bg-section);
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.hero-platforms {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hero-platforms .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
    display: inline-block;
}

/* === Ticker === */
.ticker {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
    background: var(--bg-section);
}

.ticker-track {
    display: flex;
    gap: 48px;
    animation: ticker-scroll 30s linear infinite;
    width: max-content;
}

.ticker-item {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
}

.ticker-accent {
    color: var(--accent);
    font-weight: 600;
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* === Sections === */
.section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.section-alt {
    background: var(--bg-section);
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    color: var(--text);
}

.section-desc {
    color: var(--text-muted);
    margin-bottom: 48px;
    font-size: 16px;
}

/* === Feature grid === */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 20px var(--shadow-card);
    transform: translateY(-2px);
}

.card-icon {
    margin-bottom: 16px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* === Steps === */
.steps {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: left;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.step-number {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.step-icon {
    color: var(--text-muted);
}

.step-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.step-content p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.step-line {
    display: none;
}

/* === Devices === */
.device-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.device-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s;
}

.device-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 20px var(--shadow-card);
    transform: translateY(-2px);
}

.device-logo {
    margin-bottom: 16px;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--device-logo-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.device-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.device-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 4px rgba(16, 185, 129, 0.4);
    animation: dot-blink 2s ease-in-out infinite;
}

/* === CTA === */
.section-cta {
    background: var(--cta-gradient);
    border-radius: 20px;
    margin: 0 24px 80px;
    padding: 60px 40px;
    text-align: center;
}

.section-cta .section-title {
    margin-bottom: 12px;
}

.section-cta .section-desc {
    margin-bottom: 24px;
}

/* === Footer === */
.footer {
    padding: 32px 0 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-section);
    position: relative;
    z-index: 10;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-divider {
    color: var(--border);
    font-size: 20px;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 13px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.footer-sovagroup {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.footer-sovagroup:hover {
    color: var(--accent);
    text-decoration: none;
}

.footer-sovagroup strong {
    color: var(--text);
}

/* Products dropdown */
.footer-products {
    position: relative;
}

.footer-products-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.footer-products-btn:hover {
    border-color: var(--border-hover);
    background: var(--bg);
}

.footer-products-btn svg {
    transition: transform 0.2s;
}

.footer-products.open .footer-products-btn svg {
    transform: rotate(180deg);
}

.footer-products-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    width: 300px;
    box-shadow: 0 8px 30px var(--dropdown-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s;
}

.footer-products.open .footer-products-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background 0.15s;
    color: var(--text);
    text-decoration: none;
}

.dropdown-item:hover {
    background: var(--bg-section);
    text-decoration: none;
}

.dropdown-item strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.dropdown-item span {
    font-size: 12px;
    color: var(--text-muted);
}

.dropdown-item.disabled {
    opacity: 0.5;
    cursor: default;
}

.coming-soon {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    font-weight: 600;
}

.dropdown-contact {
    padding: 8px 12px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}

.dropdown-contact a {
    font-size: 13px;
    color: var(--accent);
}

/* === Animations === */
.anim-fade-in {
    opacity: 0;
    animation: fade-in 0.8s ease forwards;
}

.anim-delay-1 { animation-delay: 0.15s; }
.anim-delay-2 { animation-delay: 0.3s; }
.anim-delay-3 { animation-delay: 0.5s; }
.anim-delay-4 { animation-delay: 0.7s; }

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

.anim-slide-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.anim-slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Download page === */
.download-hero {
    padding: 60px 0 40px;
    text-align: center;
    background: var(--hero-gradient);
}

.download-hero h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
}

.version-badge {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    border: 1.5px solid var(--accent);
    border-radius: 20px;
    padding: 4px 16px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
}

.download-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.download-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    transition: all 0.3s;
}

.download-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 20px var(--shadow-card);
    transform: translateY(-2px);
}

.download-card .os-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.download-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.download-card .arch {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.download-card .size {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

.download-card .btn {
    width: 100%;
    text-align: center;
}

.release-notes {
    background: var(--bg-section);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 40px;
}

.release-notes h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.release-notes-body {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    white-space: pre-wrap;
}

.loading {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
}

.fallback {
    text-align: center;
    padding: 32px;
    background: var(--bg-section);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* === Responsive === */
@media (max-width: 768px) {
    .hero {
        padding: 50px 0 30px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero > .container > p {
        font-size: 16px;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 24px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .device-grid {
        grid-template-columns: 1fr;
    }

    .download-cards {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .header .container {
        flex-direction: column;
        gap: 12px;
    }

    .nav a {
        margin-left: 16px;
    }

    .nav a:first-child {
        margin-left: 0;
    }

    .scan-visual {
        width: 220px;
        height: 220px;
    }

    .ring-3 {
        width: 200px;
        height: 200px;
    }

    .scan-device {
        display: none;
    }

    .footer-top {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .section-cta {
        margin: 0 16px 50px;
        padding: 40px 20px;
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .container {
        padding: 0 16px;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }
}
