/* Главная. Палитра, состояния кнопок, шапка, подвал и калькулятор — в site.css.
   Поверхности разделов: кобальт (.nk-on-cobalt), бумага и туман (.nk-on-light), ночь (по умолчанию).
   Засечки — только h1 и h2, остальной текст — гротеск. */

body.hm-page { margin: 0; background: var(--nk-night); color: var(--nk-bone); font: 16px/1.5 var(--nk-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
:where(.hm-page) :where(h1, h2, h3, p, ol, ul, figure) { margin: 0; padding: 0; }
:where(.hm-page) :where(ol, ul) { list-style: none; }
:where(.hm-page img) { display: block; max-width: 100%; height: auto; }
:where(.hm-page a) { color: inherit; }

.hm-wrap { width: 100%; max-width: var(--nk-page); margin-inline: auto; padding-inline: var(--nk-gutter); }

/* ---------- Поверхности ---------- */
.hm-paper { position: relative; isolation: isolate; overflow: clip; background: var(--hm-bg, var(--nk-ink)); color: var(--nk-bone); }
.hm-paper--mist { --hm-bg: var(--nk-mist); }
/* Кобальт и ночь — с зерном бумаги и пятном студийного света; светлые разделы чистые. */
.hm-paper--lit::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(ellipse 65% 55% at 22% 18%, rgba(255, 255, 255, .16), transparent 70%);
}
.hm-paper--lit::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .4; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 220px;
}

/* ---------- Типографика: h1 — здесь, h2 — общий .nk-section__title; всё ниже — гротеск ---------- */
.hm-section { padding-block: clamp(64px, 9vw, 112px); }
.hm-name { font: 600 18px/1.3 var(--nk-body); }

/* ---------- Первый экран ---------- */
.hm-hero { padding-block: clamp(40px, 6vw, 72px); }
.hm-hero__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 56px); align-items: center; }
/* Две строки — «ИИ фотосессия / по фото онлайн»: кегль от ширины экрана, строки выравнивает balance. */
.hm-hero__title { font: 700 clamp(40px, 4.9vw, 76px)/1 var(--nk-display); letter-spacing: -.03em; text-wrap: balance; }
.hm-hero__lead { max-width: 44ch; margin-top: 28px; color: var(--nk-ash); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; }
.hm-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hm-hero__trial { margin-top: 16px; color: var(--nk-bone); font-size: 16px; font-weight: 600; }

/* Стена кадров: три колонки медленно едут навстречу друг другу. */
.hm-wall { position: relative; height: min(78vh, 720px); min-height: 520px; }
.hm-wall__cols {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; height: 100%; overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
            mask-image: linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
}
.hm-wall__col { display: grid; gap: 12px; align-content: start; animation: hm-drift 70s linear infinite; }
.hm-wall__col:nth-child(2) { animation-direction: reverse; animation-duration: 84s; }
.hm-wall__col:nth-child(3) { animation-duration: 62s; margin-top: -40px; }
.hm-wall__col li { aspect-ratio: 3 / 4; overflow: hidden; border-radius: 10px; background: var(--nk-surface); }
.hm-wall__col img { width: 100%; height: 100%; object-fit: cover; }
.hm-wall:hover .hm-wall__col { animation-play-state: paused; }
/* Колонка — два одинаковых списка подряд, поэтому сдвиг на половину замыкает петлю. */
@keyframes hm-drift { to { transform: translateY(calc(-50% - 6px)); } }

