/* Website «Магия Чудес»: shared layout, «Бархатный вечер» tokens, light/dark theme, phone layout. Old 5-style CSS: site.v4-five-styles.css. */
:root { --bg:#F4EFE6; --surface:#fff; --text:#23302A; --muted:#5A6560; --accent:#7A2533; --on-accent:#fff; --line:rgba(35,48,42,.15);
  --display:Prata, serif; --body:Manrope, system-ui, sans-serif; --radius:0; --maxw:1240px; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--bg); color:var(--text); font:16px/1.55 var(--body); }
img { display:block; max-width:100%; }
a { color:inherit; }
h1,h2,h3 { font-family:var(--display); font-weight:400; line-height:1.15; margin:0 0 .5em; }
h2 { font-size:clamp(28px,3.2vw,42px); }
:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.top { display:flex; align-items:center; gap:28px; max-width:var(--maxw); margin:0 auto; padding:18px 24px; }
.top .logo img { height:128px; width:auto; }
.top nav { display:flex; gap:22px; flex:1; flex-wrap:wrap; font-size:15px; }
.top nav a { text-decoration:none; }
.top nav a:hover { color:var(--accent); }
.btn { display:inline-block; background:var(--accent); color:var(--on-accent); text-decoration:none; padding:13px 22px; border:1px solid var(--accent);
  border-radius:var(--radius); font:600 15px var(--body); cursor:pointer; text-align:center; }
.btn.ghost { background:transparent; color:var(--text); border-color:var(--line); }
.btn.wide { display:flex; width:100%; margin-top:10px; }

main { max-width:var(--maxw); margin:0 auto; padding:0 24px; }
section { margin:72px 0; }
.hero { display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:center; margin-top:24px; }
.hero h1 { font-size:clamp(38px,4.6vw,64px); }
.kicker { text-transform:uppercase; letter-spacing:.14em; font-size:13px; color:var(--muted); margin:0 0 14px; }
.sub { font-size:19px; color:var(--muted); max-width:34em; }
.ctas { display:flex; gap:12px; flex-wrap:wrap; margin-top:26px; }
.hpic img { width:100%; aspect-ratio:1; object-fit:cover; border-radius:var(--radius); }
.cap { font-size:14px; color:var(--muted); margin-top:8px; }

.routes { display:grid; grid-template-columns:repeat(2,1fr); gap:16px; }
.routes a { text-decoration:none; padding:24px; border:1px solid var(--line); background:var(--surface); border-radius:var(--radius); }
.routes b { display:block; font:400 24px var(--display); margin-bottom:6px; }
.routes span { color:var(--muted); font-size:15px; }
.routes a:hover { border-color:var(--accent); }

.shead { display:flex; justify-content:space-between; align-items:end; gap:24px; flex-wrap:wrap; margin-bottom:20px; }
.shead p { color:var(--muted); max-width:46em; margin:0; }
.filters { display:grid; gap:10px; margin-bottom:28px; }
.frow { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.flabel { font-weight:700; font-size:14px; min-width:130px; }
.chip { font:500 14px var(--body); padding:8px 14px; border:1px solid var(--line); background:var(--surface); color:var(--text); border-radius:var(--radius); cursor:pointer; }
.chip.on { background:var(--accent); color:var(--on-accent); border-color:var(--accent); }
.hint { color:var(--muted); font-size:13px; margin-left:8px; }

.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:28px 22px; }
.card { text-decoration:none; display:block; }
.card[hidden] { display:none; }
.card .ph { overflow:hidden; border-radius:var(--radius); background:var(--surface); }
.card img { width:100%; aspect-ratio:1; object-fit:cover; transition:transform .4s; }
.card:hover img { transform:scale(1.04); }
.card .meta { padding-top:12px; }
.sec { font-size:12px; text-transform:uppercase; letter-spacing:.12em; color:var(--muted); }
.card h3 { font-size:22px; margin:4px 0 6px; }
.row { display:flex; justify-content:space-between; align-items:center; }
.price { font-weight:700; }
.sz i { font-style:normal; font-size:12px; border:1px solid var(--line); padding:2px 7px; margin-left:4px; border-radius:var(--radius); }

