/* HeadBalance — витрина. Ночь → рассвет → утро. */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
h2 { font-size: var(--step-3); font-weight: 300; line-height: 1.08; letter-spacing: -.028em; margin: 0 0 .55em; text-wrap: balance; }
h3 { font-size: var(--step-1); font-weight: 600; line-height: 1.25; letter-spacing: -.01em; margin: 0 0 .35em; }
p { margin: 0 0 1em; max-width: 62ch; }
.muted { color: var(--muted); font-size: var(--step--1); }
.plain { list-style: none; margin: 0 0 1.2em; padding: 0; }
.plain li { padding: .25em 0; }

/* ── шапка ─────────────────────────────────────────────── */
.top {
  position: absolute; inset: 0 0 auto; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) var(--pad) 0; color: #fff;
}
.wordmark { font-size: 19px; font-weight: 300; letter-spacing: -.02em; color: inherit; text-decoration: none; margin: 0; }
.wordmark span { font-weight: 700; }
.wordmark sup { font-size: .5em; font-weight: 400; margin-left: 1px; opacity: .7; }
.wordmark--ink { color: var(--ink); font-size: 22px; margin-bottom: .6em; }
.top__cta {
  border: 0; background: rgba(255, 255, 255, .1); color: #fff; padding: 9px 18px; border-radius: 999px; font-weight: 600;
  font-size: var(--step--1); cursor: pointer; backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.top__cta:hover { background: rgba(255, 255, 255, .18); }

/* ── ночь: первый экран ────────────────────────────────── */
.hero {
  position: relative; background: var(--night); color: #fff; overflow: hidden;
  padding: 56px var(--pad) 56px; display: grid; gap: 0;
}
.hero__copy { position: relative; z-index: 1; }
.hero__kicker { color: rgba(220, 235, 248, .72); font-size: var(--step--1); margin-bottom: .6em; animation: reveal .9s var(--ease) .35s both; }
.hero__title {
  font-size: var(--step-4); font-weight: 300; line-height: .96; letter-spacing: -.045em; margin: 0 0 .32em;
}
.hero__title span { display: block; animation: reveal 1s var(--ease) both; }
.hero__title span:nth-child(1) { animation-delay: .5s; }
.hero__title span:nth-child(2) { animation-delay: .65s; color: var(--grip-soft); }
.hero__lead { color: rgba(230, 240, 250, .82); font-size: var(--step-0); line-height: 1.45; max-width: 30ch; animation: reveal 1s var(--ease) .8s both; }
.hero__note { color: var(--grip-soft); font-size: var(--step--1); margin: -.3em 0 1.2em; }
.hero__actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 30px; animation: reveal 1s var(--ease) .95s both; }
.hero__actions .btn { min-width: 220px; }
.hero__more { color: #fff; font-weight: 500; }

.price { display: flex; align-items: baseline; gap: 14px; margin: 0 0 12px; animation: reveal 1s var(--ease) .9s both; }
.price__now { font-size: clamp(34px, 9vw, 44px); font-weight: 600; letter-spacing: -.03em; }
.price__old { color: rgba(220, 235, 248, .55); font-size: var(--step-1); text-decoration-thickness: 1.5px; }
.price--ink .price__old { color: var(--muted); }
.price--ink { animation: none; }

.rating {
  display: inline-flex; align-items: center; gap: 12px; color: rgba(220, 235, 248, .8); text-decoration: none; font-size: var(--step--1);
  padding: 8px 16px 8px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--night-line);
}
.rating:hover { color: #fff; }
.rating__score { background: var(--grip); color: var(--night); font-weight: 700; border-radius: 999px; padding: 4px 10px; }

@keyframes reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── ночь: принцип ─────────────────────────────────────── */
.principle { background: var(--night); color: #fff; padding: 8px var(--pad) 0; display: grid; gap: 8px; }
.principle__fig { margin: 0 calc(var(--pad) * -1); }
.principle__fig img {
  width: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 78%, transparent 100%);
}
.principle__copy p { color: rgba(230, 240, 250, .8); }
.principle h2 { color: #fff; }

/* ── рассвет ───────────────────────────────────────────── */
.dawn {
  --p: 0;
  min-height: 88vh; display: flex; flex-direction: column; justify-content: flex-start; padding: 14vh var(--pad) 0;
  background: linear-gradient(to bottom, var(--night) 0%, #0d2540 30%, #3d6f9e 55%, #a9c9e4 78%, var(--ice) 100%);
}
.dawn__line {
  font-size: var(--step-4); font-weight: 300; letter-spacing: -.045em; line-height: .98; margin: 0 0 .35em; max-width: 9ch;
  color: #fff; transform: translateY(calc((1 - var(--p)) * 40px)); opacity: calc(.15 + var(--p) * .85);
}
.dawn__sub { font-size: var(--step-1); max-width: 26ch; color: rgba(230, 240, 250, .85); opacity: calc(var(--p) * 1.2 - .2); }

/* ── утро: как пользоваться ────────────────────────────── */
.how { padding: 24px 0 72px; }
.how__grid { display: grid; gap: 36px; }
.steps { list-style: none; margin: 0 0 28px; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 26px 62px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -4px; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 600; color: var(--action); background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--grip-soft);
}
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 20.5px; top: 46px; bottom: 6px; width: 1.5px; background: var(--grip-soft); }
.steps p { color: var(--muted); margin: 0; }
.how__care { font-size: var(--step--1); color: var(--muted); padding: 14px 18px; border-radius: var(--r-md); background: var(--paper); }
.how__fig { margin: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--night); }
.how__fig img { width: 100%; }

