/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Roboto:wght@400;500&display=swap');

/* --- CSS Variables --- */
:root {
    --bg-color: #1a1a2e;
    --text-color: #f0f0f0;
    --accent-color: #00f5d4;
    --secondary-color: #4a4a5e;
    --header-height: 70px;
    --font-header: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
    color: var(--text-color);
}

ul {
    list-style: none;
}

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

/* --- Header --- */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--secondary-color);
}

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

.header__logo {
    font-family: var(--font-header);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
}
.header__logo:hover {
    color: var(--accent-color);
}

.header__nav-list {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header__nav-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding: 5px 0;
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.header__nav-link:hover::after {
    width: 100%;
}

.header__nav-link--cta {
    background-color: var(--accent-color);
    color: var(--bg-color);
    padding: 8px 20px;
    border-radius: 50px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header__nav-link--cta:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}
.header__nav-link--cta:hover::after {
    width: 0;
}

.header__burger-menu {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
}

/* --- Footer --- */
.footer {
    padding: 60px 0 30px;
    background-color: #121220; /* Slightly darker than main bg */
    border-top: 1px solid var(--secondary-color);
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.footer__logo {
    font-family: var(--font-header);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
    display: inline-block;
}

.footer__tagline {
    font-size: 14px;
    color: #a0a0b0;
}

.footer__heading {
    font-family: var(--font-header);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
}

.footer__list li {
    margin-bottom: 10px;
}

.footer__link {
    color: #a0a0b0;
    font-size: 15px;
}
.footer__link:hover {
    color: var(--accent-color);
}

.footer__list--contacts li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.footer__icon {
    width: 18px;
    height: 18px;
    color: var(--accent-color);
    margin-top: 3px;
}

.footer__address {
    font-style: normal;
    color: #a0a0b0;
    font-size: 15px;
}

.footer__bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--secondary-color);
    font-size: 14px;
    color: #a0a0b0;
}

/* --- Responsive (Mobile First) --- */
@media (max-width: 992px) {
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header__nav {
        /* Mobile menu logic will be added here */
        display: none; 
    }
    .header__burger-menu {
        display: block;
    }
    .footer__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer__list--contacts li {
        justify-content: center;
    }
}

/* ... (предыдущие стили без изменений) ... */

/* --- General Button Styles --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    font-family: var(--font-header);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.btn--primary:hover {
    background-color: transparent;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn__icon {
    width: 20px;
    height: 20px;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: calc(100vh - var(--header-height));
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero__container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero__content {
    max-width: 800px;
    margin: 0 auto;
}

.hero__title {
    font-family: var(--font-header);
    font-size: 56px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--text-color) 70%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.hero__subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: #c0c0d0;
    margin-bottom: 40px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Footer --- */
/* ... (стили футера без изменений) ... */

/* --- Responsive (Mobile First) --- */
@media (max-width: 992px) {
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero__title {
        font-size: 40px;
    }
    .hero__subtitle {
        font-size: 16px;
    }
    .header__nav {
        /* Mobile menu logic will be added here */
        display: none; 
    }
    .header__burger-menu {
        display: block;
    }
    .footer__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer__list--contacts li {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 32px;
    }
    .btn {
        padding: 10px 22px;
        font-size: 14px;
    }
}

/* --- General Section Styles --- */
.section-padding {
    padding: 80px 0;
}

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

.section-title {
    font-family: var(--font-header);
    font-size: 42px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 18px;
    color: #c0c0d0;
    max-width: 600px;
    margin: 0 auto;
}

/* --- How It Works Section --- */
.how-it-works {
    background-color: #121220; /* Slightly darker background to separate sections */
}

.how-it-works__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.how-it-works__card {
    background-color: var(--bg-color);
    padding: 40px 30px;
    border-radius: 12px;
    border: 1px solid var(--secondary-color);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    /* Styles for animation */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.how-it-works__card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.how-it-works__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 245, 212, 0.1);
}

