/* ------------------- */
/* GLOBAL STYLES       */
/* ------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --background-color: #F9FAFB;
    --text-color: #111827;
    --primary-color: #14B8A6;
    --accent-color: #0D9488;
    --secondary-color: #E5E7EB;
    --surface-color: #FFFFFF;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

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

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* ------------------- */
/* HEADER              */
/* ------------------- */
.header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--secondary-color);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.8);
}

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

.header__logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
}

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

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

.nav__link {
    font-size: 1rem;
    font-weight: 500;
    padding-bottom: 0.25rem;
    position: relative;
}

.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__link--button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.nav__link--button:hover {
    background-color: var(--accent-color);
    color: white;
}

.nav__link--button::after {
    display: none;
}

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

/* ------------------- */
/* FOOTER              */
/* ------------------- */
.footer {
    background-color: #1F2937;
    color: #D1D5DB;
    padding: 4rem 0 2rem;
}

.footer__container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__column--info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
}

.footer__description {
    font-size: 0.9rem;
    max-width: 300px;
    line-height: 1.5;
}

.footer__title {
    font-family: var(--font-heading);
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.footer__list--contacts .footer__item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.footer__icon {
    flex-shrink: 0;
    margin-top: 4px;
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

.footer__bottom {
    text-align: center;
    border-top: 1px solid #374151;
    padding-top: 2rem;
    font-size: 0.9rem;
    color: #9CA3AF;
}

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

@media (max-width: 768px) {
    .nav__list {
        display: none; /* Будет реализовано позже с JS */
    }
    .header__burger {
        display: block;
    }
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer__column--info {
       align-items: center;
    }
    .footer__list--contacts .footer__item {
        justify-content: center;
        text-align: left;
    }
}

/* ------------------- */
/* BUTTON (GLOBAL)     */
/* ------------------- */
.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.6rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

/* ------------------- */
/* HERO SECTION        */
/* ------------------- */
.hero {
    padding: 6rem 0;
    overflow: hidden;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}

.hero__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    min-height: 170px; /* Для стабильности во время анимации */
    font-weight: 700;
}

/* Эффект курсора для пишущей машинки */
.hero__title::after {
    content: '▋';
    animation: blink 0.7s infinite;
    color: var(--primary-color);
    font-weight: 500;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero__subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #4B5563;
    max-width: 550px;
    margin-bottom: 2.5rem;
}

/* Анимация появления элементов */
.hero__subtitle, .hero__cta, .hero__image {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero__subtitle.is-visible, 
.hero__cta.is-visible,
.hero__image.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero__cta.is-visible { transition-delay: 0.2s; }
.hero__image.is-visible { transition-delay: 0.4s; }


.hero__image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}


/* ------------------- */
/* HERO RESPONSIVE     */
/* ------------------- */
@media (max-width: 1024px) {
    .hero__title {
        font-size: 2.8rem;
        min-height: 135px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0;
        text-align: center;
    }
    .hero__container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .hero__content {
        align-items: center;
        order: 2; /* Текст будет под картинкой */
    }
    .hero__title {
        font-size: 2.2rem;
        min-height: 110px;
    }
    .hero__visual {
        order: 1;
    }
}

/* ------------------- */
/* GLOBAL SECTION STYLES */
/* ------------------- */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #4B5563;
    line-height: 1.7;
}


/* ------------------- */
/* HOW-IT-WORKS SECTION */
/* ------------------- */
.how-it-works {
    padding: 6rem 0;
    background-color: var(--surface-color);
}

.how-it-works__steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step-card {
    background-color: var(--background-color);
    border: 1px solid var(--secondary-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.step-card__icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    background-color: #E0F2F1; /* Светлый оттенок primary-color */
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.step-card__icon i {
    color: var(--primary-color);
    width: 32px;
    height: 32px;
}

.step-card__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.step-card__description {
    font-size: 1rem;
    color: #4B5563;
    line-height: 1.6;
}

/* ------------------- */
/* HOW-IT-WORKS RESPONSIVE */
/* ------------------- */
@media (max-width: 1024px) {
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .how-it-works__steps {
        grid-template-columns: 1fr;
    }
    .section-title {
        font-size: 2rem;
    }
}
/* ------------------- */
/* EXAMPLES SECTION    */
/* ------------------- */
.examples {
    padding: 6rem 0;
    background-color: var(--background-color);
}

.examples__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

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

.example-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}

.example-card__image-wrapper {
    position: relative;
    height: 220px;
}

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

.example-card__category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 500;
}