/* ── ощущения ──────────────────────────────────────────── */
.feel { padding: 0 0 72px; }
.feel__list { list-style: none; margin: 0; padding: 0; }
.feel__list li { display: grid; gap: 4px; padding: 22px 0; border-top: 1px solid var(--frost); }
.feel__list li:last-child { border-bottom: 1px solid var(--frost); }
.feel__list strong { font-size: var(--step-2); font-weight: 300; letter-spacing: -.025em; color: var(--action); }
.feel__list span { color: var(--muted); }

/* ── материалы: лента ──────────────────────────────────── */
.materials { padding: 0 0 72px; }
.materials__lead { color: var(--muted); }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 340px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 0 12px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }
.tile { margin: 0; scroll-snap-align: start; background: var(--paper); border-radius: var(--r-lg); overflow: hidden; }
.tile img { aspect-ratio: 4 / 4.2; object-fit: cover; width: 100%; }
.tile figcaption { padding: 18px 20px 22px; color: var(--muted); font-size: var(--step--1); }
.tile figcaption strong { display: block; color: var(--ink); font-size: var(--step-0); margin-bottom: 4px; }

/* ── ручная работа и комплект ──────────────────────────── */
.craft { padding: 0 0 72px; }
.craft__grid { display: grid; gap: 32px; }
.craft__h { margin-top: 1.6em; }
.kit { background: var(--night); color: #fff; border-radius: var(--r-lg); padding: 28px 26px; }
.kit h3 { color: var(--grip-soft); }
.kit ul { margin: 0 0 16px; padding: 0; list-style: none; }
.kit li { padding: 10px 0 10px 28px; position: relative; border-bottom: 1px solid var(--night-line); }
.kit li::before { content: ''; position: absolute; left: 2px; top: 19px; width: 12px; height: 7px; border: solid var(--grip); border-width: 0 0 2px 2px; rotate: -45deg; }
.kit__note { color: rgba(230, 240, 250, .7); font-size: var(--step--1); margin: 0; }

/* ── карточка покупки ──────────────────────────────────── */
.buy { padding: 0 0 72px; }
.buy__card { display: grid; gap: 0; }
.buy__img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.buy__copy { background: var(--paper); border-radius: 0 0 var(--r-lg) var(--r-lg); padding: 26px 24px 28px; }
.buy__copy h2 { font-size: var(--step-2); margin-bottom: .1em; }
.buy__copy > p { color: var(--muted); }
.buy__fine { font-size: var(--step--1); color: var(--muted); margin: 14px 0 0; text-align: center; max-width: none; }

/* ── доставка и вопросы ────────────────────────────────── */
.info { padding: 0 0 80px; }
.info__grid { display: grid; gap: 48px; }
.info h2 { font-size: var(--step-2); }
[data-delivery-list] li, [data-payment-list] li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--frost); padding: 12px 0; }
[data-delivery-list] small { display: block; color: var(--muted); font-size: var(--step--1); }
.faq details { border-bottom: 1px solid var(--frost); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 6px; top: 26px; width: 10px; height: 10px; border: solid var(--action);
  border-width: 0 1.8px 1.8px 0; rotate: 45deg; transition: rotate .25s var(--ease), translate .25s var(--ease);
}
.faq details[open] summary::after { rotate: 225deg; translate: 0 4px; }
.faq details p { color: var(--muted); margin: -4px 0 18px; }

