/* Метр — ремонт квартир */
:root {
  --bg: #f3f2ee;
  --paper: #fff;
  --ink: #151515;
  --ink-2: #3d3d3d;
  --muted: #7c7a73;
  --line: #e2e0d8;
  --yellow: #ffcc00;
  --yellow-2: #f2b900;
  --dark: #151515;
  --red: #e5484d;
  --head: 'Montserrat', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--yellow-2); outline-offset: 2px; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); }
h1, h2, h3 { font-family: var(--head); margin: 0; letter-spacing: -.02em; }
h2 { font-size: clamp(30px, 4vw, 50px); font-weight: 900; line-height: 1.05; text-transform: uppercase; margin-bottom: 36px; }
.mark { background: var(--yellow); padding: 0 .15em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.btn { --h: 58px; display: inline-flex; align-items: center; justify-content: center; height: var(--h); padding: 0 28px; font-weight: 700; font-size: 15px; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; transition: background .2s, transform .2s var(--ease), box-shadow .2s, color .2s; }
.btn--sm { --h: 44px; padding: 0 20px; font-size: 13px; }
.btn--block { width: 100%; }
.btn--yellow { background: var(--yellow); color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.btn--yellow:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.btn--yellow:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn--line { border: 2px solid var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }

.header { position: fixed; inset: 0 0 auto; z-index: 50; background: rgba(243, 242, 238, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.header.is-scrolled { border-color: var(--line); }
.header__inner { height: 74px; display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 900 22px var(--head); letter-spacing: .06em; }
.logo small { font: 600 11px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-left: 4px; }
.logo__box { width: 38px; height: 38px; background: var(--yellow); display: grid; place-items: center; font-size: 20px; letter-spacing: 0; }
.nav { display: flex; gap: 24px; margin-left: auto; font-weight: 600; font-size: 14px; }
.nav a { position: relative; padding: 6px 0; }
.nav a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--yellow); transform: scaleX(0); transition: transform .25s var(--ease); }
.nav a:hover::after { transform: scaleX(1); }
.header__phone { font-weight: 700; font-size: 15px; }
.burger { display: none; width: 44px; height: 44px; background: var(--ink); position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--paper); transition: .3s var(--ease); }
.burger span:first-child { top: 17px; } .burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* hero */
.hero { padding: 120px 0 60px; }
.hero__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hero__kicker { margin: 0 0 18px; display: inline-block; padding: 6px 12px; background: var(--ink); color: var(--yellow); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { font-size: clamp(36px, 4.5vw, 62px); font-weight: 900; line-height: 1.08; text-transform: uppercase; margin-bottom: 26px; }
.hero h1 span { background: var(--yellow); padding: 0 .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero__list { list-style: none; padding: 0; margin: 0 0 34px; display: grid; gap: 10px; font-size: 17px; font-weight: 500; }
.hero__list li { display: flex; gap: 12px; align-items: center; }
.hero__list li::before { content: ''; width: 22px; height: 22px; flex-shrink: 0; background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23151515' stroke-width='3.5'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__media { position: relative; }
.hero__media::before { content: ''; position: absolute; inset: 24px -24px -24px 24px; background: var(--yellow); z-index: -1; }
.hero__media img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; }
.hero__stamp { position: absolute; left: -30px; bottom: 30px; padding: 18px 22px; background: var(--ink); color: var(--paper); display: flex; align-items: center; gap: 12px; }
.hero__stamp b { font: 900 34px var(--head); color: var(--yellow); }
.hero__stamp span { font-size: 13px; line-height: 1.3; }
.stats { list-style: none; padding: 0; margin: 70px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.stats li { padding: 24px 20px 0 0; display: flex; flex-direction: column; gap: 4px; }
.stats li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.stats b { font: 900 48px/1 var(--head); }
.stats span { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

.section { padding: clamp(70px, 9vw, 110px) 0; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section__head h2 { margin: 0; }
.section__head p { max-width: 420px; margin: 0; }

/* calculator */
.calc { background: var(--paper); }
.calc__grid { display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: start; }
.calc__form { display: grid; gap: 30px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { display: flex; align-items: center; gap: 12px; padding: 0; margin-bottom: 14px; font: 800 18px var(--head); text-transform: uppercase; letter-spacing: .01em; }
legend span { width: 30px; height: 30px; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font-size: 14px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg--small { grid-template-columns: repeat(4, 1fr); }
.seg label, .extra { position: relative; cursor: pointer; }
.seg input, .extra input, .type input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; padding: 0 12px; border: 2px solid var(--line); font-weight: 700; text-align: center; transition: .15s; }
.seg span em { font-style: normal; font-weight: 500; font-size: 13px; color: var(--muted); }
.seg input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.seg input:checked + span em { color: var(--yellow); }
.seg input:focus-visible + span, .extra input:focus-visible + span, .type input:focus-visible + div { outline: 3px solid var(--yellow-2); outline-offset: 2px; }

.area { display: flex; align-items: center; gap: 22px; }
.area input[type=range] { flex: 1; -webkit-appearance: none; appearance: none; height: 8px; background: linear-gradient(90deg, var(--ink) var(--p, 20%), var(--line) var(--p, 20%)); outline-offset: 6px; }
.area input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; background: var(--yellow); border: 3px solid var(--ink); cursor: grab; }
.area input[type=range]::-moz-range-thumb { width: 26px; height: 26px; background: var(--yellow); border: 3px solid var(--ink); border-radius: 0; cursor: grab; }
.area__value { display: flex; align-items: center; gap: 6px; padding: 0 14px; height: 56px; border: 2px solid var(--ink); }
.area__value input { width: 64px; border: 0; background: none; font: 800 24px var(--head); text-align: right; -moz-appearance: textfield; }
.area__value input::-webkit-inner-spin-button { -webkit-appearance: none; }
.area__value input:focus { outline: none; }
.area__value span { font-weight: 700; color: var(--muted); }
.area__marks { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); padding-right: 140px; }

.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.type { cursor: pointer; }
.type div { height: 100%; padding: 18px; border: 2px solid var(--line); transition: .15s; display: flex; flex-direction: column; gap: 4px; }
.type b { font: 800 17px var(--head); text-transform: uppercase; }
.type small { color: var(--muted); font-size: 13px; line-height: 1.4; flex: 1; }
.type strong { margin-top: 10px; font: 800 18px var(--head); }
.type input:checked + div { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink), 6px 6px 0 var(--yellow); }

.extras { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.extra span { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--line); font-weight: 600; font-size: 15px; transition: .15s; min-height: 60px; }
.extra span::before { content: ''; width: 22px; height: 22px; flex-shrink: 0; border: 2px solid var(--ink); background: var(--paper) center / 14px no-repeat; }
.extra span em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 13px; white-space: nowrap; }
.extra input:checked + span { border-color: var(--ink); }
.extra input:checked + span::before { background-color: var(--yellow); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23151515' stroke-width='4'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

.calc__result { position: sticky; top: 96px; padding: 32px; background: var(--ink); color: var(--paper); }
.calc__label { margin: 0 0 8px; color: var(--yellow); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.calc__total { font: 900 46px/1 var(--head); letter-spacing: -.02em; }
.calc__per { margin: 8px 0 20px; color: rgba(255, 255, 255, .6); font-size: 14px; }
.calc__term { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .15); border-bottom: 1px solid rgba(255, 255, 255, .15); margin-bottom: 14px; }
.calc__term b { font: 800 20px var(--head); color: var(--yellow); }
.calc__lines { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; font-size: 14px; }
.calc__lines li { display: flex; justify-content: space-between; gap: 12px; color: rgba(255, 255, 255, .8); }
.calc__lines li span:last-child { white-space: nowrap; font-weight: 600; color: var(--paper); }
.calc__result .btn--yellow { box-shadow: 6px 6px 0 rgba(255, 204, 0, .3); }
.calc__fine { margin: 14px 0 0; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .55); }
.bump { animation: bump .35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.04); color: var(--yellow); } }

/* cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--paper); border: 2px solid var(--ink); transition: transform .3s var(--ease), box-shadow .3s; }
.card:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--yellow); }
.card img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; border-bottom: 2px solid var(--ink); }
.card div { padding: 22px 24px 26px; }
.card h3 { font-size: 22px; text-transform: uppercase; font-weight: 900; margin-bottom: 8px; }
.card p { margin: 0 0 16px; color: var(--ink-2); font-size: 15px; }
.card b { display: inline-block; padding: 6px 12px; background: var(--yellow); font: 800 16px var(--head); }

/* works */
.works { background: var(--ink); color: var(--paper); }
.works h2 .mark { color: var(--ink); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { height: 42px; padding: 0 18px; border: 2px solid rgba(255, 255, 255, .25); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; transition: .15s; }
.tabs button:hover { border-color: var(--paper); }
.tabs button.is-active { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.works__grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 230px; gap: 14px; grid-auto-flow: dense; }
.works__grid figure { position: relative; margin: 0; overflow: hidden; animation: appear .45s var(--ease) both; }
.works__grid figure.big { grid-column: span 2; grid-row: span 2; }
.works__grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.works__grid figure:hover img { transform: scale(1.06); }
.works__grid figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); font-size: 13px; color: rgba(255, 255, 255, .8); }
.works__grid figcaption b { display: block; color: var(--paper); font: 800 16px var(--head); }
@keyframes appear { from { opacity: 0; transform: scale(.96); } }

