/* Goggle Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Manrope:wght@700&display=swap');

/* CSS Variables */
:root {
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;

    --color-background: #111827;
    --color-text: #F9FAFB;
    --color-accent: #BEF264;
    --color-accent-hover: #A8D94B;
    --color-muted: #4B5563;
    --color-surface: #1F2937;
    
    --container-width: 1200px;
    --container-padding: 1.5rem;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-background);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.6;
}

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

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

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Header */
.header {
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--color-surface);
}

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

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

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

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

.header__nav-link {
    font-size: 1rem;
    color: var(--color-text);
    padding-bottom: 0.25rem;
    border-bottom: 2px solid transparent;
}

.header__nav-link:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.header__nav-link--cta {
    background-color: var(--color-accent);
    color: var(--color-background);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border-bottom: none;
}

.header__nav-link--cta:hover {
    background-color: var(--color-accent-hover);
    color: var(--color-background);
}

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

/* Footer */
.footer {
    background-color: var(--color-surface);
    padding-top: 4rem;
    margin-top: 6rem; /* Добавим отступ от контента */
}

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

.footer__logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    display: block;
    margin-bottom: 1rem;
}

.footer__tagline {
    color: #9CA3AF;
    font-size: 0.9rem;
    max-width: 250px;
}

.footer__heading {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

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

.footer__link {
    color: #9CA3AF;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.footer__icon {
    width: 18px;
    height: 18px;
}

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

/* Responsive (Mobile-First) */
@media (max-width: 992px) {
    .header__nav {
        display: none; /* Скрываем навигацию для мобильных */
    }
    
    .header__menu-toggle {
        display: block; /* Показываем кнопку-бургер */
    }

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

@media (max-width: 576px) {
    body {
        font-size: 15px;
    }

    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer__column--brand {
        grid-row: 1; /* Логотип будет первым */
    }

    .footer__tagline {
        margin: 0 auto;
    }
    
    .footer__list {
        align-items: center;
    }
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Сдвиг для фиксированного хедера */
    overflow: hidden; /* Чтобы canvas не вылезал */
}

.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: 650px;
}

.hero__title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero__subtitle {
    font-size: 1.125rem;
    color: #D1D5DB; /* Чуть светлее, чем основной текст */
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero__cta {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-background);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    font-family: var(--font-body);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

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


/* --- Responsive for Hero --- */
@media (max-width: 768px) {
    .hero__title {
        font-size: 2.5rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    .hero {
        text-align: center;
    }

    .hero__content {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 80vh;
    }

    .hero__title {
        font-size: 2rem;
    }
}
/* --- Reusable Section Title --- */
.section-title {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--color-accent);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* --- Stories Section --- */
.stories {
    padding: 6rem 0;
}

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

.story-card {
    background-color: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #374151;
    
    /* Animation preparation */
    opacity: 0;
    transform: translateY(20px);
}

.story-card.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

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

.story-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.story-card:hover .story-card__image {
    transform: scale(1.05);
}

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

.story-card__tag {
    display: inline-block;
    background-color: var(--color-muted);
    color: var(--color-text);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.story-card__title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.story-card__title a {
    background-image: linear-gradient(var(--color-accent), var(--color-accent));
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size .3s;
}

.story-card__title a:hover {
    background-size: 100% 2px;
}

.story-card__meta {
    font-size: 0.875rem;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto; /* Прижимает мета-информацию к низу */
}

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

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    .stories {
        padding: 4rem 0;
    }
}

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

/* --- Processes Section --- */
.processes {
    padding: 6rem 0;
    background-color: var(--color-surface);
}

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

.process-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    border: 1px solid var(--color-muted);
    border-radius: 12px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    
    /* Animation preparation */
    opacity: 0;
    transform: translateY(20px);
}

.process-item.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Задержка для каждого элемента, чтобы они появлялись по очереди */
.process-item:nth-child(2) { transition-delay: 0.1s; }
.process-item:nth-child(3) { transition-delay: 0.2s; }
.process-item:nth-child(4) { transition-delay: 0.3s; }


.process-item:hover {
    border-color: var(--color-accent);
    background-color: #2a3547; /* Slightly lighter surface */
}

.process-item__icon {
    flex-shrink: 0;
    color: var(--color-accent);
}

.process-item__icon i {
    width: 40px;
    height: 40px;
}

.process-item__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.process-item__description {
    color: #D1D5DB;
    font-size: 0.95rem;
}


/* --- Responsive for Processes --- */
@media (max-width: 992px) {
    .processes__grid {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .processes__grid {
        grid-template-columns: 1fr;
    }
    .process-item {
        padding: 1.5rem;
    }
}

/* --- Code & Design Section --- */
.code-design {
    padding: 6rem 0;
}

.code-design__grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* Code Editor styles */
.code-editor {
    background-color: #272822; /* Okaidia theme background */
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    overflow: hidden;
    
    /* Animation preparation */
    opacity: 0;
    transform: translateY(20px);
}

.code-editor.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.code-editor__header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #3a3b34;
}

.code-editor__dot {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.code-editor__filename {
    color: #9CA3AF;
    font-size: 0.875rem;
    margin-left: auto;
}

/* Prism.js Overrides */
.code-editor pre[class*="language-"] {
    margin: 0;
    padding: 1.5rem;
    background: transparent !important; /* Override prism theme background */
    font-size: 0.9rem;
}

/* Result styles */
.code-design__result-wrapper {
    /* Animation preparation */
    opacity: 0;
    transform: translateY(20px);
}
.code-design__result-wrapper.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: 0.2s; /* Appear after the code editor */
}


.code-design__subtitle {
    font-size: 1.75rem;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.code-design__description {
    color: #D1D5DB;
    margin-bottom: 2rem;
    max-width: 450px;
}

.code-design__demo {
    margin-bottom: 2.5rem;
}

.code-design__result-btn {
  /* Эти стили скопированы из блока с кодом */
  font-family: 'Inter', sans-serif;
  background: var(--color-accent);
  color: var(--color-background);
  border: none;
  border-radius: 50px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.code-design__result-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -10px rgba(190, 242, 100, 0.5); /* #BEF26480 */
}

.code-design__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-accent);
    font-weight: 500;
}

.code-design__link:hover {
    text-decoration: underline;
}

.code-design__link-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.code-design__link:hover .code-design__link-icon {
    transform: translateX(4px);
}

/* --- Responsive for Code & Design --- */
@media (max-width: 992px) {
    .code-design__grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    .code-design__result-wrapper {
        text-align: center;
    }
    .code-design__description {
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- Insights Section --- */
.insights {
    padding: 8rem 0;
    background-color: var(--color-background); /* Возвращаемся к основному фону */
    position: relative;
    overflow: hidden;
}

.insights__container {
    position: relative;
    z-index: 2;
    max-width: 800px; /* Делаем контейнер уже для цитаты */
    text-align: center;
}

.insights__bg-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 300px;
    width: 300px;
    height: 300px;
    color: var(--color-surface);
    z-index: 1;
    opacity: 0.5;
}

.insights__quote {
    border: none;
    padding: 0;
    margin: 0;
}

.insights__text {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    line-height: 1.5;
    font-style: italic;
    color: var(--color-text);
    margin-bottom: 2rem;
    
    /* Animation preparation */
    opacity: 0;
    transform: translateY(20px);
}

.insights__text.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}


.insights__author {
    display: block;
    font-style: normal;
    font-size: 1rem;
    color: var(--color-accent);
    
    /* Animation preparation */
    opacity: 0;
    transform: translateY(20px);
}

.insights__author.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: 0.3s; /* Появляется после цитаты */
}


