/* Багетная мастерская — белая «галерея»: белый фон, почти чёрный текст, золото багета как единственный цвет.
   Крупный текст и одна главная кнопка на экран — для читателей 50+. */
:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --wall: #F4F2EE;
  --fg: #1E1A17;
  --muted: #625A53;
  --line: #E4DFD8;
  --gold: #9A7334;
  --gold-soft: #F6EEDF;
  --btn: #1E1A17;
  --btn-fg: #FFFFFF;
  --ok: #2F7A45;
  --err: #B3261E;
  --dark: #221C18;
  --dark-fg: #F3EDE4;
  --dark-muted: #BDB2A4;
  --display: "Manrope", "Segoe UI", Arial, sans-serif;
  --body: "Onest", "Segoe UI", Arial, sans-serif;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141110; --surface: #1D1917; --wall: #1A1614; --fg: #F1ECE6; --muted: #B3A99E;
    --line: #342E29; --gold: #D8B574; --gold-soft: #2E261D; --btn: #D8B574; --btn-fg: #141110; --ok: #7FC08F; --err: #F2B8B5;
    --dark: #0E0C0B; --dark-fg: #F3EDE4; --dark-muted: #BDB2A4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141110; --surface: #1D1917; --wall: #1A1614; --fg: #F1ECE6; --muted: #B3A99E;
  --line: #342E29; --gold: #D8B574; --gold-soft: #2E261D; --btn: #D8B574; --btn-fg: #141110; --ok: #7FC08F; --err: #F2B8B5;
  --dark: #0E0C0B; --dark-fg: #F3EDE4; --dark-muted: #BDB2A4;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 18px; line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; }
p { margin: 0; }
figure { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 780px; }
section { padding-block: 72px; }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 36px; max-width: 680px; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.15; }
.lead { color: var(--muted); font-size: 19px; }
.small { font-size: 14px; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: var(--radius); font: 600 18px/1 var(--body); text-decoration: none; cursor: pointer; border: 2px solid var(--btn); background: var(--btn); color: var(--btn-fg); }
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--fg); filter: none; }
.mock-note { display: inline-block; font-size: 13px; font-weight: 600; color: var(--gold); background: var(--gold-soft); padding: 4px 10px; border-radius: 999px; }