/* steps */
.timeline { list-style: none; padding: 0; margin: 0 0 60px; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: s; border-top: 2px solid var(--ink); }
.timeline li { counter-increment: s; position: relative; padding: 30px 20px 0 0; display: flex; flex-direction: column; gap: 6px; }
.timeline li::before { content: '0' counter(s); position: absolute; top: -17px; left: 0; width: 34px; height: 34px; background: var(--yellow); border: 2px solid var(--ink); display: grid; place-items: center; font: 800 13px var(--head); }
.timeline b { font: 800 18px var(--head); text-transform: uppercase; margin-top: 6px; }
.timeline span { font-size: 14px; color: var(--ink-2); flex: 1; }
.timeline i { font-style: normal; font-weight: 700; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.guarantees { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.guarantees div { padding: 26px; background: var(--paper); border: 2px solid var(--line); }
.guarantees b { font-size: 30px; }
.guarantees h3 { font-size: 17px; text-transform: uppercase; font-weight: 800; margin: 12px 0 6px; }
.guarantees p { margin: 0; font-size: 14px; color: var(--muted); }

.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.reviews article { padding: 28px; background: var(--paper); border-left: 6px solid var(--yellow); display: flex; flex-direction: column; gap: 6px; }
.stars { color: var(--yellow-2); letter-spacing: 2px; }
.reviews p { margin: 6px 0 14px; flex: 1; font-size: 15px; color: var(--ink-2); }
.reviews span { font-size: 13px; color: var(--muted); }

/* cta */
.cta { background: var(--yellow); }
.cta__inner { display: grid; grid-template-columns: 1fr 440px; gap: 60px; align-items: center; }
.cta h2 { margin-bottom: 16px; }
.cta .mark { background: var(--ink); color: var(--yellow); }
.cta p { margin: 0; font-size: 18px; max-width: 520px; }
.form { background: var(--paper); padding: 30px; border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); }
.form--plain { border: 0; box-shadow: none; padding: 0; }
.form__fields { display: grid; gap: 14px; }
.form small { font-size: 12px; color: var(--muted); text-align: center; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.field input { height: 54px; padding: 0 16px; border: 2px solid var(--line); background: var(--bg); font-size: 16px; }
.field input:focus { outline: none; border-color: var(--ink); background: var(--paper); }
.field em { display: none; font-style: normal; font-size: 13px; color: var(--red); font-weight: 600; }
.field.is-invalid input { border-color: var(--red); }
.field.is-invalid em { display: block; }
.form__done { text-align: center; padding: 20px 0; }
.form__done h3 { font-size: 24px; text-transform: uppercase; font-weight: 900; margin: 14px 0 6px; }
.form__done p { margin: 0; color: var(--muted); }
.done { width: 70px; height: 70px; margin: 0 auto; background: var(--yellow); border: 2px solid var(--ink); display: grid; place-items: center; font: 900 34px var(--head); animation: appear .4s var(--ease); }

.footer { padding: 40px 0 50px; background: var(--ink); color: rgba(255, 255, 255, .8); }
.footer__inner { display: grid; gap: 10px; }
.footer .logo { color: var(--paper); }
.footer .logo__box { color: var(--ink); }
.footer p { margin: 0; font-size: 15px; }
.footer .muted { color: rgba(255, 255, 255, .45); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(21, 21, 21, .6); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.modal__dialog { position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--paper); padding: 34px; border: 2px solid var(--ink); box-shadow: 12px 12px 0 var(--yellow); animation: appear .35s var(--ease); }
.modal__dialog h3 { font-size: 24px; text-transform: uppercase; font-weight: 900; margin: 0 40px 18px 0; }
.modal__close { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; background: var(--bg); font-size: 16px; }
.est__summary { padding: 16px 18px; background: var(--bg); border-left: 4px solid var(--yellow); margin-bottom: 20px; font-size: 14px; display: grid; gap: 4px; }
.est__summary b { font: 900 26px var(--head); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.hero .reveal { opacity: 1; transform: none; animation: rise .8s var(--ease) both; }
.hero .reveal:nth-child(2) { animation-delay: .06s; } .hero .reveal:nth-child(3) { animation-delay: .12s; } .hero .reveal:nth-child(4) { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }

@media (max-width: 1100px) {
  .header__phone { display: none; }
  .calc__grid { grid-template-columns: 1fr; }
  .calc__result { position: static; }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 40px; border-top: 0; }
  .timeline li { border-top: 2px solid var(--ink); }
  .guarantees { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav { position: fixed; top: 74px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 10px 20px 20px; background: var(--bg); border-bottom: 2px solid var(--ink); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .25s var(--ease); }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .burger { display: block; }
  .header__cta { margin-left: auto; }
  .hero__inner, .cta__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__media { margin-right: 24px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats li:nth-child(3) { padding-left: 0; border-left: 0; }
  .cards, .reviews { grid-template-columns: 1fr; }
  .works__grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .header__cta { display: none; }
  .burger { margin-left: auto; }
  .logo small { display: none; }
  .hero { padding-top: 100px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .hero__stamp { left: 0; bottom: 0; padding: 12px 16px; }
  .hero__stamp b { font-size: 26px; }
  .stats b { font-size: 36px; }
  .seg--small { grid-template-columns: repeat(2, 1fr); }
  .seg span { flex-direction: column; gap: 0; line-height: 1.2; }
  .types, .extras { grid-template-columns: 1fr; }
  .area { flex-wrap: wrap; }
  .area__marks { padding-right: 0; }
  .calc__result { padding: 24px 20px; }
  .calc__total { font-size: 38px; }
  .works__grid { grid-auto-rows: 140px; gap: 8px; }
  .works__grid figcaption { padding: 24px 10px 8px; font-size: 11px; }
  .works__grid figcaption b { font-size: 13px; }
  .timeline, .guarantees { grid-template-columns: 1fr; }
  .form { padding: 22px; box-shadow: 6px 6px 0 var(--ink); }
  .modal { padding: 0; align-items: end; }
  .modal__dialog { padding: 28px 18px; box-shadow: none; max-height: 92vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
