/* =============================================================================
   SUN STORM STUDIO — основной стиль
   -----------------------------------------------------------------------------
   Этот файл полностью ваш. Здесь нет скрытых правил из чужих тем —
   если что-то ведёт себя не так, причина всегда здесь, в одном месте.

   ГДЕ ЧТО МЕНЯТЬ (главные «ручки»):
   1) Цвета, шрифты, отступы  -> блок :root ниже (переменные).
   2) Размер/форма Key Art     -> секция «HERO / KEY ART».
   3) Сетка карточек игр        -> секция «OUR GAMES».
   4) Видео и скриншоты         -> секции «VIDEO» и «GAME SCREENS».
   Подробные пояснения — рядом с каждым блоком.
   ============================================================================= */


/* =============================================================================
   1. ДИЗАЙН-ТОКЕНЫ  (меняйте значения здесь — изменится весь сайт)
   ============================================================================= */
:root {

    /* --- Цвета --- */
    --bg:          #0a0908;   /* основной фон (почти чёрный, тёплый) */
    --bg-2:        #131110;   /* фон «серых» секций */
    --ink:         #ece8e1;   /* основной текст */
    --muted:       #948d82;   /* приглушённый текст */
    --line:        rgba(255,255,255,.10); /* тонкие разделители */

    /* ▼▼▼ ГЛАВНЫЙ АКЦЕНТНЫЙ ЦВЕТ САЙТА — меняйте ТОЛЬКО эту строку ▼▼▼ */
    --accent:      #ffc23d;   /* акцент (сейчас жёлтый, как кнопка For Partners) */
    /* ▲▲▲ одна строка управляет всеми акцентами: заголовки, кнопки, рамки, свечение ▲▲▲ */

    --on-accent:   #0a0908;   /* цвет текста НА акцентном фоне (тёмный — для контраста) */

    /* Производные от --accent (трогать не нужно) */
    --wire:        var(--accent);
    --spark:       var(--accent);
    --wire-glow:   color-mix(in srgb, var(--accent) 55%, transparent);

    /* --- Типографика --- */
    --font-display: "Anton", Impact, sans-serif;     /* крупные заголовки */
    --font-body:    "Hanken Grotesk", system-ui, sans-serif; /* текст */

    /* --- Размеры --- */
    --container:    1200px;   /* максимальная ширина контента */
    --hero-max:     1920px;   /* предел ширины ХИРО-картинки (дальше — чёрные поля) */
    --radius:       14px;     /* скругление углов */
    --header-h:     76px;     /* высота шапки (для отступов якорей) */

    /* --- Тайминги анимаций --- */
    --ease: cubic-bezier(.22,.61,.36,1);
}


/* =============================================================================
   2. БАЗА / СБРОС
   ============================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;          /* плавная прокрутка по якорям */
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 24px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Фоновая атмосфера: мягкое красное свечение сверху + лёгкое зерно */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(60% 40% at 80% -5%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
        radial-gradient(40% 30% at 0% 0%, rgba(255,194,61,.06), transparent 70%);
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: .98;
    letter-spacing: .01em;
    text-transform: uppercase;
    margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }


/* =============================================================================
   3. ЛЕЙАУТ-ХЕЛПЕРЫ
   ============================================================================= */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Секция = вертикальный отступ. Адаптивный через clamp — без лишних брейкпоинтов */
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section--alt { background: var(--bg-2); }

/* Тонкая светящаяся линия-«провод» как разделитель секций */
.section + .section::before {
    content: "";
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: min(var(--container), calc(100% - 48px));
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--wire), transparent);
    opacity: .5;
}

/* Заголовок секции с маленьким акцентом-искрой */
.section-title {
    font-size: clamp(2.2rem, 6vw, 4rem);
    margin-bottom: .6em;
}
.section-title .accent { color: var(--wire); }
.eyebrow {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: .25em;
    font-size: .8rem;
    font-weight: 700;
    color: var(--spark);
    margin-bottom: 1rem;
    display: inline-block;
}


