/* Фарфор - витрина. Цвета светлой и тёмной темы - assets/palette.css, тема - data-theme на <html> (переключатель в шапке).
   Шрифты только свои (assets/fonts): внешний шрифт из России держит отрисовку до 30 секунд */

:root {
  /* Цвета и тени - в assets/palette.css (собирается из tools/palettes.py по выбору в админке) */
  --danger: #B3261E;
  --radius: 16px;
  --radius-sm: 10px;
  /* Решение владельца 29.10: вариант A - один шрифт Manrope и для заголовков, и для текста */
  --serif: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2,.7,.1,1);
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* зерно поверх страницы - матовость глазури */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* типографика */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; margin: 0; text-wrap: balance; }
.display { font-size: clamp(40px, 6.6vw, 88px); }
.h2 { font-size: clamp(30px, 4.2vw, 52px); }
.h3 { font-size: clamp(24px, 2.6vw, 32px); }
.eyebrow { font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); max-width: 46ch; }
em.it { font-style: normal; color: var(--cobalt); }
.muted { color: var(--muted); }

/* шапка */
.hdr { position: sticky; top: 0; z-index: 50; transition: background .3s, box-shadow .3s, backdrop-filter .3s; }
.hdr.scrolled { background: var(--bg); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.hdr-in { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font: 700 18px/1 var(--serif); letter-spacing: .16em; text-transform: uppercase; }
.logo svg { width: 22px; height: 30px; color: var(--cobalt); }
.nav { display: flex; gap: 22px; margin-left: 12px; }
.nav a { font-size: 14px; color: var(--ink-2); position: relative; padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav a:hover::after, .nav a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
.hdr-act { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.icon-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; transition: background .2s; }
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.icon-btn svg { width: 21px; height: 21px; }
.badge { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--cobalt); color: var(--paper); font: 600 10px/17px var(--sans); text-align: center; }
.badge:empty, .badge[data-n="0"] { display: none; }
.burger { display: none; }
.nav a { white-space: nowrap; }
@media (max-width: 1180px) {
  .nav { display: none; }
  .burger { display: grid; }
}
@media (max-width: 900px) {
  .hdr-in { gap: 12px; height: 64px; }
}
.drawer { position: fixed; inset: 0; z-index: 60; background: var(--bg); padding: 88px var(--gutter) 40px; display: flex; flex-direction: column; gap: 4px;
  clip-path: circle(0 at calc(100% - 40px) 32px); transition: clip-path .6s var(--ease); visibility: hidden; }
.drawer.open { clip-path: circle(150% at calc(100% - 40px) 32px); visibility: visible; }
.drawer a { font: 700 26px/1.4 var(--serif); border-bottom: 1px solid var(--line); padding: 8px 0; }
.drawer-close { position: absolute; top: 12px; right: calc(var(--gutter) - 4px); }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 26px; border-radius: 999px;
  font: 500 15px/1 var(--sans); background: var(--ink); color: var(--bg); transition: transform .3s var(--ease), background .3s; will-change: transform; }
.btn:hover { background: var(--cobalt); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); background: transparent; }
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* герой */
.hero { position: relative; min-height: min(100svh, 980px); display: grid; align-items: center; overflow: hidden; margin-top: -72px; padding-top: 72px; }
.hero-glow { position: absolute; inset: -20% -10% auto; height: 120%; pointer-events: none;
  background: radial-gradient(40% 50% at 70% 40%, color-mix(in srgb, var(--cobalt) 12%, transparent), transparent 70%),
              radial-gradient(35% 40% at 20% 70%, color-mix(in srgb, var(--celadon) 22%, transparent), transparent 70%); filter: blur(10px); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 24px; }