.prices { display:flex; gap:16px; margin-bottom:20px; }
.prices div { padding:16px 22px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); }
.prices span { display:block; color:var(--muted); font-size:14px; }
.prices b { font:400 28px var(--display); }
.sets { display:grid; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:18px; }
figure { margin:0; }
.sets img { width:100%; aspect-ratio:3/2; object-fit:cover; border-radius:var(--radius); }
figcaption { font-size:15px; margin-top:8px; display:flex; justify-content:space-between; gap:8px; }
figcaption small { color:var(--muted); }
.how ol { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; padding:0; list-style:none; counter-reset:s; }
.how li { counter-increment:s; padding:20px; border-top:2px solid var(--accent); background:var(--surface); }
.how li::before { content:counter(s); display:block; font:400 34px var(--display); color:var(--accent); }
.how b { display:block; font-size:17px; margin-bottom:4px; }
.how li { color:var(--muted); }
.how li b { color:var(--text); }
footer { display:flex; justify-content:space-between; gap:24px; flex-wrap:wrap; max-width:var(--maxw); margin:80px auto 0; padding:32px 24px 48px; border-top:1px solid var(--line); }
footer div { display:grid; gap:4px; }
footer span { color:var(--muted); font-size:14px; }
footer .legal { flex-basis:100%; margin:8px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }

