/*
 * Studio Noir — оформление публичной части.
 *
 * Цвета, шрифты и радиусы приходят переменными из шаблона layout,
 * который берёт их из config/theme.php. Правки под клиента делаются там,
 * этот файл при смене акцента трогать не нужно.
 */

:root {
    --ground: #08090B;
    --surface: #0C0E11;
    --surface-2: #13161A;
    --surface-3: #0F1216;
    --foot: #0A0B0E;

    --hair: rgba(255, 255, 255, 0.07);
    --hair-2: rgba(255, 255, 255, 0.12);
    --hair-3: rgba(255, 255, 255, 0.18);
    --hair-4: rgba(255, 255, 255, 0.38);

    --ink: #F2F3F5;
    --ink-2: #A7ADB6;
    --ink-3: #7B828C;

    --danger: #E0665C;
    --ok: #7FC79B;

    --ease: cubic-bezier(.16, 1, .3, 1);
}

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

/* Alpine ещё не загрузился — прячем то, что он должен скрыть,
   иначе на миг видно раскрытый список подсказок */
[x-cloak] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    /* Нижняя панель на телефоне перекрывает подвал, поэтому запас снизу */
    padding-bottom: env(safe-area-inset-bottom);
}

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

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

button {
    font: inherit;
    color: inherit;
}

h1,
h2,
h3,
p {
    margin: 0;
}

::selection {
    background: var(--accent);
    color: var(--accent-ink);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ─── каркас ─────────────────────────────────────────────── */

.wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    padding: 84px 0;
}

.section--hair {
    border-top: 1px solid var(--hair);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.eyebrow::before {
    content: "";
    width: 20px;
    height: 1px;
    background: var(--accent);
}

.display-xl {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(34px, 4.2vw, 60px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.display-l {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.lead {
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink-2);
    max-width: 420px;
}

.muted {
    color: var(--ink-3);
    font-size: 13px;
}

/* Длинный текст: политика данных, оферта */
.prose {
    margin-top: 32px;
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.75;
}

.prose h2 {
    margin: 36px 0 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.prose p {
    margin: 0 0 14px;
}

.prose ul {
    margin: 0 0 14px;
    padding-left: 20px;
}

.prose li {
    margin-bottom: 6px;
}

.section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.head-note {
    text-align: right;
    line-height: 1.6;
}

/* ─── кнопки ─────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 28px;
    /* У <button> свой фон по умолчанию: без сброса призрачная кнопка
       выходит белой, а светлый текст на ней не виден */
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--t-hover) ease, border-color var(--t-hover) ease, background-color var(--t-hover) ease;
}

.btn--accent {
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-display);
    font-weight: 700;
}

.btn--accent:hover {
    opacity: .86;
}

.btn--accent:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.btn--ghost {
    border-color: var(--hair-3);
    color: var(--ink);
}

.btn--ghost:hover {
    border-color: var(--hair-4);
}

.btn--block {
    width: 100%;
}

.btn--tall {
    min-height: 56px;
    font-size: 15px;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: 1px solid var(--hair-2);
    border-radius: var(--radius-control);
    background: transparent;
    cursor: pointer;
    transition: border-color var(--t-hover) ease;
}

.icon-btn:hover {
    border-color: var(--hair-4);
}

.icon-btn--on {
    border-color: var(--accent-border);
}

.link-under {
    color: var(--ink);
    font-size: 14px;
    border-bottom: 1px solid var(--hair-3);
    padding-bottom: 4px;
    transition: border-color var(--t-hover) ease;
}

.link-under:hover {
    border-color: var(--accent);
}

/* ─── шапка ──────────────────────────────────────────────── */

.site-head {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(8, 9, 11, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--hair);
    /* В приложении на телефоне страница занимает весь экран, включая
       полосу с часами. Без этого запаса шапка уезжает под неё. */
    padding-top: env(safe-area-inset-top);
}

.site-head__in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand__mark {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border: 1px solid var(--accent-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand__name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: .16em;
}

.brand__tag {
    font-size: 9px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-top: 3px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav a {
    color: var(--ink-2);
    font-size: 14px;
    transition: color var(--t-hover) ease;
}

.main-nav a:hover {
    color: var(--ink);
}

.head-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.head-phone {
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    transition: color var(--t-hover) ease;
}

.head-phone:hover {
    color: #fff;
}

/* На широком экране номер виден текстом, иконка звонка не нужна */
.head-call {
    display: none;
}

/* ─── первый экран ───────────────────────────────────────── */

/* Только по вертикали: горизонтальные отступы задаёт .wrap на том же элементе */
.hero {
    padding-top: 72px;
    padding-bottom: 80px;
}

.hero__grid {
    display: flex;
    align-items: center;
    gap: 56px;
    flex-wrap: wrap;
}

.hero__text {
    flex: 1 1 400px;
    min-width: 0;
}

.hero__text h1 {
    margin-top: 26px;
}

.hero__text .lead {
    margin-top: 24px;
}

.hero__actions {
    display: flex;
    gap: 14px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.hero__media {
    flex: 1 1 460px;
    min-width: 0;
    position: relative;
}

.hero__media img {
    width: 100%;
    height: 620px;
    object-fit: cover;
    border: 1px solid var(--hair);
}

.media-fade {
    position: absolute;
    left: 1px;
    right: 1px;
    bottom: 1px;
    height: 190px;
    background: linear-gradient(to top, rgba(8, 9, 11, .92), rgba(8, 9, 11, 0));
    pointer-events: none;
}

.media-cap {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink);
}

.media-cap::before {
    content: "";
    width: 20px;
    height: 1px;
    flex: 0 0 auto;
    background: var(--accent);
}

.media-cap--narrow {
    display: none;
}

.stats {
    display: flex;
    gap: 40px;
    margin-top: 44px;
    flex-wrap: wrap;
}

.stat__value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.stat__label {
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-top: 6px;
}

/* ─── услуги ─────────────────────────────────────────────── */

.srv-list {
    border-top: 1px solid var(--hair);
}

.srv-row {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 76px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--hair);
    flex-wrap: wrap;
    transition: background-color var(--t-state) var(--ease);
}

.srv-row:hover {
    background: var(--surface-3);
}

.srv-num {
    flex: 0 0 28px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .12em;
    color: var(--accent);
}

.srv-name {
    flex: 1 1 240px;
    min-width: 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 19px;
    letter-spacing: -0.015em;
}

.srv-note {
    flex: 1 1 200px;
    min-width: 0;
    font-size: 14px;
    color: var(--ink-2);
}

.srv-time {
    flex: 0 0 90px;
    font-size: 13px;
    color: var(--ink-3);
}

.srv-price {
    flex: 0 0 130px;
    text-align: right;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
}

/* ─── работы ─────────────────────────────────────────────── */

.works-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.work {
    flex: 1 1 320px;
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--hair);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: border-color var(--t-state) var(--ease);
}

.work:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.work__frame {
    display: block;
    overflow: hidden;
}

.work img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 500ms var(--ease);
}

