/* Новый минималистичный дизайн */

:root {
    /* Apple-like dark palette (slightly lighter) */
    --bg: #131416;              /* немного светлее фона */
    --text: #f5f5f7;            /* основной светлый текст */
    --muted: #d0d2d6;           /* чуть светлее приглушённый серый */
    --primary: #0A84FF;         /* системный синий для тёмной темы */
    --accent: #5e5ce6;          /* дополнительный мягкий акцент */
    --card: #1e1f23;            /* слегка светлее поверхности/карточки */
    --card-alt: #23252a;        /* второй цвет для чередования карточек */
    --section-1: #1e2a3a;       /* фон секции #1 — светлее и холоднее */
    --section-2: #121a22;       /* фон секции #2 — ярче и чуть синее */
    --border: #33353a;          /* границы чуть светлее */
    --radius: 14px;
    --shadow: 0 10px 26px rgba(0,0,0,0.22); /* мягкая тень */
    --photo-radius: 28px;      /* отдельный радиус для фото в hero (чуть больше для заметности) */
    /* Яркие цвета для шапки и подвала */
    --header-grad-start: rgba(10,132,255,0.85); /* яркий синий, полупрозрачный */
    --header-grad-end: rgba(94,92,230,0.85);   /* фиолетовый, полупрозрачный */
    --header-text: #ffffff;                    /* текст в шапке поверх яркого фона */
    --footer-grad-start: #0e1014;              /* тёмный, более глубокий старт */
    --footer-grad-end: #0a0d12;                /* тёмный, более глубокий конец */
}
 
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color-scheme: dark; overflow-x: hidden; }
/* Светлая тема: переопределение переменных */
body.theme-light {
    /* базовые цвета */
    --bg: #f7f8fb;
    --text: #1a1c20;
    --muted: #60656f;
    --primary: #0A84FF;
    --accent: #5e5ce6;
    --card: #ffffff;
    --card-alt: #f1f3f7;
    --section-1: #eef3ff;
    --section-2: #ffffff;
    --border: #dde2eb;
    /* Светлая тема: яркие варианты шапки/подвала */
    --header-grad-start: rgba(10,132,255,0.75);
    --header-grad-end: rgba(255,95,109,0.75); /* коралловый для контраста */
    --header-text: #ffffff;
    --footer-grad-start: #1a1d22;
    --footer-grad-end: #14181d;
}
body.theme-light { color-scheme: light; }
* { box-sizing: border-box; }
img, svg { max-width: 100%; height: auto; }

