/* ==============================
   ДЕКОРАТИВНЫЙ РАЗДЕЛИТЕЛЬ МЕЖДУ СЕКЦИЯМИ
   ============================== */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 34px 32px;
    position: relative;
    z-index: 5;
}

.section-divider .divider-line {
    flex: 0 1 240px;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, rgba(180, 92, 63, 0.45) 35%, var(--gold) 100%);
    opacity: 0.85;
}

.section-divider .divider-line:last-of-type {
    background: linear-gradient(to right, var(--gold) 0%, rgba(180, 92, 63, 0.45) 65%, transparent 100%);
}

.section-divider .divider-cluster {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

/* Упрощено: боковые ромбы скрыты, остаётся один деликатный акцент по центру.
   Ромбы — SVG (тот же контур, что в логотипе), не текстовые символы */
.section-divider .divider-mark:not(.divider-mark--main) {
    display: none;
}

.section-divider .divider-mark {
    display: block;
    width: 6px;
    height: 6px;
    color: var(--gold);
    opacity: 0.7;
}

.section-divider .divider-mark--main {
    display: block;
    width: 15px;
    height: 15px;
    color: var(--gold);
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(180, 92, 63, 0.3));
}

/* Тёмный фон между секциями для дивайдера наследуется от соседних секций */
.section-divider--on-deep { background: var(--emerald-deep); }
.section-divider--on-dark { background: var(--emerald-dark); }

/* ==============================
   ОБЩИЕ СЕКЦИИ
   ============================== */
section {
    padding: 80px 0 120px;
    position: relative;
}

.section-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 80px;
}

.section-eyebrow {
    display: inline-block;
    color: var(--gold);
    font-size: 13px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.18;
    letter-spacing: -0.005em;
    color: var(--cream);
    margin-bottom: 16px;
    /* Те же типографические настройки, что у hero-title — единый рендеринг */
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.section-sub {
    color: var(--text-mute);
    font-size: 17px;
}

/* ==============================
   APPROACH
   ============================== */
.approach {
    background: linear-gradient(180deg, var(--emerald-deep) 0%, var(--emerald-dark) 100%);
}

/* Заголовок «Подхода» — в одну строку (перенос возвращаем на узких экранах ниже) */
.approach .section-head {
    max-width: 960px;
}

.approach .section-title {
    white-space: nowrap;
    font-size: clamp(28px, 3.9vw, 48px);
}

.approach-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: stretch;
}

/* На экранах уже 1024px карточки «Подхода» и «Кейсов» становятся одной колонкой —
   между 768 и 1023 они слишком узкие, чтобы читаться красиво в три ряда */
@media (max-width: 1023px) {
    .approach-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Кейсы: строка складывается — скриншот сверху, текст снизу (чередование сбрасываем) */
    .case-row {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .case-row:nth-child(even) .case-row-media {
        order: 0;
    }

    .case-row-body {
        max-width: 100%;
    }

    .cases-list {
        gap: 64px;
    }

    /* Hero на узких экранах — фото сверху, текст снизу */
    .hero-grid {
        grid-template-columns: 1fr;
        padding: 0 24px 40px;
        gap: 24px;
    }

    .hero-text {
        max-width: 100%;
        justify-self: stretch;
        padding: 24px 0 0;
        order: 2;
    }

    .hero-visual {
        order: 1;
        height: clamp(260px, 36vh, 340px);
        min-height: 0;
        margin: 0 -24px;
    }
}

/* ==============================
   CASES
   ============================== */
.cases {
    background: var(--emerald-dark);
}

/* Заголовок «Кейсов» — в одну строку (перенос возвращаем на узких экранах ниже) */
.cases .section-head {
    max-width: 960px;
}

.cases .section-title {
    white-space: nowrap;
    font-size: clamp(28px, 3.9vw, 48px);
}

/* Кейсы — стопкой, один под другим. Легко дописывать новые. */
.cases-list {
    display: flex;
    flex-direction: column;
    gap: 90px;
}

/* ==============================
   ABOUT
   ============================== */
.about {
    background: linear-gradient(180deg, var(--emerald-dark) 0%, var(--emerald-deep) 100%);
    /* Компактнее по вертикали — секция читается цельно */
    padding: 64px 0 72px;
}

/* Заголовок «Обо мне» — чуть меньше общего, соразмерно тексту */
.about-content .section-title {
    font-size: clamp(30px, 3.6vw, 44px);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-visual {
    position: relative;
}

.about-frame {
    position: relative;
    aspect-ratio: 4/5;
    border: 1px solid var(--gold);
    padding: 16px;
    max-width: 500px;
}

.about-frame::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 24px;
    right: -24px;
    bottom: -24px;
    border: 1px solid var(--border);
    z-index: -1;
}

.about-photo {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-deep) 100%);
    position: relative;
    overflow: hidden;
}