/* --- Responsive for Insights --- */
@media (max-width: 768px) {
    .insights {
        padding: 6rem 0;
    }
    .insights__text {
        font-size: 1.75rem;
    }
    .insights__bg-icon {
        width: 200px;
        height: 200px;
    }
}

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

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

.contact__subtitle {
    font-size: 1.1rem;
    color: #D1D5DB;
    max-width: 400px;
    margin-top: -2rem; /* Компенсируем отступ заголовка */
}

.contact .section-title {
    text-align: left;
    margin-bottom: 1.5rem;
}

.contact .section-title::after {
    margin: 0.5rem 0 0; /* Выравниваем по левому краю */
}

/* Form Styles */
.contact-form {
    background-color: var(--color-background);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--color-muted);
}

.contact-form__group {
    position: relative;
    margin-bottom: 1.5rem;
}

.contact-form__input {
    width: 100%;
    padding: 0.8rem;
    background-color: transparent;
    border: 1px solid var(--color-muted);
    border-radius: 6px;
    color: var(--color-text);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.contact-form__label {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    color: #9CA3AF;
    pointer-events: none;
    transition: all 0.3s ease;
}

.contact-form__input:focus,
.contact-form__input:not(:placeholder-shown) {
    border-color: var(--color-accent);
    outline: none;
}

.contact-form__input:focus + .contact-form__label,
.contact-form__input:not(:placeholder-shown) + .contact-form__label {
    top: -0.7rem;
    left: 0.6rem;
    font-size: 0.75rem;
    background-color: var(--color-background);
    padding: 0 0.25rem;
    color: var(--color-accent);
}

/* Captcha Styles */
.contact-form__captcha {
    margin-bottom: 1.5rem;
}
.contact-form__captcha-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #D1D5DB;
}