.work:hover img {
    transform: scale(1.03);
}

.work__body {
    padding: 20px 22px;
    border-top: 1px solid var(--hair);
}

.work__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
}

.work__cap {
    font-size: 13px;
    color: var(--ink-2);
    margin-top: 6px;
}

.work__note {
    font-size: 12px;
    color: var(--ink-3);
    margin-top: 10px;
}

/* ─── подвал ─────────────────────────────────────────────── */

.site-foot {
    border-top: 1px solid var(--hair);
    background: var(--foot);
}

.foot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    padding: 64px 0 0;
}

.foot-about {
    flex: 1 1 320px;
}

.foot-col {
    flex: 1 1 260px;
}

.foot-h {
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin: 0 0 18px;
    font-weight: 500;
}

.foot-about p {
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink-2);
    max-width: 340px;
}

.foot-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
    font-size: 14px;
    color: var(--ink-2);
}

.foot-list a {
    transition: color var(--t-hover) ease;
}

.foot-list a:hover {
    color: #fff;
}

.foot-phone {
    font-size: 17px;
    font-weight: 500;
    color: var(--ink);
}

.foot-social {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.foot-social .btn {
    min-height: 44px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-2);
    border-color: var(--hair-2);
}

.legal {
    font-size: 13px;
    line-height: 1.85;
    color: var(--ink-2);
}

.foot-links {
    display: flex;
    gap: 20px;
    margin-top: 18px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--ink-2);
}

.foot-bottom {
    margin-top: 48px;
    padding: 24px 0;
    border-top: 1px solid var(--hair);
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--ink-3);
}

/* ─── поля ───────────────────────────────────────────────── */

.field {
    min-width: 0;
}

/*
 * Ширину поля задаём только внутри строки. Если написать flex-basis
 * на самом .field, то в колоночных формах (вход, профиль) эта величина
 * станет высотой, и между полями появятся дыры в четверть экрана.
 */
