/* ==========================================================================
   Мастерская Александры
   Тёмный фон как бумага на фото работ, крупная фотография, минимум декора.
   1. Токены  2. База  3. Типографика  4. Лэйаут  5. Компоненты  6. Секции
   ========================================================================== */

/* 1. Токены ---------------------------------------------------------------- */
:root {
  --night: #0f0d0c;
  --night-2: #171412;
  --night-3: #201c19;
  --parchment: #efe6d6;
  --parchment-2: #c4b6a2;
  --parchment-3: #8c8070;
  --brass: #c9a35e;
  --brass-hi: #e0c088;
  --flame: #b3302a;
  --flame-hi: #c63a33;
  --line: rgba(239, 230, 214, .14);
  --line-soft: rgba(239, 230, 214, .08);

  --font-logo: "Ruslan Display", "Yeseva One", Georgia, serif;
  --font-display: "Yeseva One", Georgia, "Times New Roman", serif;
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --fs-h1: clamp(2.375rem, 1.5rem + 3.6vw, 4.5rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.6vw, 2.75rem);
  --fs-h3: clamp(1.25rem, 1.15rem + .4vw, 1.5rem);
  --fs-lead: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
  --fs-small: .875rem;
  --fs-micro: .75rem;

  --space-section: clamp(64px, 9vw, 120px);
  --gutter: clamp(16px, 4vw, 48px);
  --container: 1280px;
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 68px;
}

/* 2. База ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font-body); font-size: 1rem; line-height: 1.65; color: var(--parchment); background: var(--night); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
::selection { background: var(--flame); color: #fff; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 200; padding: 10px 16px; background: var(--brass); color: var(--night); text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 3. Типографика ----------------------------------------------------------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0; text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
.lead { font-size: var(--fs-lead); color: var(--parchment-2); max-width: 54ch; }
.prose { max-width: 66ch; color: var(--parchment-2); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: clamp(1.5rem, 1.3rem + .8vw, 2rem); color: var(--parchment); margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose a { color: var(--brass-hi); }
.prose strong { color: var(--parchment); font-weight: 600; }
blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(1.375rem, 1.15rem + 1vw, 2rem); line-height: 1.35; color: var(--parchment); }

/* 4. Лэйаут ---------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-section); }
.section--tight { padding-block: calc(var(--space-section) * .55); }
.section--deep { background: var(--night-2); }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 4vw, 44px); }
.page-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(32px, 5vw, 52px); }

/* 5. Компоненты ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 24px; border-radius: var(--radius);
  border: 1px solid var(--line); background: transparent; color: var(--parchment);
  font-weight: 500; font-size: .9375rem; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.btn:hover { border-color: var(--parchment-2); background: rgba(239, 230, 214, .05); }
.btn img { width: 20px; height: 20px; border-radius: 5px; flex: none; }
.btn--flame { background: var(--flame); border-color: var(--flame); color: #fff; }
.btn--flame:hover { background: var(--flame-hi); border-color: var(--flame-hi); }
.btn--sm { min-height: 42px; padding: 8px 18px; font-size: .875rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.link { color: var(--brass-hi); text-decoration: none; border-bottom: 1px solid rgba(224, 192, 136, .35); padding-bottom: 1px; transition: border-color .2s; white-space: nowrap; }
.link:hover { border-color: var(--brass-hi); }
.link--arrow::after { content: " →"; }

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(15, 13, 12, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.logo { text-decoration: none; line-height: 1; display: grid; gap: 5px; flex: none; }
.logo__name { font-family: var(--font-logo); font-size: 1.25rem; color: var(--parchment); }
.logo__sub { font-size: .625rem; letter-spacing: .2em; text-transform: uppercase; color: var(--parchment-3); }
.nav { margin-left: auto; }
.nav__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; font-size: .9375rem; color: var(--parchment-2); white-space: nowrap; }
.nav__link:hover { color: var(--parchment); }
.nav__link[aria-current="page"] { color: var(--parchment); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line); background: transparent; border-radius: var(--radius); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 18px; height: 1.5px; background: var(--parchment); position: relative; transition: transform .25s var(--ease); }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.breadcrumbs { padding-top: 24px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: var(--fs-small); color: var(--parchment-3); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; }
.breadcrumbs a { text-decoration: none; color: var(--parchment-2); }
.breadcrumbs a:hover { color: var(--parchment); }

/* Фото */
.frame { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--night-3); }
.frame img { width: 100%; height: 100%; object-fit: cover; }

/* Карточки категорий: фото с подписью поверх */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cats--wide { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cat { position: relative; display: block; text-decoration: none; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; isolation: isolate; }
.cats--wide .cat { aspect-ratio: 3 / 2; }
.cat__img { position: absolute; inset: 0; z-index: -2; }
.cat__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.cat::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgba(10, 8, 7, .85)); }
.cat__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; display: grid; gap: 4px; }
.cat__tag { display: none; }
.cat__name { font-family: var(--font-display); font-size: 1.375rem; line-height: 1.15; color: var(--parchment); }
.cat__short { font-size: var(--fs-small); color: var(--parchment-2); }
.cat:hover .cat__img img { transform: scale(1.04); }