.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.about-content .section-title {
    text-align: left;
    margin-top: 6px;
    margin-bottom: 20px;
}

.about-text {
    color: var(--text-soft);
    font-size: 16px;
    line-height: 1.62;
    margin-bottom: 16px;
    max-width: 480px;
}

/* Первый абзац — лид: крупнее и темнее, ведёт взгляд */
.about-text:first-of-type {
    font-size: 17.5px;
    line-height: 1.55;
    color: var(--text);
}

/* Мини-цитата — главная метафора, вынесена акцентом с линией слева */
.about-quote {
    font-family: var(--serif);
    font-style: italic;
    font-size: 20px;
    line-height: 1.4;
    color: var(--cream);
    border-left: 2px solid var(--gold);
    padding-left: 22px;
    margin: 20px 0;
    max-width: 480px;
}

.about-quote em {
    color: var(--gold);
    font-style: italic;
}

/* Личная подпись */
.about-sign {
    font-family: var(--serif);
    font-style: italic;
    font-size: 22px;
    color: var(--gold);
    margin: 6px 0 0;
    max-width: 480px;
}

/* Кнопка «Обсудить проект» — отступ от подписи */
.about-cta {
    margin-top: 32px;
}

/* Акценты в тексте — «якоря для глаза»: ключевые фразы серифом-курсивом в тёплом клэе */
.about-text em {
    font-family: var(--serif);
    font-style: italic;
    color: var(--gold);
    font-weight: 500;
    font-size: 1.14em;
    letter-spacing: 0.005em;
}

/* ==============================
   CONTACT
   ============================== */
.contact {
    background: var(--emerald-deep);
    padding-bottom: 96px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: 72px;
    align-items: start;
    max-width: 1040px;
    margin: 0 auto;
}

/* Левая колонка — приглашение */
.contact-intro .section-eyebrow {
    margin-bottom: 16px;
}

.contact-title {
    text-align: left;
    font-size: clamp(32px, 3.4vw, 46px);
    margin-bottom: 22px;
}

.contact-lead {
    color: var(--text-soft);
    font-size: 17px;
    line-height: 1.6;
    max-width: 440px;
    margin-bottom: 28px;
}

.contact-points {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-points li {
    position: relative;
    padding-left: 26px;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.4;
}

.contact-points li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 4px;
    width: 7px;
    height: 12px;
    border: solid var(--gold);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Правая колонка — способы связи. margin-top выравнивает верх первой
   карточки с заголовком слева (высота eyebrow + его нижний отступ) */
.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 46px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 26px;
    border-radius: var(--radius-card);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.contact-method:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
}

.cm-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(158, 98, 71, 0.08);
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cm-icon svg {
    width: 22px;
    height: 22px;
}

.cm-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-right: auto;
}

.cm-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--cream);
}

.cm-sub {
    font-size: 13px;
    color: var(--text-mute);
}

.cm-arrow {
    width: 20px;
    height: 20px;
    color: var(--gold);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.contact-method:hover .cm-arrow {
    transform: translateX(5px);
}

/* Основной способ — Telegram: заливка тёплым клэем */
.contact-method--primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-color: transparent;
    box-shadow: 0 14px 30px rgba(158, 98, 71, 0.28);
}