.hero h1 { line-height: .98; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; }
.hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
.hero h1 .line:nth-child(3) > span { animation-delay: .24s; }
@keyframes rise { to { transform: none; } }
.hero .lead { margin: 28px 0 36px; opacity: 0; animation: fade 1s .5s var(--ease) forwards; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; opacity: 0; animation: fade 1s .65s var(--ease) forwards; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.stage { position: relative; aspect-ratio: 4 / 5; width: 100%; max-height: 78svh; }
.stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.stage .fallback { position: absolute; inset: 8% 18%; color: var(--line-2); transition: opacity .8s; }
.stage.ready .fallback { opacity: 0; }
.stage-caption { position: absolute; left: 0; bottom: 4%; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.stage-caption b { font: 500 13px/1 var(--sans); color: var(--ink); letter-spacing: .04em; }
.stage-dots { display: flex; gap: 6px; }
.stage-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transition: background .3s, transform .3s; }
.stage-dots i.on { background: var(--cobalt); transform: scale(1.3); }
.scroll-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: 1px; height: 54px; background: linear-gradient(var(--line-2), transparent); overflow: hidden; }
.scroll-hint::after { content: ""; position: absolute; inset: 0; background: var(--ink); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: 88px; padding-bottom: 40px; margin-top: -64px; }
  .hero-grid { grid-template-columns: 1fr; }
  .stage { max-height: 44svh; aspect-ratio: 1 / 1; order: -1; margin-bottom: -20px; }
  .scroll-hint { display: none; }
}

/* бегущая лента материалов */
.ribbon { border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0; }
.ribbon-track { display: flex; gap: 48px; width: max-content; animation: marquee 38s linear infinite; }
.ribbon span { font: 500 20px/1 var(--serif); letter-spacing: .02em; color: var(--ink-2); white-space: nowrap; display: flex; align-items: center; gap: 48px; }
.ribbon span::after { content: ""; width: 7px; height: 7px; border: 1px solid var(--gold); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* секции */
.sec { padding: clamp(72px, 11vw, 150px) 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(32px, 5vw, 64px); flex-wrap: wrap; }
.sec-head .eyebrow { margin-bottom: 16px; display: block; }

/* бенто категорий с бликом под курсором */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(220px, auto); gap: 14px; }
.tile { --mx: 50%; --my: 50%; position: relative; grid-column: span 4; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line);
  padding: 26px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; isolation: isolate;
  transition: transform .6s var(--ease), border-color .3s; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--cobalt) 10%, transparent), transparent 60%); }
.tile:hover { border-color: var(--line-2); }
.tile:hover::before { opacity: 1; }
.tile.wide { grid-column: span 8; }
.tile.tall { grid-row: span 2; }
.tile-art { position: absolute; right: -4%; bottom: -6%; width: 58%; height: 86%; color: var(--ink); opacity: .9; transition: transform .9s var(--ease); }
.tile:hover .tile-art { transform: translateY(-8px) rotate(-2deg); }
.tile-art path, .tile-art ellipse, .tile-art circle, .tile-art line { vector-effect: non-scaling-stroke; }
.tile h3 { font-size: clamp(26px, 2.6vw, 36px); max-width: 12ch; }
.tile .meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.tile .arrow { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-2); transition: background .3s, color .3s; }
.tile:hover .arrow { background: var(--ink); color: var(--bg); }
.tile .arrow svg { width: 16px; height: 16px; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(190px, auto); }
  .tile, .tile.wide { grid-column: span 2; }
  .tile.tall { grid-row: span 1; }
}

/* липкая история материала */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 96px); }
.story-pin { position: sticky; top: 96px; height: calc(100svh - 140px); max-height: 640px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.story-pin svg { width: 62%; height: 80%; color: var(--ink); }
.story-pin [data-layer] { opacity: 0; transition: opacity .8s var(--ease), transform .8s var(--ease); transform: translateY(10px); }
.story-pin [data-layer].on { opacity: 1; transform: none; }
.story-num { position: absolute; top: 22px; left: 24px; font: 700 48px/1 var(--serif); color: var(--line-2); }
.story-steps { display: flex; flex-direction: column; }
.step { min-height: 52svh; display: flex; flex-direction: column; justify-content: center; border-top: 1px solid var(--line); padding: 32px 0; opacity: .35; transition: opacity .6s; }
.step.on { opacity: 1; }
.step h3 { font-size: clamp(30px, 3.4vw, 44px); margin: 12px 0 14px; }
.step p { margin: 0; color: var(--ink-2); max-width: 42ch; }
@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; }
  .story-pin { top: 72px; height: 42svh; z-index: 2; }
  .step { min-height: 46svh; }
}

/* появление при прокрутке */
.rv { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .08s; } .rv-d2 { transition-delay: .16s; } .rv-d3 { transition-delay: .24s; }

/* статьи */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.post { border-top: 1px solid var(--ink); padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.post h3 { font-size: 26px; }
.post p { margin: 0; color: var(--muted); font-size: 15px; }
.post .tag { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cobalt); }
@media (max-width: 900px) { .posts { grid-template-columns: 1fr; } }

