/* ==========================================================================
   Audi Club 174 — основной CSS (секции ниже первого экрана, подвал, админка-превью)
   Подключается асинхронно: media="print" onload="this.media='all'"
   ========================================================================== */

/* --- Экран 2: что есть в клубе ------------------------------------------ */
.club {
    position: relative;
    padding-block: clamp(72px, 11vh, 132px) clamp(64px, 9vh, 118px);
    background: var(--ac174-bg);
    overflow: hidden;
}
/* Световая подача секции: холодный отсвет сверху слева + мягкое затемнение к низу */
.club::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 80% at 12% 0%, rgba(120, 140, 165, .10) 0%, rgba(120, 140, 165, 0) 58%),
        linear-gradient(180deg, rgba(255, 255, 255, .035) 0%, rgba(255, 255, 255, 0) 34%, rgba(0, 0, 0, .28) 100%);
    pointer-events: none;
}
/* Градиентный шов сверху и снизу: секция мягко «всплывает» и «уходит в тень»,
   поэтому блоки отделяются друг от друга без жёстких линий. */
.club::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .18) 7%, rgba(0, 0, 0, 0) 20%),
        linear-gradient(0deg, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .22) 8%, rgba(0, 0, 0, 0) 22%),
        linear-gradient(90deg, var(--ac174-accent) 0%, rgba(227, 6, 19, 0) min(300px, 30%));
    background-repeat: no-repeat;
    background-size: 100% 100%, 100% 100%, min(300px, 30%) 1px;
    background-position: top left, bottom left, top left;
    pointer-events: none;
}

.section-head { position: relative; max-width: 900px; }
.section-head__overline {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--ac174-text-muted);
    margin-bottom: 20px;
}
.rule { width: 30px; height: 1px; background: var(--ac174-accent); flex: 0 0 auto; }
.section-head__title {
    font-size: clamp(30px, 4.2vw, 62px);
    font-weight: 600;
    line-height: 1.03;
    letter-spacing: -.025em;
    text-wrap: balance;
}

.club__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(28px, 4vw, 56px);
    margin-top: clamp(34px, 5vw, 64px);
}

.club__media { position: relative; overflow: hidden; background: var(--ac174-surface); }
.club__media img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    filter: saturate(.94) contrast(1.04);
    transition: transform 1.2s var(--ac174-ease-out);
}
.club__media:hover img { transform: scale(1.03); }
.club__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 7, 9, 0) 46%, rgba(6, 7, 9, .82) 100%);
    pointer-events: none;
}
.club__caption {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 16px;
    z-index: 1;
    font-size: 11.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ac174-text-soft);
}

.club__list { display: grid; gap: 0; align-content: start; }
.club__item {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 20px;
    padding: 24px 0;
    border-top: 1px solid var(--ac174-line);
    transition: border-color .4s var(--ac174-ease);
}
.club__item:last-child { border-bottom: 1px solid var(--ac174-line); }
.club__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: -1px;
    width: 0;
    height: 1px;
    background: var(--ac174-accent);
    transition: width .6s var(--ac174-ease-out);
}
.club__item:hover::before { width: 100%; }
.club__item:hover { border-top-color: transparent; }
.club__num {
    font-family: var(--ac174-mono);
    font-size: 12px;
    letter-spacing: .1em;
    color: var(--ac174-text-muted);
    padding-top: 4px;
}
.club__title {
    font-size: clamp(19px, 1.5vw, 25px);
    font-weight: 600;
    letter-spacing: -.015em;
    line-height: 1.2;
    margin-bottom: 7px;
}
.club__text { font-size: 15px; line-height: 1.62; color: var(--ac174-text-soft); max-width: 52ch; }

.club__note {
    margin-top: clamp(28px, 4vw, 48px);
    padding-top: 20px;
    border-top: 1px solid var(--ac174-line);
    max-width: 76ch;
    font-size: 13px;
    line-height: 1.7;
    color: var(--ac174-text-muted);
}

/* --- Экран 3: финальный CTA -------------------------------------------- */
.join {
    position: relative;
    display: flex;
    align-items: center;
    min-height: min(78vh, 700px);
    min-height: min(78svh, 700px);
    padding-block: clamp(72px, 11vh, 128px);
    overflow: hidden;
    isolation: isolate;
}
.join__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #06070a; }
.join__media picture { display: block; width: 100%; height: 100%; }
.join__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 46%; }
.join__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, #08090b 0%, rgba(8, 9, 11, .62) 26%, rgba(8, 9, 11, .78) 72%, #08090b 100%),
        linear-gradient(90deg, rgba(6, 7, 9, .92) 0%, rgba(6, 7, 9, .38) 62%, rgba(6, 7, 9, .18) 100%);
}
/* Градиентные швы секции призыва: тёмная кромка сверху и снизу отделяет её
   от блока клуба и подвала, как и у остальных секций. */
.join::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, #08090b 0%, rgba(8, 9, 11, .45) 6%, rgba(8, 9, 11, 0) 20%),
        linear-gradient(0deg, #08090b 0%, rgba(8, 9, 11, .45) 6%, rgba(8, 9, 11, 0) 20%);
    pointer-events: none;
}

.join { display: block; }   /* сетку держит .join__inner, секция остаётся фоном */

/* Контейнер секции призыва — обычный .shell (тот же левый отступ, что у шапки,
   секции клуба и подвала), но внутри своя сетка: текст слева, кнопки справа. */
