/* 1. GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@500;700&family=Inter:wght@400;500&display=swap');

/* 2. CSS VARIABLES */
:root {
    --bg-color: #121212;
    --card-bg: #1E1E1E;
    --text-color: #E0E0E0;
    --text-muted: #888;
    --primary-color: #BB86FC;
    --primary-hover: #D6B5FF;
    --border-color: #2e2e2e;
    
    --font-heading: 'Exo 2', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --header-height: 70px;
}

/* 3. GLOBAL STYLES & RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1.3;
}

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

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

ul {
    list-style: none;
}

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

.container {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* 4. HEADER */
.header {
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

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

.nav__list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__link {
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

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

.nav__link:hover::after {
    width: 100%;
}

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

/* 5. FOOTER */
.footer {
    background-color: var(--card-bg);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer__logo {
    font-size: 1.7rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer__description {
    color: var(--text-muted);
    max-width: 250px;
}

.footer__title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer__nav, .footer__legal, .footer__contacts {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer__link {
    color: var(--text-color);
}

.footer__link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer__contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-color);
}

.footer__contact-item i {
    color: var(--primary-color);
    width: 20px;
    height: 20px;
}

.footer__bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 6. RESPONSIVENESS (Mobile-first) */
@media (max-width: 768px) {
    .nav {
        /* JS будет управлять отображением меню на мобильных */
        display: none; 
    }

    .nav__toggle {
        display: block;
    }
}

/* 7. HERO SECTION */
.hero {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    padding: 4rem 0;
    overflow: hidden;
}

.hero__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero__content {
    flex: 1 1 55%;
    z-index: 2;
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem); /* Адаптивный размер шрифта */
    margin-bottom: 1rem;
}

.hero__description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 550px;
    margin-bottom: 2rem;
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #000;
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: var(--primary-hover);
    color: #000;
    transform: translateY(-3px);
}

.hero__visual {
    flex: 1 1 45%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.hero__image-wrapper {
    position: relative;
    z-index: 2;
    padding: 1rem;
    background: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.hero__image {
    width: 100%;
    max-width: 450px;
    border-radius: 8px;
}

/* Анимация частиц */
.hero__particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.particle {
    position: absolute;
    background-color: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    animation: float 20s infinite ease-in-out;
}

.particle:nth-child(1) { width: 10px; height: 10px; top: 15%; left: 20%; animation-delay: 0s; }
.particle:nth-child(2) { width: 6px; height: 6px; top: 30%; left: 80%; animation-delay: -15s; }
.particle:nth-child(3) { width: 8px; height: 8px; top: 75%; left: 10%; animation-delay: -8s; }
.particle:nth-child(4) { width: 12px; height: 12px; top: 85%; left: 90%; animation-delay: -18s; }
.particle:nth-child(5) { width: 7px; height: 7px; top: 5%; left: 50%; animation-delay: -3s; }
.particle:nth-child(6) { width: 9px; height: 9px; top: 50%; left: 5%; animation-delay: -12s; }
.particle:nth-child(7) { width: 5px; height: 5px; top: 40%; left: 60%; animation-delay: -6s; }
.particle:nth-child(8) { width: 8px; height: 8px; top: 60%; left: 40%; animation-delay: -2s; }

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(40px, -60px) scale(1.2);
        opacity: 0.8;
    }
    50% {
        transform: translate(-30px, 50px) scale(0.8);
        opacity: 0.5;
    }
    75% {
        transform: translate(60px, 20px) scale(1.1);
        opacity: 1;
    }
}

/* Адаптивность для Hero */
@media (max-width: 992px) {
    .hero__container {
        flex-direction: column;
        text-align: center;
    }

    .hero__content {
        order: 2; /* Текст будет под картинкой */
    }
    
    .hero__visual {
        order: 1; /* Картинка будет над текстом */
        min-height: auto;
        margin-bottom: 2rem;
    }

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

/* 8. GENERIC SECTION STYLES */
.section {
    padding: 5rem 0;
}

.section:nth-of-type(odd) {
    background-color: var(--card-bg);
}

.section__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section__title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}

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


/* 9. CREATIVITY SECTION & CARDS */
.creativity__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(187, 134, 252, 0.1);
}

.card__image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

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

.card__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Чтобы контент занимал все доступное место */
}

.card__title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.card__icon {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
}

.card__description {
    color: var(--text-muted);
    flex-grow: 1; /* Чтобы описание растягивалось */
    margin-bottom: 1rem;
}

.card__prompt {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card__prompt p {
    margin: 0;
}

/* 10. WORK SECTION */
.work__features {
    display: flex;
    flex-direction: column;
    gap: 4rem; /* Расстояние между блоками */
}

.feature-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}

