/* niqlab — стиль сайта (редизайн «игровая студия») */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg:        #0a0a0a;
    --bg-soft:   #111111;
    --surface:   #141414;
    --surface-2: #1a1a1a;
    --text:      #ececec;
    --muted:     #b3b3b3;
    --muted-2:   #888888;
    --faint:     #666666;
    --border:    #232323;
    --border-2:  #313131;
    --accent:    #8b6cf2;
    --accent-2:  #c4b2ff;
    --accent-ink:#0f0720;
    --accent-soft: rgba(139, 108, 242, 0.14);
    --maxw: 880px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* ---------- Типографика ---------- */
h1, h2 {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
}
h1 { font-size: clamp(48px, 9vw, 84px); margin-bottom: 16px; }
h2 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 20px; }
h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 21px;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.3;
}
p { margin-bottom: 16px; color: var(--muted); }
strong { color: var(--text); font-weight: 600; }

a { color: var(--accent-2); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

ul { margin: 0 0 16px 22px; color: var(--muted); }
ul li { margin-bottom: 8px; }

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

/* ---------- Контейнер ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: 56px 0; border-top: 1px solid var(--border); }
.section:first-of-type { border-top: none; }

.eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.lead { font-size: 19px; color: var(--text); }

/* ---------- Шапка ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 10, 10, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: background .3s, border-color .3s;
}
.site-header.scrolled {
    background: rgba(10, 10, 10, 0.92);
    border-bottom-color: var(--border);
}
.header-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 30px;
    color: #fff;
    line-height: 1;
}
.brand:hover { color: #fff; }
.brand .dot { color: var(--accent); }
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
    color: var(--muted-2);
    font-size: 14px;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: 8px;
    transition: color .2s, background .2s;
}
.site-nav a:hover { color: #fff; background: var(--surface-2); }
.site-nav a.active { color: #fff; background: var(--accent-soft); }

/* ---------- Герой-экран ---------- */
.hero {
    position: relative;
    min-height: clamp(540px, 88vh, 860px);
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    filter: saturate(1.05);
    z-index: 0;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(120% 90% at 70% 20%, rgba(10,10,10,.30) 0%, rgba(10,10,10,.78) 60%, rgba(10,10,10,.97) 100%),
        linear-gradient(180deg, rgba(10,10,10,.55) 0%, rgba(10,10,10,.20) 35%, rgba(10,10,10,.92) 100%);
}
.hero-inner {
    position: relative;
    z-index: 2;
    max-width: var(--maxw);
    width: 100%;
    margin: 0 auto;
    padding: 120px 24px 90px;
}
.hero-content { max-width: 620px; }
.hero-title {
    font-size: clamp(72px, 16vw, 150px);
    margin-bottom: 4px;
    text-shadow: 0 6px 40px rgba(0,0,0,.5);
}
.hero-tagline {
    font-family: 'Caveat', cursive;
    font-size: clamp(28px, 5vw, 40px);
    color: var(--accent-2);
    margin-bottom: 22px;
}
.hero-lead { font-size: 18px; color: #d8d8d8; margin-bottom: 30px; max-width: 540px; }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 600;
    padding: 13px 22px;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s, background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); color: var(--accent-ink); }
.btn-ghost { background: rgba(255,255,255,.06); color: #fff; border-color: var(--border-2); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

.scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 2;
    transform: translateX(-50%);
    color: var(--muted-2);
    font-size: 22px;
    animation: bob 1.8s ease-in-out infinite;
}
.scroll-hint:hover { color: #fff; }
@keyframes bob { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,8px); } }