/* ── подвал ────────────────────────────────────────────── */
.foot { background: var(--paper); padding: 48px 0 calc(110px + var(--safe-b)); }
.foot__grid { display: grid; gap: 28px; }
.foot h3 { font-size: var(--step--1); color: var(--muted); font-weight: 500; }
.foot a { color: var(--ink); }
.foot__seller { margin-top: 1em; }

/* ── нижняя панель ─────────────────────────────────────── */
.dock {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 20px; border-radius: 999px; background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 10px 30px -12px rgba(5, 14, 24, .35), inset 0 0 0 1px rgba(14, 33, 51, .06);
  transform: translateY(140%); transition: transform .45s var(--ease);
}
.dock.is-on { transform: none; }
.dock__price { display: flex; align-items: baseline; gap: 10px; font-weight: 600; font-size: var(--step-1); }
.dock__price s { color: var(--muted); font-weight: 400; font-size: var(--step--1); }
.dock .btn { min-height: 48px; padding: 0 24px; }
.in-tg .dock { display: none; }
.in-tg .top { display: none; }
.in-tg .hero { padding-top: 24px; }

/* ── шторка оформления ─────────────────────────────────── */
.sheet {
  border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: 100%; max-height: 94dvh; height: 94dvh;
  border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--ice); color: var(--ink); overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet-up .45s var(--ease); }
.sheet.is-closing { animation: sheet-down .3s ease-in forwards; }
.sheet::backdrop { background: rgba(5, 14, 24, .55); backdrop-filter: blur(2px); animation: fade .35s ease; }
.sheet.is-closing::backdrop { animation: fade .3s ease reverse forwards; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

.sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--pad) calc(24px + var(--safe-b)); flex: 1; }
.sheet__grab { width: 40px; height: 5px; border-radius: 3px; background: #c4d3e1; margin: 10px auto 2px; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--ice); padding: 10px 0 12px; z-index: 2; }
.sheet__head h2 { font-size: var(--step-1); font-weight: 600; letter-spacing: -.01em; margin: 0; }
.sheet__close { border: 0; background: var(--paper); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink); }

.co-item { display: flex; align-items: center; gap: 14px; background: var(--paper); border-radius: var(--r-md); padding: 10px 12px 10px 10px; margin-bottom: 22px; }
.co-item img { width: 56px; height: 70px; object-fit: cover; border-radius: 10px; }
.co-item__name { flex: 1; display: grid; }
.co-item__name span { color: var(--muted); font-size: var(--step--1); }
.qty { display: flex; align-items: center; background: var(--ice); border-radius: 999px; }
.qty button { width: 42px; height: 42px; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--action); border-radius: 50%; }
.qty button:disabled { color: #b5c3d0; cursor: default; }
.qty output { min-width: 22px; text-align: center; font-weight: 600; }
.qty output.tick { animation: tick .25s var(--ease); }
@keyframes tick { from { transform: translateY(-6px); opacity: .3; } }

.co-group { border: 0; padding: 0; margin: 0 0 22px; }
.co-group legend { font-weight: 600; font-size: var(--step-1); padding: 0; margin-bottom: 10px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field > span { font-size: var(--step--1); color: var(--muted); }
.field em { font-style: normal; opacity: .8; }
.field input, .field textarea, .promo input {
  width: 100%; border: 0; border-radius: 14px; background: var(--paper); padding: 15px 16px; font-size: 17px;
  box-shadow: inset 0 0 0 1px #d3e0ec; transition: box-shadow .15s; resize: vertical;
}
.field input:focus, .field textarea:focus, .promo input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--grip); }
.field.is-bad input, .field.is-bad textarea { box-shadow: inset 0 0 0 2px var(--warn); }
.field .err { color: var(--warn); font-size: var(--step--1); }

