/* GLOBAL STYLES */
:root {
    --bg-main: #1a1a2e;
    --bg-secondary: #16213e;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0b0;
    --accent-primary: #00f5c3;
    --accent-hover: #00e0b2;
    --font-headings: 'Roboto Mono', monospace;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3 {
    font-family: var(--font-headings);
    font-weight: 700;
    color: var(--text-primary);
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-primary);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.main {
    flex-grow: 1;
}

/* HEADER */
.header {
    background-color: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.header__logo {
    font-family: var(--font-headings);
    font-size: 24px;
    font-weight: 700;
}

.header__logo:hover {
    color: var(--text-primary);
}

.nav__list {
    display: none; /* Hidden on mobile */
    align-items: center;
    gap: 25px;
}

.nav__link {
    font-size: 16px;
    font-weight: 500;
}

.nav__link--cta {
    background-color: var(--accent-primary);
    color: var(--bg-main);
    padding: 8px 16px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav__link--cta:hover {
    background-color: var(--accent-hover);
    color: var(--bg-main);
}

.header__burger-menu {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: block; /* Shown on mobile */
}

/* FOOTER */
.footer {
    background-color: var(--bg-secondary);
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__container {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr; /* Mobile: 1 column */
}

.footer__logo {
    font-family: var(--font-headings);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    display: inline-block;
}

.footer__logo:hover {
    color: var(--text-primary);
}

.footer__copyright {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer__title {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--accent-primary);
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer__link,
.footer__text {
    color: var(--text-secondary);
    font-size: 15px;
}

.footer__link:hover {
    color: var(--accent-primary);
}

.footer__list--contacts .footer__item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer__icon {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

/* ADAPTIVE STYLES (Mobile-first) */
@media (min-width: 768px) {
    .header__burger-menu {
        display: none;
    }

    .nav__list {
        display: flex;
    }

    .footer__container {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 columns */
    }

    .footer__column--brand {
        grid-column: 1 / -1; /* Brand spans full width on tablet */
    }
}

@media (min-width: 1024px) {
    .footer__container {
        grid-template-columns: 2fr 1fr 1fr 1.5fr; /* Desktop: 4 columns */
        align-items: start;
    }
    
    .footer__column--brand {
        grid-column: auto;
    }
}

/* HERO SECTION */
.hero {
    padding: 80px 0;
    min-height: calc(100vh - 85px); /* Full height minus header */
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: center;
    text-align: center;
}

.hero__title {
    font-size: 2.5rem; /* 40px */
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero__title-dynamic {
    color: var(--accent-primary);
    position: relative;
}

/* Blinking cursor effect */
.hero__title-dynamic::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 5%;
    bottom: 5%;
    width: 3px;
    background-color: var(--accent-primary);
    animation: blink 0.8s infinite;
}

.hero__description {
    font-size: 1.125rem; /* 18px */
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--accent-primary);
    color: var(--bg-main);
    padding: 14px 28px;
    border-radius: 5px;
    font-weight: 500;
    font-size: 1rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.button:hover {
    background-color: var(--accent-hover);
    color: var(--bg-main);
    transform: translateY(-3px);
}

.hero__visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__image {
    max-width: 80%;
    border-radius: 15px;
    animation: float 6s ease-in-out infinite;
}

/* KEYFRAME ANIMATIONS */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}


/* ADAPTIVE STYLES FOR HERO */
@media (min-width: 992px) {
    .hero {
        padding: 100px 0;
    }

    .hero__container {
        grid-template-columns: 1.2fr 1fr; /* Text gets more space */
        text-align: left;
    }

    .hero__title {
        font-size: 3.5rem; /* 56px */
    }

    .hero__description {
        margin-left: 0;
        margin-right: 0;
    }

    .hero__image {
        max-width: 100%;
    }
}

/* FEATURES SECTION */
.features {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.features__heading {
    text-align: center;
    margin-bottom: 60px;
}

.features__subtitle {
    display: block;
    font-family: var(--font-headings);
    color: var(--accent-primary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.features__title {
    font-size: 2.25rem; /* 36px */
    max-width: 600px;
    margin: 0 auto;
}

.features__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.features__card {
    background-color: var(--bg-main);
    padding: 35px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    /* Animation initial state */
    opacity: 0;
    transform: translateY(30px);
}

.features__card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.features__card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 245, 195, 0.1);
}

.features__icon-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto 25px;
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-main));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.features__icon {
    color: var(--accent-primary);
    width: 30px;
    height: 30px;
}

.features__card-title {
    font-size: 1.5rem; /* 24px */
    margin-bottom: 15px;
}

.features__card-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* ADAPTIVE STYLES FOR FEATURES */
@media (min-width: 768px) {
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .features {
        padding: 100px 0;
    }

    .features__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Staggered animation delay for desktop */
    .features__card.is-visible:nth-child(2) {
        transition-delay: 0.2s;
    }
    .features__card.is-visible:nth-child(3) {
        transition-delay: 0.4s;
    }
}

/* TECH SECTION */
.tech {
    padding: 80px 0;
    overflow: hidden;
}

.tech__heading {
    text-align: center;
    margin-bottom: 60px;
}

.tech__subtitle {
    display: block;
    font-family: var(--font-headings);
    color: var(--accent-primary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.tech__title {
    font-size: 2.25rem; /* 36px */
    max-width: 650px;
    margin: 0 auto;
}

/* Tech Tabs component */
.tech-tabs__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.tech-tabs__button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tech-tabs__button:hover {
    color: var(--text-primary);
    background-color: #2a3a5e;
}

.tech-tabs__button--active {
    color: var(--accent-primary);
    background-color: var(--bg-main);
    border-color: var(--accent-primary);
}

.tech-tabs__pane {
    display: none; /* Hidden by default */
    grid-template-columns: 1fr;
    align-items: center;
    gap: 40px;
    animation: fadeIn 0.6s ease forwards;
}

.tech-tabs__pane--active {
    display: grid;
}

.tech-tabs__image-wrapper {
    text-align: center;
}

.tech-tabs__image {
    border-radius: 10px;
    max-width: 90%;
}

.tech-tabs__pane-title {
    font-size: 1.75rem; /* 28px */
    margin-bottom: 15px;
}

.tech-tabs__text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
}

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

/* ADAPTIVE STYLES FOR TECH */
@media (min-width: 768px) {
    .tech-tabs__pane {
        grid-template-columns: 1fr 1.2fr;
        gap: 60px;
    }

    .tech-tabs__pane:nth-child(even) .tech-tabs__image-wrapper {
        order: 2; /* Alternate image position */
    }
    
    .tech-tabs__image {
        max-width: 100%;
    }
}

@media (min-width: 992px) {
    .tech {
        padding: 100px 0;
    }
}

/* CASES SECTION */
.cases {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.cases__heading {
    text-align: center;
    margin-bottom: 60px;
}

.cases__subtitle {
    display: block;
    font-family: var(--font-headings);
    color: var(--accent-primary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.cases__title {
    font-size: 2.25rem; /* 36px */
    max-width: 600px;
    margin: 0 auto;
}

.cases__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.case-card {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    /* Animation initial state */
    opacity: 0;
    transform: translateY(30px);
}

.case-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 245, 195, 0.1);
}

.case-card__image-wrapper {
    width: 100%;
    height: 200px;
}

.case-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-card__content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.case-card__category {
    display: inline-block;
    background-color: var(--accent-primary);
    color: var(--bg-main);
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 15px;
    align-self: flex-start;
}

.case-card__title {
    font-size: 1.5rem; /* 24px */
    margin-bottom: 10px;
}

.case-card__description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.case-card__link {
    color: var(--accent-primary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.case-card__link:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

/* ADAPTIVE STYLES FOR CASES */
@media (min-width: 768px) {
    .cases__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .cases {
        padding: 100px 0;
    }

    .cases__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Staggered animation delay */
    .case-card.is-visible:nth-child(2) {
        transition-delay: 0.2s;
    }
    .case-card.is-visible:nth-child(3) {
        transition-delay: 0.4s;
    }
}

/* PRICING SECTION */
.pricing {
    padding: 80px 0;
}

.pricing__heading {
    text-align: center;
    margin-bottom: 60px;
}

.pricing__subtitle {
    display: block;
    font-family: var(--font-headings);
    color: var(--accent-primary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.pricing__title {
    font-size: 2.25rem; /* 36px */
    max-width: 600px;
    margin: 0 auto;
}

.pricing__note {
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pricing__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: center;
}

.pricing-card {
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 35px;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition: transform 0.3s ease;
    
    /* Animation initial state */
    opacity: 0;
    transform: translateY(30px);
}

.pricing-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.pricing-card:hover {
    transform: scale(1.03);
}

.pricing-card--popular {
    border: 2px solid var(--accent-primary);
    transform: scale(1.05); /* Slightly bigger by default */
}

.pricing-card--popular:hover {
     transform: scale(1.08);
}

.pricing-card__badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-primary);
    color: var(--bg-main);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.pricing-card__header {
    text-align: center;
    margin-bottom: 30px;
}

.pricing-card__title {
    font-size: 1.75rem;
    margin-bottom: 10px;
}

.pricing-card__price {
    font-family: var(--font-headings);
    font-size: 2.5rem;
    color: var(--accent-primary);
}

.pricing-card__period {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
}

.pricing-card__features {
    list-style: none;
    margin-bottom: 40px;
    flex-grow: 1;
}

.pricing-card__feature {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.pricing-card__feature i {
    color: var(--accent-primary);
    width: 20px;
}

.pricing-card__feature--disabled {
    color: var(--text-secondary);
    text-decoration: line-through;
}

.pricing-card__feature--disabled i {
    color: var(--text-secondary);
}

.pricing-card__cta {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding-top: 14px;
    padding-bottom: 14px;
}

.button--outline {
    background-color: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.button--outline:hover {
    background-color: var(--accent-primary);
    color: var(--bg-main);
}


/* ADAPTIVE STYLES FOR PRICING */
@media (min-width: 992px) {
    .pricing__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* CONTACT SECTION */
.contact {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-secondary) 100%);
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: center;
}

.contact__title {
    font-size: 2.25rem; /* 36px */
    margin-bottom: 20px;
}

.contact__description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 40px;
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact__info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact__info-item i {
    color: var(--accent-primary);
    width: 24px;
    margin-top: 5px;
}

.contact__info-item h4 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.contact__info-item p {
    color: var(--text-secondary);
}

.contact__form-wrapper {
    background-color: var(--bg-main);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative; /* For success message positioning */
}

.contact-form__title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.75rem;
}

.contact-form__group {
    margin-bottom: 20px;
}

.contact-form__label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-form__input {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form__input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 245, 195, 0.2);
}

.contact-form__group--captcha {
    max-width: 200px;
}

.contact-form__group--checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.contact-form__group--checkbox label {
    margin: 0;
    color: var(--text-secondary);
}

.contact-form__group--checkbox a {
    color: var(--accent-primary);
    text-decoration: underline;
}

.contact-form__submit {
    width: 100%;
    justify-content: center;
}

.contact-form__success-message {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-main);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 2;
}

.contact-form__success-message.is-visible {
    opacity: 1;
    visibility: visible;
}

.contact-form__success-message i {
    color: var(--accent-primary);
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

/* ADAPTIVE STYLES FOR CONTACT */
@media (min-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr 1fr;
    }
}

/* COOKIE POP-UP */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Initially hidden */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 30px);
    max-width: 600px;
    background: rgba(30, 40, 60, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 2000;
    transition: bottom 0.5s ease-in-out;
}

.cookie-popup.is-visible {
    bottom: 15px;
}

.cookie-popup__text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

.cookie-popup__text a {
    color: var(--accent-primary);
    text-decoration: underline;
}

.cookie-popup__button {
    background-color: var(--accent-primary);
    color: var(--bg-main);
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.cookie-popup__button:hover {
    background-color: var(--accent-hover);
}

@media (min-width: 768px) {
    .cookie-popup {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    .cookie-popup__text {
       text-align: left;
    }
}

/* Mobile Menu Styles */
@media (max-width: 767px) {
    .header__nav {
        display: none; /* Скрываем по умолчанию */
        position: absolute;
        top: 100%; /* Появляется сразу под хедером */
        left: 0;
        right: 0;
        background-color: var(--bg-secondary);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .header__nav.nav--open {
        display: block; /* Показываем при клике */
    }

    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .nav__item {
        width: 100%;
    }

    .nav__link {
        display: block;
        padding: 10px 0;
        width: 100%;
    }
}

/* ========================================= */
/* STYLES FOR POLICY PAGES          */
/* ========================================= */

.pages {
    padding: 60px 0;
}

.pages .container {
    max-width: 800px; /* Limit width for better readability */
}

.pages h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--accent-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.pages h2 {
    font-size: 1.75rem;
    margin-top: 40px;
    margin-bottom: 20px;
}

.pages p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.pages a {
    color: var(--accent-primary);
    text-decoration: underline;
    transition: color 0.3s ease;
}

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

.pages ul {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 20px;
}

.pages li {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 10px;
}

.pages strong {
    color: var(--text-primary);
    font-weight: 500;
}