.contact-method--primary .cm-icon {
    background: rgba(255, 253, 248, 0.22);
    color: #fff;
}

.contact-method--primary .cm-title { color: #fff; }
.contact-method--primary .cm-sub { color: rgba(255, 253, 248, 0.85); }
.contact-method--primary .cm-arrow { color: #fff; }

.contact-method--primary:hover {
    box-shadow: 0 18px 38px rgba(158, 98, 71, 0.36);
}

/* Кнопка копирования @username — отдельная подсказка под карточками,
   отделена тонкой линией на всю ширину колонки */
.contact-copy {
    display: flex;
    align-items: center;
    gap: 8px;
    align-self: stretch;
    justify-content: flex-start;
    background: none;
    border: none;
    border-top: 1px solid var(--border);
    cursor: pointer;
    padding: 16px 4px 0;
    margin-top: 6px;
    color: var(--text-mute);
    font-family: inherit;
    font-size: 13.5px;
    text-align: left;
    transition: color 0.3s ease;
}

.contact-copy svg {
    width: 15px;
    height: 15px;
    color: var(--gold);
    opacity: 0.75;
    flex-shrink: 0;
}

.contact-copy:hover,
.contact-copy.copied,
.contact-copy.copied svg {
    color: var(--gold);
}

/* ==============================
   FOOTER
   ============================== */
/* Футер — блаш-панель: отделяет низ от кремовой секции контактов,
   даёт сайту завершённое «основание» */
.footer {
    background: var(--emerald-dark);
    padding: 0 0 34px;
}

/* Лента технологий — плавная бегущая строка на всю ширину, вверху футера */
.tech-marquee {
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
    margin-bottom: 46px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.tech-marquee-track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: tech-scroll 46s linear infinite;
}

.tech-marquee:hover .tech-marquee-track {
    animation-play-state: paused;
}

.tech-marquee-track span {
    flex-shrink: 0;
    color: var(--text-soft);
    font-size: 15px;
    letter-spacing: 0.01em;
    padding: 0 26px;
}

.tech-marquee-track i {
    flex-shrink: 0;
    color: var(--gold);
    font-size: 7px;
    font-style: normal;
    opacity: 0.55;
}

@keyframes tech-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .tech-marquee-track { animation: none; }
}

/* Минимальный футер: слева бренд, справа копирайт — одна строка */
.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.logo-footer {
    margin-bottom: 14px;
}

.footer-tag {
    color: var(--cream);
    font-size: 16px;
    font-family: var(--serif);
    font-style: italic;
    line-height: 1.4;
}

.footer-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    color: var(--text-mute);
    font-size: 13px;
    text-align: right;
}

/* ==============================
   АНИМАЦИЯ ПОЯВЛЕНИЯ
   ============================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==============================
   COOKIE-УВЕДОМЛЕНИЕ
   ============================== */
.cookie-banner {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 200;
    max-width: 384px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(60, 46, 32, 0.18);
    animation: cookie-in 0.5s ease both;
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-text {
    color: var(--text-soft);
    font-size: 13.5px;
    line-height: 1.55;
}

.cookie-text a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(158, 98, 71, 0.35);
}

.cookie-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
}

.cookie-decline {
    cursor: pointer;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text-mute);
    background: none;
    border: none;
    padding: 8px 6px;
    transition: color 0.25s ease;
}

.cookie-decline:hover {
    color: var(--cream);
}

.cookie-accept {
    cursor: pointer;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border: none;
    border-radius: 10px;
    padding: 9px 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cookie-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(158, 98, 71, 0.3);
}

.cookie-banner.hide {
    animation: cookie-out 0.4s ease forwards;
}

@keyframes cookie-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@keyframes cookie-out {
    to { opacity: 0; transform: translateY(14px); }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner { animation: none; }
    .cookie-banner.hide { animation: none; }
}

@media (max-width: 500px) {
    .cookie-banner {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}