/* Мозаика на главной: 4 колонки × 3 ряда, без пустот */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(160px, 17vw, 280px); gap: 8px; }
.mosaic__item { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--night-3); }
.mosaic__img, .mosaic__img img { width: 100%; height: 100%; }
.mosaic__img img { object-fit: cover; transition: transform .8s var(--ease); }
.mosaic__item--1 { grid-column: span 2; grid-row: span 2; }
.mosaic__item--3 { grid-row: span 2; }
.mosaic__item--5, .mosaic__item--6 { grid-column: span 2; }
.mosaic__item figcaption, .work figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 16px 14px; font-size: var(--fs-small); line-height: 1.4; color: var(--parchment); background: linear-gradient(180deg, transparent, rgba(10, 8, 7, .85)); opacity: 0; transition: opacity .3s; }
.mosaic__item:hover figcaption, .work:hover figcaption, .mosaic__item:focus-within figcaption { opacity: 1; }
.mosaic__item:hover img { transform: scale(1.03); }

/* Галерея: ровная сетка одинаковых кадров */
.gallery { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 8px; }
.gallery--feature .work:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.work { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; background: var(--night-3); }
.work__img, .work__img img { width: 100%; height: 100%; }
.work__img img { object-fit: cover; transition: transform .8s var(--ease); }
.work:hover img { transform: scale(1.03); }

/* Шаги */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; padding: 20px 24px 0 0; border-top: 1px solid var(--line); }
.steps li + li { padding-left: 24px; }
.steps li::before { content: counter(s); display: block; font-size: var(--fs-small); color: var(--parchment-3); margin-bottom: 12px; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--parchment-2); font-size: .9375rem; }

/* Инфо-список */
.spec { border-top: 1px solid var(--line); }
.spec__row { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.spec__key { font-size: var(--fs-small); color: var(--parchment-3); }
.spec__val { color: var(--parchment-2); }
.spec__val ul { margin: 0; padding-left: 1.1em; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line-soft); }
.faq__q { display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; cursor: pointer; list-style: none; font-family: var(--font-display); font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: "+"; font-family: var(--font-body); font-size: 1.5rem; line-height: 1; color: var(--parchment-3); transition: transform .3s var(--ease); }
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__a { padding-bottom: 22px; color: var(--parchment-2); max-width: 66ch; }

/* Форма */
.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field__label { font-size: var(--fs-small); font-weight: 500; }
.field__label small { color: var(--parchment-3); font-weight: 400; }
.field__input { width: 100%; min-height: 52px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--night); }
.field__input::placeholder { color: var(--parchment-3); }
.field__input:focus { outline: none; border-color: var(--parchment-2); }
.field__input[aria-invalid="true"] { border-color: var(--flame-hi); }
textarea.field__input { min-height: 110px; resize: vertical; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-small); color: var(--parchment-2); }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--flame); flex: none; }
.consent a { color: var(--brass-hi); }
.form__status { min-height: 1.5em; font-size: var(--fs-small); }
.form__status--error { color: #ff9c8f; }
.form__status--ok { color: #a7d39a; }

/* Подвал */
.site-footer { border-top: 1px solid var(--line-soft); background: #0a0807; color: var(--parchment-2); padding: 56px 0 calc(32px + env(safe-area-inset-bottom)); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.footer-title { color: var(--parchment); font-size: var(--fs-small); margin: 0 0 12px; font-weight: 600; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; text-decoration: none; font-size: .9375rem; }
.footer-links a:hover { color: var(--parchment); }
.footer-links img { width: 18px; height: 18px; border-radius: 4px; }
.site-footer p a { color: var(--brass-hi); }
.footer-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: var(--fs-micro); color: var(--parchment-3); }
.footer-legal a { color: var(--parchment-2); }

.todo { background: rgba(179, 48, 42, .25); color: #ffd6cf; padding: 0 4px; outline: 1px dashed var(--flame-hi); }
.dock { display: none; }

/* 6. Секции ---------------------------------------------------------------- */
/* Hero: три фото работ во всю ширину, текст поверх */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 560px; height: calc(100svh - var(--header-h)); max-height: 920px; display: flex; align-items: flex-end; }
.hero__photos { position: absolute; inset: 0; z-index: -2; display: grid; grid-template-columns: 1fr 1.25fr 1fr; grid-template-rows: 100%; gap: 3px; background: var(--night); }
.hero__photos img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 8, 7, .55), transparent 55%), linear-gradient(0deg, rgba(10, 8, 7, .94) 0%, rgba(10, 8, 7, .7) 32%, rgba(10, 8, 7, .1) 62%, rgba(10, 8, 7, .25) 100%); }
.hero__content { display: grid; gap: 22px; justify-items: start; padding-bottom: clamp(32px, 6vw, 72px); }
.hero h1 { font-size: clamp(2.5rem, 1.4rem + 4.6vw, 5.75rem); line-height: 1; max-width: 13ch; }
.hero__lead { max-width: 46ch; font-size: var(--fs-lead); color: var(--parchment-2); }

