/* =========================================================
   Мебель Ростов — styles
   Minimal, premium. Palette derived from the logo's petrol blue
   plus a champagne accent. One typeface: Manrope.
   ========================================================= */

:root {
  --bg: #01202f;
  --bg-deep: #001722;
  --surface: #032b3e;
  --raised: #0a3b52;
  --line: rgba(237, 241, 243, .09);
  --line-strong: rgba(237, 241, 243, .2);
  --text: #edf1f3;
  --text-soft: rgba(237, 241, 243, .7);
  --muted: #8aa3b1;
  --accent: #e3d3b8;       /* champagne */
  --accent-ink: #01202f;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;
  --r-lg: 24px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
}

@media (max-width: 1099px) {
  :root { --header-h: 64px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.js body.is-loading { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.08; letter-spacing: -.03em; }
h3 { font-weight: 500; letter-spacing: -.01em; }
p { margin: 0; }

:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 28px;
  height: 1px;
  margin: -2px 14px 0 0;
  background: var(--accent);
  opacity: .7;
}

.lead { color: var(--text-soft); font-size: clamp(15px, 1.25vw, 17px); }

/* ---------- Buttons ---------- */
.btn {
  --bh: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: var(--bh);
  padding: 0 28px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform .4s var(--ease), background-color .3s, color .3s, border-color .3s, box-shadow .4s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .4s var(--ease); }
.btn--sm { --bh: 42px; padding: 0 18px; font-size: 11.5px; }

.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -18px rgba(227, 211, 184, .55); }
.btn--accent:hover svg { transform: translateX(3px); }

.btn--ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn--ghost:hover { transform: translateY(-2px); border-color: rgba(237, 241, 243, .45); }

/* ---------- Splash ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: radial-gradient(60% 60% at 50% 45%, var(--surface) 0%, var(--bg-deep) 100%);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1s var(--ease-io);
  animation: splash-failsafe 0s linear 7s forwards;
}
.splash.is-leave { clip-path: inset(0 0 100% 0); pointer-events: none; }
@keyframes splash-failsafe { to { visibility: hidden; } }

.splash__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  transition: transform 1s var(--ease-io), opacity .6s;
}
.splash.is-leave .splash__inner { transform: translateY(-70px); opacity: 0; }

.splash__mark { position: relative; width: 172px; height: 172px; display: grid; place-items: center; }
.splash__mark::before {
  content: "";
  position: absolute;
  inset: -60px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(227, 211, 184, .12), transparent);
  opacity: 0;
}
.splash__frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.splash__frame rect {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
}
.splash__logo {
  width: 132px;
  height: 132px;
  border-radius: 30px;
  clip-path: inset(50% 50% 50% 50% round 30px);
  transform: scale(1.18);
}
.splash__word {
  display: flex;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .5em;
  margin-right: -.5em;
  text-transform: uppercase;
}
.splash__word span { display: inline-block; opacity: 0; transform: translateY(10px); }

.splash.is-play .splash__frame rect { animation: draw 1.2s var(--ease-io) forwards; }
.splash.is-play .splash__logo { animation: logo-in 1.05s var(--ease-io) .35s forwards; }
.splash.is-play .splash__mark::before { animation: fade-in 1.4s ease .5s forwards; }
.splash.is-play .splash__word span { animation: letter-in .7s var(--ease) forwards; animation-delay: calc(.95s + var(--i) * 45ms); }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes logo-in { to { clip-path: inset(0 0 0 0 round 30px); transform: none; } }
@keyframes letter-in { to { opacity: 1; transform: none; } }
@keyframes fade-in { to { opacity: 1; } }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color .4s, border-color .4s;
}
.header.is-scrolled {
  background: rgba(0, 23, 34, .82);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}

.header__in { height: 100%; display: flex; align-items: center; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__text b { font-size: 15px; font-weight: 500; letter-spacing: .02em; }
.brand__text small { font-size: 10px; color: var(--muted); letter-spacing: .2em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  position: relative;
  padding: 10px 14px;
  font-size: 14px;
  color: rgba(237, 241, 243, .72);
  transition: color .3s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__extra { display: none; }

.header__actions { display: flex; align-items: center; gap: 10px; }
.burger { display: none; }

@media (max-width: 1099px) {
  .brand img { width: 36px; height: 36px; border-radius: 9px; }
  .brand__text b { font-size: 14px; }

  .header__wa { width: 42px; padding: 0; }
  .header__wa span { display: none; }

  /* Burger sits on the far right */
  .burger {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    transition: background-color .3s, border-color .3s;
  }
  .burger span {
    position: absolute;
    width: 16px;
    height: 1.4px;
    border-radius: 2px;
    background: var(--text);
    transition: transform .45s var(--ease);
  }
  .burger span:first-child { transform: translateY(-3.5px); }
  .burger span:last-child { transform: translateY(3.5px); }
  .nav-open .burger { background: var(--accent); border-color: var(--accent); }
  .nav-open .burger span { background: var(--accent-ink); }
  .nav-open .burger span:first-child { transform: rotate(45deg); }
  .nav-open .burger span:last-child { transform: rotate(-45deg); }

  /* Compact dropdown panel, not full screen */
  .nav {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    right: 12px;
    width: min(290px, calc(100vw - 24px));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.96);
    transition: opacity .3s var(--ease), transform .45s var(--ease), visibility 0s .45s;
  }
  .nav-open .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .3s var(--ease), transform .45s var(--ease);
  }
  .nav__link { padding: 12px 14px; font-size: 15px; }
  .nav__link::after { display: none; }
  .nav-open .nav__link { animation: nav-in .5s var(--ease) both; animation-delay: calc(var(--i) * 40ms + 60ms); }

  .nav__extra {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
    padding: 14px 8px 4px;
    border-top: 1px solid var(--line);
  }
  .nav__phone { font-size: 18px; font-weight: 500; }
  .nav__hours { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
  .nav__extra .btn + .btn { margin-top: 4px; }

  /* With a burger menu the hero has no buttons — they live in the menu */
  .hero__content .hero__btns { display: none; }
}

