/* === VARIABLES === */
:root {
    --c-bg: #F3F9EA;
    --c-bg-alt: #EEE;
    --c-bg-dark: #060606;
    --c-text: #060606;
    --c-text-muted: #595959;
    --c-accent: #C7FC70;
    --c-border: #CCC;
    --c-white: #fff;
    --c-error: #d32f2f;
    --max-w: 1120px;
    --font: 'Roboto', sans-serif;
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.2s;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--c-text);
    background-color: var(--c-bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: underline; }
a:hover { text-decoration: none; }
ul { list-style: none; }

/* === SKIP LINK (WCAG) === */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--c-bg-dark);
    color: var(--c-white);
    padding: 8px 16px;
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 1000;
    font-size: 14px;
}
.skip-link:focus { top: 0; }

/* === HEADER === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(243, 249, 234, 0.95);
    backdrop-filter: blur(8px);
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.site-header__name {
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

/* === SECTIONS === */
.section { padding: 64px 24px; }
.section--alt { background-color: var(--c-bg-alt); }
.section--dark {
    background-color: var(--c-bg-dark);
    color: var(--c-white);
}
.section--dark .section__label { color: rgba(255, 255, 255, 0.5); }
.section--dark .section__title { color: var(--c-white); }
.section--dark .contact-item { color: var(--c-white); }
.section--dark .social-heading { color: var(--c-white); }
.section--dark .social-link {
    color: var(--c-white);
    border-color: rgba(255, 255, 255, 0.2);
}
.section--dark .social-link:hover {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: var(--c-bg-dark);
}
.section--dark .social-link img { filter: invert(1); }
.section--dark .social-link:hover img { filter: invert(0); }

.section__container { max-width: var(--max-w); margin: 0 auto; }
.section__label {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--c-text-muted);
    margin-bottom: 16px;
}
.section__title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 32px;
}
.section__subtitle {
    font-size: 16px;
    color: var(--c-text-muted);
    line-height: 1.5;
    margin-top: -20px;
    margin-bottom: 32px;
}

/* === HERO === */
.hero {
    padding: 24px 24px 0;
    overflow: hidden;
}
.hero__container {
    max-width: var(--max-w);
    margin: 0 auto;
}
.hero__name {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -1px;
    margin-bottom: 12px;
}
.hero__badges {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.hero__badge { height: 36px; border-radius: 6px; }
.hero__badge--partner { border: 1px solid var(--c-border); }
.hero__badge-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 14px;
    color: var(--c-text-muted);
    transition: color var(--transition);
}
.hero__badge-link:hover { color: var(--c-text); text-decoration: none; }
.hero__badge-link span { line-height: 1.3; }
.hero__heading {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--c-text-muted);
}
.hero__heading mark {
    background: var(--c-accent);
    color: var(--c-text);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}
.hero__image {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-top: 24px;
    will-change: transform;
}
.hero__image img {
    max-height: 320px;
    width: auto;
}

/* === CONTACT === */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-size: 18px;
}
.contact-item:hover span { text-decoration: underline; }
.contact-item svg { flex-shrink: 0; width: 24px; height: 24px; }
.social-heading {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}
.social-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 16px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    transition: background var(--transition), border-color var(--transition);
}
.social-link:hover {
    background: var(--c-accent);
    border-color: var(--c-accent);
    text-decoration: none;
}
.social-link img { width: 24px; height: 24px; }

/* === GROUPS === */
.groups-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 32px;
}
.group-card {
    padding: 24px;
    background: var(--c-white);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: box-shadow var(--transition);
}
.group-card:hover { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); }
.group-card__label {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--c-text-muted);
    margin-bottom: 6px;
}
.group-card__name {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 16px;
}
.section__more-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
    color: var(--c-text-muted);
}

