/* ================== ROOT ================== */
:root {
    --content-max: 880px;
    --content-pad: 16px;
    --muted: #d9d9d9;
    --bg-dark: #000;
    --card-dark: #1b1b1b;
    --border-light: rgba(255, 255, 255, .75);
}

/* ================== RESET ================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body {
    font-family: Georgia, "Times New Roman", serif;
    background: var(--bg-dark);
    color: var(--muted);
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

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

/* ================== LAYOUT ================== */
.frame {
    width: 100%;
    padding: 24px 0;
}

.container {
    width: min(100%, var(--content-max));
    margin: 0 auto;
    padding-inline: var(--content-pad);
    text-align: center;
}

/* ================== HEADER ================== */
header {
    margin-bottom: 20px;
}

.logo {
    display: inline-block;
    position: relative;
    overflow: hidden;
    margin-bottom: -24px;
}

.logo img {
    max-width: 100%;
}

.logo::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 65%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000);
}

.tagline {
    font-size: 15px;
    color: #fff;
    text-align: center;
    margin-top: -12px;
    position: relative;
    z-index: 2;
}

/* ================== TITLES ================== */
.section-big-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 30px 0 8px;
}

.lead {
    font-size: 16px;
    margin-bottom: 22px;
    color: var(--muted);
}

.links-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 28px 0 12px;
}

/* ================== HERO ================== */
.hero-card {
    display: flex;
    width: 100%;
    background: linear-gradient(180deg, #1f1f1f, #141414);
    border-radius: 12px;
    border: 3px solid var(--border-light);
    overflow: hidden;
    text-decoration: none;
    color: #fff;
}

.hero-img {
    flex: 0 0 52%;
    background: #0e0e0e;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-text {
    flex: 1;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 800;
    margin-bottom: 6px;
}

.hero-sub {
    font-size: clamp(14px, 2.6vw, 18px);
    line-height: 1.35;
}

/* ================== CHATS ================== */
.chats-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 0;
    padding: 0;
}

.chats-grid li {
    list-style: none;
}

.chat-tile {
    display: block;
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 10px;
    border: 2px solid var(--border-light);
    overflow: hidden;
    position: relative;
    background: #111;
    text-decoration: none;
    color: #fff;
}

.chat-tile .thumb {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(.35);
}

.chat-tile .label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    max-width: 90%;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .7);
}

/* ================== LINKS ================== */
.alist {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 28px 0 8px;
}

.ael {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid #fff;
    background: #1e1e1e;
    text-decoration: none;
    color: #fff;
}

.ael img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: #000;
}

/* важно: чтобы “Всемогущий/ЧС” не уезжали влево */
.ael .text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
    flex: 1;
}

.ael .name {
    font-weight: 800;
    font-size: 18px;
}

.ael .desc {
    font-size: 14px;
    line-height: 1.35;
    color: #e7e7e7;
}

.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 12px 0;
}

/* ================== BUTTONS ================== */
.big-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 14px;
    width: 100%;
    border-radius: 10px;
    border: 2px solid #fff;
    background: #111;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    min-height: 52px;
}

.big-btn .emoji {
    font-size: 20px;
}

/* ================== CITY BUTTON WRAP ================== */
.city-btn-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 12px 0 0;
}

/* Кнопка города: эмодзи слева, текст строго по центру */
.city-btn {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    column-gap: 6px;
}

.city-btn .emoji {
    grid-column: 1;
    justify-self: center;
}

.city-btn #cityLabel,
.city-btn #selectedCity {
    grid-column: 2;
    justify-self: center;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}

/* ================== FOOTER ================== */
.footer-note {
    margin-top: 30px;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .08);
    font-size: 13px;
    color: #bdbdbd;
}

/* ================== HOVER ================== */
.ael,
.big-btn,
.chat-tile {
    transition: transform .15s ease, box-shadow .15s ease;
}

.ael:hover,
.big-btn:hover,
.chat-tile:hover {
    transform: translateY(-2px);
}

/* ================== CITY MODAL ================== */
.city-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 9998;
}