/* Шапка */
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark { width: 38px; height: 38px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text b { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.logo-text span { font-size: 14px; color: var(--muted); }
nav.main { display: flex; gap: 26px; font-weight: 500; }
nav.main a { text-decoration: none; color: var(--muted); }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--fg); }
.top-phone { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.top-phone a { font-weight: 700; font-size: 19px; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.status { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.status.open i { background: var(--ok); }

/* Первый экран */
.hero { padding-block: 56px 72px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.hero h1 { font-size: clamp(38px, 5.4vw, 60px); line-height: 1.08; }
.hero .lead { font-size: 21px; max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 14px 36px; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 8px; }
.fact { display: flex; flex-direction: column; padding-top: 14px; }
.fact b { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; }
.fact span { font-size: 15px; color: var(--muted); }

/* Рама: багет, паспарту, картина (заглушки до настоящих фото) */
.frame { position: relative; padding: 22px; background: linear-gradient(135deg, #7c5d27, #e6c77a 22%, #a7823d 45%, #f1dc9c 68%, #8a6a2f); box-shadow: 0 30px 50px -24px rgba(43,36,32,.55), inset 0 0 0 2px rgba(0,0,0,.18); }
.frame .mat { background: #F8F6F1; padding: 30px; box-shadow: inset 0 2px 6px rgba(0,0,0,.25); }
.frame .art { aspect-ratio: 4 / 5; background:
  radial-gradient(circle at 70% 30%, #f6e2b3 0 9%, transparent 10%),
  linear-gradient(to bottom, #e9c79a 0%, #e0a878 38%, #b86e4b 46%, #6f7f6a 47%, #55694f 62%, #3f5446 100%); }
.frame .art.alt { background: linear-gradient(160deg, #3d5a73, #6c8aa0 45%, #c9b28a 46%, #a88b62); }
.frame .art.alt2 { background: repeating-linear-gradient(45deg, #b54a3c 0 12px, #efe2cc 12px 24px); }
.hero-visual { position: relative; width: 100%; background: radial-gradient(120% 90% at 30% 10%, var(--surface) 0%, var(--wall) 70%); border-radius: 20px; padding: 48px 56px 40px; }
.hero-visual .frame { max-width: 360px; margin: 0 auto; }
.hero-visual .hero-photo { max-height: 520px; width: auto; margin: 0 auto; box-shadow: 0 30px 50px -24px rgba(43,36,32,.55); }
.hero-visual figcaption { margin-top: 22px; font-size: 14px; color: var(--muted); text-align: center; }
.hero-tag { position: absolute; right: 20px; bottom: 64px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 14px; line-height: 1.35; box-shadow: 0 10px 24px -14px rgba(0,0,0,.35); }
.hero-tag b { display: block; font-size: 15px; }

/* Что оформляем */
.kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kind { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; gap: 18px; align-items: center; }
.kind svg, .kind img { width: 52px; height: 52px; flex: none; color: var(--gold); }
.kind h3 { font-size: 20px; font-weight: 600; }
.kind p { font-size: 16px; color: var(--muted); }

/* Цены: виды багета — заголовки столбцов */
.prices-bg { background: var(--wall); }
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding-top: 12px; }
table.price { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 680px; }
.price th, .price td { padding: 18px 22px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.price thead th { border-bottom: 2px solid var(--line); }
.price thead th:first-child { vertical-align: bottom; font-size: 15px; color: var(--muted); font-weight: 600; }
.price .tier-h { width: 26%; }
.price .tier-h .strip { height: 14px; border-radius: 3px; margin-bottom: 14px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.price .tier-h b { display: block; font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; }
.price .tier-h span { display: block; font-size: 15px; font-weight: 400; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.price .pick { background: var(--gold-soft); }
.price thead .pick { position: relative; }
.price thead .pick::before { content: "Выбирают чаще всего"; position: absolute; top: -1px; left: 22px; transform: translateY(-50%); font-size: 12px; font-weight: 700; letter-spacing: .04em; background: var(--gold); color: var(--btn-fg); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.price td { font-size: 19px; }
.price td:first-child { font-weight: 700; font-size: 18px; white-space: nowrap; }
.price tr:last-child td { border-bottom: 0; }
.price-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-top: 16px; color: var(--muted); font-size: 16px; }

/* Каталог */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 500 16px var(--body); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .corner { position: relative; aspect-ratio: 4 / 3; background: var(--wall); display: grid; place-items: center; }
.card .corner img { width: 100%; height: 100%; object-fit: cover; }
.card .corner span { width: 62%; aspect-ratio: 1; border: 18px solid; border-image-slice: 1; box-shadow: 0 10px 18px -10px rgba(0,0,0,.45); }
.card .corner span[class^="m-"] { background: #F8F6F1; }
.card .badge { position: absolute; left: 10px; top: 10px; font-style: normal; font-size: 13px; font-weight: 700; background: var(--surface); color: var(--muted); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }
.card.is-out .corner > span, .card.is-out .corner > img { opacity: .45; }
.card .body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.card .art-no { font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.card h3 { font-size: 18px; font-weight: 600; }
.card .spec { font-size: 15px; color: var(--muted); }
.card .from { margin-top: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.card .from small { font-weight: 400; color: var(--muted); font-size: 14px; }
.catalog-more { margin-top: 28px; display: flex; justify-content: center; }
.catalog-cta { margin-top: 40px; padding: 28px; border-radius: var(--radius); background: var(--gold-soft); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.catalog-cta p { font-size: 19px; font-weight: 600; }

/* Цвета багета (материал — одинаков в обеих темах) */
.m-gold   { border-image-source: linear-gradient(135deg, #7c5d27, #e6c77a 30%, #a7823d 55%, #f1dc9c 75%, #8a6a2f); background: linear-gradient(90deg, #7c5d27, #e6c77a 30%, #a7823d 55%, #f1dc9c 75%, #8a6a2f); }
.m-silver { border-image-source: linear-gradient(135deg, #6f7377, #e3e5e6 30%, #9a9ea2 55%, #f4f5f5 75%, #7d8185); background: linear-gradient(90deg, #6f7377, #e3e5e6 30%, #9a9ea2 55%, #f4f5f5 75%, #7d8185); }
.m-walnut { border-image-source: linear-gradient(135deg, #4a2f1d, #8b5e3c 30%, #6b452b 55%, #a57449 75%, #5a3a24); background: linear-gradient(90deg, #4a2f1d, #8b5e3c 30%, #6b452b 55%, #a57449 75%, #5a3a24); }
.m-oak    { border-image-source: linear-gradient(135deg, #a07a4e, #d9b98b 30%, #c29b6b 55%, #e7cfa6 75%, #b38b5d); background: linear-gradient(90deg, #a07a4e, #d9b98b 30%, #c29b6b 55%, #e7cfa6 75%, #b38b5d); }
.m-white  { border-image-source: linear-gradient(135deg, #cfcbc2, #fbfaf6 30%, #e6e3dc 55%, #ffffff 75%, #d9d6cf); background: linear-gradient(90deg, #cfcbc2, #fbfaf6 30%, #e6e3dc 55%, #ffffff 75%, #d9d6cf); }
.m-black  { border-image-source: linear-gradient(135deg, #111, #3b3b3b 30%, #222 55%, #4a4a4a 75%, #1b1b1b); background: linear-gradient(90deg, #111, #3b3b3b 30%, #222 55%, #4a4a4a 75%, #1b1b1b); }

/* Три шага — светлая тёплая полоса; цифры, заголовки и тексты стоят на общих «полках» */
.steps-band { background: var(--gold-soft); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto auto auto; column-gap: 16px; row-gap: 16px; }
.step { background: var(--surface); border-radius: var(--radius); padding: 28px; display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 12px; box-shadow: 0 12px 28px -20px rgba(60,40,10,.45); }
.step .num { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--btn-fg); font-family: var(--display); font-weight: 800; font-size: 22px; }
.step h3 { font-size: 21px; font-weight: 700; align-self: start; }
.step p { color: var(--muted); font-size: 17px; align-self: start; }
.steps-cta { margin-top: 32px; display: flex; justify-content: center; }

/* Работы */
.works { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: end; }
.works .frame { padding: 12px; }
.works .frame .mat { padding: 14px; }
.works .frame.walnut { background: linear-gradient(135deg, #4a2f1d, #8b5e3c 30%, #6b452b 55%, #a57449 75%, #5a3a24); }
.works .frame.black { background: linear-gradient(135deg, #111, #3b3b3b 30%, #222 55%, #4a4a4a 75%, #1b1b1b); }
.works .frame.silver { background: linear-gradient(135deg, #6f7377, #e3e5e6 30%, #9a9ea2 55%, #f4f5f5 75%, #7d8185); }
.works figcaption { margin-top: 12px; font-size: 15px; color: var(--muted); }
.works .art.sq { aspect-ratio: 1; }
.works .art.land { aspect-ratio: 4 / 3; }
.work-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 6px; overflow: hidden; }
.work-open img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* Отзыв */
.review { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.stars { color: var(--gold); font-size: 22px; letter-spacing: 2px; }
.review blockquote { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.35; letter-spacing: -0.01em; }
.review .who { margin-top: 14px; color: var(--muted); font-size: 16px; }
.review .rating { text-align: center; display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.review .rating b { font-family: var(--display); font-weight: 800; font-size: 52px; line-height: 1; }
.review .rating span { font-size: 14px; color: var(--muted); }

/* Заявка */
.order-bg { background: var(--wall); }
form.order { max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; display: flex; flex-direction: column; gap: 22px; box-shadow: 0 20px 40px -30px rgba(60,40,10,.4); }
.order-head { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.order-title { color: var(--gold); font-size: clamp(30px, 3.8vw, 40px); }
.form-fields { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 600; font-size: 17px; }
.field .hint { font-size: 15px; font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { font: 18px var(--body); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; min-height: 54px; width: 100%; }
.field textarea { min-height: 96px; resize: vertical; }
.field input[type="file"] { padding: 12px; }
.field input[aria-invalid="true"] { border-color: var(--err); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; color: var(--muted); cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--gold); }
.consent a { color: var(--fg); }
.form-error { color: var(--err); font-weight: 600; font-size: 17px; padding: 12px 16px; border: 2px solid var(--err); border-radius: 8px; background: color-mix(in srgb, var(--err) 8%, transparent); }
.consent.is-invalid { color: var(--err); }
.consent.is-invalid input { outline: 2px solid var(--err); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-ok { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; align-items: center; text-align: center; }
.form-ok h3 { font-family: var(--display); font-weight: 800; font-size: 28px; }
.form-ok p { color: var(--muted); }

/* Контакты */
.contacts { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 32px; align-items: start; padding-top: 28px; border-top: 1px solid var(--line); }
.c-block { display: flex; flex-direction: column; gap: 4px; }
.c-block .label { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.c-block .val { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
.hours { display: grid; grid-template-columns: auto auto; gap: 4px 24px; font-size: 18px; font-variant-numeric: tabular-nums; justify-content: start; }
.hours .off { color: var(--muted); }
.c-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }

/* Внутренние страницы */
.page-top { padding-block: 40px 72px; }
.page-title { font-size: clamp(34px, 4.6vw, 50px); line-height: 1.1; }
.crumbs { font-size: 15px; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }
.prose h2 { font-size: 24px; margin-top: 32px; margin-bottom: 8px; }
.prose p { color: var(--fg); }

/* Подвал */
footer { padding-block: 32px; background: var(--dark); color: var(--dark-muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer a { color: var(--dark-muted); }

/* Просмотр фото работ */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(10, 8, 7, .9); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 80vh; object-fit: contain; }
.lightbox figcaption { color: #F3EDE4; font-size: 16px; }
.lb-close, .lb-nav { position: fixed; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 50%; width: 52px; height: 52px; font-size: 32px; line-height: 1; cursor: pointer; }
.lb-close { top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { padding: 36px 28px 32px; }
  .cards, .works { grid-template-columns: repeat(2, 1fr); }
  .kinds, .steps { grid-template-columns: 1fr 1fr; }
  .contacts { grid-template-columns: 1fr 1fr; }
  .c-actions { flex-direction: row; flex-wrap: wrap; }
  nav.main { display: none; }
}
@media (max-width: 620px) {
  body { font-size: 17px; }
  section { padding-block: 52px; }
  .kinds, .steps, .row2, .contacts { grid-template-columns: 1fr; }
  .c-actions { flex-direction: column; }
  .hero-tag { display: none; }
  .review { grid-template-columns: 1fr; padding: 24px; }
  .review .rating { text-align: left; }
  .logo-text span { display: none; }
  .top-phone .status { display: none; }
  .top-phone a { font-size: 16px; }
  .hero-actions .btn { width: 100%; }
  form.order { padding: 22px; }
  .lb-nav { display: none; }
}
@media (max-width: 420px) {
  .cards, .works { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card .body { padding: 12px 12px 16px; }
  .card h3 { font-size: 16px; }
  .logo-text b { font-size: 17px; }
}
@media (prefers-reduced-motion: no-preference) {
  .card, .btn, .chip { transition: transform .15s ease, filter .15s ease, border-color .15s ease; }
  .card:hover { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
