/* =========================================================
   SAINTSOUND — стили
   Шрифт: когда клиент пришлёт свой — положи файл в assets/fonts/
   как ss-font.woff2 и раскомментируй @font-face ниже (SSFont).
   ========================================================= */

/* Раскомментировать, когда положим файл шрифта:
@font-face {
  font-family: 'SSFont';
  src: url('../fonts/ss-font.woff2') format('woff2'),
       url('../fonts/ss-font.otf') format('opentype'),
       url('../fonts/ss-font.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
*/

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #8a8a8a;
  --line: #2a2a2a;
  --line-2: #3d3d3d;
  --panel: #0b0b0b;
  --bar: rgba(22, 22, 22, .78);
  --accent: #fff;
  --danger: #ff5a5a;
  --font: 'SSFont', 'Lexend Exa', 'Unbounded', system-ui, sans-serif;
  --font-text: 'SSFont', 'Lexend Exa', 'Unbounded', system-ui, sans-serif;
  --pad: clamp(16px, 9vw, 133px);
  --header-h: clamp(64px, 7.5vw, 96px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: var(--font-text);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.lock { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: #fff; color: #000; }
:focus-visible { outline: 1px solid #fff; outline-offset: 3px; }

.lc { text-transform: lowercase; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4.5vw, 60px);
  transition: background .3s var(--ease), backdrop-filter .3s;
}
.header.is-bar { background: var(--bar); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.header.is-solid { background: #000; }
.header__logo { height: 22px; opacity: 0; transition: opacity .3s; }
.header__logo img { height: 100%; width: auto; }
.header.show-logo .header__logo { opacity: 1; }
.header__actions { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); margin-left: auto; }
.icon-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; }
.icon-btn svg { width: 30px; height: 30px; stroke: #fff; fill: none; stroke-width: 1.6; }
.icon-btn--burger svg { width: 38px; }
.cart-count {
  position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
  font-family: var(--font); font-size: 9px; line-height: 1; letter-spacing: 0;
}

/* ---------- menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0, 0, 0, .86);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
}
.menu.open { opacity: 1; visibility: visible; }
.menu__top {
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4.5vw, 60px);
  font-family: var(--font); font-size: 12px; text-transform: lowercase; letter-spacing: .04em;
}
.menu__top img { height: 22px; width: auto; }
.menu__body {
  flex: 1; overflow-y: auto; padding: 24px clamp(16px, 4.5vw, 60px) 40px;
  display: grid; align-content: start; gap: 44px;
}
.menu__group h4 {
  margin: 0 0 18px; font-family: var(--font); font-weight: 500; font-size: 12px;
  color: var(--muted); text-transform: lowercase; letter-spacing: .06em;
}
.menu__group a, .menu__group button {
  display: block; font-family: var(--font); font-weight: 200;
  font-size: clamp(20px, 5.4vw, 34px); line-height: 1.5; text-transform: lowercase;
  transform: translateY(12px); opacity: 0;
  transition: transform .5s var(--ease), opacity .5s var(--ease), color .2s;
}
.menu.open .menu__group a, .menu.open .menu__group button { transform: none; opacity: 1; }
.menu__group a:hover, .menu__group button:hover { color: var(--muted); }
.menu__group .sub { font-size: clamp(14px, 3.6vw, 20px); padding-left: 1.2em; color: #cfcfcf; }
.menu__foot {
  padding: 18px clamp(16px, 4.5vw, 60px) 28px; display: flex; justify-content: space-between;
  font-family: var(--font); font-size: 11px; color: var(--muted); text-transform: lowercase;
}

/* ---------- hero (страница 1) ---------- */
/* фото во всю ширину без заливки по краям; верх и низ плавно уходят в чёрный, чтобы блоки перетекали друг в друга */
.stage { position: relative; background: #000; overflow: hidden; }
.stage__frame {
  position: relative; width: fit-content; max-width: 100%; margin: 0 auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 86%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 86%, transparent 100%);
}
.stage__img { display: block; width: 100vw; max-width: 100%; height: auto; }
@media (min-aspect-ratio: 3/4) {
  /* широкий экран: фото по высоте экрана по центру, бока тоже растворяются */
  .stage__img { width: auto; height: 100svh; }
  .stage__img {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
  }
}
.stage__cta {
  position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%); white-space: nowrap;
  font-family: var(--font); font-weight: 200; font-size: clamp(16px, 2.2vw, 26px);
  color: rgba(255, 255, 255, .78); text-transform: lowercase; letter-spacing: .02em;
  padding: 10px 18px; transition: color .2s, letter-spacing .4s var(--ease);
}
.stage__cta:hover { color: #fff; letter-spacing: .08em; }
.scroll-hint {
  position: absolute; left: 50%; bottom: 14px; width: 1px; height: 34px; background: rgba(255,255,255,.35);
  overflow: hidden; transform: translateX(-50%);
}
.scroll-hint::after {
  content: ''; position: absolute; left: 0; top: -100%; width: 1px; height: 100%; background: #fff;
  animation: drip 1.8s var(--ease) infinite;
}
@keyframes drip { to { top: 100%; } }

/* ---------- section titles ---------- */
.section { padding: calc(var(--header-h) + clamp(40px, 10vw, 140px)) var(--pad) clamp(60px, 10vw, 140px); }
.section--tight { padding-top: clamp(50px, 8vw, 110px); }
.h-display {
  margin: 0; font-family: var(--font); font-weight: 200; text-transform: lowercase;
  font-size: clamp(30px, 8.4vw, 120px); line-height: .95; letter-spacing: -.01em;
}
.h-sub {
  margin: 14px 0 0; max-width: 560px; color: #bdbdbd; font-size: 13px;
}
.collection-head { margin-bottom: clamp(40px, 8vw, 100px); }

/* ---------- product grid (страница 2) ---------- */
.grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(20px, 8.9vw, 128px); row-gap: clamp(50px, 11vw, 160px);
}
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 72px; } }
@media (min-width: 1600px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { display: block; }
.card__media { position: relative; aspect-ratio: 522 / 695; overflow: hidden; background: #111; }
.slides {
  display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.card:hover .slides img { transform: scale(1.015); }
.slides img { transition: transform .8s var(--ease); }
.bars { display: flex; gap: clamp(10px, 2.2vw, 32px); margin-top: clamp(12px, 2.2vw, 32px); }
.bars span { flex: 1; height: 3px; background: #7a7a7a; transition: background .3s; }
.bars span.on { background: #fff; }
.card__name {
  margin-top: clamp(14px, 2.6vw, 34px); text-align: center;
  font-family: var(--font); font-weight: 300; font-size: clamp(11px, 2.4vw, 22px); text-transform: lowercase;
  letter-spacing: -.01em;
}
.card__price { text-align: center; margin-top: 6px; font-family: var(--font); font-size: clamp(10px, 1.8vw, 14px); color: var(--muted); }

.card--soon .slides img { filter: blur(14px); transform: scale(1.12); }
.card--soon .card__media::after {
  content: 'soon'; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font); font-size: clamp(14px, 2.6vw, 30px); text-transform: lowercase;
}
.card--soon { pointer-events: none; }


/* ---------- product page ---------- */
.product { padding-top: var(--header-h); display: grid; }
@media (min-width: 960px) {
  .product { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 100svh; }
  .product .product__gallery { position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h)); }
}
.product__gallery { position: relative; background: #0c0c0c; }
.product__gallery .slides { aspect-ratio: 3 / 4; }
@media (min-width: 960px) { .product__gallery .slides { aspect-ratio: auto; height: 100%; } }
.product__gallery .bars { position: absolute; left: 16px; right: 16px; bottom: 16px; margin: 0; }
.product__gallery .bars span { height: 2px; background: rgba(255,255,255,.35); }
.product__gallery .bars span.on { background: #fff; }
.back {
  position: absolute; top: 14px; left: 14px; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center;
}
.back svg { width: 28px; stroke: #fff; fill: none; stroke-width: 1.4; }

.product__info { padding: 32px var(--pad-in, 20px) 80px; }
@media (min-width: 960px) { .product__info { --pad-in: clamp(32px, 5vw, 90px); padding-top: clamp(40px, 7vw, 110px); max-width: 640px; } }
.product__coll { font-family: var(--font); font-size: 11px; color: var(--muted); text-transform: lowercase; }
.product__name {
  margin: 10px 0 0; font-family: var(--font); font-weight: 300; text-transform: lowercase;
  font-size: clamp(24px, 3.4vw, 40px); line-height: 1.1;
}
.product__price { margin-top: 16px; font-family: var(--font); font-size: 20px; font-weight: 300; }
.label {
  display: block; margin: 30px 0 12px; font-family: var(--font); font-size: 11px;
  color: var(--muted); text-transform: lowercase; letter-spacing: .06em;
}
.sizes { display: flex; flex-wrap: wrap; gap: 10px; }
.size {
  min-width: 64px; height: 48px; padding: 0 16px; border: 1px solid var(--line-2);
  font-family: var(--font); font-size: 13px; text-transform: lowercase; transition: border-color .2s, background .2s, color .2s;
}
.size:hover { border-color: #888; }
.size.on { border-color: #fff; background: #fff; color: #000; }
.size-error { margin-top: 10px; font-size: 12px; color: var(--danger); min-height: 1em; }

.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 58px;
  background: #fff; color: #000; font-family: var(--font); font-size: 13px; font-weight: 400;
  text-transform: lowercase; letter-spacing: .12em; transition: opacity .2s, background .2s;
}
.btn:hover { opacity: .86; }
.btn:disabled { background: #3a3a3a; color: #9a9a9a; cursor: not-allowed; opacity: 1; }
.btn--ghost { background: transparent; color: #fff; border: 1px solid var(--line-2); }
.btn--ghost:hover { border-color: #fff; opacity: 1; }
.product .btn { margin-top: 28px; }

.desc { margin-top: 34px; }
.desc h3 { margin: 0 0 12px; font-family: var(--font); font-weight: 400; font-size: 14px; text-transform: lowercase; }
.desc ul { margin: 0; padding: 0; list-style: none; color: #cfcfcf; }
.desc li { padding: 3px 0; }
.desc li::before { content: '— '; color: var(--muted); }

.acc { margin-top: 36px; border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0; font-family: var(--font); font-size: 13px; text-transform: lowercase;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '+'; font-size: 20px; font-weight: 200; transition: transform .3s var(--ease); }
.acc details[open] summary::after { transform: rotate(45deg); }
.acc .acc__body { padding: 0 0 22px; color: #bdbdbd; font-size: 13px; }

.related { padding: 40px var(--pad) 100px; border-top: 1px solid var(--line); }
.related h2 { margin: 0 0 40px; font-family: var(--font); font-weight: 300; font-size: 14px; text-transform: lowercase; letter-spacing: .08em; }

/* ---------- cart drawer ---------- */
.shade {
  position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.6);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.shade.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(520px, 100%);
  background: var(--panel); border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .45s var(--ease);
}
.drawer.open { transform: none; }
.drawer__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 26px 24px 20px; border-bottom: 1px solid var(--line);
}
.drawer__title { font-family: var(--font); font-size: 14px; letter-spacing: .14em; text-transform: lowercase; }
.drawer__title b { font-weight: 300; color: var(--muted); margin-left: 6px; }
.drawer__note { margin-top: 6px; font-size: 12px; color: #cfcfcf; text-transform: lowercase; font-family: var(--font); }
.drawer__close svg { width: 26px; height: 26px; stroke: #fff; stroke-width: 1.4; }
.drawer__body { flex: 1; overflow-y: auto; padding: 0 24px; }
.drawer__foot { padding: 20px 24px 26px; border-top: 1px solid var(--line); }

.line { display: grid; grid-template-columns: 96px 1fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.line img { width: 96px; aspect-ratio: 3 / 4; object-fit: cover; background: #151515; }
.line__name { font-family: var(--font); font-size: 13px; text-transform: lowercase; }
.line__size { margin-top: 4px; font-size: 12px; color: var(--muted); }
.line__row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); height: 40px; }
.qty button { width: 38px; height: 100%; font-size: 16px; }
.qty span { min-width: 26px; text-align: center; font-family: var(--font); font-size: 12px; }
.line__price { font-family: var(--font); font-size: 14px; }
.line__del { margin-top: 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid currentColor; }
.line__del:hover { color: #fff; }

.sum { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font); }
.sum + .sum { margin-top: 8px; }
.sum--total { font-size: 20px; margin-top: 14px !important; }
.sum--small { font-size: 12px; color: #bdbdbd; }
.drawer__hint { margin: 10px 0 18px; font-size: 12px; color: var(--muted); }
.empty { padding: 60px 0; text-align: center; color: var(--muted); font-family: var(--font); text-transform: lowercase; }
.empty a { display: inline-block; margin-top: 18px; color: #fff; border-bottom: 1px solid #fff; }

/* ---------- forms ---------- */
.form { padding: 10px 0 30px; }
.field { margin-top: 22px; }
.field > span {
  display: block; margin-bottom: 10px; font-family: var(--font); font-size: 11px;
  color: var(--muted); text-transform: lowercase; letter-spacing: .06em;
}
.field small { display: block; margin: -4px 0 10px; font-size: 11px; color: #6f6f6f; }
.input {
  width: 100%; height: 54px; padding: 0 16px; background: transparent; border: 1px solid var(--line-2);
  border-radius: 0; outline: none; transition: border-color .2s; font-size: 15px;
}
.input::placeholder { color: #555; }
.input:focus { border-color: #fff; }
.input.err { border-color: var(--danger); }
textarea.input { height: 96px; padding-top: 14px; resize: vertical; }
.promo { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.promo button { padding: 0 18px; border: 1px solid var(--line-2); font-family: var(--font); font-size: 11px; text-transform: lowercase; }
.promo-msg { margin-top: 8px; font-size: 12px; min-height: 1em; }
.promo-msg.ok { color: #9be29b; } .promo-msg.bad { color: var(--danger); }

.choice { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice i {
  flex: 0 0 22px; height: 22px; border: 1px solid #777; display: grid; place-items: center; margin-top: 1px;
}
.choice i::after { content: ''; width: 10px; height: 10px; background: #fff; transform: scale(0); transition: transform .2s var(--ease); }
.choice input:checked + i { border-color: #fff; }
.choice input:checked + i::after { transform: scale(1); }
.choice input:focus-visible + i { outline: 1px solid #fff; outline-offset: 3px; }
.choice em { font-style: normal; color: var(--muted); margin-left: 6px; }
.choice a { border-bottom: 1px solid currentColor; }
.form-error { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--danger); color: var(--danger); font-size: 13px; }
.legal { margin-top: 18px; font-size: 11px; color: #6f6f6f; }
.legal a { border-bottom: 1px solid currentColor; }

.done { padding: 70px 0; text-align: center; }
.done__mark { width: 96px; margin: 0 auto 28px; }
.done h3 { margin: 0; font-family: var(--font); font-weight: 200; font-size: 28px; text-transform: lowercase; }
.done p { color: #bdbdbd; margin: 14px 0 0; }
.done .num { font-family: var(--font); color: #fff; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 20px);
  background: #fff; color: #000; padding: 14px 22px; font-family: var(--font); font-size: 12px; text-transform: lowercase;
  opacity: 0; transition: opacity .3s, transform .3s var(--ease); pointer-events: none; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- footer ---------- */
.footer {
  padding: 70px var(--pad) 40px;
  display: grid; gap: 40px;
}
@media (min-width: 800px) { .footer { grid-template-columns: 1.2fr 1fr 1fr; align-items: start; } }
.footer__logo img { width: 92px; }
.footer__logo p { margin: 16px 0 0; color: var(--muted); font-size: 12px; max-width: 280px; }
.footer h5 { margin: 0 0 14px; font-family: var(--font); font-weight: 400; font-size: 11px; color: var(--muted); text-transform: lowercase; letter-spacing: .06em; }
.footer a { display: block; padding: 4px 0; font-family: var(--font); font-size: 13px; text-transform: lowercase; }
.footer a:hover { color: var(--muted); }
.footer__copy { grid-column: 1 / -1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: #5f5f5f; font-size: 11px; font-family: var(--font); text-transform: lowercase; }

/* ---------- info pages ---------- */
.prose { max-width: 760px; }
.prose h2 { margin: 56px 0 14px; font-family: var(--font); font-weight: 300; font-size: 18px; text-transform: lowercase; }
.prose p, .prose li { color: #cfcfcf; }
.prose a { border-bottom: 1px solid currentColor; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