/* Work page */
.crumbs { font-size:14px; color:var(--muted); margin:24px 0; }
.wgrid { display:grid; grid-template-columns:1.15fr 1fr; gap:56px; align-items:start; }
.wpic img { width:100%; aspect-ratio:1; object-fit:cover; border-radius:var(--radius); }
.wpic figcaption { color:var(--muted); font-size:14px; }
.winfo h1 { font-size:clamp(36px,4vw,54px); margin-top:6px; }
.lede { font-size:18px; color:var(--muted); }
.sizes { border:0; padding:0; margin:24px 0 8px; display:grid; gap:8px; }
.sizes legend { font-weight:700; margin-bottom:8px; }
.sizes label { cursor:pointer; }
.sizes input { position:absolute; opacity:0; }
.sizes span { display:grid; grid-template-columns:48px 1fr auto; gap:12px; align-items:center; padding:12px 16px; border:1px solid var(--line); background:var(--surface); border-radius:var(--radius); }
.sizes b { font:400 22px var(--display); }
.sizes em { font-style:normal; color:var(--muted); font-size:14px; }
.sizes input:checked + span { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.sizes input:focus-visible + span { outline:3px solid var(--accent); outline-offset:2px; }
.total { display:flex; justify-content:space-between; align-items:baseline; margin:16px 0 4px; }
.total b { font:400 34px var(--display); }
.comp { padding-left:18px; color:var(--muted); }
.story { max-width:44em; font-size:18px; }
.winfo h3 { font-size:22px; margin-top:28px; }

/* ============ 1. Бархатный вечер ============ */
.t-velvet { --bg:#3A0F18; --surface:#4A1622; --text:#F7EBD6; --muted:#D9C4B2; --accent:#D2B072; --on-accent:#2A0A11; --line:rgba(240,227,204,.22); --display:Forum, serif; --radius:2px; }
.t-velvet h1, .t-velvet h2 { letter-spacing:.01em; }
.t-velvet .hero h1 { font-size:clamp(44px,5.4vw,76px); }
.t-velvet .hpic img { box-shadow:0 30px 60px rgba(10,0,2,.6); }
.t-velvet .routes a { background:linear-gradient(180deg, rgba(240,227,204,.04), rgba(240,227,204,.09)); }
.t-velvet .sizes span { border-style:dashed; }
.t-velvet .sizes input:checked + span { border-style:solid; }
.t-velvet .how li { background:rgba(240,227,204,.06); }

/* ============ Light / dark theme toggle on «Бархатный вечер» (owner 2026-11-10) ============ */
.theme-toggle { display:inline-flex; align-items:center; font:500 14px var(--body); color:var(--text); background:transparent;
  border:1px solid var(--line); border-radius:999px; padding:9px 16px; cursor:pointer; }
.theme-toggle:hover { border-color:var(--accent); }
.theme-toggle span { display:inline-flex; align-items:center; gap:8px; }
.theme-toggle svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.theme-toggle .to-dark svg { fill:currentColor; stroke:none; }
.theme-toggle .to-dark, html[data-theme="light"] .theme-toggle .to-light { display:none; }
html[data-theme="light"] .theme-toggle .to-dark { display:inline-flex; }
.logo-light { display:none; }
html[data-theme="light"] .logo-dark { display:none; }
html[data-theme="light"] .logo-light { display:block; }

/* Light theme: the same velvet look on a light cream ground, wine text and accents. */
html[data-theme="light"] .t-velvet { --bg:#F7F1E8; --surface:#FFFDF9; --text:#3A0F18; --muted:#6B4A45; --accent:#6E1A2A; --on-accent:#F7EBD6; --line:rgba(58,15,24,.18); }
html[data-theme="light"] .t-velvet .hpic img { box-shadow:0 24px 48px rgba(58,15,24,.18); }
html[data-theme="light"] .t-velvet .routes a { background:var(--surface); }
html[data-theme="light"] .t-velvet .how li { background:var(--surface); }

/* Icons, catalog download, order ways (owner 2026-11-10: orders via Telegram or phone only). */
.ico { width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.btn small { font-weight:400; opacity:.75; }
.theme-toggle em { font-style:normal; }
.order-ways { display:flex; flex-wrap:wrap; gap:14px; margin-top:24px; }
.way { display:flex; align-items:center; gap:14px; text-decoration:none; padding:16px 22px; border:1px solid var(--line); background:var(--surface); border-radius:var(--radius); min-width:250px; }
.way:first-child { background:var(--accent); color:var(--on-accent); border-color:var(--accent); }
.way:first-child small { color:inherit; opacity:.8; }
.way .ico { width:26px; height:26px; }
.way b { display:block; font-size:17px; }
.way small { color:var(--muted); font-size:15px; }
.way:hover { border-color:var(--accent); }
.say { color:var(--muted); font-size:15px; margin:10px 0 0; }
.dl-link { display:inline-flex; align-items:center; gap:8px; }
.dl-link small { color:var(--muted); }
.mbar { display:none; }

/* Phone layout: one column, readable type, filters scroll sideways, order bar fixed at the bottom. */
@media (max-width:900px) {
  .top { flex-wrap:wrap; gap:12px 16px; padding:12px 16px; }
  .top .logo img { height:72px; }
  .top nav { order:3; flex:0 0 100%; flex-wrap:nowrap; overflow-x:auto; gap:20px; padding:4px 0 6px; font-size:16px; white-space:nowrap; scrollbar-width:none; }
  .top nav::-webkit-scrollbar { display:none; }
  .theme-toggle { margin-left:auto; padding:10px; }
  .theme-toggle em { display:none; }
  .theme-toggle svg { width:20px; height:20px; }
  .order-btn { display:none; }
  main { padding:0 16px; }
  section { margin:48px 0; }
  .hero, .wgrid, .routes, .how ol { grid-template-columns:1fr; }
  .hero { gap:24px; margin-top:8px; }
  .t-velvet .hero h1 { font-size:36px; }
  .sub { font-size:17px; }
  .ctas .btn { flex:1 1 100%; }
  .routes a { padding:18px; }
  .routes b { font-size:21px; }
  .shead { gap:12px; }
  .shead .btn { width:100%; }
  .frow { display:grid; gap:6px; }
  .chips { display:flex; gap:8px; overflow-x:auto; margin:0 -16px; padding:0 16px 4px; scrollbar-width:none; }
  .chips::-webkit-scrollbar { display:none; }
  .chip { flex:none; padding:10px 16px; font-size:15px; }
  .grid { grid-template-columns:repeat(2,1fr); gap:24px 12px; }
  .card h3 { font-size:18px; }
  .card .row { flex-wrap:wrap; gap:4px; }
  .sz i { margin:0 4px 0 0; }
  .prices { flex-wrap:wrap; }
  .prices div { flex:1 1 140px; padding:14px 16px; }
  .sets { grid-template-columns:repeat(2,1fr); gap:12px; }
  figcaption { flex-direction:column; gap:0; font-size:14px; }
  .way { width:100%; min-width:0; }
  .wgrid { gap:20px; }
  .winfo h1 { font-size:34px; }
  .lede, .story { font-size:17px; }
  .total b { font-size:30px; }
  footer { margin-top:48px; padding:28px 16px 96px; display:grid; gap:20px; }
  .mbar { display:grid; grid-template-columns:1fr 1fr; position:fixed; left:0; right:0; bottom:0; z-index:10; background:var(--bg); border-top:1px solid var(--line);
    padding:10px 12px calc(10px + env(safe-area-inset-bottom)); gap:10px; }
  .mbar a { display:flex; align-items:center; justify-content:center; gap:8px; padding:12px; text-decoration:none; font-weight:600; border:1px solid var(--line); border-radius:var(--radius); }
  .mbar a:first-child { background:var(--accent); color:var(--on-accent); border-color:var(--accent); }
}
@media (max-width:360px) { .grid { grid-template-columns:1fr; } }

/* Catalog tabs (owner 2026-11-10): home and gift / office and reception. */
.tabs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.tab { font-size:16px; padding:12px 20px; }
.note { color:var(--muted); max-width:46em; margin:0 0 20px; }
@media (max-width:900px) { .tabs { display:grid; grid-template-columns:1fr 1fr; } .tab { font-size:15px; padding:12px 10px; } }

/* Office sets (owner 2026-11-10): one block per set, big and small composition shown close. */
.osets { display:grid; gap:48px; margin-top:28px; }
.oset h3 { font-size:28px; margin-bottom:14px; }
.opics { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; align-items:start; }
.opics a { display:block; cursor:zoom-in; }
.opics img { width:100%; aspect-ratio:3/2; object-fit:contain; background:var(--surface); border-radius:var(--radius); }
.opics figcaption { font-size:16px; margin-top:8px; }
.opics figcaption b { font-weight:700; }
@media (max-width:900px) { .osets { gap:36px; } .oset h3 { font-size:24px; } .opics { grid-template-columns:1fr; gap:12px; } }

/* Lightbox for office mock-ups (owner 2026-11-10): same tab, close button top right. */
.lightbox { border:0; padding:0; background:transparent; max-width:100vw; max-height:100vh; width:100vw; height:100vh; margin:0;
  display:none; place-items:center; align-content:center; color:#F7EBD6; }
.lightbox[open] { display:grid; }
.lightbox::backdrop { background:rgba(12,4,6,.9); }
.lightbox img { max-width:min(92vw,1400px); max-height:82vh; width:auto; height:auto; object-fit:contain; }
.lightbox p { margin:12px 16px 0; font-size:16px; text-align:center; }
.lb-close { position:fixed; top:16px; right:16px; width:52px; height:52px; border-radius:50%; border:1px solid rgba(247,235,214,.5);
  background:rgba(12,4,6,.6); color:#F7EBD6; font:300 34px/1 var(--body); cursor:pointer; display:grid; place-items:center; padding:0 0 4px; }
.lb-close:hover { background:rgba(247,235,214,.15); }
body:has(.lightbox[open]) { overflow:hidden; }

/* Product page gallery (owner 2026-11-10): every card photo opens enlarged; office cards have big / small / whole-set thumbnails. */
.wpic .zoom { position:relative; display:block; cursor:zoom-in; }
.zoom-hint { position:absolute; right:12px; bottom:12px; width:44px; height:44px; border-radius:50%; display:grid; place-items:center;
  background:rgba(12,4,6,.55); color:#F7EBD6; }
.zoom-hint svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.wpic img#mainPic { aspect-ratio:auto; object-fit:contain; }
.thumbs { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:12px; }
.thumb { padding:0; border:1px solid var(--line); background:var(--surface); cursor:pointer; border-radius:var(--radius); overflow:hidden; }
.thumb img { width:100%; aspect-ratio:3/2; object-fit:cover; }
.thumb.on { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }
.sizes span { grid-template-columns:minmax(48px,auto) 1fr auto; }

/* Office set cards: whole 3:2 sketch, uncropped, three per row (owner 2026-11-10). */
.grid.wide { grid-template-columns:repeat(3,1fr); }
.card.set img { aspect-ratio:3/2; }
@media (max-width:900px) { .grid.wide { grid-template-columns:1fr; } }