.field-row > .field {
    flex: 1 1 260px;
}

.field__label {
    display: block;
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-2);
    margin-bottom: 10px;
}

/* 16px — ниже этого iOS делает зум при фокусе в поле */
.input,
.select,
.textarea {
    width: 100%;
    background: var(--ground);
    border: 1px solid var(--hair-2);
    border-radius: var(--radius-control);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    padding: 0 16px;
    min-height: 56px;
    transition: border-color var(--t-hover) ease;
}

.textarea {
    padding: 16px;
    min-height: 92px;
    line-height: 1.5;
    resize: vertical;
}

.select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 44px;
}

.select option {
    background: var(--surface-2);
    color: var(--ink);
}

.input::placeholder,
.textarea::placeholder {
    color: var(--ink-3);
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.input--err,
.textarea--err {
    border-color: var(--danger);
}

.field__err {
    margin-top: 8px;
    font-size: 12px;
    color: var(--danger);
}

.field-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-3);
    cursor: pointer;
}

.check input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin: 1px 0 0;
    accent-color: var(--accent);
}

.alert {
    border: 1px solid var(--hair-2);
    border-left: 2px solid var(--accent);
    background: var(--surface);
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-2);
    margin-bottom: 24px;
}

.alert--err {
    border-left-color: var(--danger);
}

.alert--ok {
    border-left-color: var(--ok);
}

/* ─── форма записи ──────────────────────────────────────── */

.bk-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-card);
    padding: 34px 36px;
}

.bk-group {
    margin-top: 26px;
}

.bk-group__label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-2);
    margin-bottom: 10px;
}

.bk-foot {
    margin-top: 28px;
    padding-top: 26px;
    border-top: 1px solid var(--hair);
}

.bk-submit {
    flex: 0 0 auto;
    padding: 0 36px;
}

/* полоса дней */

.day-strip {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.day-strip__days {
    display: flex;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.day {
    flex: 1 1 0;
    min-width: 0;
    min-height: 66px;
    padding: 8px 4px;
    background: var(--ground);
    border: 1px solid var(--hair-2);
    border-radius: var(--radius-control);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease;
}

.day:hover:not(.day--off):not(.day--on) {
    border-color: var(--hair-4);
}

.day__wd {
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.day__n {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--ink);
}

.day--off {
    background: var(--surface-2);
    border-color: rgba(255, 255, 255, 0.055);
    cursor: not-allowed;
}

.day--off .day__n,
.day--off .day__wd {
    color: var(--ink-3);
}

.day--on {
    background: var(--accent);
    border-color: var(--accent);
}

.day--on .day__n,
.day--on .day__wd {
    color: var(--accent-ink);
}

.day-nav {
    flex: 0 0 auto;
    width: 38px;
    align-self: stretch;
    background: var(--ground);
    border: 1px solid var(--hair-2);
    border-radius: var(--radius-control);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color var(--t-hover) ease, opacity var(--t-hover) ease;
}

.day-nav:hover:not(:disabled) {
    border-color: var(--hair-4);
}

.day-nav:disabled {
    opacity: .3;
    cursor: not-allowed;
}

/* окна времени */

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
}

.slot {
    min-height: 76px;
    padding: 12px 16px;
    background: var(--ground);
    border: 1px solid var(--hair-2);
    border-radius: var(--radius-control);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease;
}

.slot:hover:not(.slot--off):not(.slot--on) {
    border-color: var(--hair-4);
}

.slot__time {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
}

.slot__note {
    font-size: 11px;
    line-height: 1.35;
    color: var(--ink-3);
}

.slot--off {
    background: #121418;
    border-color: rgba(255, 255, 255, 0.055);
    cursor: not-allowed;
}

.slot--off .slot__time {
    color: var(--ink-3);
}

.slot--on {
    background: var(--accent);
    border-color: var(--accent);
}

.slot--on .slot__time,
.slot--on .slot__note {
    color: var(--accent-ink);
}

/* подсказка марки */

.ac {
    position: relative;
}

.ac__list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    max-height: 288px;
    overflow-y: auto;
    background: var(--surface-2);
    border: 1px solid var(--hair-2);
    border-radius: var(--radius-control);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
}

.ac__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 8px 14px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--hair);
    text-align: left;
    cursor: pointer;
    transition: background-color var(--t-hover) ease;
}

