/* Reset & Base Styles */
:root {
    --bg-dark: #09090b; /* Almost black */
    --bg-darker: #050505;
    --text-main: #f8f9fa;
    --text-muted: #a1a1aa;
    
    /* Deep purples */
    --purple-primary: #7c3aed;
    --purple-light: #a78bfa;
    --purple-dark: #4c1d95;
    --purple-glow: rgba(124, 58, 237, 0.5);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Background Orbs */
.bg-gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-darker) 100%);
    z-index: -1;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -2;
    opacity: 0.6;
    animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--purple-dark);
    top: -200px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: rgba(88, 28, 135, 0.4); /* Dark purple */
    bottom: 20%;
    right: -150px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Glassmorphism Utilities */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(9, 9, 11, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Navigation */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-placeholder {
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-placeholder img {
    height: 100%;
    width: auto;
    max-width: 250px;
    object-fit: contain;
}

.nav-title {
    font-size: clamp(1.2rem, 2.2vw, 1.7rem);
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.9;
}

.nav-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.org-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: var(--transition);
}

.org-card:hover {
    background: var(--glass-highlight);
    border-color: var(--purple-light);
    transform: translateY(-2px);
}

/* Language Switcher */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.2rem 0.3rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    line-height: 1;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    transition: var(--transition);
    font-family: inherit;
    line-height: 1;
}

.lang-btn:hover {
    color: #ffffff;
}

.lang-btn.active {
    color: #ffffff;
    background: var(--purple-primary);
}

.lang-divider {
    color: var(--glass-border);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    user-select: none;
}

/* Typography & Colors */
.text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--purple-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--purple-primary) 0%, var(--purple-dark) 100%);
    color: white;
    border: 1px solid transparent;
    box-shadow: 0 4px 15px var(--purple-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
}

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