/* Плавный переход при смене темы через overlay */
.theme-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.theme-overlay.fade-in {
    opacity: 1;
}
/* Цвет overlay зависит от направления перехода */
.theme-overlay.to-light { background: #f7f8fb; }
.theme-overlay.to-dark { background: #131416; }

.container { width: 92%; max-width: 1100px; margin: 0 auto; }

/* Header */
.site-header { position: fixed; top: 0; left: 0; width: 100%; background: linear-gradient(90deg, var(--header-grad-start), var(--header-grad-end)); backdrop-filter: blur(8px); box-shadow: 0 4px 16px rgba(0,0,0,0.28); z-index: 1000; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.brand { text-decoration: none; color: var(--header-text); font-weight: 600; letter-spacing: 0.2px; }
.primary-nav { display: flex; gap: 22px; align-items: center; }
.primary-nav a { text-decoration: none; color: var(--header-text); font-weight: 500; padding: 8px 6px; border-radius: 8px; transition: color .2s ease; }
.primary-nav a:hover { color: var(--primary); }
.primary-nav .cta-link { color: var(--primary); }
.nav-toggle { display: none; background: none; border: none; color: var(--header-text); font-size: 1.4rem; }

/* Header socials */
.header-social { display: flex; gap: 12px; align-items: center; margin-left: 12px; }
.header-social a { display: inline-flex; align-items: center; justify-content: center; color: var(--header-text); text-decoration: none; font-size: 2.2rem; line-height: 1; transition: color .2s ease, transform .2s ease; }
.header-social a:hover { color: var(--primary); transform: translateY(-1px); }
/* Переключатель темы */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--border); color: var(--header-text); border-radius: 10px; width: 38px; height: 38px; padding: 0; margin-left: 8px; cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }
.theme-toggle i { font-size: 1.1rem; line-height: 1; width: 1.1rem; text-align: center; }

/* Hero */
.hero { padding-top: 140px; padding-bottom: 60px; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-text { max-width: 520px; }
.hero-text h1 { font-size: 2.6rem; margin-bottom: 18px; font-weight: 600; line-height: 1.2; }
.lead { font-size: 1.1rem; color: var(--muted); margin-bottom: 32px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; }
.btn { display: inline-block; padding: 14px 24px; border-radius: 12px; background: var(--primary); color: #fff; text-decoration: none; font-weight: 600; box-shadow: none; transition: background-color .2s ease, transform .2s ease; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn.btn-secondary { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.hero-art { position: relative; display: flex; justify-content: center; align-items: center; }
.hero-art .shape { position: absolute; inset: -20px; border-radius: 50%; background: radial-gradient(circle, rgba(10,132,255,0.08) 0%, transparent 70%); pointer-events: none; filter: blur(40px); }
.hero-photo { position: relative; z-index: 1; border-radius: var(--photo-radius); overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.3); max-width: 380px; width: 100%; aspect-ratio: 1/1; }
.hero-photo img { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: cover; object-position: center top; }

/* Sections */
.section { padding: 50px 0 74px; scroll-margin-top: 90px; }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 28px; margin-top: 0; }
.section-lead { text-align: center; color: var(--muted); max-width: 720px; margin: 0 auto 22px; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.grid.small { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--card); padding: 22px; border-radius: var(--radius); box-shadow: none; border: 1px solid var(--border); }
.card h3 { font-size: 1.2rem; margin-bottom: 8px; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }
.card p { color: var(--muted); overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }
.card.icon { text-align: center; }
.card.icon i { font-size: 2rem; color: var(--primary); margin-bottom: 8px; display: inline-block; }

/* Единственный цвет для карточек и контактных элементов */
.grid .card { background: var(--card); }
.contact-item { background: var(--card); }

.pill-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.pill { background: var(--card); border: 1px solid var(--border); color: var(--text); padding: 10px 14px; border-radius: 999px; white-space: normal; overflow-wrap: anywhere; }

/* Micro-elements */
.kicker { color: var(--muted); font-weight: 600; letter-spacing: .2px; margin-bottom: 8px; }
.badge-list { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.badge { border: 1px solid var(--border); color: var(--muted); background: var(--card); border-radius: 999px; padding: 8px 12px; font-size: .95rem; white-space: normal; }

/* Pricing */
.pricing { background: transparent; }
.pricing-card { max-width: 640px; margin: 0 auto; text-align: center; background: var(--card); padding: 34px; border-radius: var(--radius); box-shadow: none; border: 1px solid var(--border); }
.price { font-size: 2.2rem; font-weight: 700; color: var(--primary); margin: 6px 0 8px; }
.note { color: var(--muted); margin-bottom: 16px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.contact-list { display: grid; gap: 12px; }
.contact-item { display: flex; gap: 10px; align-items: center; background: var(--card); padding: 16px; border-radius: var(--radius); box-shadow: none; border: 1px solid var(--border); }
.contact-item i { color: var(--primary); }
.contact-item span { overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }
.social { display: flex; gap: 10px; margin-top: 8px; }
.social a { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: var(--card); border: 1px solid var(--border); text-decoration: none; transition: color .2s ease, border-color .2s ease; }
.social a:hover { color: var(--primary); border-color: var(--primary); }

.form { background: var(--card); padding: 22px; border-radius: var(--radius); box-shadow: none; border: 1px solid var(--border); max-width: 520px; margin: 0 auto; }
.form input, .form textarea { width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; font-family: inherit; margin-bottom: 12px; background: var(--card); color: var(--text); overflow-wrap: anywhere; word-break: break-word; }
.form textarea { resize: none; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,132,255,0.25); }
.form ::placeholder { color: var(--muted); }
.form-title { margin-bottom: 10px; }

/* Выбор способа связи */
.contact-method { margin-bottom: 12px; }
.method-label { display: block; color: var(--muted); font-size: 0.95rem; margin-bottom: 8px; }
.method-options { display: flex; gap: 8px; flex-wrap: wrap; }
.method-option { flex: 1; min-width: 100px; }
.method-option input[type="radio"] { display: none; }
.method-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 0.9rem; transition: all 0.2s ease; background: var(--card); color: var(--text); }
.method-btn i { font-size: 1.1rem; }
.method-btn:hover { border-color: var(--primary); color: var(--primary); }
.method-option input[type="radio"]:checked + .method-btn { background: var(--primary); color: #fff; border-color: var(--primary); }
.method-option input[type="radio"]:checked + .method-btn i { color: #fff; }

/* Модальное окно уведомления */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    box-sizing: border-box;
}
.modal-confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}
.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    opacity: 0;
    -webkit-animation: confettiFall 3s ease-out forwards;
    animation: confettiFall 3s ease-out forwards;
}
@-webkit-keyframes confettiFall {
    0% { -webkit-transform: translateY(0) rotate(0deg); transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { -webkit-transform: translateY(100vh) rotate(720deg); transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
@keyframes confettiFall {
    0% { -webkit-transform: translateY(0) rotate(0deg); transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { -webkit-transform: translateY(100vh) rotate(720deg); transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
.modal-box {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 32px 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.modal-close-x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(128, 128, 128, 0.2);
    color: var(--muted);
    font-size: 1.4rem;
    line-height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close-x:hover {
    background: rgba(128, 128, 128, 0.4);
    color: var(--text);
}
.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}
.modal-icon.success {
    background: #22c55e;
    color: #fff;
}
.modal-icon.error {
    background: #ef4444;
    color: #fff;
}
.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}
.modal-text {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 24px;
}
.modal-btn {
    min-width: 140px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 14px;
    transition: all 0.3s ease;
}
.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(10, 132, 255, 0.4);
}

/* Footer */
.site-footer { background: linear-gradient(135deg, var(--footer-grad-start), var(--footer-grad-end)); color: #fff; padding: 18px 0; margin-top: 0; }
.footer-inner { display: grid; gap: 6px; justify-items: center; text-align: center; }
.footer-brand { font-weight: 600; font-size: 1rem; }
.footer-note { color: #bfc6d1; font-size: 0.9rem; }
.footer-copy { color: #8f97a6; font-size: 0.85rem; }

/* Responsive */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .hero-text { max-width: 100%; margin: 0 auto; }
    .hero-text h1 { font-size: 2.2rem; }
    .hero-actions { justify-content: center; }
    .hero-photo { max-width: 320px; }
    .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .primary-nav { position: fixed; top: 60px; left: 0; width: 100%; background: rgba(30,30,34,0.96); backdrop-filter: blur(8px); box-shadow: 0 12px 28px rgba(0,0,0,0.32); padding: 16px; transform: translateY(-120%); opacity: 0; pointer-events: none; transition: transform .3s ease, opacity .3s ease; gap: 12px; flex-direction: column; align-items: center; z-index: 999; }
    .primary-nav.active { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .nav-toggle { display: block; }
    .btn { width: 100%; text-align: center; }
    .section-title { font-size: 1.8rem; }
    .header-social { gap: 10px; }
}

@media (max-width: 600px) {
    .grid.cols-3 { grid-template-columns: 1fr; }
}

/* Alternating section backgrounds (2 цвета по очереди) */
/* Чередование твёрдых фонов секций */
main > section { position: relative; }
main > section:nth-of-type(odd) { background: var(--section-1); }
main > section:nth-of-type(even) { background: var(--section-2); }

/* Мягкие переходы между секциями через псевдо-элемент */
main > section:nth-of-type(even)::before,
main > section:nth-of-type(odd):not(:first-of-type)::before {
    content: "";
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    height: 40px;
    pointer-events: none;
}
/* Переход от section-1 к section-2 (над чётной секцией) */
main > section:nth-of-type(even)::before {
    background: linear-gradient(180deg, var(--section-1) 0%, var(--section-2) 100%);
}
/* Переход от section-2 к section-1 (над нечётной, кроме первой) */
main > section:nth-of-type(odd):not(:first-of-type)::before {
    background: linear-gradient(180deg, var(--section-2) 0%, var(--section-1) 100%);
}