/* Исходное селфи — отпечаток на солнечном скотче поверх стены. */
.hm-selfie { position: absolute; left: clamp(-56px, -3vw, -16px); bottom: 9%; z-index: 1; width: clamp(128px, 15vw, 190px); padding: 8px 8px 12px; background: #fff; color: var(--nk-night); transform: rotate(-4deg); box-shadow: 0 22px 44px rgba(14, 18, 51, .45); }
.hm-selfie::before { content: ""; position: absolute; top: -12px; left: 50%; width: 76px; height: 24px; background: color-mix(in srgb, var(--nk-sun) 80%, transparent); transform: translateX(-50%) rotate(3deg); }
.hm-selfie img { aspect-ratio: 3 / 4; width: 100%; object-fit: cover; }
.hm-selfie figcaption { margin-top: 8px; font-size: 13px; line-height: 1.3; }

/* ---------- Поводы: крупная первая плитка, в конце — каталог ---------- */
.hm-occasions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: clamp(170px, 17vw, 230px); grid-auto-flow: dense; gap: 12px; }
/* Вид плитки — общий .nk-tile; здесь крупная первая плитка и каталог в конце. */
.hm-occasions .nk-tile:first-child { grid-column: span 2; grid-row: span 2; }
.hm-occasions .nk-tile:first-child .nk-tile__name { padding: 24px; font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; letter-spacing: -.01em; }
.hm-occasions .nk-tile--all { grid-column: span 2; }

/* ---------- Было — стало ---------- */
.hm-cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px) clamp(16px, 2vw, 28px); }
.hm-case a { position: relative; display: block; text-decoration: none; }
.hm-case__after { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 16px; background: var(--nk-paper); }
.hm-case__after .nk-caption { padding: 72px 18px 18px; font: 600 clamp(20px, 2vw, 26px)/1.15 var(--nk-display); }
.hm-case__after img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.hm-case__before { position: absolute; z-index: 2; right: 14px; top: 14px; width: 30%; padding: 5px 5px 7px; background: #fff; transform: rotate(3deg); box-shadow: 0 12px 28px rgba(14, 18, 51, .35); }
.hm-case__before img { aspect-ratio: 3 / 4; width: 100%; object-fit: cover; }
.hm-case a:hover .hm-case__after img { transform: scale(1.04); }

/* ---------- Услуги: три по отдельности и Beauty Pack — отдельной карточкой-комбо ---------- */
.hm-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; }
.hm-service { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hm-service__image { align-self: stretch; aspect-ratio: 4 / 3; margin-bottom: 10px; overflow: hidden; border-radius: 16px; background: var(--nk-mist); }
.hm-service__image img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hm-service__name { font-size: 20px; }
.hm-service__name a { text-decoration: none; transition: color .15s; }
.hm-service__name a:hover { color: var(--nk-accent); }
.hm-service__price { margin-bottom: 10px; color: var(--nk-ash); font-size: 17px; font-variant-numeric: tabular-nums; }

.hm-combo { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: center; margin-top: 40px; overflow: hidden; border-radius: 24px; background: var(--nk-cobalt); color: var(--nk-bone); }
.hm-combo__text { display: grid; justify-items: start; gap: 16px; padding: clamp(28px, 4vw, 56px); }
.hm-combo__title { font: 600 clamp(28px, 3vw, 40px)/1.1 var(--nk-display); letter-spacing: -.01em; }
.hm-combo__list { display: grid; gap: 8px; font-size: 17px; }
.hm-combo__list li { display: flex; align-items: center; gap: 10px; }
.hm-combo__list li::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--nk-sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230e1233' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.hm-combo__price { display: flex; align-items: baseline; gap: 12px; font-variant-numeric: tabular-nums; }
.hm-combo__price strong { font: 700 clamp(40px, 4vw, 56px)/1 var(--nk-body); letter-spacing: -.02em; }
.hm-combo__price .nk-old-price { font-size: 20px; }
/* Пример результата — вставкой в рамке, а не половиной карточки. */
.hm-combo__image { justify-self: end; width: min(100%, 340px); aspect-ratio: 4 / 5; margin: clamp(20px, 3vw, 40px); overflow: hidden; border: 6px solid #fff; border-radius: 16px; background: #fff; box-shadow: 0 24px 48px rgba(14, 18, 51, .35); transform: rotate(2deg); }
.hm-combo__image img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---------- Статьи и вопросы ---------- */
/* Главная статья — крупным кадром с заголовком поверх фото, остальные — списком с миниатюрами. */
.hm-guides { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px clamp(24px, 4vw, 48px); align-items: stretch; }
.hm-guide-lead { position: relative; display: flex; align-items: flex-end; min-height: 440px; overflow: hidden; border-radius: 24px; background: var(--nk-cobalt); color: #fff; text-decoration: none; }
.hm-guide-lead img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; transition: transform .5s; }
.hm-guide-lead::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(to top, rgba(14, 18, 51, .9), transparent); }
.hm-guide-lead:hover img { transform: scale(1.03); }
.hm-guide-lead__text { position: relative; z-index: 1; display: grid; justify-items: start; gap: 12px; padding: clamp(24px, 3vw, 36px); --nk-bone: #fff; --nk-ink: var(--nk-night); }
.hm-guide-lead__title { font: 600 clamp(26px, 2.6vw, 34px)/1.15 var(--nk-display); text-wrap: balance; }
.hm-guide-lead__desc { max-width: 46ch; color: rgba(255, 255, 255, .82); font-size: 16px; line-height: 1.55; }
.hm-guides__list { display: grid; align-content: start; gap: 12px; }
.hm-guide { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 18px; padding: 12px; border-radius: 18px; background: var(--nk-paper); text-decoration: none; transition: box-shadow .15s; }
.hm-guide:hover { box-shadow: 0 0 0 2px var(--nk-accent); }
.hm-guide__image { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: var(--nk-cobalt); }
.hm-guide__image img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.hm-guide__text { display: grid; gap: 6px; }
.hm-guide__category { color: var(--nk-accent); font-size: 13px; font-weight: 600; }
.hm-guide__title { font: 600 18px/1.3 var(--nk-body); }
.hm-guides__all { justify-self: start; margin-top: 8px; }

/* Вопросы в две независимые колонки: раскрытый ответ не сдвигает соседнюю. */
.hm-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 64px); align-items: start; }
.hm-faq .nk-faq { max-width: none; }

