/* How it works and FAQ page. */
.hw-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 64px; align-items: end; padding-top: 8px; }
.hw-head h1 { margin: 0; font-size: clamp(44px, 6vw, 88px); font-weight: 760; line-height: .95; letter-spacing: -.045em; text-wrap: balance; }
.hw-head p { margin: 0; color: var(--muted); font-size: 18px; line-height: 1.6; }
.hw-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.hw-jump a { padding: 10px 16px; border-radius: 999px; background: var(--panel); border: 1.5px solid var(--line); text-decoration: none; font-weight: 600; font-size: 14px; }
.hw-jump a:hover { border-color: var(--text); color: var(--text); }
.hw-sec { padding-top: 110px; scroll-margin-top: 20px; }
.hw-h { margin: 0 0 16px; font-size: clamp(32px, 4vw, 56px); font-weight: 740; line-height: 1; letter-spacing: -.04em; text-wrap: balance; }
.hw-lead { margin: 0 0 40px; max-width: 52ch; color: var(--muted); font-size: 18px; line-height: 1.6; }

/* Steps: zig-zag cards with a centre line that draws itself as you scroll. */
.hw-steps { position: relative; }
.hw-steps ol { display: grid; gap: clamp(28px, 5vw, 64px); margin: 0; padding: 0; list-style: none; }
.hw-steps-line { position: absolute; left: 50%; top: 40px; bottom: 40px; width: 3px; margin-left: -1.5px; border-radius: 3px; background: var(--line); }
.hw-steps-line i { position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(var(--accent), var(--accent-2)); transform-origin: top; transform: scaleY(var(--p, 0)); }
.hw-step { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 7vw, 112px); align-items: center; }
.hw-step::before { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--bg); border: 3px solid var(--line); transition: border-color .4s, transform .5s var(--spring), background .4s; }
.hw-step.is-on::before { border-color: var(--accent-2); background: var(--accent); transform: scale(1.25); }
.hw-step:nth-child(even) .hw-step-vis { order: 2; }
.hw-step-vis { position: relative; aspect-ratio: 5 / 4; border-radius: 30px; overflow: clip; background: #f5e5da; opacity: .35; transform: translateY(26px) scale(.97); transition: opacity .7s var(--ease), transform .8s var(--spring); }
.hw-step:nth-child(3n+2) .hw-step-vis { background: #dde4d7; }
.hw-step:nth-child(3n) .hw-step-vis { background: #efe4d3; }
.hw-step.is-on .hw-step-vis { opacity: 1; transform: none; }
.hw-step-copy { opacity: .45; transition: opacity .6s var(--ease); }
.hw-step.is-on .hw-step-copy { opacity: 1; }
.hw-num { display: block; margin-bottom: 10px; font-size: clamp(56px, 7vw, 96px); font-weight: 800; line-height: .9; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1.5px var(--accent-2); }
.hw-step h3 { margin: 14px 0 10px; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.03em; }
.hw-step p { margin: 0; max-width: 46ch; color: var(--muted); font-size: 17px; line-height: 1.6; }
.hw-when { display: inline-block; padding: 7px 13px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 650; }

/* Step visuals */
.hw-vis-photo img { width: 100%; height: 100%; object-fit: cover; }
.hw-vis-styles img { position: absolute; bottom: 9%; width: 34%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 18px; box-shadow: 0 20px 30px -18px rgba(0,0,0,.45); transition: transform .6s var(--spring); }
.hw-vis-styles img:nth-child(1) { left: 8%; transform: rotate(-8deg); }
.hw-vis-styles img:nth-child(2) { left: 31%; bottom: 18%; z-index: 1; }
.hw-vis-styles img:nth-child(3) { right: 8%; transform: rotate(8deg); }
.hw-step:hover .hw-vis-styles img:nth-child(1) { transform: rotate(-12deg) translateX(-8px); }
.hw-step:hover .hw-vis-styles img:nth-child(3) { transform: rotate(12deg) translateX(8px); }
.hw-sizes { position: absolute; left: 50%; top: 7%; z-index: 2; display: flex; align-items: baseline; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--panel); transform: translateX(-50%); font-size: 13px; box-shadow: 0 8px 20px -12px rgba(0,0,0,.4); }
.hw-sizes b { padding: 3px 8px; border-radius: 999px; background: var(--bg); }
.hw-sizes b:nth-child(2) { background: var(--text); color: var(--bg); }
.hw-vis-views { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; padding: 9% 7%; }
.hw-vis-views img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 14px; background: #fffdfa; box-shadow: 0 14px 22px -16px rgba(0,0,0,.5); transform: translateY(14px); opacity: 0; transition: transform .6s var(--spring), opacity .5s; }
.hw-step.is-on .hw-vis-views img { transform: none; opacity: 1; }
.hw-vis-views img:nth-child(2) { transition-delay: .12s; }
.hw-vis-views img:nth-child(3) { transition-delay: .24s; }
.hw-vis-views img:nth-child(4) { transition-delay: .36s; aspect-ratio: 1; }
.hw-vis-order { display: grid; place-items: center; }
.hw-receipt { display: grid; gap: 6px; width: 62%; padding: 22px 22px 26px; border-radius: 18px 18px 6px 6px; background: var(--panel); box-shadow: 0 24px 40px -26px rgba(0,0,0,.5); font-size: 14px; color: var(--muted); transform: rotate(-3deg); }
.hw-receipt b { color: var(--text); font-size: 18px; }
.hw-receipt b::before { content: "✓ "; color: #5d7a58; }
.hw-receipt em { margin-top: 8px; padding-top: 10px; border-top: 1.5px dashed var(--line); color: var(--text); font-style: normal; font-size: 22px; font-weight: 750; }
.hw-phone { position: absolute; right: 7%; bottom: 10%; display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600; animation: hw-ring 2.6s var(--ease) infinite; }
.hw-phone svg { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--accent); color: var(--text); }
@keyframes hw-ring { 0%, 70%, 100% { transform: none; } 75% { transform: rotate(-4deg); } 80% { transform: rotate(4deg); } 85% { transform: rotate(-3deg); } 90% { transform: rotate(2deg); } }
.hw-vis-paint img { width: 100%; height: 100%; object-fit: cover; }
.hw-brush { position: absolute; right: 10%; top: 12%; animation: hw-paint 3s var(--ease) infinite; filter: drop-shadow(0 10px 12px rgba(0,0,0,.3)); }
@keyframes hw-paint { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-18px, 14px) rotate(-10deg); } }
.hw-dots { position: absolute; left: 7%; bottom: 8%; display: flex; gap: 8px; padding: 9px 12px; border-radius: 999px; background: var(--panel); }
.hw-dots i { width: 16px; height: 16px; border-radius: 50%; background: #b5533d; }
.hw-dots i:nth-child(2) { background: #5b9bd5; }
.hw-dots i:nth-child(3) { background: #f1d79a; }
.hw-dots i:nth-child(4) { background: #29312d; }
.hw-vis-box { display: grid; place-items: center; align-content: center; gap: 18px; }
.hw-vis-box svg { width: 50%; height: auto; animation: hw-bob 3.2s var(--ease) infinite; }
@keyframes hw-bob { 50% { transform: translateY(-10px) rotate(-2deg); } }
.hw-pin { max-width: 86%; padding: 9px 14px; border-radius: 999px; background: var(--panel); font-size: 13px; font-weight: 600; text-align: center; }

.hw-tl-total { margin-top: 56px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 26px; border-radius: 24px; background: #dde4d7; }
.hw-tl-total b { font-size: 22px; }
.hw-tl-total span { color: #4b524c; }

/* Compare */
.hw-cmp-box { overflow-x: auto; border-radius: 24px; border: 1.5px solid var(--line); background: var(--panel); }
.hw-cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; }
.hw-cmp th, .hw-cmp td { padding: 18px 22px; border-bottom: 1.5px solid var(--line); text-align: left; vertical-align: top; }
.hw-cmp tr:last-child th, .hw-cmp tr:last-child td { border-bottom: 0; }
.hw-cmp thead th { font-size: 18px; }
.hw-cmp thead th:not(:first-child) { width: 36%; }
.hw-cmp tbody th { color: var(--muted); font-weight: 500; width: 28%; }
.hw-cmp .hi { background: #fff6f0; }
.hw-cmp td small { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.4; }

/* Photo guide */
.hw-photo { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.hw-photo-img { border-radius: 28px; overflow: clip; background: var(--panel); }
.hw-photo-img img { width: 100%; }
.hw-dd { display: grid; gap: 12px; }
.hw-d { padding: 20px 22px; border-radius: 20px; background: var(--panel); border: 1.5px solid var(--line); }
.hw-d h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 18px; }
.hw-d h3 i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-style: normal; font-size: 13px; color: var(--bg); }
.hw-d.yes h3 i { background: #5d7a58; }
.hw-d.no h3 i { background: var(--accent-2); }
.hw-d ul { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.6; }
.hw-d p { margin: 0; color: var(--muted); line-height: 1.55; }

/* FAQ */
.hw-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.hw-tabs button { min-height: 44px; padding: 0 18px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--text); font: 600 15px 'Onest', 'Manrope', sans-serif; cursor: pointer; transition: all .25s var(--ease); }
.hw-tabs button[aria-pressed="true"] { border-color: var(--text); background: var(--text); color: var(--bg); }
.hw-faq { border-top: 1.5px solid var(--text); }
.hw-faq details { border-bottom: 1.5px solid var(--line); animation: hw-in .4s var(--ease) backwards; }
.hw-faq details[hidden] { display: none; }
@keyframes hw-in { from { opacity: 0; transform: translateY(8px); } }
.hw-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 44px; padding: 22px 0; font-weight: 650; font-size: 19px; cursor: pointer; list-style: none; }
.hw-faq summary::-webkit-details-marker { display: none; }
.hw-faq summary i { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 1.5px solid var(--line); border-radius: 50%; font-style: normal; font-weight: 500; transition: transform .35s var(--spring), background .3s, color .3s; }
.hw-faq details[open] summary i { transform: rotate(45deg); background: var(--text); color: var(--bg); border-color: var(--text); }
.hw-faq details p { max-width: 64ch; margin: 0 0 22px; color: var(--muted); font-size: 16px; line-height: 1.65; }

.hw-closing { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; margin-block: 110px 0; padding: clamp(32px, 5vw, 64px); border-radius: 36px; background: var(--text); color: var(--bg); overflow: clip; }
.hw-closing h2 { margin: 0; font-size: clamp(30px, 3.6vw, 50px); font-weight: 740; line-height: 1; letter-spacing: -.04em; }
.hw-closing p { max-width: 44ch; margin: 14px 0 0; color: #c9ccc4; font-size: 17px; line-height: 1.55; }
.hw-acts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.sf .hw-btn-light { background: var(--bg); color: var(--text); }
.sf .hw-btn-light:hover { color: var(--text); transform: translateY(-2px); }
.sf .hw-link-light { color: var(--bg); font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }
.sf .hw-link-light:hover { color: var(--accent); }
.hw-star { position: absolute; right: -30px; bottom: -90px; font-size: 280px; line-height: 1; color: var(--accent); opacity: .18; pointer-events: none; }

@media (max-width: 900px) {
  .hw-steps-line { left: 14px; }
  .hw-step { grid-template-columns: 1fr; gap: 18px; padding-left: 40px; }
  .hw-step::before { left: 15px; top: 24px; }
  .hw-step:nth-child(even) .hw-step-vis { order: 0; }
  .hw-head, .hw-photo { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { .hw-step-vis, .hw-step-copy, .hw-vis-views img { opacity: 1 !important; transform: none !important; } }
/* Phones: the comparison becomes stacked rows instead of a table that scrolls sideways. */
@media (max-width: 640px) {
  .hw-cmp-box { overflow: visible; border: 0; border-radius: 0; background: none; }
  .hw-cmp thead { display: none; }
  .hw-cmp, .hw-cmp tbody { display: block; }
  .hw-cmp tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px 0; border-bottom: 1.5px solid var(--line); }
  .hw-cmp tbody th { grid-column: 1 / -1; width: auto; padding: 0 0 2px; border: 0; color: var(--text); font-weight: 650; }
  .hw-cmp td { padding: 10px 12px; border: 0; border-radius: 12px; background: var(--panel); font-size: 15px; }
  .hw-cmp tr:last-child th, .hw-cmp tr:last-child td { border-bottom: 0; }
  .hw-cmp td::before { content: 'Из каталога'; display: block; margin-bottom: 2px; color: var(--muted); font-size: 12px; }
  .hw-cmp td.hi::before { content: 'По фото'; }
  .hw-step-vis { aspect-ratio: 4 / 3; }
  .hw-num { font-size: 52px; }
}