.join__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(24px, 3.4vw, 44px);
    align-items: center;
}

@media (min-width: 1100px) {
    /* текст слева (как было), кнопки — ОДНОЙ СТРОКОЙ справа от текста */
    .join { padding-bottom: clamp(96px, 12vh, 148px); }
    .join__inner {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: clamp(24px, 3vw, 48px);
        align-items: end;
    }
    .join__main { grid-column: 1; }
    .join__cta { grid-column: 2; align-self: end; display: block; }
    .join__actions {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 14px;
        /* низ кнопок — по низу строки «Присоединяйся к Audi Club 174…»:
           компенсируем нижний полуинтервал строки текста (line-height 1.5) */
        margin: 0 0 -0.25em 0;
    }
    .join__actions .cta { flex: 0 0 auto; min-width: 0; }
    .join__plate { display: none; }
}

/* Узкие экраны: кнопки под текстом, во всю ширину — так удобнее нажимать */
@media (max-width: 1099px) {
    .join__cta { display: block; }
    .join__actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: clamp(24px, 3.4vw, 40px);
    }
    .join__actions .cta { flex: 1 1 auto; }
}
.join__plate {
    position: absolute;
    right: -2%;
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(180px, 22vw, 340px);
    font-weight: 700;
    line-height: .8;
    letter-spacing: -.05em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, .07);
    pointer-events: none;
    user-select: none;
}
.join__overline {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--ac174-text-muted);
    margin-bottom: 22px;
}
.join__title {
    font-size: clamp(36px, 6.4vw, 92px);
    font-weight: 700;
    line-height: .96;
    letter-spacing: -.03em;
    text-wrap: balance;
    margin-bottom: 18px;
}
.join__text { font-size: clamp(15px, 1.15vw, 19px); color: var(--ac174-text-soft); max-width: 44ch; }
/* Раскладка кнопок задаётся ниже: на широких экранах — одна строка справа от текста,
   на узких — столбик под текстом. Базовые правила здесь намеренно не дублируются,
   иначе они перебивают медиазапрос (объявлены позже в файле). */

/* --- Подвал ------------------------------------------------------------- */
.footer { background: var(--ac174-bg); border-top: 1px solid var(--ac174-line); }
.footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px 32px;
    align-items: center;
    padding-block: 30px 34px;
}
.footer__brand { display: flex; flex-direction: column; gap: 3px; }
.footer__name { font-size: 15px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.footer__region { font-size: 12.5px; letter-spacing: .06em; color: var(--ac174-text-muted); }
.footer__nav { display: inline-flex; align-items: center; gap: 22px; }
.footer__link {
    font-size: 13px;
    letter-spacing: .06em;
    color: var(--ac174-text-soft);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color .3s var(--ac174-ease), border-color .3s var(--ac174-ease);
}
.footer__link:hover { color: var(--ac174-text); border-bottom-color: var(--ac174-accent); }
.footer__legal {
    grid-column: 1 / -1;
    font-size: 12px;
    line-height: 1.6;
    color: #7e858d;   /* 5.34:1 на фоне — проходит WCAG AA для мелкого текста */
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .055);
}

/* --- Планшет / десктоп -------------------------------------------------- */
@media (min-width: 700px) {
    .hero__inner {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        column-gap: clamp(24px, 4vw, 56px);
    }
    .hero__inner > .hero__overline,
    .hero__inner > .hero__subtitle { grid-column: 1; }
    .hero__inner > .hero__title { grid-column: 1 / -1; }
    .hero__actions {
        grid-column: 1 / -1;
        grid-row: auto;
        flex-direction: row;
        align-items: stretch;
        justify-self: end;
        align-self: end;
    }
    .topbar__inner { min-height: 74px; }
}

@media (min-width: 1000px) {
    /* фотографии — карточки в первой колонке, список клуба — вторая */
    .club__grid { grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); align-items: start; }
    .club__media { grid-column: 1; }
    .club__list { grid-column: 2; grid-row: 1 / span 2; }
}

@media (min-width: 1280px) {
    .club__item { grid-template-columns: 56px minmax(0, 1fr); gap: 26px; padding: 28px 0; }
}

/* --- Мобильные уточнения ------------------------------------------------ */
@media (max-width: 699px) {
    .hero__title { font-size: clamp(40px, 12.4vw, 88px); }
    .join { padding-block: 64px 68px; min-height: 0; align-items: flex-start; }
    .join__plate { right: -8%; opacity: .65; -webkit-text-stroke-color: rgba(255, 255, 255, .06); }
    .join__title { margin-bottom: 14px; }
    .join__actions { flex-direction: column; margin-top: 24px; }
    .join__actions .cta { flex: 1 1 auto; }
    .footer__inner { grid-template-columns: 1fr; align-items: start; }
    .footer__nav { flex-wrap: wrap; gap: 16px; }
    .club__item { grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 20px 0; }
}

/* --- Кнопки: мобильная эргономика -------------------------------------- */
@media (hover: none) {
    .cta:hover { transform: none; }
    .cta:hover::after { transform: translateY(101%); }
}

/* --- Ховер-подсветка курсором (только точный указатель) ----------------- */
@media (hover: hover) and (pointer: fine) {
    .hero__media { transition: transform .9s var(--ac174-ease-out); }
}
