/* =====================
   BASE
===================== */

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background: #0b0f17;
    color: #e8e8e8;
    line-height: 1.55;
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 24px;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3 {
    margin: 0 0 12px;
    line-height: 1.2;
}

p {
    margin: 0 0 12px;
}

/* =====================
   π BACKGROUND
===================== */

.pi-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.pi-background span {
    position: absolute;
    color: rgba(255,255,255,0.07);
    font-size: 22px;
    animation: float 10s linear infinite;
}

@keyframes float {
    from { transform: translateY(0); }
    to   { transform: translateY(-120vh); }
}

main, footer {
    position: relative;
    z-index: 1;
}

/* =====================
   HEADER
===================== */

header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(20, 20, 20, 0.65);
    backdrop-filter: blur(12px);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

header nav a {
    margin-right: 25px;
    font-size: 1.05em;
    transition: 0.25s;
}

header nav a:hover {
    color: #61dafb;
    transform: translateY(-2px);
}

header nav a.active {
    color: #61dafb;
    border-bottom: 2px solid #61dafb;
    padding-bottom: 3px;
}

#burger {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

/* =====================
   HERO
===================== */

.hero {
    position: relative;
    margin-bottom: 50px;
    border-radius: 15px;
    overflow: hidden;
    perspective: 900px;
}

.hero-img {
    width: 100%;
    max-height: 540px;
    object-fit: cover;
    filter: brightness(0.85);
    transform-origin: center;
}

.hero-text {
    position: absolute;
    top: 10%;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 0 42px;
    max-width: 900px;
    color: #fff;
    text-align: left;
    text-shadow: 0 3px 10px rgba(0,0,0,0.7);
}

.hero-text h1 {
    margin: 0 0 14px;
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    line-height: 1.1;
    font-weight: 800;
}

.hero-text p {
    margin: 0;
    font-size: clamp(0.95rem, 1.6vw, 1.15rem);
    line-height: 1.35;
    font-weight: 500;
    opacity: 0.95;
}

/* =====================
   FEATURES
===================== */

.feature {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: 0.7s ease-out;
}

.feature.active {
    opacity: 1;
    transform: translateY(0);
}

.feature.reverse {
    flex-direction: row-reverse;
}

.feature img {
    width: 48%;
    border-radius: 14px;
}

/* =====================
   CARDS / FORMS
===================== */

.about-block,
.product-card {
    background: #1a1a1a;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.35);
    margin-bottom: 25px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 500px;
}

.contact-form input,
.contact-form textarea {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.4);
    color: #f0f0f0;
}

/* =====================
   HOVER + PARALLAX
===================== */

.feature img,
.product-card img,
.about-block img,
.hero-img {
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        filter 0.35s ease;
    will-change: transform;
}

.feature img:hover,
.product-card img:hover,
.about-block img:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 24px rgba(0,0,0,0.45);
}

.hero:hover .hero-img {
    transform: scale(1.05) translateY(-6px);
    filter: brightness(0.9);
}

.hero:hover .hero-text {
    transform: translateY(4px);
}

/* =====================
   FOOTER
===================== */

footer {
    margin-top: 60px;
    padding: 25px 0;
    text-align: center;
    color: #ccc;
    background: rgba(20,20,20,0.6);
    backdrop-filter: blur(10px);
    font-size: 0.95em;
}

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 768px) {

    #burger { display: block; }
    header nav { display: none; }

    .hero-img {
        max-height: 360px;
        border-radius: 0;
    }

    .hero-text {
        top: 8%;
        padding: 0 18px;
        max-width: 100%;
    }

    .hero-text h1 {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .hero-text p {
        font-size: clamp(0.9rem, 3.6vw, 1.05rem);
    }

    .feature {
        flex-direction: column !important;
        text-align: center;
    }

    .feature img {
        width: 100%;
    }

    main {
        padding: 15px;
    }
}

@media (hover: none) {
    .hero:hover .hero-img,
    .hero:hover .hero-text {
        transform: none;
        filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* =====================
   PRODUCT LINK CARD
===================== */

.product-link {
    cursor: pointer;
    text-decoration: none;
    border: 1px solid rgba(97, 218, 251, 0.25);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

.product-link:hover {
    border-color: #61dafb;
    background: rgba(97, 218, 251, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.45);
}

.product-link h3 {
    margin-top: 0;
    color: #61dafb;
}

/* Строка "Открыть..." — БЕЗ ПЕРЕНОСОВ */
.product-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-weight: 600;
    color: #61dafb;
    white-space: nowrap;
    width: fit-content;
    max-width: 100%;
}

/* Карточка-ссылка */
a.product-link.product-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
}

a.product-link.product-card * {
    text-decoration: none;
}