.ac__item:last-child {
    border-bottom: 0;
}

.ac__item:hover,
.ac__item--cur {
    background: var(--surface-3);
}

.ac__logo {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/*
 * Логотипы марок нарисованы под белый фон и на чёрном почти не читаются,
 * а разноцветная россыпь спорила бы со сдержанной темой. Поэтому все
 * приводятся к одному светлому силуэту: форма узнаётся, цвет не мешает.
 */
.ac__logo img {
    max-width: 26px;
    max-height: 26px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: .82;
}

.ac__mono {
    width: 26px;
    height: 26px;
    border: 1px solid var(--accent-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    color: var(--accent);
}

.ac__name {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac__sub {
    margin-left: auto;
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--ink-3);
}

.ac__hint {
    padding: 14px;
    font-size: 13px;
    color: var(--ink-3);
}

/* ─── страницы входа и кабинета ─────────────────────────── */

.narrow {
    max-width: 520px;
    margin: 0 auto;
}

.card {
    background: var(--surface);
    border: 1px solid var(--hair-2);
    border-radius: var(--radius-card);
    padding: 32px;
}

.card__head {
    margin-bottom: 26px;
}

.card__head p {
    margin-top: 10px;
    font-size: 14px;
    color: var(--ink-2);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.visit {
    border: 1px solid var(--hair);
    border-radius: var(--radius-card);
    background: var(--surface);
}

.visit__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 22px;
    border-bottom: 1px solid var(--hair);
}

.visit__when {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
}

.visit__body {
    padding: 18px 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 32px;
    font-size: 14px;
    color: var(--ink-2);
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--hair-2);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.tag--accent {
    border-color: var(--accent-border);
    color: var(--accent);
}

/* перечень работ в заказе */
.items {
    margin-top: 18px;
    border-top: 1px solid var(--hair);
}

.item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--hair);
    font-size: 14px;
}

.item__name {
    color: var(--ink-2);
}

.item__sum {
    flex: 0 0 auto;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}

.item--total .item__name {
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 600;
}

.item--total .item__sum {
    font-size: 17px;
    color: var(--accent);
}

/* фотографии работ в кабинете */
.photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.photo {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid var(--hair);
    transition: border-color var(--t-hover) ease;
}

.photo:hover {
    border-color: var(--hair-4);
}

.photo img {
    width: 100%;
    height: 110px;
    object-fit: cover;
}

.photo__kind {
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 4px 8px;
    background: rgba(8, 9, 11, .82);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.empty {
    border: 1px dashed var(--hair-2);
    padding: 36px 24px;
    text-align: center;
    color: var(--ink-3);
    font-size: 14px;
}

/* ─── страница установки приложения ─────────────────────── */

.bullets {
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bullets li {
    position: relative;
    padding-left: 26px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink-2);
}

.bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 10px;
    height: 6px;
    border-left: 1.5px solid var(--accent);
    border-bottom: 1.5px solid var(--accent);
    transform: rotate(-45deg);
}

.steps-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.steps-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.steps {
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.step__num {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent-border);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    color: var(--accent);
}

.step__text {
    flex: 1 1 auto;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink-2);
}

/* Иконка «Поделиться» прямо в строке — её и нужно искать на экране */
.step__icon {
    display: inline-flex;
    vertical-align: -4px;
    margin-left: 6px;
    padding: 2px;
    border: 1px solid var(--hair-2);
    color: var(--ink);
}

.link-copy {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.link-copy .input {
    flex: 1 1 240px;
    min-width: 0;
    color: var(--ink-2);
}

.link-copy .btn {
    flex: 0 0 auto;
}

/* ─── нижняя панель телефона ─────────────────────────────── */

.mobile-bar {
    display: none;
}

/* ─── подсказка про установку на главный экран ───────────── */

.install-hint {
    position: fixed;
    left: 12px;
    right: 12px;
    /* над нижней панелью, с запасом под вырез экрана */
    bottom: calc(90px + env(safe-area-inset-bottom));
    z-index: 45;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--hair-2);
    border-radius: var(--radius-card);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .6);
}

.install-hint[hidden] {
    display: none;
}

/* Без нижней панели подсказке незачем висеть так высоко */
.no-bar .install-hint {
    bottom: calc(16px + env(safe-area-inset-bottom));
}

.install-hint__icon {
    flex: 0 0 auto;
    color: var(--accent);
    display: flex;
}

