/* =========================================================
   «Невесомо» — прототип. Направление: «Кондитерское ателье».
   Цвета приходят из сезонной темы (assets/js/themes.js).
   ========================================================= */

:root {
  --bg: #F4EFE6; --bg-2: #EAE1D2; --card: #FBF8F2; --ink: #2B1B17; --muted: #7A675C;
  --line: rgba(43, 27, 23, .12); --accent: #E0466A; --accent-ink: #fff; --accent-2: #C29A6B; --accent-3: #8EA487;
  --display: 'Unbounded', 'Arial Black', sans-serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', 'Segoe UI', sans-serif;
  --r-lg: 32px; --r-md: 20px; --r-sm: 12px;
  --pad: clamp(16px, 4vw, 56px);
  --shadow: 0 30px 60px -30px color-mix(in srgb, var(--ink) 35%, transparent);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
:root[data-mode="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
html:not([data-prototype]) main { overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .6s var(--ease), color .6s var(--ease);
}
/* лёгкое зерно — ощущение бумаги / печати */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .06; mix-blend-mode: multiply;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-mode="dark"] body::after { mix-blend-mode: overlay; opacity: .09; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: -.025em; line-height: 1.02; margin: 0; }
h2 { font-size: clamp(2rem, 4.6vw, 3.9rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; line-height: 1.2; }
em { font-family: var(--serif); font-style: italic; font-weight: 600; letter-spacing: -.01em; color: var(--accent); }
h1 em, h2 em { font-size: 1.12em; line-height: .9; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--display); font-weight: 600; font-size: .9rem; letter-spacing: -.01em; padding: 1.05em 1.6em; border-radius: 999px;
  transition: transform .35s var(--ease), background-color .3s, box-shadow .35s var(--ease), color .3s;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 14px 30px -14px var(--accent); }
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -14px var(--accent); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--text { background: none; color: var(--muted); padding-inline: .6em; }
.btn--text:hover { color: var(--ink); }
.btn--wide { width: 100%; }

/* ---------- сезонные частицы ---------- */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.fx i { position: absolute; top: -40px; display: block; animation: fall linear infinite; opacity: .8; }
.fx i svg { width: 100%; height: 100%; }
@keyframes fall {
  0% { transform: translate3d(0, -40px, 0) rotate(0deg); }
  50% { transform: translate3d(var(--drift, 30px), 50vh, 0) rotate(160deg); }
  100% { transform: translate3d(0, 105vh, 0) rotate(320deg); }
}
.fx i.bat { animation-name: flap-fly; top: auto; }
@keyframes flap-fly {
  0% { transform: translate3d(-10vw, 0, 0) scaleY(1); }
  25% { transform: translate3d(25vw, -6vh, 0) scaleY(.6); }
  50% { transform: translate3d(55vw, 3vh, 0) scaleY(1); }
  75% { transform: translate3d(85vw, -4vh, 0) scaleY(.6); }
  100% { transform: translate3d(115vw, 0, 0) scaleY(1); }
}

/* ---------- промо и шапка ---------- */
.promo {
  display: flex; align-items: center; justify-content: center; gap: .7em; padding: .65em var(--pad);
  background: var(--ink); color: var(--bg); font-size: .82rem; font-weight: 600; text-align: center;
}
.promo__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: ping 2s infinite; flex: none; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.header {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 2rem; padding: 14px var(--pad);
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.logo__mark {
  width: 26px; height: 30px; border-radius: 50% 50% 48% 48% / 55% 55% 45% 45%; position: relative;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 35%, #fff), var(--accent) 55%, color-mix(in srgb, var(--accent) 70%, #000));
}
.logo__mark::after { content: ''; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%); border: 4px solid transparent; border-bottom-color: color-mix(in srgb, var(--accent) 70%, #000); }
.logo__word { display: flex; flex-direction: column; font-family: var(--display); font-weight: 800; font-size: 1.02rem; line-height: .95; letter-spacing: -.04em; }
.logo__word span:last-child { color: var(--accent); }
/* знак «иголка с бантиком»: игла — цвет текста, бант — акцент темы */
.logo__sign { width: 34px; height: 37px; flex: none; color: var(--ink); transition: transform .5s var(--ease); }
.logo:hover .logo__sign { transform: rotate(-12deg) scale(1.06); }
.nav { display: flex; gap: 1.6rem; margin-right: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: .92rem; position: relative; }
.nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -4px; height: 2px; background: var(--accent); transition: right .35s var(--ease); }
.nav a:hover::after { right: 0; }
.header__actions { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.header__phone { font-weight: 700; text-decoration: none; font-size: .92rem; white-space: nowrap; }
.cart-btn { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; cursor: pointer; transition: transform .3s var(--ease); }
.cart-btn:hover { transform: scale(1.06); }
.cart-btn.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.25); } }
.cart-btn__count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: .7rem; font-weight: 800; display: grid; place-items: center; }
.burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--ink); background: none; cursor: pointer; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.burger span { width: 18px; height: 2px; background: var(--ink); transition: transform .3s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: calc(100svh - 110px); display: flex; align-items: center; padding: 40px var(--pad) 80px; overflow: hidden;
  background:
    radial-gradient(60% 70% at 78% 40%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(40% 50% at 10% 90%, color-mix(in srgb, var(--accent-3) 18%, transparent), transparent 70%);
}
.hero__canvas, .hero__fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__canvas { cursor: default; touch-action: pan-y; }
.hero__fallback { display: none; }
.no-webgl .hero__fallback { display: grid; place-items: center end; padding-right: 6vw; }
.no-webgl .hero__fallback svg { height: 80%; width: auto; }
.no-webgl .hero__canvas { visibility: hidden; }
.hero__fallback [data-balloon] { cursor: pointer; transition: opacity .15s; }
.hero__fallback .is-popped { opacity: 0; pointer-events: none; }
.hero__content { position: relative; z-index: 2; max-width: 640px; pointer-events: none; }
.hero__content a, .hero__content button { pointer-events: auto; }
.kicker { display: inline-flex; align-items: center; gap: .6em; margin: 0 0 1.4rem; padding: .45em 1em; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 60%, transparent); font-size: .8rem; font-weight: 700; letter-spacing: .02em; backdrop-filter: blur(6px); }
.kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero__title { font-size: clamp(2.6rem, 6.4vw, 6rem); font-weight: 800; letter-spacing: -.045em; line-height: .95; }
.hero__title em { display: block; font-size: 1.08em; margin-top: .06em; }
.hero__sub { max-width: 30rem; margin: 1.6rem 0 2rem; font-size: 1.08rem; color: var(--muted); }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.trust { list-style: none; display: flex; gap: 2.2rem; padding: 0; margin: 3rem 0 0; flex-wrap: wrap; }
.trust li { display: flex; flex-direction: column; }
.trust b { font-family: var(--display); font-size: 1.4rem; letter-spacing: -.03em; }
.trust span { font-size: .82rem; color: var(--muted); max-width: 10rem; line-height: 1.3; }
.hero > * { animation: rise 1s var(--ease) both; }
.hero__content > * { animation: rise .9s var(--ease) both; }
.hero__content > :nth-child(2) { animation-delay: .08s; } .hero__content > :nth-child(3) { animation-delay: .16s; }
.hero__content > :nth-child(4) { animation-delay: .24s; } .hero__content > :nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* ---------- бегущая строка ---------- */
.marquee { overflow: hidden; background: var(--accent); color: var(--accent-ink); padding: 1.05rem 0; transform: rotate(-1.2deg); margin: -12px -10px 0; position: relative; z-index: 3; }
.marquee__track { display: flex; gap: 1.6rem; width: max-content; animation: marquee 38s linear infinite; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; white-space: nowrap; }
.marquee__track i { font-style: normal; opacity: .6; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- секции ---------- */
.section { padding: clamp(70px, 10vw, 130px) var(--pad) 0; max-width: 1440px; margin: 0 auto; }
.section__head { margin-bottom: 2.6rem; max-width: 860px; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; }
.section__head--row .section__lead { max-width: 26rem; margin: 0; }
.eyebrow { font-family: var(--display); font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 1rem; }
.section__lead { color: var(--muted); font-size: 1.08rem; max-width: 36rem; margin: 1.2rem 0 0; }
[data-prototype] .reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-prototype] .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-prototype]) .reveal.in { animation: reveal-enter .6s var(--ease) both; }
}
@keyframes reveal-enter {
  from { transform: translateY(14px); }
  to { transform: none; }
}