/* факты */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.fact { padding: 28px 22px 8px 0; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact b { display: block; font: 700 clamp(34px, 3.8vw, 52px)/1 var(--serif); letter-spacing: -.02em; margin-bottom: 12px; }
.fact span { font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .facts { grid-template-columns: 1fr 1fr; } .fact:nth-child(2) { border-right: 0; } .fact { padding-left: 0; border-bottom: 1px solid var(--line); } }

/* хлебные крошки */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); padding-top: 24px; }
.crumbs a:hover { color: var(--ink); }
.crumbs li { list-style: none; display: flex; gap: 8px; }
.crumbs li + li::before { content: "/"; color: var(--line-2); }
.crumbs ol { display: contents; }

/* каталог */
.cat-hero { padding: 32px 0 40px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: end; border-bottom: 1px solid var(--line); }
.cat-hero h1 { font-size: clamp(42px, 6vw, 84px); margin-top: 14px; }
.cat-hero .lead { margin: 0; }
@media (max-width: 900px) { .cat-hero { grid-template-columns: 1fr; } }
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 22px 0; }
.chip { height: 38px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 14px; box-shadow: inset 0 0 0 1px var(--line-2); transition: background .2s, color .2s; }
.chip:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.chip[aria-current] { background: var(--ink); color: var(--bg); box-shadow: none; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 14px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr 1fr; gap: 22px 10px; } }
.card { position: relative; display: flex; flex-direction: column; gap: 12px; }
.card-media { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-sm); overflow: hidden; background: var(--paper); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .6s; }
.card-media img + img { position: absolute; inset: 0; opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .card:hover .card-media img:first-child { transform: scale(1.04); }
  .card:hover .card-media img + img { opacity: 1; }
}
.card-fav { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--paper) 80%, transparent); backdrop-filter: blur(6px); }
.card-fav svg { width: 18px; height: 18px; }
.fav-on svg { fill: var(--cobalt); color: var(--cobalt); }
.card-title { font-size: 15px; line-height: 1.4; }
.card-price { display: flex; gap: 10px; align-items: baseline; font-weight: 600; }
.card-price s { font-weight: 400; color: var(--muted); font-size: 14px; }
.flag { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: var(--paper); }

.empty { margin: 48px 0; padding: clamp(36px, 6vw, 72px); border: 1px dashed var(--line-2); border-radius: var(--radius); display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
.empty svg { width: 96px; height: 120px; color: var(--muted); }
.empty h2 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 10px; }
.empty p { margin: 0 0 20px; color: var(--ink-2); max-width: 52ch; }
@media (max-width: 640px) { .empty { grid-template-columns: 1fr; } }

.seo-text { columns: 2 340px; column-gap: 48px; color: var(--ink-2); font-size: 15px; padding: 48px 0 0; border-top: 1px solid var(--line); }
.seo-text h2 { column-span: all; font-size: clamp(28px, 3vw, 40px); margin-bottom: 20px; color: var(--ink); }
.seo-text h3 { font-size: 22px; margin: 0 0 8px; color: var(--ink); break-after: avoid; }
.seo-text p { margin: 0 0 16px; break-inside: avoid; }