.feature-block__image-wrapper {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
}

.feature-block__image {
    border-radius: 8px;
}

.feature-block__title {
    font-size: 2rem;
    color: #fff; /* Делаем заголовок ярче, т.к. он не акцентный */
    margin-bottom: 1rem;
}

.feature-block__description {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.feature-block__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-block__list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
}

.feature-block__list i {
    color: var(--primary-color);
    width: 22px;
    height: 22px;
}

/* Модификатор для реверса колонок */
.feature-block--reversed .feature-block__image-wrapper {
    order: 2;
}
.feature-block--reversed .feature-block__content {
    order: 1;
}

/* Адаптивность для Work Section */
@media (max-width: 992px) {
    .feature-block {
        grid-template-columns: 1fr;
    }
    
    /* Сбрасываем реверс на мобильных, т.к. все идет в одну колонку */
    .feature-block--reversed .feature-block__image-wrapper,
    .feature-block--reversed .feature-block__content {
        order: initial;
    }
}

/* 11. LEARNING SECTION (ACCORDION) */
.learning {
    background-color: var(--bg-color); /* Снова темный фон для контраста */
}

.learning__grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Текстовая колонка чуть шире */
    align-items: center;
    gap: 3rem;
}

.learning__image-wrapper {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
}

.learning__image {
    border-radius: 8px;
}

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

.accordion__header {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 1.5rem 0.5rem;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

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

.accordion__icon {
    transition: transform 0.4s ease;
    flex-shrink: 0; /* Предотвращает сжатие иконки */
    margin-left: 1rem;
}

.accordion__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.accordion__content p {
    padding: 0 0.5rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Стили для активного состояния */
.accordion__item.active .accordion__header {
    color: var(--primary-color);
}

.accordion__item.active .accordion__icon {
    transform: rotate(45deg);
}

/* Адаптивность для Learning Section */
@media (max-width: 992px) {
    .learning__grid {
        grid-template-columns: 1fr;
    }
    .learning__image-wrapper {
        display: none; /* На мобильных устройствах скроем картинку, чтобы аккордеон был главным */
    }
}

/* 12. DAILY-LIFE SECTION */
.daily-life {
    background-color: var(--card-bg);
}

.daily-life__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.daily-life__item {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: border-color 0.3s ease;
}

.daily-life__item:hover {
    border-color: var(--primary-color);
}

.daily-life__icon-wrapper {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.daily-life__icon {
    width: 32px;
    height: 32px;
    color: var(--bg-color);
}

.daily-life__title {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.daily-life__description {
    color: var(--text-muted);
}

/* Адаптивность для Daily Life Section */
@media (max-width: 576px) {
    .daily-life__item {
        flex-direction: column;
        text-align: center;
    }
}

/* 13. CONTACT SECTION */
.contact {
    background-color: var(--bg-color);
}

.contact__form {
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-input { /* Теперь этот стиль применяется ко всем полям ввода */
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(187, 134, 252, 0.2);
}

.form-group--captcha {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.form-input--captcha {
    width: 80px;
}

.form-group--checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.form-group--checkbox label {
    margin-bottom: 0;
    color: var(--text-muted);
}
.form-group--checkbox a {
    text-decoration: underline;
}

.contact__button {
    width: 100%;
}

.form-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    display: none; /* Скрыто по умолчанию */
}

.form-message--success {
    background-color: rgba(60, 179, 113, 0.2);
    color: #3CB371; /* MediumSeaGreen */
    display: block;
}

.form-message--error {
    background-color: rgba(255, 69, 0, 0.2);
    color: #FF4500; /* OrangeRed */
    display: block;
}

/* 14. COOKIE POP-UP */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Изначально скрыт за экраном */
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.2);
    z-index: 200;
    transition: bottom 0.5s ease-in-out;
}

.cookie-popup--show {
    bottom: 0; /* Показать попап */
}

.cookie-popup__content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.cookie-popup p {
    margin: 0;
    color: var(--text-muted);
}

.cookie-popup a {
    text-decoration: underline;
}

.cookie-popup__button {
    flex-shrink: 0; /* Чтобы кнопка не сжималась */
    padding: 0.8rem 1.5rem;
}

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

/* 15. STATIC PAGES STYLES (privacy, terms, etc.) */
.pages {
    padding: 4rem 0;
}

.pages h1, .pages h2 {
    font-family: var(--font-heading);
    color: #fff;
    margin-bottom: 1rem;
}

.pages h1 {
    font-size: 3rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.pages h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
}

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

.pages a {
    color: var(--primary-color);
    text-decoration: underline;
}

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

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

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

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