.master { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.master .frame { max-width: 420px; }

.order { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.order__panel { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); background: var(--night-2); }

.product { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; padding-top: 16px; }
.product__media { position: sticky; top: calc(var(--header-h) + 24px); max-width: 520px; }
.product__info { display: grid; gap: 24px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Адаптив ------------------------------------------------------------------ */
@media (max-width: 1180px) { .nav__link { padding: 0 9px; } .site-header__cta { display: none; } }
@media (max-width: 960px) {
  :root { --header-h: 60px; }
  .nav-toggle { display: inline-flex; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; margin: 0; background: var(--night); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav__list { flex-direction: column; }
  .nav__link { min-height: 52px; font-size: 1.125rem; padding: 0; border-bottom: 1px solid var(--line-soft); width: 100%; }
  .master, .order, .product { grid-template-columns: 1fr; }
  .product__media { position: static; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { padding-left: 0; }
  .steps li { padding-bottom: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 42vw; }
  .mosaic__item--1 { grid-column: span 2; grid-row: span 1; }
  .mosaic__item--3 { grid-row: span 2; }
  .mosaic__item--5, .mosaic__item--6 { grid-column: span 1; }
  .dock { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(15, 13, 12, .96); border-top: 1px solid var(--line); }
  .dock .btn { min-height: 46px; padding: 8px; font-size: .8125rem; }
  .dock .btn span { overflow: hidden; text-overflow: ellipsis; }
  body { padding-bottom: 72px; }
}
@media (max-width: 600px) {
  h1, h2, h3 { hyphens: auto; }
  .hero { height: auto; min-height: calc(100svh - var(--header-h) - 72px); }
  .hero__photos { grid-template-columns: 1fr; }
  .hero__photos img:not(:nth-child(2)) { display: none; }
  .hero::before { background: linear-gradient(0deg, rgba(10, 8, 7, .96) 0%, rgba(10, 8, 7, .82) 45%, rgba(10, 8, 7, .3) 75%, rgba(10, 8, 7, .2) 100%); }
  .hero .btn-row { width: 100%; }
  .hero .btn-row .btn { flex: 1 1 40%; }
  .hero .btn-row .btn--flame { flex-basis: 100%; }
  .cats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cats--wide { grid-template-columns: 1fr; }
  .cat__body { padding: 12px; }
  .cat__name { font-size: 1.0625rem; }
  .cat__short { display: none; }
  .steps, .form__row, .footer-grid { grid-template-columns: 1fr; }
  .steps li + li { padding-left: 0; }
  .head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .spec__row { grid-template-columns: 1fr; gap: 4px; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery--feature .work:first-child { grid-row: span 1; aspect-ratio: 4 / 3; }
  .logo__name { font-size: 1.0625rem; }
}
@media (max-width: 380px) { .dock .btn span { display: none; } }

/* Цены ------------------------------------------------------------------- */
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.prices + .prices__group { margin-top: 48px; }
.prices__group { font-size: var(--fs-h3); margin-bottom: 20px; }
.price { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--night-2); }
.price__img { aspect-ratio: 4 / 3; overflow: hidden; }
.price__img img { width: 100%; height: 100%; object-fit: cover; }
.price__body { display: grid; grid-template-rows: auto 1fr auto; gap: 10px; padding: 20px; }
.price__body p { color: var(--parchment-2); font-size: .9375rem; }
.price__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.price__sum { font-family: var(--font-display); font-size: 1.75rem; line-height: 1; white-space: nowrap; }
.prices__note { margin-top: 24px; max-width: 70ch; font-size: var(--fs-small); color: var(--parchment-3); }

/* Оффер: бесплатная диагностика + −10% ------------------------------------ */
.offer { background: var(--night-2); border-block: 1px solid var(--line-soft); padding-block: clamp(48px, 7vw, 88px); }
.offer__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.offer__copy { display: grid; gap: 18px; justify-items: start; }
.offer__copy p { color: var(--parchment-2); max-width: 52ch; }
.offer__badge { display: inline-block; padding: 6px 12px; border-radius: var(--radius); background: var(--flame); color: #fff; font-size: var(--fs-small); font-weight: 600; }
.offer__steps { list-style: none; margin: 0; padding: 0; counter-reset: o; display: grid; gap: 0; }
.offer__steps li { counter-increment: o; display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.offer__steps li:last-child { border-bottom: 1px solid var(--line); }
.offer__steps li::before { content: counter(o); grid-row: span 2; font-family: var(--font-display); font-size: 1.75rem; line-height: 1; color: var(--brass); }
.offer__steps h3 { font-size: 1.125rem; }
.offer__steps p { color: var(--parchment-2); font-size: .9375rem; margin-top: 4px; }

@media (max-width: 960px) {
  .prices { grid-template-columns: 1fr 1fr; }
  .offer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .prices { grid-template-columns: 1fr; }
  .offer .btn { width: 100%; }
}
.offer__alt { font-size: var(--fs-small); color: var(--parchment-3); }
.offer__alt a { color: var(--parchment-2); }