.btn-secondary:hover {
    background: var(--glass-highlight);
    border-color: var(--purple-light);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem 2rem;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.mockup-card {
    width: 100%;
    max-width: 450px;
    padding: 1rem;
    transform: rotateY(-15deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.mockup-card:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.mockup-header {
    display: flex;
    gap: 6px;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.toc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.toc-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    padding: 2rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.toc-item:hover {
    border-color: var(--purple-primary);
    color: white;
    background: rgba(124, 58, 237, 0.1);
}

/* Features Section */
.features {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    padding: 1.5rem;
    text-align: center;
}

.feature-icon {
    font-size: 2rem;
    color: var(--purple-light);
    margin-bottom: 1rem;
}

.feature-title {
    margin-bottom: 0.5rem;
    font-size: 1.rem;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Products Section */
.products {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-description {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.products-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.product-card {
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    gap: 3rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Alternate sides for images if there are multiple */
.product-card:nth-child(even) .product-image {
    order: -1;
}

@media (max-width: 900px) {
    .product-card {
        grid-template-columns: 1fr;
    }
    .product-card:nth-child(even) .product-image {
        order: 0;
    }
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--purple-primary), var(--purple-light));
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: rgba(124, 58, 237, 0.3);
}

.product-card:hover::before {
    opacity: 1;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.product-title-link {
    color: inherit;
    text-decoration: none;
}

.product-title-link:hover .product-title {
    color: var(--purple-light);
}

.product-link {
    color: var(--text-muted);
    font-size: 1.75rem;
    transition: var(--transition);
}

.product-link:hover {
    color: var(--purple-light);
}

.product-actions {
    display: flex;
    gap: .75rem;
}

.github-icon {
    color: var(--text-muted);
    font-size: 1.75rem;
    transition: var(--transition);
}

.github-icon:hover {
    color: var(--purple-light);
}

.product-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.product-image {
    width: 100%;
    height: auto;
    min-height: 250px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.use-case-img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.use-case-img.zoomable {
    cursor: zoom-in;
}

.use-case-img.zoomable:hover {
    transform: scale(1.02);
}

.img-overlay {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.product-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    background: rgba(124, 58, 237, 0.1);
    color: var(--purple-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Contact Section */
.contact {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem 8rem;
}

.contact-card {
    padding: 3rem;
    text-align: center;
}

.contact-desc {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.contact-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
    text-align: left;
}

.contact-item:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: var(--purple-primary);
    transform: translateY(-3px);
}

.icon-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--purple-light);
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.contact-value {
    font-size: 1rem;
    font-weight: 500;
}

.copy-tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--purple-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.copy-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: var(--purple-primary) transparent transparent transparent;
}

.copy-tooltip.show {
    opacity: 1;
    top: -50px;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
    overflow: auto;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--purple-light);
    text-decoration: none;
    cursor: pointer;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animation Utilities */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

/* Responsive Design */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        padding-top: 8rem;
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }

    .hero-visual {
        width: 100%;
        margin-top: 2rem;
    }

    .mockup-card {
        transform: none;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .nav-title {
        font-size: 1rem;
    }
    
    .contact-links {
        grid-template-columns: 1fr;
    }
}



/* =========================================
   Mobile Fixes
   ========================================= */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Фикс декоративного фона */
.bg-gradient-overlay {
    inset: 0;
    width: auto;
    height: auto;
}

.glow-orb {
    pointer-events: none;
}

/* =========================================
   Планшеты
   ========================================= */

@media (max-width: 900px) {

    .hero,
    .features,
    .products,
    .contact {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .nav-container {
        padding: 1rem;
    }

    .logo-placeholder {
        height: 60px;
    }

    .hero {
        gap: 2rem;
    }

    .hero-title {
        font-size: clamp(2.2rem, 7vw, 3rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .mockup-card {
        max-width: 100%;
    }

    .product-card {
        padding: 1.5rem;
        gap: 2rem;
    }

    .product-image {
        min-height: auto;
    }

    .use-case-img {
        max-height: 300px;
    }

    .contact-card {
        padding: 2rem;
    }

}

/* =========================================
   Phones
   ========================================= */

@media (max-width: 600px) {

    .hero,
    .features,
    .products,
    .contact {
        padding: 3rem 1rem;
    }

    .hero{
        padding-top:7rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-title {
        font-size: clamp(2rem, 9vw, 2.6rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    /* Кнопки одна под другой */

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
    }

    /* Header */

    .nav-container {
        padding: 0.75rem 1rem;
    }

    .logo-area {
        gap: 0.4rem;
        min-width: 0;
    }

    .logo-placeholder {
        height: 36px;
    }

    .logo-placeholder img {
        max-width: 150px;
    }

    .nav-title {
        font-size: clamp(0.85rem, 2.5vw, 1.25rem);
        line-height: 1.2;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.35rem;
        flex-shrink: 0;
    }

    .org-card {
        padding: 0.35rem 0.55rem;
        font-size: 0.85rem;
        gap: 0.3rem;
    }

    .lang-switcher {
        padding: 0.25rem 0.4rem;
    }

    .lang-btn {
        font-size: 0.8rem;
        padding: 0.15rem 0.3rem;
    }

    /* Features */

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

    /* Products */

    .product-card {
        padding: 1.25rem;
        gap: 1.5rem;
    }

    .product-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    .product-features {
        gap: .4rem;
    }

    .badge {
        font-size: .75rem;
    }

    .product-image {
        min-height: auto;
    }

    .use-case-img {
        max-height: 220px;
    }

    /* Contact */

    .contact-card {
        padding: 1.5rem;
    }

    .contact-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-item {
        padding: 1rem;
        gap: .75rem;
        align-items: flex-start;
    }

    .icon-wrapper {
        width: 42px;
        height: 42px;
        flex-shrink: 0;
    }

    .contact-info {
        min-width: 0;
    }

    .contact-label {
        font-size: .8rem;
    }

    .contact-value {
        font-size: .95rem;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

}

/* Footer Link */
.footer-link {
    color: var(--purple-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Privacy Policy Page */
.privacy-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
}

.privacy-container {
    padding: 3rem 3.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--purple-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.back-link:hover {
    color: #ffffff;
    transform: translateX(-4px);
}

.privacy-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.privacy-effective {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.privacy-intro {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-main);
}

.privacy-divider {
    border: 0;
    height: 1px;
    background: var(--glass-border);
    margin: 2rem 0;
}

.privacy-section {
    margin-bottom: 2rem;
}

.privacy-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

.privacy-section p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.privacy-contact-box {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    margin-top: 0.75rem;
}

.privacy-contact-box i {
    color: var(--purple-light);
}

.privacy-contact-box a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
}

.privacy-contact-box a:hover {
    color: var(--purple-light);
    text-decoration: underline;
}

@media (max-width: 600px) {
    .privacy-page {
        padding: 5.2rem 0.75rem 2rem;
    }

    .privacy-container {
        padding: 1.5rem 1rem;
        border-radius: 12px;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    .privacy-title {
        font-size: clamp(1.3rem, 5.5vw, 1.8rem);
        line-height: 1.25;
    }

    .privacy-effective {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .privacy-intro {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .privacy-section h2 {
        font-size: 1.15rem;
    }

    .privacy-section p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .privacy-contact-box {
        max-width: 100%;
        font-size: 0.85rem;
        padding: 0.6rem 0.75rem;
        word-break: break-all;
    }

    footer p {
        font-size: 0.8rem;
        line-height: 1.5;
        overflow-wrap: break-word;
    }
}