/* =============================================================================
   4. КНОПКИ И ССЫЛКИ-ИКОНКИ
   ============================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 14px 26px;
    border-radius: 999px;
    border: 1.5px solid var(--wire);
    background: var(--wire);
    color: var(--on-accent);
    cursor: pointer;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 28px -2px var(--wire-glow); }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* Ссылки-картинки (Steam / Discord / сторы) — высота задаётся здесь */
.icon-links { display: flex; align-items: center; gap: 48px; flex-wrap: wrap; }
.icon-link img {
    height: 40px;            /* <-- РАЗМЕР логотипов Steam/Discord меняйте тут */
    width: auto;
    transition: transform .25s var(--ease), filter .25s;
}
.icon-link:hover img { transform: translateY(-2px); filter: drop-shadow(0 0 10px var(--wire-glow)); }


/* =============================================================================
   5. ШАПКА / НАВИГАЦИЯ
   ============================================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: rgba(10,9,8,.72);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }

.brand img { height: 38px; width: auto; }   /* <-- размер логотипа студии */

.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .85rem;
    color: var(--muted);
    transition: color .2s;
}
.nav a:hover { color: var(--ink); }
/* Подсветка пункта-кнопки (For Partners) */
.nav a.is-cta {
    color: #0a0908;
    background: var(--spark);
    padding: 8px 16px;
    border-radius: 999px;
}
.nav a.is-cta:hover { box-shadow: 0 0 24px -4px var(--spark); }

/* Бургер (мобильный) */
.nav-toggle {
    display: none;
    background: none; border: 0; cursor: pointer;
    width: 44px; height: 44px; padding: 10px;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; }

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        flex-direction: column;
        gap: 0;
        background: rgba(10,9,8,.97);
        border-bottom: 1px solid var(--line);
        padding: 12px 0;
        transform: translateY(-120%);
        transition: transform .3s var(--ease);
    }
    .nav.is-open { transform: translateY(0); }
    .nav a { padding: 14px 24px; width: 100%; }
    .nav a.is-cta { margin: 8px 24px; text-align: center; }
}


/* =============================================================================
   6. HERO  (одно цельное изображение на всю ширину)
   -----------------------------------------------------------------------------
   • Картинка тянется/сжимается по ширине экрана, высота — пропорционально.
   • Ширина ограничена сверху (--hero-max). На сверхшироких экранах картинка
     не растёт дальше предела, а по бокам остаётся чёрный фон.
   • Ссылки Steam/Discord лежат ПОВЕРХ картинки внизу слева.
   Что менять:
     --hero-max (в :root)  — предел ширины картинки;
     отступы ссылок        — .hero-links ниже.
   ============================================================================= */
.hero {
    background: #000;                /* чёрные поля по бокам на сверхшироких экранах */
}

.hero-stage {
    position: relative;
    width: 100%;
    max-width: var(--hero-max);      /* предел ширины (см. :root) */
    margin: 0 auto;                  /* центрирование -> чёрный фон слева/справа */
}

/* Само изображение хиро. height:auto = высота всегда пропорциональна ширине. */
.hero-art {
    display: block;
    width: 100%;
    height: auto;
}

/* Ссылки Steam/Discord поверх картинки, внизу слева */
.hero-links {
    position: absolute;   /* ← без этой строки left/top не работают */
    left: 19%;            /* по горизонтали: 0% = левый край картинки */
    top: 75%;             /* по вертикали:  0% = верх картинки */
    z-index: 2;           /* поверх картинки */
}

/* =============================================================================
   7. ABOUT  (о студии / об игре)
   ============================================================================= */
.about-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 2fr;
    gap: clamp(24px, 5vw, 64px);
    align-items: start;
}
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }
.about-text p { color: var(--muted); }
.about-text p + p { margin-top: 1.1em; }