.choices { display: grid; gap: 8px; margin-bottom: 14px; }
.choice { position: relative; display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center; background: var(--paper); border-radius: 14px; padding: 14px 16px; cursor: pointer; box-shadow: inset 0 0 0 1px #d3e0ec; transition: box-shadow .2s; }
.choice input { appearance: none; width: 22px; height: 22px; border-radius: 50%; margin: 0; box-shadow: inset 0 0 0 1.5px #a9bdd0; transition: box-shadow .2s var(--ease); }
.choice input:checked { box-shadow: inset 0 0 0 7px var(--action); }
.choice:has(input:checked) { box-shadow: inset 0 0 0 2px var(--action); }
.choice:has(input:focus-visible) { outline: 2px solid var(--grip); outline-offset: 2px; }
.choice b { font-weight: 600; display: block; }
.choice small { color: var(--muted); font-size: var(--step--1); display: block; line-height: 1.35; }
.choice .num { font-weight: 600; white-space: nowrap; }

.co-extra details { border-top: 1px solid var(--frost); }
.co-extra details:last-child { border-bottom: 1px solid var(--frost); margin-bottom: 18px; }
.co-extra summary { cursor: pointer; padding: 14px 0; color: var(--action); font-weight: 500; }
.promo { display: flex; gap: 8px; margin-bottom: 8px; }
.promo .btn { min-height: 52px; padding: 0 18px; }
.hint { font-size: var(--step--1); color: var(--muted); }
.hint.ok { color: var(--ok); }
.hint.bad { color: var(--warn); }

.sum { margin: 0 0 18px; }
.sum div { display: flex; justify-content: space-between; padding: 5px 0; color: var(--muted); }
.sum dd { margin: 0; }
.sum .sum__total { color: var(--ink); font-weight: 600; font-size: var(--step-1); padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--frost); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: var(--step--1); color: var(--muted); margin-bottom: 14px; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--action); flex: none; }
.consent.is-bad span { color: var(--warn); }
.form-error { color: var(--warn); font-size: var(--step--1); min-height: 0; margin: 0 0 10px; }
.form-error:empty { display: none; }
.sheet__submit { position: sticky; bottom: 0; padding: 10px 0 4px; background: linear-gradient(to top, var(--ice) 75%, transparent); }
.in-tg .sheet__submit { display: none; }

