@font-face { font-family: Manrope; src: url('assets/manrope-400.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url('assets/manrope-800.ttf'); font-weight: 800; font-display: swap; }
:root {
  --ink: #252b30;
  --accent: #379e87;
  --accent-hover: #287d6b;
  --paper: #fff;
  --warm: #f1f7f5;
  --muted: #53616a;
  --line: #d8dce1;
  --radius: 12px;
  --margin: clamp(18px, 5vw, 72px);
  color: var(--ink);
  background: var(--paper);
  font: 400 17px/1.55 Manrope, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-underline-offset: .2em; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .7; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #00639a; outline-offset: 4px; }
img { width: 100%; display: block; object-fit: cover; }
.shell { max-width: 1120px; width: calc(100% - 2 * var(--margin)); margin-inline: auto; }
@media (min-width: 1024px) {
  .shell { width: 84%; }
}
.header, .footer { display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 78px; }
.header nav { display: flex; gap: 28px; align-items: center; }
.header-partner { width: 126px; height: auto; flex: none; }
.header-rating { width: 150px; height: auto; flex: none; }
.header a { text-decoration: none; }
.header nav a:hover, .footer a:hover { color: var(--accent); }
.brand { display: inline-flex; gap: 10px; align-items: center; font-weight: 800; font-size: 23px; }
.window-mark { position: relative; width: 24px; height: 26px; border: 2px solid var(--accent); }
.window-mark::before, .window-mark::after { position: absolute; content: ''; background: var(--accent); }
.window-mark::before { width: 2px; inset: 0 auto 0 calc(50% - 1px); }
.window-mark::after { height: 2px; inset: calc(50% - 1px) 0 auto; }
.hero { background: var(--warm); padding: clamp(24px, 4vw, 58px) 0; }
.hero-layout { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.hero-copy { padding-block: 14px; }
.region { font-size: 15px; margin-bottom: 17px; }
.region .icon { color: var(--accent); }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.04em; font-weight: 800; }
h1 { font-size: clamp(36px, 3.85vw, 62px); max-width: 22ch; margin-bottom: 18px; }
h2 { font-size: clamp(36px, 4vw, 61px); }
h3 { font-size: clamp(25px, 3vw, 34px); }
.offer { display: block; color: var(--accent); font-size: .62em; line-height: 1.2; letter-spacing: -.025em; margin-top: 14px; }
.hero-copy > p { max-width: 49ch; }
.hero-photo img { height: clamp(420px, 41vw, 640px); border-radius: var(--radius); object-position: 56% center; }
.button { display: inline-flex; min-height: 54px; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: var(--radius); background: var(--accent); color: white; text-decoration: none; padding: 12px 22px; font-weight: 800; transition: background .18s, transform .18s; }
.button:hover { background: var(--accent-hover); transform: translateY(-2px); }
.hero .button-primary {
  margin-top: 25px;
  min-height: 72px;
  padding: 16px 25px;
  font-size: clamp(18px, 2.1vw, 23px);
}
.button-primary .icon { width: 25px; height: 25px; }
.button-primary .icon:last-child { margin-left: auto; }
.icon { display: inline-block; vertical-align: -.17em; width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.header nav a, .region, .footer a, .back, .field > span { display: inline-flex; align-items: center; gap: 7px; }
#works-title, #quiz-title, #success h3 { display: flex; align-items: baseline; gap: .3em; }
#works-title .icon, #quiz-title .icon, #success h3 .icon { align-self: start; width: .8em; height: .8em; margin-top: .12em; color: var(--accent); }
.option { position: relative; padding-right: 35px; }
.option::after { content: '→'; position: absolute; right: 13px; color: var(--accent); }

.terms { color: var(--muted); font-size: 14px; margin-top: 18px; }
.benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  list-style: none;
  margin-block: 0;
  padding: 26px 0 0;
}
.benefits li { position: relative; padding-left: 46px; }
.benefits .icon { position: absolute; left: 0; top: 0; width: 32px; height: 32px; color: var(--accent); }
.benefits strong, .benefits span { display: block; }
.benefits strong { font-weight: 800; }
.benefits span { margin-top: 3px; }
.works { padding-block: clamp(55px, 8vw, 115px); }
.section-heading { display: flex; gap: 18px 48px; align-items: baseline; justify-content: space-between; margin-bottom: 30px; }
.section-heading p { max-width: 46ch; }
.gallery { display: grid; grid-template-columns: 1.14fr 1fr 1fr .9fr; gap: 14px; align-items: start; }
.gallery figure:nth-child(even) { margin-top: 36px; }
.gallery img { height: clamp(210px, 26vw, 395px); border-radius: var(--radius); }
.gallery figcaption { margin-top: 10px; font-weight: 800; }
.quiz-section { padding-block: clamp(48px, 7vw, 104px); background: var(--warm); }
.quiz-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(25px, 5vw, 72px); align-items: start; }
.quiz-intro p { max-width: 36ch; margin-top: 20px; }
.quiz-panel { border-radius: var(--radius); background: white; padding: clamp(20px, 3.2vw, 44px); }
.progress-row { display: grid; grid-template-columns: max-content 1fr; align-items: center; gap: 18px; margin-bottom: 28px; color: var(--muted); font-size: 15px; }
progress { width: 100%; height: 7px; border: 0; border-radius: 99px; background: var(--warm); accent-color: var(--accent); }
progress::-webkit-progress-bar { background: var(--warm); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 99px; }
#options, #contact { display: grid; gap: 9px; margin-top: 21px; }
.option, .field input { border: 1px solid var(--line); border-radius: var(--radius); }
.option { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 9px 14px; background: var(--paper); color: inherit; text-align: left; transition: background .18s; }
.option::before { content: ''; width: 12px; height: 12px; flex: none; border: 1px solid var(--muted); border-radius: 50%; }
.option:hover, .option[data-selected] { background: #eaf5f1; border-color: var(--accent); }
.option[data-selected]::before { background: var(--accent); border-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); width: 18px; height: 18px; flex: none; margin: 0; }
.field { display: grid; gap: 4px; }
.field input { min-width: 0; width: 100%; padding: 10px 13px; min-height: 48px; }
.consent { display: flex; gap: 10px; align-items: start; font-size: 14px; margin-top: 8px; }
.consent input { margin-top: 2px; }
.trap { position: absolute; width: 1px; height: 1px; clip-path: inset(100%); }
.quiz-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.quiz-actions .button { margin-left: auto; }
.back { padding: 10px 0; background: none; border: none; color: var(--ink); }
.back:hover { text-decoration: underline; }
.form-error { color: #9d251c; margin-top: 12px; }
#success p { margin-top: 16px; }
.footer { padding-block: 14px; font-size: 14px; }
.footer span { font-weight: 800; }
.legal { padding-block: 34px 60px; max-width: 880px; }
.legal h1 { max-width: none; font-size: clamp(29px, 4vw, 46px); margin: 20px 0; overflow-wrap: anywhere; }
.legal h2 { font-size: 23px; margin: 24px 0 8px; }
.legal p + p { margin-top: 9px; }
@media (max-width: 1000px) {
  .hero-layout { gap: 26px; }
  h1 { font-size: clamp(34px, 4vw, 42px); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .gallery img { height: clamp(190px, 31vw, 340px); }
}
@media (max-width: 690px) {
  .benefits { grid-template-columns: 1fr; gap: 16px; }
  .header { min-height: 66px; }
  .header nav { gap: 0; font-size: 14px; }
  .header nav a:first-child { display: none; }
  .brand { font-size: 19px; }
  .header-rating { width: 128px; }
  .hero-layout, .quiz-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding: 0; }
  .hero .offer { display: inline; margin: 0; font: inherit; letter-spacing: inherit; }
  .hero .button-primary {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) 25px;
    width: 100%;
    min-height: 82px;
    padding: 12px 10px;
    gap: 6px;
    font-size: clamp(20px, 5.9vw, 24px);
    line-height: 1.2;
    text-align: center;
  }
  .hero-photo img { height: clamp(220px, 67vw, 365px); }
  .section-heading { display: grid; }
  .gallery figure:nth-child(even) { margin-top: 18px; }
  .gallery img { height: clamp(155px, 45vw, 300px); }
  .gallery figcaption { font-size: 15px; }
  .footer {
    align-items: start;
    flex-direction: column;
    justify-content: start;
    padding-bottom: 40svh;
  }
}
@media (max-width: 850px) {
  .header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand rating" "partner nav";
    gap: 4px 10px;
    padding-block: 8px;
  }
  .header .brand { grid-area: brand; }
  .header-partner { grid-area: partner; }
  .header-rating { grid-area: rating; justify-self: end; }
  .header nav { grid-area: nav; justify-content: end; }
  .header nav a { padding: 8px 0; }
}
@media (max-width: 500px) {
  .header nav a { max-width: 128px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

.gallery { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .9fr); row-gap: 26px; }
.gallery figure:nth-child(even) { margin-top: 0; }
.gallery img { height: auto; aspect-ratio: 4 / 3; }
.gallery figure:nth-child(3n + 1) img { aspect-ratio: 1.35; }
@media (max-width: 690px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery figure:last-child { grid-column: 1 / -1; }
  .gallery figure:last-child img { aspect-ratio: 2 / 1; }
}

.hero-bullets { display: grid; gap: 9px; list-style: none; padding: 0; margin: 19px 0; }
.hero-bullets li { display: flex; align-items: baseline; gap: 9px; }
.hero-bullets .icon { align-self: start; margin-top: .15em; color: var(--accent); }
.hero-prompt { color: var(--muted); }

@media (min-width: 1024px) {
  .hero { padding-block: 36px; }
  .hero-layout {
    grid-template-columns: minmax(0, 1.27fr) minmax(0, 1fr);
    gap: clamp(32px, 4vw, 56px);
  }
  .hero-copy { padding-block: 0; line-height: 1.45; }
  .hero .region { margin-bottom: 12px; }
  .hero h1 { max-width: none; font-size: clamp(36px, 3.3vw, 48px); margin-bottom: 14px; }
  .hero .offer { display: inline; margin: 0; font: inherit; letter-spacing: inherit; }
  .hero-copy > p { max-width: 58ch; }
  .hero-bullets { gap: 6px; margin-block: 14px; }
  .hero .button-primary { margin-top: 16px; }
  .hero .terms { margin-top: 12px; }
  .hero-photo img { height: clamp(440px, 38vw, 540px); }
}

.estimate-dialog {
  position: fixed;
  inset: 0;
  width: min(440px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 25px clamp(18px, 5vw, 28px) 24px;
  border: 0;
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
}
.estimate-dialog::backdrop { background: #222c35a6; backdrop-filter: blur(4px); }
body:has(.estimate-dialog[open]) { overflow: hidden; }
.estimate-dialog h2 { padding-right: 42px; font-size: 25px; line-height: 1.16; }
.estimate-dialog h2:focus { outline: none; }
.dialog-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f2f4f6;
  color: var(--ink);
}
.dialog-close:hover { background: #e2e6ea; }
.estimate-form, .estimate-options { display: grid; }
.estimate-form { gap: 12px; margin-top: 18px; }
.estimate-options { gap: 8px; }
.estimate-options .option { padding: 9px 12px; }
.estimate-options .option::before, .estimate-options .option::after { content: none; }
.estimate-options .option:has(input:checked) { background: #eaf5f1; border-color: var(--accent); }
.estimate-options input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--accent); }
.estimate-form .field input { min-height: 52px; }
.estimate-form .consent { margin-top: 0; }
.thanks-dialog {
  width: min(460px, calc(100% - 28px));
  padding: clamp(28px, 8vw, 48px) clamp(18px, 5vw, 32px);
  text-align: center;
}
.thanks-dialog h2 { padding: 0; font-size: clamp(26px, 5vw, 32px); }
.thanks-check {
  display: block;
  width: 74px;
  height: 74px;
  margin: 0 auto 20px;
  fill: none;
  stroke: #337e50;
  stroke-width: 11;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.thanks-dialog p { margin: 14px auto 22px; max-width: 34ch; }
.thanks-button { background: #337e50; border-radius: 999px; max-width: 100%; }
.thanks-button:hover { background: #276540; }
.thanks-button::after { display: none; }
.idle-offer > p { margin-top: 12px; }
.idle-offer .offer-gift {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  padding: 8px;
  border-radius: var(--radius);
  background: #eaf5f1;
  color: var(--accent);
}

@media (max-width: 690px) {
  .quiz-layout { width: calc(100% - 20px); }
  .quiz-intro { padding-inline: 8px; }
  .quiz-panel { padding: 20px 14px; }
  .quiz-panel h3 { font-size: clamp(27px, 7vw, 32px); line-height: 1.16; }
  .quiz-panel .progress-row { font-size: 16px; margin-bottom: 20px; }
  .quiz-panel #options, .quiz-panel #contact { gap: 12px; }
  .quiz-panel .option, .estimate-form .option {
    min-height: 60px;
    font-size: 19px;
    line-height: 1.35;
    padding-block: 12px;
  }
  .estimate-dialog { width: min(480px, calc(100% - 20px)); }
  .quiz-panel .field input, .estimate-form .field input {
    min-height: 62px;
    font-size: 20px;
  }
  .quiz-panel .consent, .estimate-form .consent { font-size: 16px; }
  .quiz-panel .consent input, .estimate-form .consent input { width: 22px; height: 22px; }
  .quiz-panel .quiz-actions .button, .estimate-form .button {
    width: 100%;
    min-height: 64px;
    font-size: 20px;
  }
  .quiz-panel .back { min-height: 44px; }
}

.button { position: relative; overflow: hidden; isolation: isolate; }
.button::after {
  content: '';
  position: absolute;
  inset: -100% -50%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 46%, rgba(255, 255, 255, .8) 50%, transparent 54%);
  transform: translateX(-100%);
  animation: slideme 6s ease-in-out .05s infinite paused;
}
.button.button-shine-visible::after { animation-play-state: running; }
.button:disabled::after { display: none; }
@keyframes slideme {
  0% { transform: translateX(-100%); }
  45%, 100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .button::after { display: none; animation: none; }
}

.gallery-photo { display: block; cursor: zoom-in; border-radius: var(--radius); }
@media (max-width: 690px) {
  .gallery figure:nth-child(n) img { aspect-ratio: 3 / 4; }
  .gallery figure:last-child img { aspect-ratio: 4 / 5; }
}
.gallery-dialog {
  position: fixed;
  inset: 0;
  width: min(800px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 12px;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--paper);
}
.gallery-dialog::backdrop { background: #222c35d9; }
body:has(.gallery-dialog[open]) { overflow: hidden; }
.gallery-dialog img { max-height: calc(100dvh - 110px); object-fit: contain; }
.gallery-dialog figcaption { margin-top: 8px; text-align: center; }

/* Окна 2.0: palette and logo from the company website. */
:root { --brand-berry: #b51e63; }
.brand img { width: 145px; height: 86px; object-fit: contain; }
.header { min-height: 108px; }
.header-rating { display: flex; flex-direction: column; width: 132px; font-size: 15px; gap: 2px; }
.header-rating b { margin-left: 8px; }
.rating-stars { color: #d59d13; letter-spacing: 2px; font-size: 22px; }
.hero .offer, .region .icon { color: var(--brand-berry); }
.button { background: #287d6b; }
.button:hover { background: #206554; }
.hero-photo { position: relative; }
.hero-photo img { object-position: center; }
@media (max-width: 690px) {
 .header { min-height: 84px; gap: 8px; flex-wrap: wrap; padding-block: 9px; }
 .brand img { width: 116px; height: 68px; }
 .header-partner { width: 94px; }
 .header-rating { width: 104px; font-size: 13px; }
 .rating-stars { font-size: 18px; letter-spacing: 1px; }
 .header nav { justify-content: space-between; width: 100%; padding-block: 4px; }
}

.hero .offer { display: inline; margin: 0; font: inherit; letter-spacing: inherit; }
@media (max-width: 690px) {
 .header { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-areas: 'brand partner rating' 'nav nav nav'; column-gap: 8px; row-gap: 0; }
 .brand img { width: 104px; height: 70px; }
 .header-partner { width: 82px; justify-self: center; }
 .header nav { display: flex; justify-content: space-between; max-width: none; }
 .header nav a:first-child { display: inline-flex; }
 .header nav a { max-width: none; }
}