/* карточка товара */
.pp { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 5vw, 72px); padding-block: 28px 40px; }
.pp-gallery { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-self: start; position: sticky; top: 88px; }
.pp-thumbs { display: flex; flex-direction: column; gap: 8px; }
.pp-thumbs button { aspect-ratio: 4/5; border-radius: 8px; overflow: hidden; opacity: .55; transition: opacity .2s; box-shadow: inset 0 0 0 1px var(--line); }
.pp-thumbs button[aria-current="true"] { opacity: 1; box-shadow: inset 0 0 0 1px var(--ink); }
.pp-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pp-main { position: relative; aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; background: var(--paper); cursor: zoom-in; }
.pp-strip { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pp-strip::-webkit-scrollbar { display: none; }
.pp-strip img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; transition: transform .25s; transform-origin: var(--zx, 50%) var(--zy, 50%); }
.pp-main.zoom img { transform: scale(2); }
@media (max-width: 900px) {
  .pp { grid-template-columns: 1fr; padding-top: 12px; }
  .pp > * { min-width: 0; }
  .pp-gallery { grid-template-columns: 1fr; position: static; }
  .pp-thumbs { flex-direction: row; order: 2; overflow-x: auto; }
  .pp-thumbs button { width: 60px; flex: 0 0 60px; }
}
.pp h1 { font-size: clamp(34px, 4vw, 54px); margin: 12px 0 18px; }
.pp-price { display: flex; align-items: baseline; gap: 14px; font: 700 30px/1 var(--serif); margin-bottom: 8px; }
.pp-price s { font: 400 18px var(--sans); color: var(--muted); }
.stock { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--celadon); }
.stock.out::before { background: var(--line-2); }
.pp-buy { display: flex; gap: 10px; margin: 28px 0; }
.pp-buy .btn { flex: 1; }
.qty { display: inline-flex; align-items: center; height: 52px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); }
.qty button { width: 44px; height: 52px; font-size: 20px; }
.qty input { width: 34px; text-align: center; border: 0; background: none; font: 600 15px var(--sans); color: var(--ink); -moz-appearance: textfield; }
.specs { width: 100%; border-collapse: collapse; font-size: 15px; }
.specs th, .specs td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { font-weight: 400; color: var(--muted); width: 44%; }
details.acc { border-bottom: 1px solid var(--line); }
details.acc summary { list-style: none; cursor: pointer; padding: 18px 0; display: flex; justify-content: space-between; font: 600 18px/1.3 var(--serif); }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; font: 300 24px/1 var(--sans); transition: transform .3s; }
details.acc[open] summary::after { transform: rotate(45deg); }
details.acc > div { padding: 0 0 18px; color: var(--ink-2); }
.sample-note { margin: 0 0 18px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--cobalt-soft); color: var(--ink); font-size: 14px; }

/* корзина и избранное */
.page-head { padding-block: 32px 24px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(40px, 5vw, 72px); }
.cart { display: grid; grid-template-columns: 1fr 360px; gap: 40px; padding-block: 32px 80px; align-items: start; }
.cart-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-row img { width: 96px; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; background: var(--paper); }
.cart-sum { position: sticky; top: 96px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.cart-sum .tot { display: flex; justify-content: space-between; font: 700 24px/1 var(--serif); margin: 8px 0 20px; }
@media (max-width: 900px) { .cart { grid-template-columns: 1fr; } .cart-sum { position: static; } }

/* статья */
.article { max-width: 760px; margin: 0 auto; padding-block: 24px 80px; }
.article h1 { font-size: clamp(38px, 5vw, 64px); margin: 16px 0 20px; }
.article h2 { font-size: clamp(28px, 3vw, 38px); margin: 48px 0 16px; }
.article p, .article li { font-size: 17px; line-height: 1.7; color: var(--ink-2); }

/* подвал */
.ftr { border-top: 1px solid var(--line); padding: 64px 0 120px; margin-top: 40px; }
.ftr-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.ftr h4 { font: 500 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.ftr a { display: block; padding: 5px 0; font-size: 15px; color: var(--ink-2); }
.ftr a:hover { color: var(--ink); }
.ftr-big { font: 800 clamp(48px, 11vw, 168px)/.9 var(--serif); letter-spacing: -.04em; color: var(--line-2); margin-top: 56px; white-space: nowrap; overflow: hidden; }
@media (max-width: 900px) { .ftr-grid { grid-template-columns: 1fr 1fr; } .ftr-grid > :first-child { grid-column: span 2; } }

/* нижнее меню на телефоне */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr);
    height: 62px; border-radius: 22px; background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); position: relative; }
  .tabbar a[aria-current] { color: var(--ink); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .badge { top: 6px; right: calc(50% - 22px); }
}

.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; z-index: 80; background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-size: 14px; transition: .4s var(--ease); pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; }
}

.empty .btn svg { width: 18px; height: 18px; }
.ftr .logo { display: flex; }

/* переключатель темы: кнопка в шапке и три положения в подвале */
.theme-btn .t-light, .theme-btn .t-dark, .theme-btn .t-auto { display: none; }
:root[data-theme-pref="light"] .theme-btn .t-light, :root[data-theme-pref="dark"] .theme-btn .t-dark, :root[data-theme-pref="auto"] .theme-btn .t-auto { display: block; }
.theme-seg { display: inline-flex; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); margin-top: 12px; }
.theme-seg button { padding: 7px 12px; border-radius: 999px; font-size: 13px; color: var(--ink-2); }
.theme-seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* Жирный Manrope шире Cormorant: длинные слова («конфиденциальности») не влезали в 390 px */
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 480px) {
  .page-head h1, .cat-hero h1, .article h1 { font-size: 30px; }
  .pp h1 { font-size: 28px; }
}
.theme-seg button { white-space: nowrap; }
/* узкий телефон: три ровные колонки вместо переноса кнопок в «таблетке» */
@media (max-width: 400px) {
  .theme-seg { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; border-radius: 14px; }
  .theme-seg button { white-space: normal; line-height: 1.25; padding: 8px 4px; border-radius: 11px; text-align: center; }
}
@media (max-width: 360px) { .hdr-act { gap: 0; } .logo span { letter-spacing: .1em; } }

