/* GLOBAL STYLES & SETUP */
:root {
    --bg-main: #0D1117;
    --text-main: #E6EDF3;
    --color-accent: #3081F7;
    --bg-secondary: #161B22;
    --border-color: #30363D;
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Exo 2', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

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

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

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

ul {
    list-style: none;
}

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

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

.header__logo {
    font-family: var(--font-secondary);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

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

.nav__list {
    display: flex;
    align-items: center;
    gap: 25px;
}

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

.nav__link--cta {
    background-color: var(--color-accent);
    color: #fff;
    border-radius: 6px;
    padding: 8px 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav__link--cta:hover {
    background-color: #fff;
    color: var(--color-accent);
}

.header__burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

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

.footer__container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

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

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

.footer__description {
    color: #8B949E;
    max-width: 250px;
}

.footer__title {
    font-family: var(--font-secondary);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

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

.footer__link {
    color: #8B949E;
}

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

.footer__address {
    color: #8B949E;
    font-style: normal;
}

.footer__bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #8B949E;
}

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

@media (max-width: 768px) {
    .header__nav {
        /* Mobile menu logic will be added later */
        display: none;
    }
    .header__burger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 24px;
        height: 24px;
    }
    .header__burger span {
        background-color: var(--text-main);
        height: 2px;
        width: 100%;
        transition: all 0.3s ease;
    }
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer__column--about {
        align-items: center;
    }
    .footer__description {
        margin: 0 auto;
    }
}

/* HERO SECTION */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 80px 0;
}

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

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

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

.hero__title {
    font-family: var(--font-secondary);
    font-size: clamp(2.5rem, 5vw, 4rem); /* Адаптивный размер шрифта */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero__title--dynamic {
    color: var(--color-accent);
    display: inline-block;
    transition: all 0.3s ease-in-out;
    opacity: 1;
}

.hero__title--dynamic.fade {
    opacity: 0;
    transform: translateY(10px);
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #b1bac4;
    max-width: 650px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--color-accent);
    color: #fff;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 16px;
    padding: 14px 28px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.button i {
    width: 20px;
    height: 20px;
}

/* GENERAL SECTION STYLES */
.section {
    padding: 80px 0;
}

.section:nth-child(even) {
    background-color: var(--bg-secondary);
}

.section__title {
    font-family: var(--font-secondary);
    font-size: clamp(2rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 15px;
}

.section__subtitle {
    text-align: center;
    color: #b1bac4;
    max-width: 700px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
}

/* AUTOMATION SECTION */
.automation__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.automation__card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.automation__card:hover {
    transform: translateY(-8px);
    border-color: var(--color-accent);
}

.automation__card-icon {
    color: var(--color-accent);
    margin-bottom: 20px;
}

.automation__card-icon i {
    width: 36px;
    height: 36px;
}

.automation__card-title {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.automation__card-description {
    color: #b1bac4;
    line-height: 1.7;
}

/* ADAPTIVE FOR AUTOMATION SECTION */
@media (max-width: 992px) {
    .automation__grid {
        grid-template-columns: 1fr;
    }
}

/* SECTION TITLE & SUBTITLE MODIFIERS */
.section__title--left,
.section__subtitle--left {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

/* CREATIVITY SECTION */
.creativity {
    background-color: var(--bg-secondary);
}

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

.creativity__features {
    list-style: none;
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.creativity__feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
}

.creativity__feature-item i {
    color: var(--color-accent);
    flex-shrink: 0;
}

.creativity__cta {
    margin-top: 20px;
}

/* Visual Generator */
.creativity__visual {
    perspective: 1500px;
}

.visual-generator {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: rotateY(-15deg) rotateX(5deg);
    transition: transform 0.4s ease;
}

.creativity__visual:hover .visual-generator {
    transform: rotateY(0deg) rotateX(0deg);
}

.visual-generator__header {
    background-color: #21262d;
    padding: 10px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    gap: 8px;
}

.visual-generator__header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #494f58;
}

.visual-generator__body {
    padding: 20px;
}

.visual-generator__output {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #010409;
}

.visual-generator__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

.visual-generator__loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 17, 23, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 2;
}

.visual-generator__loader.is-loading {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #494f58;
    border-bottom-color: var(--color-accent);
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.visual-generator__prompt {
    font-size: 14px;
    color: #b1bac4;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.visual-generator__button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
    background-color: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s ease;
}

.visual-generator__button:hover {
    background-color: #458ff7;
}


/* ADAPTIVE FOR CREATIVITY SECTION */
@media (max-width: 992px) {
    .creativity__container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .section__title--left,
    .section__subtitle--left {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .creativity__content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .visual-generator {
        transform: none;
    }
}
/* LEARNING & WORK SECTION */
.learning__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.learning__card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.learning__card:hover {
    transform: translateY(-8px);
    border-color: var(--color-accent);
}

.learning__card-icon {
    color: var(--color-accent);
    margin-bottom: 20px;
}

.learning__card-icon i {
    width: 36px;
    height: 36px;
}

.learning__card-title {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.learning__card-description {
    color: #b1bac4;
    line-height: 1.7;
    flex-grow: 1; /* Позволяет карточкам в одном ряду иметь одинаковую высоту */
}


/* ADAPTIVE FOR LEARNING SECTION */
@media (max-width: 768px) {
    .learning__grid {
        grid-template-columns: 1fr;
    }
}

/* HOUSEHOLD SECTION */
.household {
    background-color: var(--bg-main);
    padding: 100px 0;
}

.household__container {
    display: grid;
    grid-template-columns: 1fr 1.1fr; /* Асимметричная сетка */
    align-items: center;
    gap: 80px;
}

.household__image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.household__features-list {
    list-style: none;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.household__feature {
    display: flex;
    align-items: flex-start;
    gap: 25px;
}

.household__feature-icon {
    flex-shrink: 0;
    color: var(--color-accent);
    background-color: rgba(48, 129, 247, 0.1);
    border-radius: 8px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.household__feature-icon i {
    width: 24px;
    height: 24px;
}

.household__feature-title {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    margin-bottom: 5px;
}

.household__feature-description {
    color: #b1bac4;
    line-height: 1.6;
}

/* ADAPTIVE FOR HOUSEHOLD SECTION */
@media (max-width: 992px) {
    .household__container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .household__visual {
        order: -1; /* Ставим картинку сверху на мобильных */
    }
}

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

.contact__wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form__group {
    display: flex;
    flex-direction: column;
}

.form__label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #c9d1d9;
}

.form__input {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form__input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(48, 129, 247, 0.3);
}

.form__group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.form__group--checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

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

#form-message {
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 14px;
    display: none; /* Initially hidden */
}

#form-message.error {
    background-color: rgba(210, 55, 69, 0.2);
    color: #ff8991;
}

.contact__button {
    margin-top: 10px;
    padding: 15px;
    font-size: 18px;
    font-weight: 700;
    width: 100%;
    justify-content: center;
}

/* Success Message */
.contact__success-message {
    display: none; /* Initially hidden */
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
}

.success-message__icon {
    color: #31c48d;
    margin-bottom: 20px;
}

.success-message__icon i {
    width: 60px;
    height: 60px;
}

.success-message__title {
    font-family: var(--font-secondary);
    font-size: 2rem;
    margin-bottom: 10px;
}

.success-message__text {
    color: #b1bac4;
    font-size: 1.1rem;
}

/* COOKIE POP-UP */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    z-index: 200;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.cookie-popup.is-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

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

.cookie-popup__text {
    color: #b1bac4;
}

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

.cookie-popup__button {
    padding: 10px 25px; /* Делаем кнопку чуть меньше */
    flex-shrink: 0;
}

/* ADAPTIVE FOR COOKIE POP-UP */
@media (max-width: 768px) {
    .cookie-popup__container {
        flex-direction: column;
        text-align: center;
    }
}

/* GENERIC TEXT PAGES (PRIVACY, TERMS, ETC.) */

.pages {
    padding: 80px 0;
}

.pages .container {
    max-width: 800px; /* Ограничиваем ширину для лучшей читабельности */
}

.pages h1 {
    font-family: var(--font-secondary);
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.pages h2 {
    font-family: var(--font-secondary);
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
}

.pages p {
    font-size: 1rem;
    line-height: 1.8;
    color: #b1bac4;
    margin-bottom: 20px;
}

.pages ul,
.pages ol {
    padding-left: 25px;
    margin-bottom: 20px;
}

.pages li {
    margin-bottom: 12px;
    line-height: 1.8;
    color: #b1bac4;
}

.pages a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.pages a:hover {
    border-bottom-color: var(--color-accent);
}

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