/* Agreement Checkbox */
.contact-form__agreement {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.contact-form__agreement label {
    font-size: 0.875rem;
    color: #9CA3AF;
}
.contact-form__agreement a {
    color: var(--color-accent);
    text-decoration: underline;
}
.contact-form__agreement input[type="checkbox"] {
    width: 1.25em;
    height: 1.25em;
    accent-color: var(--color-accent);
}

/* Submit Button */
.contact-form__submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--color-accent);
    color: var(--color-background);
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.contact-form__submit:hover {
    background-color: var(--color-accent-hover);
}

/* Form Message */
.contact-form__message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    display: none; /* Скрыто по умолчанию */
}
.contact-form__message--success {
    background-color: rgba(190, 242, 100, 0.2); /* Accent color with alpha */
    color: var(--color-accent);
    display: block;
}
.contact-form__message--error {
    background-color: rgba(255, 95, 86, 0.2);
    color: #ff5f56;
    display: block;
}


/* --- Responsive for Contact --- */
@media (max-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .contact__content {
        text-align: center;
    }
    .contact .section-title::after {
        margin: 0.5rem auto 0;
    }
    .contact__subtitle {
        margin: -1rem auto 0;
    }
}

/* --- Cookie Pop-up --- */
.cookie-popup {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    max-width: 500px;
    
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    
    background-color: var(--color-surface);
    color: var(--color-text);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--color-muted);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 200;

    transform: translateY(200%);
    opacity: 0;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

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

.cookie-popup__text {
    font-size: 0.9rem;
    color: #D1D5DB;
}

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

.cookie-popup__button {
    flex-shrink: 0;
    padding: 0.6rem 1.2rem;
    background-color: var(--color-accent);
    color: var(--color-background);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

/* --- Responsive for Cookie Pop-up --- */
@media (max-width: 576px) {
    .cookie-popup {
        flex-direction: column;
        text-align: center;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
    }
}

/* --- Generic Content Pages (privacy, terms, etc.) --- */
.pages {
    padding: 10rem 0 6rem 0; /* Большой отступ сверху из-за фиксированного хедера */
}

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

.pages h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--color-text);
}

.pages h2 {
    font-size: 1.75rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.pages p {
    font-size: 1rem;
    line-height: 1.7;
    color: #D1D5DB;
    margin-bottom: 1.5rem;
}

.pages ul,
.pages ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: #D1D5DB;
}

.pages li {
    margin-bottom: 0.75rem;
}

.pages a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid var(--color-accent-hover);
}

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

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