.how-it-works__card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 25px;
    border-radius: 50%;
    background-color: rgba(0, 245, 212, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.how-it-works__card-icon i {
    width: 32px;
    height: 32px;
}

.how-it-works__card-title {
    font-family: var(--font-header);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
}

.how-it-works__card-text {
    font-size: 15px;
    color: #c0c0d0;
    line-height: 1.7;
}


/* --- Responsive (Mobile First) --- */
/* ... */
@media (max-width: 992px) {
    .how-it-works__grid {
        grid-template-columns: 1fr;
    }
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* ... */
@media (max-width: 768px) {
    .section-title {
        font-size: 34px;
    }
    .section-subtitle {
        font-size: 16px;
    }
    /* ... */
}

/* --- Concepts Section (Accordion) --- */
.concepts__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.accordion__item {
    border-bottom: 1px solid var(--secondary-color);
}
.accordion__item:first-child {
    border-top: 1px solid var(--secondary-color);
}

.accordion__header {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-color);
    padding: 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    cursor: pointer;
}

.accordion__title {
    font-family: var(--font-header);
    font-size: 20px;
    font-weight: 600;
}

.accordion__icon {
    color: var(--accent-color);
    flex-shrink: 0;
    margin-left: 20px;
    transition: transform 0.3s ease;
}

.accordion__item.is-open .accordion__icon {
    transform: rotate(45deg);
}

.accordion__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}
.accordion__content p {
    color: #c0c0d0;
    padding-bottom: 25px;
    line-height: 1.7;
}

.concepts__image-viewer {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--secondary-color);
}

.concepts__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.concepts__image.is-active {
    opacity: 1;
}

/* ... (предыдущие медиа-запросы) ... */
@media (max-width: 992px) {
    /* ... */
    .concepts__layout {
        grid-template-columns: 1fr;
    }
    .concepts__image-viewer {
        margin-top: 40px;
        aspect-ratio: 16 / 9;
    }
    /* ... */
}

/* --- Showcase Section --- */
.showcase {
    background-color: var(--bg-color);
}

.showcase__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 250px; /* Defines the base height of a grid row */
    gap: 25px;
}

.showcase__card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    color: var(--text-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);

    /* Animation setup */
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, box-shadow 0.3s ease;
}

.showcase__card.is-visible {
    opacity: 1;
    transform: scale(1);
}

.showcase__card:hover {
    box-shadow: 0 10px 30px rgba(0, 245, 212, 0.1);
}

.showcase__card-image {
    width: 100%;
    height: 100%;
}

.showcase__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.showcase__card:hover .showcase__card-image img {
    transform: scale(1.05);
}

.showcase__card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(26, 26, 46, 0.9) 0%, rgba(26, 26, 46, 0) 100%);
}