@keyframes nav-in { from { opacity: 0; transform: translateX(10px); } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: clip;
  padding-top: calc(var(--header-h) + clamp(32px, 6vh, 72px));
  padding-bottom: clamp(24px, 4vh, 40px);
}

.hero__bg { position: absolute; inset: 0; pointer-events: none; }

/* Background photo: covers the whole hero, sofa kept in view */
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 60%; }
.hero__media::after {
  /* light overall darkening + a touch more behind the text and at the bottom edge */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 16, 24, .35) 0%, rgba(0, 16, 24, 0) 55%),
    linear-gradient(180deg, rgba(0, 23, 34, 0) 70%, var(--bg-deep) 100%),
    rgba(0, 12, 18, .18);
}

.hero__content { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.hero__content::before {
  /* soft shade behind the text so the photo doesn't blend into it */
  content: "";
  position: absolute;
  z-index: -1;
  left: -12%;
  top: 50%;
  width: min(1000px, 120%);
  height: 130%;
  transform: translateY(-50%);
  background: radial-gradient(closest-side, rgba(0, 14, 21, .62), rgba(0, 14, 21, 0));
  pointer-events: none;
}

.hero__title {
  max-width: 900px;
  margin: 28px 0 28px;
  font-size: clamp(44px, 5.8vw, 82px);
  line-height: 1.02;
  letter-spacing: -.035em;
  filter: drop-shadow(0 4px 24px rgba(0, 10, 16, .55));
}
.hero__title .line { display: block; }
.hero__title .w { display: inline-block; }

/* Accent line: champagne with a light that sweeps across once */
.hero__title .line--accent .w {
  color: transparent;
  background: linear-gradient(105deg, var(--accent) 0 42%, #fff6e4 50%, var(--accent) 58% 100%) 100% 0 / 260% 100% no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
}
.is-ready .hero__title .line--accent .w { animation: shine 1.6s var(--ease-io) forwards; animation-delay: calc(1.25s + var(--i) * .1s); }
@keyframes shine { to { background-position: 0 0; } }
.hero__lead { max-width: 27em; font-size: clamp(15px, 1.25vw, 17px); color: var(--text-soft); }
.hero__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.hero__btns .btn--ghost { background: rgba(1, 32, 47, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

.hero__bottom { position: relative; margin-top: clamp(40px, 6vh, 64px); }

/* Hero entrance, played after the splash */
.js .hero [data-hero] { opacity: 0; transform: translateY(26px); }
.js .hero__title .w { opacity: 0; transform: translateY(.4em) scale(.98); filter: blur(7px); }
.js .hero__media { opacity: 0; transform: scale(1.05); }

.is-ready .hero [data-hero] {
  opacity: 1;
  transform: none;
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
/* Title: words come out of blur one after another */
.is-ready .hero__title .w {
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity 1s ease, transform 1.3s var(--ease), filter 1.1s ease;
  transition-delay: calc(.1s + var(--i) * .11s);
}
.is-ready .hero__media { opacity: 1; transform: none; transition: opacity 1.2s ease, transform 2.4s var(--ease); }

/* Quick pick bar */
.quick {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}
.quick__label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.quick__scroll { flex: 1; min-width: 0; }
.quick__chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.quick__chips::-webkit-scrollbar { display: none; }
.quick__chip {
  flex: none;
  padding: 11px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
  transition: background-color .3s, color .3s, border-color .3s;
}
.quick__chip:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.quick__info { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.quick__info svg { width: 16px; height: 16px; }

/* ---------- Horizontal scroll: hint + indicator ---------- */
[data-scroll] { -webkit-overflow-scrolling: touch; }
[data-scroll].has-more {
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}
[data-scroll].has-more.has-less {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 88%, transparent);
}
[data-scroll].has-less:not(.has-more) {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%);
  mask-image: linear-gradient(90deg, transparent, #000 10%);
}

.sbar { position: relative; height: 2px; margin-top: 16px; border-radius: 2px; overflow: hidden; }
.sbar[hidden] { display: none; }
.sbar span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--text);
  opacity: .12;
  transition: opacity .5s ease;
}
.sbar.is-active span { opacity: .7; transition-duration: .2s; }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(88px, 12vw, 160px); }
.sec-head { max-width: 780px; }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head h2 { margin-top: 20px; font-size: clamp(30px, 4.2vw, 56px); }
.sec-head .lead { margin-top: 20px; }
.sec-head--center .lead { margin-inline: auto; max-width: 36em; }

/* Scroll reveal */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Dimension line (furniture spec style) */
.dim {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .14em;
  white-space: nowrap;
}
.dim::before, .dim::after {
  content: "";
  flex: 1;
  height: 9px;
  background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
  opacity: .5;
}
.dim::before { border-left: 1px solid; }
.dim::after { border-right: 1px solid; }

/* ---------- Furniture drawings ---------- */
.art {
  --edge: color-mix(in srgb, var(--tint, #c8ae8a) 55%, #01141f);
  width: 100%;
  height: auto;
  overflow: visible;
}
.art .u, .art .u2, .art .u3 { stroke: var(--edge); stroke-width: 1.4; transition: fill .6s var(--ease), stroke .6s var(--ease); }
.art .u  { fill: var(--tint, #c8ae8a); }
.art .u2 { fill: color-mix(in srgb, var(--tint, #c8ae8a), #fff 9%); }
.art .u3 { fill: color-mix(in srgb, var(--tint, #c8ae8a), #000 14%); }
.art .ln { fill: none; stroke: var(--edge); stroke-width: 1.3; stroke-linecap: round; opacity: .7; transition: stroke .6s; }
.art .leg { fill: none; stroke: var(--legs, #1b2227); stroke-width: 5; stroke-linecap: round; transition: stroke .6s; }
.art .leg.back { opacity: .55; }
.art .lg { fill: var(--legs, #1b2227); transition: fill .6s; }
.art .frame { fill: none; stroke: var(--legs, #1b2227); stroke-width: 7; stroke-linejoin: round; transition: stroke .6s; }
.art .handle { fill: none; stroke: var(--legs, #1b2227); stroke-width: 3; stroke-linecap: round; transition: stroke .6s; }
.art .linen { fill: #ece6dc; stroke: rgba(1, 20, 31, .3); stroke-width: 1.4; }
.art .floor { fill: url(#floorShade); }

/* Sketch version: thin champagne lines that draw themselves */
.art--sketch .u, .art--sketch .u2, .art--sketch .u3, .art--sketch .linen,
.art--sketch .leg, .art--sketch .lg, .art--sketch .frame, .art--sketch .handle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.3;
}
.art--sketch .ln { stroke: var(--accent); opacity: .4; }
.art--sketch .leg.back { opacity: .4; }
.art--sketch .floor { display: none; }
.js .art--sketch > * { stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset 2.6s var(--ease-io); }
.is-in .art--sketch > * { stroke-dashoffset: 0; }

/* ---------- Calculator ---------- */
.calc { overflow-x: clip; background: var(--bg-deep); }

/* Category ribbon (idea from the reference) */
.ribbon {
  position: relative;
  height: clamp(64px, 8vw, 108px);
  margin-top: clamp(40px, 5vw, 64px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24%, #000 76%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 24%, #000 76%, transparent 100%);
  touch-action: pan-y;
}
.ribbon__track {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: clamp(24px, 3.6vw, 60px);
  white-space: nowrap;
  will-change: transform;
}
.ribbon__item {
  padding: 8px 0;
  font-size: clamp(13px, 1.4vw, 17px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(237, 241, 243, .36);
  transition: font-size .6s var(--ease), color .6s var(--ease), letter-spacing .6s var(--ease);
}
.ribbon__item:hover { color: rgba(237, 241, 243, .7); }
.ribbon__item.is-active { font-size: clamp(34px, 6vw, 80px); font-weight: 400; letter-spacing: .02em; color: var(--text); }

/* Coverflow stage */
.stage {
  --drag: 0px;
  --card-w: clamp(272px, 30vw, 400px);
  position: relative;
  height: clamp(400px, 36vw, 480px);
  margin-top: clamp(16px, 3vw, 36px);
  outline: none;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  transition: opacity .3s var(--ease), transform .5s var(--ease);
}
.stage:focus-visible .card.is-active { outline: 1.5px solid var(--accent); outline-offset: 4px; }
.stage.is-out { opacity: 0; transform: translateY(18px); }

.card {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: var(--card-w);
  z-index: calc(10 - var(--a, 0));
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 28px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #0a3a51 0%, var(--surface) 75%);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8);
  cursor: pointer;
  opacity: calc(1 - var(--a, 0) * .45);
  transform: translateX(calc(-50% + var(--o, 0) * 76% + var(--drag))) scale(calc(1 - var(--a, 0) * .15));
  transition: transform .75s var(--ease), opacity .75s var(--ease), border-color .5s;
}
.card.is-active { cursor: grab; border-color: rgba(227, 211, 184, .26); }
.card[aria-hidden="true"] { pointer-events: none; }
.stage.is-dragging .card { transition: none; }
.stage.is-dragging .card.is-active { cursor: grabbing; }

.card__name { font-size: clamp(20px, 1.8vw, 24px); font-weight: 500; }
.card__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.card__meta b { font-weight: 600; color: var(--accent); }
.card__art { flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; }
.card__art img { max-height: 100%; object-fit: contain; -webkit-user-drag: none; }
.card__dim { width: 80%; opacity: 0; transform: scaleX(.6); transition: opacity .5s var(--ease), transform .7s var(--ease); }
.card.is-active .card__dim.has-dim { opacity: 1; transform: none; transition-delay: .15s; }

.stage-nav { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 32px; }
.arrow {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  transition: background-color .3s, color .3s, border-color .3s, opacity .3s;
}
.arrow svg { width: 20px; height: 20px; }
.arrow:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.arrow:disabled { opacity: .25; cursor: default; }

.dots { display: flex; gap: 2px; }
.dots button { display: grid; place-items: center; width: 20px; height: 28px; transition: width .5s var(--ease); }
.dots button::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: rgba(237, 241, 243, .22);
  transition: width .5s var(--ease), background-color .5s;
}
.dots button[aria-current="true"] { width: 36px; }
.dots button[aria-current="true"]::after { width: 26px; background: var(--accent); }

/* Options + summary */
.cfg {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(56px, 7vw, 96px);
}
.cfg__opts { transition: opacity .3s var(--ease); }
.cfg__opts.is-out { opacity: 0; }

.opt {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px 24px;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.opt:first-child { border-top: 0; padding-top: 0; }
.opt--top { align-items: start; }
.opt__label { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.opt__label em { display: block; margin-top: 6px; font-style: normal; font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input, .swatch input, .switch input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color .3s, color .3s, border-color .3s;
}
.chip small { font-size: 12px; color: var(--muted); transition: color .3s; }
.chip:hover span { border-color: rgba(237, 241, 243, .45); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip input:checked + span small { color: rgba(1, 32, 47, .6); }
.chip input:focus-visible + span { outline: 1.5px solid var(--accent); outline-offset: 3px; }

.swatches { display: flex; flex-wrap: wrap; gap: 14px; padding: 6px; }
.swatch { position: relative; cursor: pointer; }
.swatch span {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .22), transparent 55%), var(--c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  transition: transform .4s var(--ease);
}
.swatch span::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  transform: scale(.8);
  transition: opacity .3s, transform .4s var(--ease);
}
.swatch:hover span { transform: scale(1.07); }
.swatch input:checked + span::after { opacity: 1; transform: none; }
.swatch input:focus-visible + span { outline: 1.5px solid var(--accent); outline-offset: 9px; }

.qty { display: inline-flex; align-items: center; justify-self: start; border: 1px solid var(--line-strong); border-radius: 999px; }
.qty button { width: 44px; height: 44px; border-radius: 50%; font-size: 18px; transition: background-color .3s, opacity .3s; }
.qty button:hover:not(:disabled) { background: rgba(237, 241, 243, .07); }
.qty button:disabled { opacity: .3; cursor: default; }
.qty output { min-width: 40px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }

.switches { display: grid; }
.switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  cursor: pointer;
}
.switch + .switch { border-top: 1px solid var(--line); }
.switch__text { font-size: 14px; }
.switch__text small { display: block; font-size: 12px; color: var(--muted); }
.switch__ui { position: relative; flex: none; width: 44px; height: 26px; border-radius: 99px; background: rgba(237, 241, 243, .12); transition: background-color .3s; }
.switch__ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text);
  transition: transform .4s var(--ease), background-color .3s;
}
.switch input:checked ~ .switch__ui { background: var(--accent); }
.switch input:checked ~ .switch__ui::after { transform: translateX(18px); background: var(--accent-ink); }
.switch input:focus-visible ~ .switch__ui { outline: 1.5px solid var(--accent); outline-offset: 3px; }

.cfg__sum {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface), rgba(3, 43, 62, .4));
}
.sum__model { margin-top: 14px; font-size: 26px; }
.sum__list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; margin: 24px 0 0; font-size: 13.5px; }
.sum__list dt { color: var(--muted); }
.sum__list dd { margin: 0; text-align: right; }
.sum__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.sum__total small { font-size: 13px; color: var(--muted); }
.sum__total strong { font-size: clamp(30px, 2.8vw, 38px); font-weight: 400; letter-spacing: -.02em; line-height: 1; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sum__send { width: 100%; margin-top: 22px; }
.sum__note { margin-top: 14px; font-size: 12.5px; color: var(--muted); }

/* Floating price bar (mobile only) */
.calc-float {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(3, 43, 62, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .65);
  transform: translateY(150%);
  transition: transform .55s var(--ease);
}
.calc-float.is-on { transform: none; }
.calc-float small { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.calc-float strong { font-size: 21px; font-weight: 500; line-height: 1.2; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---------- Custom order ---------- */
.custom__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: center;
}
.custom__copy h2 { margin-top: 20px; font-size: clamp(30px, 4.2vw, 56px); }
.custom__copy .lead { margin-top: 20px; }
.custom__copy .btn { margin-top: 40px; }

.blueprint {
  position: relative;
  aspect-ratio: 1.15;
  display: grid;
  place-items: center;
  padding: 10% 10% 16%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background-color: rgba(3, 43, 62, .5);
  background-image:
    linear-gradient(rgba(227, 211, 184, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(227, 211, 184, .05) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}
.blueprint__label {
  position: absolute;
  top: 22px;
  left: 26px;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}
.blueprint__art { width: 100%; }
.blueprint__dim { position: absolute; left: 18%; right: 18%; bottom: 11%; }

.facts { margin: 36px 0 0; padding: 0; list-style: none; }
.facts li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 6px 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts b { font-size: 15px; font-weight: 500; }
.facts span { font-size: 15px; color: var(--text-soft); }

/* ---------- Steps ---------- */
.steps { background: var(--bg-deep); }
.steps__body { position: relative; margin-top: clamp(44px, 5vw, 72px); }
.steps__track { position: absolute; background: var(--line-strong); }

.steps__list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step { position: relative; padding-top: 82px; }
.step__num {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--bg-deep);
  font-size: 15px;
  color: var(--accent);
}
.step h3 { margin-bottom: 10px; font-size: 20px; }
.step p { font-size: 14.5px; color: var(--text-soft); }

/* ---------- Reviews ---------- */
.reviews__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(44px, 5vw, 72px);
}
.review {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.review__mark { width: 28px; height: 1px; background: var(--accent); }
.review p { font-size: 15.5px; color: rgba(237, 241, 243, .86); }
.review footer { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 6px; }
.review footer b { display: block; font-size: 14px; font-weight: 500; }
.review footer small { font-size: 12.5px; color: var(--muted); }
.review__ava {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 14px;
  color: var(--accent);
}

/* ---------- Contacts ---------- */
.contacts { background: var(--bg-deep); }
.contacts__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 20px;
  margin-top: clamp(44px, 5vw, 72px);
}
.info {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.info dl { display: grid; gap: 24px; margin: 0; }
.info dt { margin-bottom: 6px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.info dd { margin: 0; font-size: 20px; font-weight: 400; line-height: 1.35; letter-spacing: -.01em; }
.info dd a { transition: color .3s; }
.info dd a:hover { color: var(--accent); }
.info__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 36px; }

.map {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(.35) saturate(.85); }

/* ---------- Footer ---------- */
.footer { padding: 40px 0 44px; border-top: 1px solid var(--line); background: var(--bg-deep); font-size: 13px; color: var(--muted); }
.footer__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.footer .brand { margin-right: 0; color: var(--text); }
.footer__note { flex-basis: 100%; font-size: 11.5px; opacity: .75; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .cfg { grid-template-columns: minmax(0, 1fr); }
  .cfg__sum { position: static; }
  .calc-float { display: flex; }
}

@media (max-width: 860px) {
  /* Phone / tablet portrait: the photo sits under the buttons, its dark wall fades into the page */
  /* Phone / tablet portrait: a blurred copy of the photo fills the whole screen,
     the sharp photo with the full sofa sits under the buttons and melts into it */
  .hero__bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../img/hero.jpg") 80% 0 / cover no-repeat;
    filter: brightness(.85);
    -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 56%);
    mask-image: linear-gradient(180deg, #000 40%, transparent 56%);
  }
  .hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 16, 24, .25), rgba(0, 16, 24, 0) 40%, rgba(0, 16, 24, 0) 70%, var(--bg-deep) 100%);
  }
  .hero__media {
    top: auto;
    bottom: 120px;
    height: 120vw;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 28%, #000 78%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 28%, #000 78%, transparent 100%);
  }
  .hero__media img { object-position: 72% 50%; }
  .hero__media::after { background: rgba(0, 12, 18, .18); }
  .hero__content { flex: none; }
  .hero__bottom { margin-top: calc(55vw - 10px); }

  .quick { flex-wrap: wrap; gap: 14px; }
  .quick__label { width: 100%; }
  .quick__scroll { flex: 1 1 100%; }
  .quick__info { width: 100%; white-space: normal; }

  .custom__grid { grid-template-columns: minmax(0, 1fr); }
  .contacts__grid { grid-template-columns: minmax(0, 1fr); }
  .map { min-height: 340px; }

  .reviews__list {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(84%, 360px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .reviews__list::-webkit-scrollbar { display: none; }
  .review { scroll-snap-align: start; }
}

@media (max-width: 760px) {
  .steps__list { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .step { padding: 2px 0 0 76px; min-height: 54px; }
  .step h3 { margin-bottom: 6px; font-size: 18px; }
  .step p { font-size: 14px; }
}

@media (max-width: 600px) {
  .hero__btns .btn { flex: 1 1 100%; }

  .ribbon {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%);
  }
  .stage { --card-w: 74vw; height: 380px; }
  .card { padding: 26px 18px 22px; }
  .card { transform: translateX(calc(-50% + var(--o, 0) * 84% + var(--drag))) scale(calc(1 - var(--a, 0) * .15)); }

  .opt { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 20px 0; }
  .opt__label em { display: inline; margin: 0 0 0 8px; }
  .chip span { min-height: 42px; padding: 0 15px; font-size: 13.5px; }
  .cfg__sum { padding: 24px; }

  .facts li { grid-template-columns: minmax(0, 1fr); }
  .review { padding: 26px; }

  .info__btns .btn { flex: 1 1 100%; }
  .footer__in { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero__title .w { filter: none; transform: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
}