/* личный кабинет (логика - auth.js, как у Студии Жалюзи) */
.acc-wrap { padding-block: 28px 80px; }
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.acc-grid > * { min-width: 0; }
#auth-logged-out.acc-grid { margin-top: 0; grid-template-columns: 1.1fr .9fr; }
@media (max-width: 760px) { .acc-grid, #auth-logged-out.acc-grid { grid-template-columns: 1fr; } }
.acc-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.acc-card .h3 { font-size: 22px; margin-bottom: 14px; }
.acc-side p { color: var(--ink-2); }
.acc-tabs { display: inline-flex; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); margin-bottom: 18px; }
.auth-tab { padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.auth-tab.active { background: var(--ink); color: var(--bg); }
.fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 14px; color: var(--ink-2); }
.fld input { height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: 400 16px var(--sans); }
.fld input:focus { outline: 2px solid var(--cobalt); outline-offset: 1px; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); margin: 0 0 12px; cursor: pointer; }
.chk input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--cobalt); flex: 0 0 auto; }
.chk a, .acc-note a, .acc-side a { color: var(--cobalt); text-decoration: underline; text-underline-offset: 2px; }
.acc-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.form-msg { margin-top: 12px; font-size: 14px; }
.form-msg.ok, .form-msg.success { color: var(--celadon); }
.form-msg.err, .form-msg.error { color: var(--danger); }
.acc-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.acc-bar p { margin: 0; overflow-wrap: anywhere; }
.acc-bar-btns { display: flex; gap: 10px; }
.acc-orders-head { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin-bottom: 8px; }
.acc-orders-head .h3 { margin: 0 auto 0 0; }
.acc-orders-head .chk { margin: 0; }
.orders-empty { padding: 24px 0; color: var(--muted); }
.orders-empty a { color: var(--cobalt); }
.order-card { border-top: 1px solid var(--line); }
.order-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; text-align: left; flex-wrap: wrap; }
.order-head-main, .order-head-side { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.order-number { font-weight: 700; }
.order-date, .order-meta { color: var(--muted); font-size: 14px; }
.order-badge { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--cobalt-soft); color: var(--cobalt); }
.order-total { font-weight: 700; }
.order-chevron { width: 18px; height: 18px; transition: transform .3s; }
.order-head[aria-expanded="true"] .order-chevron { transform: rotate(180deg); }
.order-body { padding: 0 0 18px; }
.order-timeline { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.order-timeline li { display: flex; align-items: center; gap: 6px; }
.order-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.order-timeline .done .order-dot, .order-timeline .current .order-dot { background: var(--cobalt); }
.order-items, .order-sums, .order-history-list { list-style: none; padding: 0; margin: 0 0 10px; }
.order-items li, .order-sums li, .order-history-list li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }
.order-sums-total { font-weight: 700; border-top: 1px solid var(--line); padding-top: 8px !important; }
.order-meta-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.order-history h4 { margin: 12px 0 6px; font-size: 14px; }
.order-history-date { color: var(--muted); }

/* документы */
.legal-li { padding-left: 14px; }
.legal-more { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.legal-more a { color: var(--cobalt); }
.ftr-docs { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.ftr-docs a { font-size: 13px; color: var(--muted); padding: 2px 0; display: inline; }
.ftr-docs a:hover { color: var(--ink); }
.logo svg { flex: 0 0 auto; }
@media (max-width: 400px) { .hdr-in { gap: 6px; } .hdr-act .icon-btn { width: 38px; } .logo { gap: 8px; } }
.link-btn { display: block; margin: 12px 0 0; padding: 4px 0; font-size: 14px; color: var(--cobalt); text-decoration: underline; text-underline-offset: 3px; }
.recovery-note { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--cobalt-soft); color: var(--ink); font-size: 14px; }
.fld .pw-eye { color: var(--ink-2); }