.showcase__card-category {
    display: inline-block;
    padding: 4px 10px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    font-size: 12px;
    font-weight: 700;
    border-radius: 50px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.showcase__card-title {
    font-family: var(--font-header);
    font-size: 20px;
    line-height: 1.3;
}

/* --- Masonry-like grid adjustments --- */
.showcase__card:nth-child(1) {
    grid-row: span 2; /* Make this card taller */
}
.showcase__card:nth-child(4) {
    grid-column: span 2; /* Make this card wider */
}
.showcase__card:nth-child(5) {
    grid-row: span 2; /* Make this card taller */
}


/* ... (предыдущие медиа-запросы) ... */
@media (max-width: 992px) {
    .showcase__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Reset complex spans on smaller screens for a simpler layout */
    .showcase__card:nth-child(4) {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .showcase__grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 300px;
    }
    /* Reset all spans for single column layout */
    .showcase__card:nth-child(1),
    .showcase__card:nth-child(5) {
        grid-row: span 1;
    }
}
/* --- Contact Section --- */
.contact {
    background-color: #121220;
}

.contact__wrapper {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--bg-color);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--secondary-color);
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group__input {
    width: 100%;
    padding: 14px 20px;
    background-color: #121220;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 16px;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}

.form-group__input:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Floating label */
.form-group__label {
    position: absolute;
    top: 15px;
    left: 20px;
    color: #a0a0b0;
    pointer-events: none;
    transition: all 0.2s ease;
}

.form-group__input:focus ~ .form-group__label,
.form-group__input:not(:placeholder-shown) ~ .form-group__label {
    top: -10px;
    left: 15px;
    font-size: 12px;
    color: var(--accent-color);
    background-color: var(--bg-color);
    padding: 0 5px;
}

.form-group--captcha {
    display: flex;
    align-items: center;
    gap: 20px;
}

.form-group__captcha-question {
    flex-shrink: 0;
    font-weight: 500;
}

.form-group--checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-group--checkbox label {
    font-size: 14px;
    color: #a0a0b0;
}

.form-group__link {
    text-decoration: underline;
}
.form-group__link:hover {
    text-decoration: none;
}

.contact__form-btn {
    width: 100%;
}
.contact__form-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-messages {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none; /* Hidden by default */
}
.form-messages--success {
    background-color: rgba(0, 245, 212, 0.1);
    color: var(--accent-color);
    display: block;
}
.form-messages--error {
    background-color: rgba(255, 100, 100, 0.1);
    color: #ff8c8c;
    display: block;
}

/* --- Cookie Popup --- */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    background-color: #121220;
    border: 1px solid var(--secondary-color);
    border-radius: 12px;
    padding: 20px;
    z-index: 2000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transform: translateY(200%);
    transition: transform 0.5s ease-in-out;
}

.cookie-popup:not(.is-hidden) {
    transform: translateY(0);
}

.cookie-popup.is-hidden {
    /* To ensure it's visually hidden after animation */
    transition: transform 0.5s ease-in-out, visibility 0.5s;
    visibility: hidden;
}


.cookie-popup__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-popup__text {
    font-size: 14px;
    color: #c0c0d0;
}
.cookie-popup__text a {
    text-decoration: underline;
}

.cookie-popup__btn {
    flex-shrink: 0;
    padding: 8px 20px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.cookie-popup__btn:hover {
    background-color: var(--text-color);
}

@media (max-width: 540px) {
    .cookie-popup__content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* --- Generic Content Pages (privacy, terms, etc.) --- */
.pages {
    padding: 60px 0;
}

.pages .container {
    max-width: 800px;
}

.pages h1, .pages h2 {
    font-family: var(--font-header);
    color: var(--text-color);
    margin-bottom: 20px;
}

.pages h1 {
    font-size: 42px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.pages h2 {
    font-size: 28px;
    margin-top: 40px;
}

.pages p {
    color: #c0c0d0;
    line-height: 1.8;
    margin-bottom: 20px;
}

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

.pages li {
    color: #c0c0d0;
    margin-bottom: 10px;
}

.pages a {
    font-weight: 500;
    text-decoration: underline;
}

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

/* --- Resources Section --- */
.resources {
    background-color: var(--bg-color); /* або #121220 для контрасту */
}

.resources__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.resources__card {
    background-color: #121220;
    border: 1px solid var(--secondary-color);
    border-radius: 12px;
    padding: 35px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    
    /* Animation setup */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.3s ease;
}

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

.resources__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 245, 212, 0.08);
}

.resources__card-icon {
    margin: 0 auto 20px;
    color: var(--accent-color);
}

.resources__card-icon i {
    width: 40px;
    height: 40px;
}

.resources__card-title {
    font-family: var(--font-header);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
}

.resources__card-text {
    font-size: 15px;
    color: #c0c0d0;
    line-height: 1.7;
    margin-bottom: 30px;
    flex-grow: 1; /* Makes text containers equal height */
}

.resources__card .btn {
    margin-top: auto; /* Pushes button to the bottom */
}

/* --- New Button Style --- */
.btn--secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--secondary-color);
}

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