/* =============================================================================
   8. OUR GAMES  (карточки-ссылки на страницы игр)
   ============================================================================= */
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);   /* <-- число колонок карточек */
    gap: clamp(18px, 2.4vw, 30px);
    margin-top: clamp(28px, 4vw, 48px);
}
@media (max-width: 860px) { .games-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .games-grid { grid-template-columns: 1fr; } }

.game-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: #1a1816;
    border: 1px solid var(--line);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.game-card .cover {
    aspect-ratio: 1 / 1;           /* <-- форма обложки игры */
    overflow: hidden;
}
.game-card .cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease);
}
.game-card .label {
    position: absolute;
    inset: auto 0 0 0;
    padding: 18px 20px;
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 1.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,.85));
}
.game-card:hover {
    transform: translateY(-6px);
    border-color: var(--wire);
    box-shadow: 0 0 36px -10px var(--wire-glow);
}
.game-card:hover .cover img { transform: scale(1.06); }


/* =============================================================================
   9. VIDEO  (ролик YouTube)
   ============================================================================= */
.video {
    max-width: 900px;              /* <-- максимальная ширина видео */
    margin: clamp(28px,4vw,44px) auto 0;
    aspect-ratio: 16 / 9;          /* стандартная пропорция YouTube */
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--line), 0 0 50px -16px var(--wire-glow);
}
.video iframe { width: 100%; height: 100%; border: 0; }


/* =============================================================================
   10. GAME SCREENS  (скриншоты)
   ============================================================================= */
.screens-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);   /* <-- число колонок скриншотов */
    gap: clamp(14px, 1.8vw, 22px);
    margin-top: clamp(28px,4vw,44px);
}
@media (max-width: 760px) { .screens-grid { grid-template-columns: 1fr; } }
.screen {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
}
.screen img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.screen:hover img { transform: scale(1.05); }


/* =============================================================================
   11. SUBSCRIBE  (форма Mailchimp)
   ============================================================================= */
.subscribe { max-width: 640px; margin: 0 auto; text-align: center; }
.subscribe-form {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}
@media (max-width: 520px) { .subscribe-form { flex-direction: column; } }
.subscribe-form input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: rgba(255,255,255,.04);
    color: var(--ink);
    font: inherit;
}
.subscribe-form input:focus {
    outline: none;
    border-color: var(--wire);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.subscribe-note { color: var(--muted); font-size: 1.4rem; margin-top: 14px; }
/* Сообщение об успехе/ошибке */
.subscribe-status { margin-top: 14px; min-height: 1.4em; font-weight: 700; }
.subscribe-status.ok  { color: var(--spark); }
.subscribe-status.err { color: var(--wire); }


/* =============================================================================
   12. FOR PARTNERS / FOR MEDIA
   ============================================================================= */
.partners { text-align: center; max-width: 720px; margin: 0 auto; }
.partners p { color: var(--muted); margin-top: 1rem; }
.partners a { color: var(--spark); }

.media-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: center;
    margin-top: clamp(24px,3vw,40px);
}
@media (max-width: 560px) { .media-grid { grid-template-columns: 1fr; } }
.media-grid .version { color: var(--muted); }


/* =============================================================================
   13. FOOTER
   ============================================================================= */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 40px 0;
    color: var(--muted);
    font-size: .9rem;
}
.site-footer p { margin: .25em 0; }


/* =============================================================================
   14. КНОПКА «НАВЕРХ»
   ============================================================================= */
.to-top {
    position: fixed;
    right: 22px; bottom: 22px;
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--wire);
    color: var(--on-accent);
    font-size: 1.3rem;
    opacity: 0; visibility: hidden;
    transform: translateY(12px);
    transition: .3s var(--ease);
    z-index: 60;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { box-shadow: 0 0 26px -2px var(--wire-glow); }


/* =============================================================================
   15. АНИМАЦИИ ПОЯВЛЕНИЯ  (мягкие, ступенчатые)
   ============================================================================= */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

/* Уважение к системной настройке «меньше движения» */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
    * { animation: none !important; }
}