.example-card__content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.example-card__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.example-card__description {
    font-size: 1rem;
    color: #4B5563;
    line-height: 1.6;
}

/* ------------------- */
/* EXAMPLES RESPONSIVE */
/* ------------------- */
@media (max-width: 1024px) {
    .examples__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .examples__grid {
        grid-template-columns: 1fr;
    }
}

/* ------------------- */
/* BUTTON (MODIFIER)   */
/* ------------------- */
.button--secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    font-weight: 700;
}

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

/* ------------------- */
/* TOOLS SECTION       */
/* ------------------- */
.tools {
    padding: 6rem 0;
    background-color: var(--surface-color);
}

.tools__list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.tool-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem 2rem;
    padding: 1.5rem;
    border: 1px solid var(--secondary-color);
    border-radius: 16px;
    transition: box-shadow 0.3s ease;
}

.tool-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.tool-item__logo {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.tool-item__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.tool-item__name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.tool-item__description {
    color: #4B5563;
    line-height: 1.5;
}

.tool-item__action {
    justify-self: end;
}


/* ------------------- */
/* TOOLS RESPONSIVE    */
/* ------------------- */
@media (max-width: 768px) {
    .tool-item {
        grid-template-columns: auto 1fr;
        grid-template-areas: 
            "logo name"
            "desc desc"
            "action action";
    }
    .tool-item__logo {
        grid-area: logo;
    }
    .tool-item__content {
       grid-area: name; /* Поместим имя рядом с лого */
    }
    .tool-item__description {
        grid-area: desc;
        margin-top: 1rem;
    }
    .tool-item__name {
        font-size: 1.25rem;
    }
    .tool-item__action {
        grid-area: action;
        justify-self: stretch;
        margin-top: 1.5rem;
    }
    .button--secondary {
        width: 100%;
    }
}

/* ------------------- */
/* SECURITY SECTION    */
/* ------------------- */
.security {
    padding: 6rem 0;
    background-color: var(--background-color);
}

.accordion {
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid var(--secondary-color);
}

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

.accordion__button {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    cursor: pointer;
    text-align: left;
}

.accordion__title {
    font-size: 1.25rem;
    font-weight: 500;
    font-family: var(--font-heading);
    color: var(--text-color);
}

.accordion__icon {
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform 0.3s ease-in-out;
    color: var(--primary-color);
}

.accordion__content {
    display: grid;
    grid-template-rows: 0fr; /* Анимация высоты от 0 до auto */
    transition: grid-template-rows 0.4s ease-in-out;
}

.accordion__content > * {
    overflow: hidden;
}

.accordion__text {
    padding-bottom: 1.5rem;
    color: #4B5563;
    line-height: 1.7;
}

/* Активное состояние аккордеона */
.accordion__item.is-active .accordion__icon {
    transform: rotate(180deg);
}

.accordion__item.is-active .accordion__content {
    grid-template-rows: 1fr;
}

/* ------------------- */
/* CONTACT SECTION     */
/* ------------------- */
.contact {
    padding: 6rem 0;
    background-color: var(--surface-color);
}

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

.contact-form__fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-family: var(--font-body);
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

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

.form-input.is-invalid {
    border-color: #EF4444; /* Red for error */
}

.form-error-message {
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.2em; /* резервируем место под ошибку */
}

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

.contact-form__submit {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    margin-top: 1rem;
}

.contact-form__submit:disabled {
    background-color: var(--accent-color);
    cursor: not-allowed;
}

#form-message-container {
    margin-top: 1.5rem;
    text-align: center;
    font-weight: 500;
}
.form-message--success {
    color: var(--accent-color);
}
.form-message--error {
    color: #EF4444;
}
/* ------------------- */
/* COOKIE POP-UP       */
/* ------------------- */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1F2937; /* Цвет футера */
    color: #D1D5DB;
    padding: 1.5rem 0;
    z-index: 1000;
    transform: translateY(150%);
    transition: transform 0.5s ease-in-out;
}

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

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

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

.cookie-popup__button {
    flex-shrink: 0;
    padding: 0.6rem 1.2rem;
}


/* COOKIE POP-UP RESPONSIVE */
@media (max-width: 768px) {
    .cookie-popup__content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ------------------- */
/* GENERIC PAGES (LEGAL)*/
/* ------------------- */
.pages {
    padding: 4rem 0 6rem;
    background-color: var(--surface-color);
}

.pages .container {
    max-width: 800px; /* Делаем контент уже для лучшей читаемости */
}

.pages h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.pages h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.pages p, .pages li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 1.5rem;
}

.pages ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}

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

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

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