/* ---------- поводы ---------- */
.occasions { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.occ {
  border: 1px solid var(--line); background: var(--card); border-radius: var(--r-md); padding: 10px 10px 16px; cursor: pointer; text-align: center;
  transition: transform .45s var(--ease), border-color .3s, background-color .3s;
}
.occ__art { aspect-ratio: 1; border-radius: 14px; background: var(--bg-2); overflow: hidden; display: grid; place-items: center; }
.occ__art svg { width: 92%; height: 92%; transition: transform .6s var(--ease); }
.occ b { display: block; margin-top: .7rem; font-size: .84rem; font-weight: 700; line-height: 1.2; }
.occ:hover { transform: translateY(-6px) rotate(-1deg); border-color: var(--accent); }
.occ:hover svg { transform: translateY(-6px) scale(1.06); }
.occ[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- каталог ---------- */
.tabs { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--bg-2); flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: .7em 1.2em; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--muted); transition: background-color .3s, color .3s; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.filters { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.6rem; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-right: auto; }
.chip { border: 1px solid var(--line); background: none; border-radius: 999px; padding: .45em 1em; font-size: .84rem; font-weight: 600; cursor: pointer; transition: all .25s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.messengers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }
.messengers a { display: inline-flex; align-items: center; min-height: 44px; background: var(--card); color: var(--ink); text-decoration: none; }
.messengers a:hover, .messengers a:focus-visible { text-decoration: underline; text-underline-offset: .2em; }
.toggle { display: inline-flex; align-items: center; gap: .6em; font-weight: 600; font-size: .88rem; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle span { width: 40px; height: 24px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); position: relative; transition: background-color .3s; }
.toggle span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); transition: transform .3s var(--ease); }
.toggle input:checked + span { background: var(--accent-3); }
.toggle input:checked + span::after { transform: translateX(16px); }
.toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
select { appearance: none; border: 1px solid var(--line); border-radius: 999px; padding: .55em 2.4em .55em 1.1em; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 1em center; font-weight: 600; font-size: .88rem; cursor: pointer; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease); animation: cardIn .7s var(--ease) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(20px) scale(.98); } }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__art {
  position: relative; aspect-ratio: 1 / 1.08; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(70% 60% at 50% 38%, color-mix(in srgb, var(--accent) 14%, var(--bg-2)), var(--bg-2));
}
.card__art svg { width: 86%; height: 92%; transition: transform .8s var(--ease); }
.card:hover .card__art svg { transform: translateY(-10px) rotate(-1.5deg); }
.badge { position: absolute; top: 14px; left: 14px; z-index: 2; padding: .35em .8em; border-radius: 999px; background: var(--card); font-size: .72rem; font-weight: 800; letter-spacing: .02em; }
.badge--air { left: auto; right: 14px; background: var(--accent-3); color: #fff; }
.card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card__tag { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.card__meta { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.card__foot { margin-top: auto; padding-top: .8rem; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card__foot .price { min-width: 0; }
.card__foot .add { flex: none; }
.card h3, .card__meta, .tile h3, .occ b { overflow-wrap: break-word; hyphens: auto; }
.price { font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.03em; }
.price small { font-family: var(--sans); font-weight: 600; font-size: .75rem; color: var(--muted); letter-spacing: 0; }
.add { width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; background: var(--ink); color: var(--bg); font-size: 1.4rem; line-height: 1; display: grid; place-items: center; transition: transform .35s var(--ease), background-color .3s; }
.add:hover { transform: rotate(90deg) scale(1.08); background: var(--accent); color: var(--accent-ink); }
.add.done { background: var(--accent-3); transform: none; }
.card--featured { grid-column: span 2; flex-direction: row; }
.card--featured .card__art { flex: 1.2; aspect-ratio: auto; min-height: 380px; background: radial-gradient(70% 70% at 50% 40%, color-mix(in srgb, var(--accent) 30%, var(--bg-2)), var(--bg-2)); }
.card--featured .card__body { flex: 1; padding: 30px; justify-content: center; }
.card--featured h3 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1; }
.card--featured .card__meta { font-size: 1rem; }
.card--featured .card__foot { margin-top: 1.4rem; }
.ribbon { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--accent); }
.empty { color: var(--muted); padding: 2rem 0; }

/* ---------- конструктор ---------- */
.builder__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(20px, 4vw, 60px); align-items: start; }
.builder__controls { display: flex; flex-direction: column; gap: 1.8rem; }
.field { display: flex; flex-direction: column; gap: .7rem; }
.field > label, .label { font-family: var(--display); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.label--small { margin-top: .4rem; }
.budget { display: flex; align-items: baseline; gap: .4rem; border-bottom: 2px solid var(--ink); }
.budget input { border: 0; background: none; width: 100%; font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 6vw, 4.4rem); letter-spacing: -.05em; padding: 0; -moz-appearance: textfield; }
.budget input::-webkit-outer-spin-button, .budget input::-webkit-inner-spin-button { -webkit-appearance: none; }
.budget input:focus { outline: none; }
.budget span { font-family: var(--display); font-size: 2rem; color: var(--muted); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: var(--bg-2); cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); border: 4px solid var(--card); box-shadow: 0 4px 12px -2px color-mix(in srgb, var(--ink) 40%, transparent); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 4px solid var(--card); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .45em 1em; font-weight: 700; font-size: .85rem; cursor: pointer; }
.quick button:hover { border-color: var(--ink); }
.palettes { display: flex; gap: 8px; flex-wrap: wrap; }
.pal { display: flex; align-items: center; gap: .6em; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .35em .9em .35em .4em; cursor: pointer; font-weight: 700; font-size: .85rem; transition: border-color .25s; }
.pal__dots { display: flex; }
.pal__dots i { width: 20px; height: 20px; border-radius: 50%; margin-left: -7px; border: 2px solid var(--card); }
.pal__dots i:first-child { margin-left: 0; }
.pal[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
input[type="text"], input[type="tel"], input[type="email"], input[type="date"], input:not([type]), input[type="number"]:not(#budget), textarea, .lead select, .drawer select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); padding: .85em 1em; font-size: .95rem;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); }
.input--short { max-width: 90px; }
.items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.item { display: flex; align-items: center; gap: .6rem; padding: 8px 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.item__ico { width: 38px; height: 44px; flex: none; }
.item__ico svg { width: 100%; height: 100%; }
.item__txt { flex: 1; min-width: 0; line-height: 1.2; }
.item__txt b { display: block; font-size: .84rem; }
.item__txt small { color: var(--muted); font-size: .76rem; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: none; cursor: pointer; font-weight: 800; line-height: 1; }
.stepper button:hover { background: var(--ink); color: var(--bg); }
.stepper output { min-width: 1.6em; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.builder__buttons { display: flex; gap: .6rem; flex-wrap: wrap; }
.builder__preview { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 1rem; }
.preview {
  aspect-ratio: 1 / 1.02; border-radius: var(--r-lg); display: grid; place-items: center; overflow: hidden; position: relative;
  background: radial-gradient(60% 55% at 50% 40%, color-mix(in srgb, var(--accent) 18%, var(--card)), var(--bg-2));
  border: 1px solid var(--line);
}
.preview svg { width: 82%; height: 94%; animation: sway 6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes sway { 50% { transform: rotate(1.6deg) translateY(-6px); } }
.preview__more { position: absolute; bottom: 16px; right: 18px; font-weight: 800; font-size: .8rem; padding: .3em .8em; border-radius: 999px; background: var(--card); }
.meter { padding: 16px 18px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); }
.meter__row { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; flex-wrap: wrap; }
.meter__row b { font-family: var(--display); }
.meter__bar { height: 10px; border-radius: 5px; background: var(--bg-2); margin: .7rem 0 .5rem; overflow: hidden; }
.meter__bar i { display: block; height: 100%; width: 0; border-radius: 5px; background: linear-gradient(90deg, var(--accent-3), var(--accent)); transition: width .5s var(--ease); }
.meter.over .meter__bar i { background: #C0392B; }
.meter.over #builder-left { color: #C0392B; font-weight: 700; }
.meter__note { margin: 0; color: var(--muted); font-size: .82rem; }

/* ---------- оформление ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(330px, auto); gap: 16px; }
.tile { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); display: flex; flex-direction: column; }
.tile--xl { grid-column: span 2; grid-row: span 2; }
/* иллюстрация сверху, текст отдельным блоком снизу — они никогда не перекрываются */
.tile__art { position: relative; flex: 1 1 auto; min-height: 150px; display: grid; place-items: center; overflow: hidden; }
.tile__art svg { position: absolute; inset: 6% 4% 0; width: 92%; height: 94%; transition: transform 1s var(--ease); }
.tile:hover .tile__art svg { transform: scale(1.05); }
.tile__body { position: relative; flex: none; padding: 16px 20px 20px; background: var(--card); border-top: 1px solid var(--line); }
.tile__body p { margin: .4rem 0 .6rem; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.tile__body b { font-family: var(--display); font-size: .95rem; }
.tile--xl h3 { font-size: 2rem; }
.tile--calc { grid-column: span 2; background: var(--ink); color: var(--bg); justify-content: center; }
.tile--calc .tile__body { background: none; border: 0; display: flex; flex-direction: column; gap: .7rem; padding: 26px; }
.tile--calc h3 { font-size: 1.5rem; }
.tile--calc label { font-size: .9rem; }
.tile--calc input[type="range"] { background: color-mix(in srgb, var(--bg) 25%, transparent); }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 14%, transparent); width: max-content; }
.seg button { border: 0; background: none; color: inherit; padding: .45em 1.1em; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: .85rem; }
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); }
.check { display: flex; gap: .6em; align-items: flex-start; font-size: .88rem; cursor: pointer; }
.check input { accent-color: var(--accent); margin-top: .25em; }
.check--consent { font-size: .78rem; color: var(--muted); }
.calc__total { margin: .2rem 0 0; font-size: 1rem; }
.calc__total b { font-family: var(--display); font-size: 2rem; letter-spacing: -.04em; color: var(--accent); }

.lead { margin-top: 18px; display: grid; grid-template-columns: 1fr 1.3fr; gap: 30px; padding: clamp(24px, 4vw, 48px); border-radius: var(--r-lg); background: var(--accent); color: var(--accent-ink); }
.lead h3 { font-size: clamp(1.5rem, 2.8vw, 2.4rem); line-height: 1.05; }
.lead em { color: inherit; }
.lead p { opacity: .85; }
.lead__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.lead__fields input, .lead__fields select { background: color-mix(in srgb, #fff 92%, transparent); color: #2B1B17; border-color: transparent; border-radius: var(--r-sm); width: 100%; padding: .85em 1em; }
.lead .check--consent { color: inherit; opacity: .85; grid-column: span 2; }
.lead .btn--primary { background: var(--ink); color: var(--bg); box-shadow: none; grid-column: span 2; }
.file { display: flex; align-items: center; justify-content: center; border: 1.5px dashed color-mix(in srgb, currentColor 60%, transparent); border-radius: var(--r-sm); cursor: pointer; font-weight: 600; font-size: .9rem; padding: .7em; }
.file input { position: absolute; opacity: 0; width: 1px; }

/* ---------- ротанг и 3D ---------- */
.craft__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: center; }
.craft__text p { color: var(--muted); font-size: 1.05rem; margin: 1.4rem 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: .6rem; }
.ticks li { display: flex; gap: .7rem; font-weight: 600; }
.ticks li::before { content: '✦'; color: var(--accent); }
.craft__art { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.craft__art > div { border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--line); aspect-ratio: 1 / 1.15; display: grid; place-items: center; overflow: hidden; position: relative; }
.craft__art > div:nth-child(2) { transform: translateY(40px); }
.craft__art > div:nth-child(3) { transform: translateY(-10px); }
.craft__art > div:nth-child(4) { transform: translateY(30px); }
.craft__art svg { width: 90%; height: 90%; }
.craft__art span { position: absolute; left: 14px; bottom: 12px; font-size: .74rem; font-weight: 800; padding: .3em .8em; border-radius: 999px; background: var(--card); }

/* ---------- шаги ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.steps li { padding: 26px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); position: relative; overflow: hidden; }
.steps li span { font-family: var(--display); font-weight: 800; font-size: 4.6rem; line-height: 1; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1.5px var(--accent); display: block; margin-bottom: 1.2rem; }
.steps p { margin: .5rem 0 0; color: var(--muted); font-size: .92rem; }
.districts { margin-top: 1.6rem; padding: 18px 22px; border-radius: var(--r-md); background: var(--bg-2); font-size: .9rem; color: var(--muted); }
.districts b { color: var(--ink); }

/* ---------- галерея ---------- */
.gallery { columns: 4 240px; column-gap: 16px; }
.work { break-inside: avoid; margin-bottom: 16px; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); position: relative; }
.work { margin-top: 0; margin-inline: 0; }
.work__art { aspect-ratio: var(--ar, 1 / 1.2); display: grid; place-items: center; background: radial-gradient(70% 60% at 50% 40%, color-mix(in srgb, var(--accent) 12%, var(--bg-2)), var(--bg-2)); }
.work__art svg { width: 92%; height: 92%; }
/* подпись под картинкой, а не поверх: длинные названия не наезжают на композицию */
.work figcaption { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; background: var(--card); border-top: 1px solid var(--line); font-size: .86rem; font-weight: 600; line-height: 1.35; }
.work figcaption b { font-family: var(--display); font-size: 1.05rem; color: var(--accent); white-space: nowrap; }
.note { font-size: .82rem; color: var(--muted); }
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 2rem; }
.reviews blockquote { margin: 0; padding: 26px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.reviews p { margin: 0 0 1rem; font-family: var(--serif); font-style: italic; font-size: 1.3rem; line-height: 1.3; }
.reviews cite { font-style: normal; font-size: .8rem; color: var(--muted); font-weight: 600; }

/* ---------- напоминание ---------- */
.remind { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; margin-top: clamp(70px, 10vw, 130px); padding: clamp(28px, 5vw, 60px); border-radius: var(--r-lg); background: var(--ink); color: var(--bg); max-width: calc(1440px - 2 * var(--pad)); margin-inline: auto; }
.remind h2 { font-size: clamp(1.8rem, 3.6vw, 3rem); }
.remind p { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.remind__form { display: grid; gap: 10px; }
.remind__form input { background: color-mix(in srgb, var(--bg) 10%, transparent); border-color: color-mix(in srgb, var(--bg) 20%, transparent); color: var(--bg); }
.remind__form input::placeholder { color: color-mix(in srgb, var(--bg) 55%, transparent); }
@media (min-width: 761px) { .section.remind { width: calc(100% - 2 * var(--pad)); } }

/* ---------- о нас ---------- */
.about { max-width: 1000px; text-align: center; }
.about__quote { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.7rem, 3.6vw, 3rem); line-height: 1.15; }
.about__quote em { font-size: 1em; }
.about__sign { margin: 1.4rem 0 0; color: var(--muted); }
.about__sign b { color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { max-width: 900px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 1.4rem 0; font-family: var(--display); font-weight: 600; font-size: clamp(1rem, 1.8vw, 1.3rem); letter-spacing: -.02em; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.6em; line-height: .8; color: var(--accent); transition: transform .35s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.4rem; color: var(--muted); max-width: 42rem; }

/* ---------- подвал ---------- */
.footer { margin-top: clamp(80px, 10vw, 140px); padding: 60px var(--pad) 40px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; border-top: 1px solid var(--line); background: var(--bg-2); }
.footer p { color: var(--muted); font-size: .9rem; }
.footer h4 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; font-weight: 600; }
.footer__seo, .footer__legal { display: flex; flex-direction: column; gap: .45rem; }
.footer__seo a, .footer__legal a { text-decoration: none; font-size: .9rem; font-weight: 500; }
.footer__seo a:hover, .footer__legal a:hover { color: var(--accent); }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a { text-decoration: none; padding: .5em 1em; border-radius: 999px; border: 1px solid var(--line); font-size: .82rem; font-weight: 700; }
.socials a:hover { background: var(--ink); color: var(--bg); }
.footer__copy { margin-top: auto; font-size: .78rem !important; }

/* ---------- корзина ---------- */
.drawer { position: fixed; inset: 0; z-index: 120; background: color-mix(in srgb, #000 40%, transparent); opacity: 0; pointer-events: none; transition: opacity .35s; }
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--bg); padding: 24px; display: flex; flex-direction: column; gap: 1rem; transform: translateX(100%); transition: transform .5s var(--ease); overflow-y: auto; }
.drawer.open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; }
.drawer__head h3 { font-size: 1.6rem; }
.drawer__close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: none; cursor: pointer; }
.drawer__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.drawer__list li { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.drawer__thumb { width: 60px; height: 66px; border-radius: 12px; background: var(--bg-2); flex: none; display: grid; place-items: center; overflow: hidden; }
.drawer__thumb svg { width: 90%; height: 90%; }
.drawer__info { flex: 1; min-width: 0; }
.drawer__info b { display: block; font-size: .88rem; line-height: 1.25; }
.drawer__info small { color: var(--muted); font-size: .78rem; }
.drawer__empty { color: var(--muted); text-align: center; padding: 2rem 0; }
.drawer__form { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
.drawer select { border-radius: var(--r-sm); background-position: right 1em center; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drawer__total { display: flex; justify-content: space-between; align-items: baseline; }
.drawer__total b { font-family: var(--display); font-size: 1.8rem; letter-spacing: -.04em; }
.drawer__delivery { margin: 0; font-size: .82rem; color: var(--muted); }
#lead-status, #lead .check--consent { grid-column: 1 / -1; }
#lead-status:empty, #checkout-status:empty { display: none; }

/* ---------- демо-переключатель тем ---------- */
.theme-demo { position: fixed; left: 16px; bottom: 16px; z-index: 110; }
.theme-demo__btn { display: flex; align-items: center; gap: .6em; border: 0; cursor: pointer; padding: .7em 1.1em .7em .7em; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .82rem; box-shadow: var(--shadow); }
.theme-demo__swatch { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(var(--accent), var(--accent-2), var(--accent-3), var(--accent)); }
.theme-demo__menu { position: absolute; left: 0; bottom: calc(100% + 8px); width: 250px; padding: 8px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.theme-demo__menu[hidden] { display: none; }
.theme-demo__menu p { margin: 6px 10px 8px; font-size: .74rem; color: var(--muted); line-height: 1.35; }
.theme-demo__menu button { display: flex; justify-content: space-between; align-items: center; gap: .6em; border: 0; background: none; padding: .6em .8em; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .88rem; text-align: left; }
.theme-demo__menu button:hover { background: var(--bg-2); }
.theme-demo__menu button[aria-current="true"] { background: var(--ink); color: var(--bg); }
.theme-demo__menu small { opacity: .6; font-size: .72rem; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 130; transform: translate(-50%, calc(100% + 24px)); opacity: 0; pointer-events: none; padding: .9em 1.4em; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .9rem; box-shadow: var(--shadow); transition: transform .5s var(--ease), opacity .5s var(--ease); max-width: calc(100% - 32px); text-align: center; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- адаптив ---------- */
@media (max-width: 1180px) {
  .occasions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nav { gap: 1.1rem; }
  .header__phone { display: none; }
}
@media (max-width: 960px) {
  .nav { position: fixed; inset: 0 0 auto 0; top: 0; padding: 100px var(--pad) 30px; flex-direction: column; gap: 1rem; background: var(--bg); transform: translateY(-105%); transition: transform .5s var(--ease); z-index: -1; border-bottom: 1px solid var(--line); }
  .nav a { font-family: var(--display); font-size: 1.6rem; }
  .nav.open { transform: none; }
  .burger { display: flex; }
  .builder__layout { grid-template-columns: 1fr; }
  .builder__preview { position: relative; top: 0; order: -1; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .lead, .craft__grid, .remind { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: span 2; }
  .card--featured { grid-column: 1 / -1; flex-direction: column; }
  .card--featured .card__art { min-height: 0; aspect-ratio: 1 / 1.08; }
  .card--featured .card__body { padding: 18px 20px 20px; }
}
@media (max-width: 760px) {
  .hero { align-items: flex-end; min-height: calc(100svh - 100px); padding-top: 46vh; padding-bottom: 40px; }
  .no-webgl .hero__fallback { inset: 0 0 auto; height: 46vh; padding: 0; place-items: center; }
  .hero__content { max-width: none; }
  .trust { gap: 1.2rem; margin-top: 2rem; }
  .trust b { font-size: 1.1rem; }
  .occasions { grid-template-columns: repeat(8, 140px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-inline: calc(-1 * var(--pad)); padding-inline: var(--pad); }
  .occ { scroll-snap-align: start; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { border-radius: 22px; }
  .card__body { padding: 12px 14px 14px; }
  .card h3 { font-size: .95rem; }
  .card__meta { font-size: .76rem; }
  .price { font-size: 1rem; }
  .add { width: 38px; height: 38px; }
  .items { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .tile { min-height: 320px; }
  .tile--xl { grid-column: auto; grid-row: auto; min-height: 420px; }
  .tile--calc { grid-column: auto; grid-row: auto; min-height: 0; }
  .lead__fields { grid-template-columns: 1fr; }
  .lead .check--consent, .lead .btn--primary { grid-column: auto; }
  .steps { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr; }
  .footer__brand { grid-column: auto; }
  .tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .tabs button { white-space: nowrap; }
  .theme-demo__btn #theme-demo-label { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .fx { display: none; }
  [data-prototype] .reveal { opacity: 1; transform: none; }
}