/* ---------- Карточки «сейчас в работе» ---------- */
.now-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 8px;
}
.now-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    transition: transform .2s, border-color .2s, background .2s;
}
.now-card:hover { transform: translateY(-4px); border-color: var(--border-2); background: var(--surface-2); }
.now-card .status {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 14px;
}
.status.done { background: rgba(93, 202, 165, .14); color: #7fe0c2; }
.status.wip  { background: var(--accent-soft); color: var(--accent-2); }
.now-card h3 { margin-bottom: 6px; }
.now-card p { font-size: 15px; margin-bottom: 0; color: var(--muted); }

/* ---------- Карточки проектов (страница Projects) ---------- */
.project-card {
    display: block;
    margin: 24px 0;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: transform .2s, border-color .2s, background .2s;
}
a.project-card:hover { transform: translateY(-4px); border-color: var(--border-2); background: var(--surface-2); }
.project-card h3 { margin-top: 0; }
.project-card .status { font-size: 13px; color: var(--muted-2); margin-bottom: 14px; }
.project-card img { margin: 14px 0; }
.project-card p:last-child { margin-bottom: 0; }

/* ---------- Галерея ---------- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin: 10px 0 8px;
}
.gallery figure { margin: 0; }
.gallery img { margin: 0; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.gallery figcaption,
.caption {
    font-size: 14px;
    color: var(--muted-2);
    margin-top: 8px;
    font-style: italic;
}
.figure { margin: 24px 0; }
.figure img { margin: 0 0 8px; }

/* Фото-галерея мозаикой (смешанные вертикальные/горизонтальные кадры) */
.photos { column-count: 2; column-gap: 14px; margin: 8px 0; }
.photos figure { break-inside: avoid; margin: 0 0 14px; }
.photos img { width: 100%; margin: 0; display: block; }
.photos figcaption { font-size: 14px; color: var(--muted-2); margin-top: 8px; font-style: italic; }
@media (max-width: 600px) { .photos { column-count: 1; } }

/* Логотип-аватар NiqLab */
.brand-avatar {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    margin: 4px 0 26px;
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 6px var(--accent-soft);
}

/* ---------- Дневник ---------- */
.journal-entry {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}
.journal-entry:last-of-type { border-bottom: none; }
.date {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.journal-entry img { margin: 18px 0 6px; }
.tags { margin-top: 16px; font-size: 13px; color: var(--faint); }
.tags span {
    display: inline-block;
    margin: 0 8px 6px 0;
    padding: 3px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
}

/* Тизеры дневника на главной */
.entry-teaser {
    display: block;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    transition: padding-left .2s;
}
.entry-teaser:hover { padding-left: 8px; }
.entry-teaser .date { margin-bottom: 4px; }
.entry-teaser h3 { color: #fff; margin-bottom: 4px; }
.entry-teaser p { font-size: 15px; margin-bottom: 0; }

.more-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 26px;
    font-weight: 600;
}

/* ---------- Футер ---------- */
.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
}
.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 48px 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 28px;
    flex-wrap: wrap;
}
.footer-tag {
    font-family: 'Caveat', cursive;
    font-size: 22px;
    color: var(--muted-2);
    margin: 6px 0 0;
}
.social { display: flex; gap: 10px; flex-wrap: wrap; }
.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    padding: 9px 14px;
    border: 1px solid var(--border-2);
    border-radius: 10px;
    transition: color .2s, border-color .2s, background .2s;
}
.social-link:hover { color: #fff; border-color: var(--accent); background: var(--accent-soft); }
.social-link svg { width: 18px; height: 18px; flex: none; }
.copyright {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 16px 24px 40px;
    font-size: 13px;
    color: var(--faint);
}

/* ---------- Появление при прокрутке ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .scroll-hint { animation: none; }
    html { scroll-behavior: auto; }
}

/* ---------- Внутренние страницы: верхний отступ ---------- */
.page { padding-top: 64px; }
.page .page-tagline {
    font-family: 'Caveat', cursive;
    font-size: clamp(26px, 4vw, 34px);
    color: var(--accent-2);
    margin-top: -8px;
    margin-bottom: 28px;
}

/* ---------- Адаптив ---------- */
@media (max-width: 640px) {
    body { font-size: 16px; }
    .header-inner { padding: 10px 18px; flex-direction: column; gap: 6px; }
    .brand { font-size: 26px; }
    .site-nav { justify-content: center; gap: 2px; }
    .site-nav a { padding: 6px 10px; font-size: 13px; }
    .container, .hero-inner { padding-left: 18px; padding-right: 18px; }
    .hero-inner { padding-top: 100px; padding-bottom: 70px; }
    .section { padding: 44px 0; }
    .cta-row .btn { flex: 1 1 auto; justify-content: center; }
    .footer-inner { flex-direction: column; gap: 22px; }
}