/* === BUTTON === */
.btn {
    display: inline-block;
    background: var(--c-bg-dark);
    color: var(--c-white);
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition);
}
.btn:hover { background: #333; color: var(--c-white); text-decoration: none; }
.btn:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

/* === NEWSLETTER === */
.newsletter-form { max-width: 560px; }
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    height: 54px;
    padding: 16px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: inherit;
    background: var(--c-white);
    color: var(--c-text);
    transition: border-color var(--transition);
}
.form-input:focus {
    outline: none;
    border-color: var(--c-text);
    box-shadow: 0 0 0 3px rgba(199, 252, 112, 0.4);
}
.form-input::placeholder { color: #999; }
.form-help {
    font-size: 13px;
    color: var(--c-text-muted);
    margin-top: 6px;
    line-height: 1.4;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.form-agreement {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 24px;
}
.form-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border: 3px solid var(--c-text);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    margin-top: 2px;
}
.form-checkbox:checked { background: var(--c-text); }
.form-checkbox:checked::after {
    content: "\2714";
    color: var(--c-white);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
}
.form-checkbox:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.form-agreement__text {
    font-size: 13px;
    color: var(--c-text-muted);
    line-height: 1.4;
}
.form-required {
    font-size: 13px;
    color: var(--c-text-muted);
    margin-bottom: 16px;
}
.form-error {
    display: none;
    color: var(--c-error);
    font-size: 13px;
    margin-top: 4px;
}

/* === MODAL === */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
}
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 201;
    background: var(--c-bg-alt);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    width: 90vw;
    max-width: 820px;
    max-height: 90vh;
}
.modal__inner { display: flex; flex-direction: column; }
.modal__image { max-height: 240px; overflow: hidden; }
.modal__image img { width: 100%; height: 100%; object-fit: cover; }
.modal__body {
    padding: 32px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.modal__title { font-size: 22px; font-weight: 700; line-height: 1.3; }
.modal__label { font-size: 16px; color: var(--c-text-muted); }
.modal__text { font-size: 16px; color: var(--c-text-muted); cursor: pointer; }
.modal__socials { display: flex; gap: 16px; justify-content: center; }
.modal__socials a { text-decoration: none; }
.modal__socials img { width: 28px; height: 28px; }
.modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--c-border);
    background: var(--c-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.modal__close:hover { background: var(--c-bg-alt); }
.modal__help-link {
    display: inline-block;
    font-size: 15px;
    font-weight: 500;
    color: var(--c-text);
    padding: 10px 20px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    transition: background var(--transition), border-color var(--transition);
}
.modal__help-link:hover {
    background: var(--c-accent);
    border-color: var(--c-accent);
    text-decoration: none;
}

/* === SUBPAGE === */
.body--subpage {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.body--subpage .site-footer__inner { max-width: 760px; }
.page-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px 32px;
    flex: 1;
    width: 100%;
}
.page-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}
.page-subtitle {
    font-size: 18px;
    line-height: 1.5;
    color: var(--c-text-muted);
    margin-bottom: 40px;
}
.groups-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}
.back-link {
    display: inline-block;
    font-size: 14px;
    color: var(--c-text-muted);
    transition: color var(--transition);
}
.back-link:hover { color: var(--c-text); }

/* === FOOTER === */
.site-footer {
    padding: 32px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--c-text-muted);
    font-size: 12px;
    line-height: 1.6;
}
.site-footer__inner { max-width: var(--max-w); margin: 0 auto; }

/* === 768px+ === */
@media (min-width: 768px) {
    .section { padding: 80px 40px; }
    .hero { padding: 40px 40px 0; }
    .hero__name { font-size: 64px; }
    .hero__badges { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .hero__heading { font-size: 26px; }
    .section__title { font-size: 36px; }
    .form-row { grid-template-columns: 1fr 1fr; }
    .groups-grid { grid-template-columns: 1fr 1fr; }
    .modal__inner { flex-direction: row; }
    .modal__image { max-height: none; width: 50%; flex-shrink: 0; }
    .modal__body { width: 50%; padding: 40px 32px; }
    .page-content { padding: 64px 40px 48px; }
    .page-title { font-size: 48px; text-align: center; }
    .page-subtitle { text-align: center; }
    .groups-list { display: grid; grid-template-columns: 1fr 1fr; }
}

/* === 1024px+ === */
@media (min-width: 1024px) {
    .hero__container {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto auto;
        column-gap: 40px;
    }
    .hero__name { grid-column: 1; font-size: 72px; }
    .hero__badges { grid-column: 1; }
    .hero__heading { grid-column: 1; font-size: 28px; }
    .hero__image {
        grid-column: 2;
        grid-row: 1 / -1;
        align-self: end;
        margin-top: 0;
    }
    .hero__image img { max-height: 440px; }
    .section__title { font-size: 40px; }
}

/* === 1280px+ === */
@media (min-width: 1280px) {
    .hero__name { font-size: 80px; }
    .hero__heading { font-size: 30px; }
}