.done { text-align: center; padding-top: 12vh; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.done[hidden] { display: none; }
.done__mark { color: var(--ok); animation: pop .6s var(--ease) both; }
.done__mark path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .25s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.done h2 { font-size: var(--step-2); margin: 0; }
.done p { color: var(--muted); margin: 0 auto 10px; }
.done .btn { max-width: 420px; }

/* ── широкие экраны ────────────────────────────────────── */
@media (min-width: 760px) {
  .hero { grid-template-columns: 1fr 1fr; align-items: center; min-height: 100vh; padding: 96px max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))) 64px; }
  .principle { grid-template-columns: 1fr 1fr; align-items: center; padding: 40px max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))) 80px; gap: 48px; }
  .principle__fig { margin: 0; }
  .dawn { padding-left: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))); }
  .how__grid, .craft__grid, .info__grid { grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: start; }
  .feel__list li { grid-template-columns: 280px 1fr; align-items: baseline; }
  .rail { grid-auto-columns: calc((100% - 28px) / 3); }
  .buy__card { grid-template-columns: 1fr 1fr; }
  .buy__img { height: 100%; aspect-ratio: auto; border-radius: var(--r-lg) 0 0 var(--r-lg); }
  .buy__copy { border-radius: 0 var(--r-lg) var(--r-lg) 0; padding: 48px; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
  .foot__grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .foot { padding-bottom: 60px; }
  .dock { left: auto; right: 24px; bottom: 24px; width: 360px; }
  .sheet { max-width: 560px; height: auto; max-height: 92vh; margin: auto; border-radius: var(--r-lg); }
  .sheet[open] { animation: fade .3s ease, rise-in .4s var(--ease); }
  .sheet.is-closing { animation: fade .25s ease reverse forwards; }
  @keyframes rise-in { from { transform: translateY(24px); } }
}

.top {
  width: min(100%, var(--max)); left: 50%; right: auto; transform: translateX(-50%);
  padding-top: max(18px, env(safe-area-inset-top));
}
.top__nav { display: none; }
.hero {
  background: radial-gradient(ellipse at 80% 38%, #18364b 0, #0a1b28 42%, var(--night) 78%);
  padding-top: 76px; gap: 26px;
}
.hero__actions { gap: 10px; margin-bottom: 18px; }
.hero__actions .btn { min-width: 0; }
.hero__actions .btn--ghost { color: #e7f1fb; box-shadow: inset 0 0 0 1px #648194; }
.hero__title { font-size: clamp(2.9rem, 10vw, 5.4rem); }
.product-gallery { width: 100%; min-width: 0; margin: 0; }
.gallery__photo {
  position: relative; overflow: hidden; isolation: isolate; background: #081927;
  border-radius: 22px; border: 1px solid rgba(195,223,242,.22); height: clamp(230px, 66vw, 390px);
  touch-action: pan-y pinch-zoom;
}
.gallery__photo > img { width: 100%; height: 100%; object-fit: cover; }
.gallery__caption {
  position: absolute; inset: auto 0 0; display: flex; justify-content: space-between;
  align-items: end; gap: 12px; padding: 45px 16px 12px;
  background: linear-gradient(transparent, rgba(3,13,21,.85)); color: white; font-size: .875rem;
}
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; }
.gallery__thumbs button {
  border: 1px solid #496071; padding: 2px; border-radius: 10px; background: transparent;
  cursor: pointer; width: clamp(44px, 12vw, 62px); height: 44px;
}
.gallery__thumbs button[aria-pressed=true] { border: 2px solid #b5e4ff; padding: 1px; }
.gallery__thumbs img { width: 100%; height: 100%; border-radius: 6px; object-fit: cover; }
.dawn { min-height: clamp(310px, 48vh, 490px); padding-top: 8vh; }
@media (max-width: 380px) {
  .hero__actions .btn { padding-inline: 17px; font-size: 1rem; }
}
@media (min-width: 760px) {
  .top__nav { display: flex; gap: clamp(14px, 3vw, 36px); }
  .top__nav a { color: #d7e5ef; text-decoration: none; font-size: .9375rem; }
  .top__nav a:hover { text-decoration: underline; }
  .hero { min-height: 0; padding-top: 108px; padding-bottom: 62px; gap: clamp(20px, 4vw, 60px); }
  .product-gallery { order: 2; }
  .gallery__photo { height: auto; aspect-ratio: 1 / 1.07; border-radius: 28px; }
  .gallery__thumbs button { height: 50px; }
}

.material-controls { display: flex; gap: .5rem; justify-content: flex-end; }
.material-controls[hidden] { display: none; }
.material-controls button { padding: .6rem 1rem; min-height: 44px; border-radius: 2rem; color: var(--action); background: white; border: 1px solid var(--frost); font: inherit; cursor: pointer; }
.material-controls button:disabled { opacity: .45; cursor: default; }