.city-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.city-modal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -100%;
    background: #0b0b0b;
    border-radius: 18px 18px 0 0;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    transition: bottom .25s ease;
    z-index: 9999;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.city-modal.show {
    bottom: 0;
}

.city-header {
    text-align: center;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.city-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.city-item {
    padding: 14px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 8px;
    background: #111;
    cursor: pointer;
}

.city-item:active {
    background: #1c1c1c;
}

.city-item.active {
    background: #1c1c1c;
    font-weight: 700;
    border: 1px solid #fff;
}

/* ПК: модалка НЕ во всю ширину */
@media (min-width: 721px) {
    .city-modal {
        width: min(calc(100% - 32px), var(--content-max));
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

/* Мобилки */
@media (max-width: 720px) {
    .hero-card {
        flex-direction: column;
    }

    .hero-img {
        flex: none;
        width: 100%;
        aspect-ratio: 16/10;
    }

    .hero-text {
        padding: 14px;
    }

    .hero-title {
        margin-bottom: 4px;
    }
}

/* Мелкие экраны */
@media (max-width: 480px) {
    .chats-grid {
        gap: 8px;
    }

    .chat-tile .label {
        font-size: 11px;
    }

    .ael {
        gap: 10px;
    }

    .ael .name {
        font-size: 16px;
    }

    .ael .desc {
        font-size: 13px;
    }
}

/* отключаем hover на тачах */
@media (hover: none) {
    .city-item:hover {
        background: #111;
    }
}

/* FIX: HERO компактнее на мобилках + округление картинки */
@media (max-width: 720px) {
    .hero-card { overflow: hidden; }

    .hero-img {
        aspect-ratio: auto;
        padding: 12px;
        background: #0e0e0e;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-img img {
        width: 100%;
        height: auto;
        max-height: 260px;
        object-fit: cover;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .hero-img img { max-height: 220px; }
}

/* FIX: расстояние между нижними кнопками как у чатов */
.alist { gap: 10px; }
@media (max-width: 480px) { .alist { gap: 8px; } }
.ael { padding: 10px 12px; }

/* SEO: скрытый h1 */
.visually-hidden{
    position:absolute !important;
    height:1px; width:1px;
    overflow:hidden;
    clip:rect(1px,1px,1px,1px);
    white-space:nowrap;
}



/* --- desktop hover micro-interactions --- */
@media (hover: hover) and (pointer: fine) {
  .city-modal .city-item {
    transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
    will-change: transform;
  }
  .city-modal .city-item:hover {
    transform: translateY(-3px);
    background-color: rgba(0, 0, 0, 0.05);
  }

  /* hero button (Анкеты моделей) */
  a.hero-card {
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
    will-change: transform;
  }
  a.hero-card:hover {
    transform: translateY(-3px);
    filter: brightness(1.03);
  }
}


/* --- desktop header tuned (logo bigger, content still above fold) --- */
@media (min-width: 900px) {
  /* Slightly tighter vertical rhythm so hero is visible without scrolling */
  .frame { padding: 18px 0; }
  header { margin-bottom: 14px; }

  /* Keep logo large but capped so it doesn't eat the whole viewport */
  .logo { max-width: 860px; margin-bottom: -14px; }
  .logo img {
    display: block;
    margin: 0 auto;
    width: auto;
    max-width: 100%;
    height: auto;
    /* bigger than last attempt */
    max-height: clamp(280px, 40vh, 430px);
  }
  .logo::after { height: 55%; }

  .tagline { margin-top: -10px; }
  .section-big-title { margin: 20px 0 8px; }
  .lead { margin-bottom: 16px; }
}


/* --- desktop 1440p logo boost --- */
@media (min-width: 1400px) {
  .logo { max-width: 980px; }
  .logo img {
    max-height: clamp(320px, 42vh, 520px);
  }
}


/* --- ultra-wide / 4K cap --- */
@media (min-width: 2200px) {
  .logo { max-width: 1100px; }
  .logo img {
    /* cap so it doesn't get comically large on 4K/ultrawide */
    max-height: 560px;
  }
}