.hm-business { padding-block: clamp(48px, 6vw, 72px); }
.hm-business__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.hm-business p { max-width: 34ch; font: 600 clamp(22px, 2.4vw, 28px)/1.25 var(--nk-body); letter-spacing: -.01em; }

/* ---------- Планшет ---------- */
@media (max-width: 960px) {
    .hm-hero__grid { grid-template-columns: 1fr; }
    .hm-hero__title { font-size: clamp(38px, 7.4vw, 64px); }
    .hm-wall { height: 560px; min-height: 0; margin-left: 24px; }
    .hm-selfie { left: -20px; }
    .hm-occasions { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(160px, 28vw, 230px); }
    .hm-cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm-services { gap: 24px 14px; }
    .hm-combo { grid-template-columns: 1fr; }
    .hm-combo__image { justify-self: start; width: min(70%, 280px); margin-top: 0; }
    .hm-faq { grid-template-columns: 1fr; }
    .hm-faq .nk-faq + .nk-faq { border-top: 0; }
}
/* ---------- Телефон ---------- */
@media (max-width: 640px) {
    .hm-actions .nk-btn { width: 100%; }
    .hm-wall { height: 440px; margin-left: 0; }
    .hm-wall__cols, .hm-wall__col { gap: 8px; }
    .hm-wall__col li { border-radius: 6px; }
    .hm-selfie { left: -6px; bottom: 6%; width: 118px; padding: 6px 6px 8px; }
    .hm-selfie figcaption { font-size: 11px; }
    .hm-occasions { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; gap: 8px; }
    .hm-occasions .nk-tile:first-child .nk-tile__name { padding: 16px; font-size: 22px; }
    /* Пары листаются по горизонтали: видно, что их больше. */
    .hm-cases { display: flex; gap: 14px; margin-inline: calc(-1 * var(--nk-gutter)); padding-inline: var(--nk-gutter); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--nk-gutter); scrollbar-width: none; }
    .hm-cases::-webkit-scrollbar { display: none; }
    .hm-case { flex: 0 0 78%; scroll-snap-align: start; }
    .hm-services { grid-template-columns: 1fr; gap: 28px; }
    .hm-guides { grid-template-columns: 1fr; }
    .hm-guide-lead { min-height: 360px; }
    .hm-guide { grid-template-columns: 80px minmax(0, 1fr); gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .hm-wall__col { animation: none; }
    .hm-case__after img { transition: none; }
}