.install-hint__text {
    flex: 1 1 auto;
    font-size: 13px;
    line-height: 1.4;
    color: var(--ink-2);
}

.install-hint__close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: var(--ink-3);
    cursor: pointer;
}

.install-hint__close:hover {
    color: var(--ink);
}

/* ─── адаптив ────────────────────────────────────────────── */

@media (max-width: 1040px) {
    .main-nav {
        display: none;
    }
}

@media (max-width: 860px) {
    .wrap {
        padding: 0 20px;
    }

    .section {
        padding: 56px 0;
    }

    .hero {
        padding-top: 28px;
        padding-bottom: 48px;
    }

    /*
     * Порядок как в макете PWA: плашка, заголовок, текст, кадр, цифры.
     * display: contents раскрывает левую колонку, и её части становятся
     * обычными элементами полосы — иначе фото нельзя вклинить между ними.
     */
    .hero__grid {
        flex-direction: column;
        /* stretch обязателен: в колонке center сжал бы кадр до ширины картинки */
        align-items: stretch;
        gap: 0;
    }

    .hero__text {
        display: contents;
    }

    .hero__text > .eyebrow {
        order: 1;
    }

    .hero__text > h1 {
        order: 2;
        margin-top: 14px;
    }

    .hero__text > .lead {
        order: 3;
    }

    .hero__text > .stats {
        order: 5;
    }

    .display-xl {
        font-size: 33px;
        line-height: 1.06;
    }

    .hero__media {
        order: 4;
        /* flex-basis из десктопных правил в колонке стал бы высотой блока */
        flex: 0 0 auto;
        /* кадр во всю ширину экрана, как в макете PWA */
        margin: 16px -20px 0;
        width: auto;
    }

    .media-cap--wide {
        display: none;
    }

    .media-cap--narrow {
        display: flex;
    }

    .hero__media img {
        height: 236px;
        border-left: 0;
        border-right: 0;
    }

    .media-cap {
        left: 20px;
        right: 20px;
        bottom: 13px;
        font-size: 9px;
    }

    .media-fade {
        left: 0;
        right: 0;
        height: 96px;
    }

    .stats {
        gap: 0;
        margin: 6px -20px 0;
        border-top: 1px solid var(--hair);
        border-bottom: 1px solid var(--hair);
    }

    .stat {
        flex: 1 1 0;
        min-width: 0;
        padding: 13px 16px;
        border-right: 1px solid var(--hair);
    }

    .stat:last-child {
        border-right: 0;
    }

    .stat__value {
        font-size: 17px;
    }

    .stat__label {
        font-size: 9px;
        margin-top: 4px;
    }

    .head-phone,
    .head-cta {
        display: none;
    }

    .head-call {
        display: inline-flex;
    }

    .site-head__in {
        min-height: 64px;
    }

    .bk-card {
        padding: 22px 18px;
        margin: 0 -20px;
        border-left: 0;
        border-right: 0;
    }

    .card {
        padding: 24px 18px;
    }

    .srv-row {
        gap: 4px 16px;
        padding: 16px;
    }

    .srv-name {
        flex: 1 1 auto;
        font-size: 17px;
    }

    .srv-note {
        display: none;
    }

    .srv-time {
        flex: 0 0 auto;
        order: 3;
    }

    .srv-price {
        flex: 1 1 auto;
        order: 4;
        font-size: 15px;
    }

    .work img {
        height: 220px;
    }

    .foot-grid {
        gap: 36px;
        padding-top: 44px;
    }

    .slot-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* нижняя панель вместо кнопки в шапке */
    .hero__actions {
        display: none;
    }

    .mobile-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
        background: rgba(8, 9, 11, 0.94);
        backdrop-filter: blur(16px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-bar .btn {
        flex: 1 1 auto;
        min-height: 52px;
        font-size: 15px;
    }

    .mobile-bar .icon-btn {
        width: 52px;
        height: 52px;
        border-color: var(--hair-3);
    }

    .site-foot {
        padding-bottom: 86px;
    }

    /* Страница записи обходится без нижней панели — и без запаса под неё */
    .no-bar .site-foot {
        padding-bottom: 0;
    }

    .head-note {
        text-align: left;
    }

    .section__head {
        gap: 16px;
        margin-bottom: 24px;
    }
}

@media (max-width: 420px) {
    .slot-grid {
        grid-template-columns: 1fr;
    }

    .field-row > .field {
        flex-basis: 100%;
    }

    .bk-submit {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
