:root {
  --ink: #0E2A3B;
  --stone: #EEF2F1;
  --paper: #FFFFFF;
  --route: #1C716B;
  --glass: #5FB8B0;
  --slate: #4E5F68;
  --line: #C9D4D4;
  --focus: #1C716B;
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-weight: 400;
}
h1, h2, h3, p, ol, ul, figure { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .5rem .75rem; z-index: 10; }

/* Шапка */
.top {
  display: flex; align-items: center; gap: 2rem;
  padding-block: 1.75rem 0;
}
.mark {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 650; font-size: 1.5rem; letter-spacing: -.03em;
  text-decoration: none; line-height: 1;
}
.mark svg { width: 1.9rem; height: 1.9rem; }
.nav { display: flex; gap: 1.5rem; margin-left: auto; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--slate); }
.nav a:hover { color: var(--ink); }
.langs { display: flex; gap: .15rem; font-size: .85rem; }
.langs a {
  text-decoration: none; color: var(--slate);
  padding: .2rem .4rem; border-radius: 4px;
}
.langs a[aria-current] { color: var(--ink); background: var(--paper); font-weight: 600; }

/* Перший екран */
.hero {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3.5rem, 8vw, 6rem);
}
h1 {
  font-weight: 700; letter-spacing: -.022em;
  font-size: clamp(2.05rem, 3.9vw, 3.3rem); line-height: 1.08;
  max-width: 21ch;
}
.lede { margin-top: 1.6rem; max-width: var(--measure); color: var(--slate); font-size: 1.125rem; }
.actions { margin-top: 2.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--ink); color: var(--paper);
  font: inherit; font-weight: 600; font-size: 1rem;
  padding: .85rem 1.4rem; border-radius: 6px; text-decoration: none;
}
.btn:hover { background: #163b51; }
.link { font-weight: 600; text-underline-offset: .25em; text-decoration-thickness: 1.5px; text-decoration-color: var(--glass); }

.hero-map figcaption { margin-top: .75rem; font-size: .875rem; color: var(--slate); max-width: 36ch; margin-left: auto; text-align: right; }
.map { width: 100%; height: auto; display: block; overflow: visible; }
.map .r {
  fill: none; stroke: var(--route); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
  animation: draw 1.1s cubic-bezier(.45,0,.2,1) forwards;
  animation-delay: calc(.15s + var(--i) * 70ms);
}
.map .s { fill: var(--paper); stroke: var(--route); stroke-width: 2.5; }
.map .c { font: 500 17px "Schibsted Grotesk", sans-serif; fill: var(--ink); text-anchor: end; }
.map .n { fill: var(--ink); opacity: 0; animation: pop .35s ease-out 1.25s forwards; transform-origin: 470px 190px; }
.map .ni { fill: var(--glass); opacity: 0; animation: pop .35s ease-out 1.35s forwards; transform-origin: 470px 190px; }
.map .p { fill: var(--glass); stroke: var(--paper); stroke-width: 1.5; }
.map .d { font: 700 19px "Schibsted Grotesk", sans-serif; fill: var(--ink); text-anchor: middle; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .map .r { animation: none; stroke-dashoffset: 0; }
  .map .n, .map .ni { animation: none; opacity: 1; }
  .map .p { display: none; }
  .js .steps::before { background: var(--route); }
  .js .steps .fill { display: none; }
  .js .steps .k { border-color: var(--route); color: var(--ink); transition: none; }
  .js .steps li:nth-of-type(3) .k { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  html { scroll-behavior: auto; }
}

/* Розділи */
h2 { font-size: clamp(1.55rem, 2.4vw, 2.05rem); line-height: 1.15; letter-spacing: -.015em; font-weight: 700; max-width: 24ch; }
.how, .pair, .who { padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 1px solid var(--line); }

.how { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); }
.side { align-self: start; position: sticky; top: 2rem; }
.side p { margin-top: 1rem; color: var(--slate); max-width: 40ch; }

.steps { list-style: none; padding: 0; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 15px; top: 16px; bottom: 16px;
  width: 3px; background: var(--route); border-radius: 2px;
}
.steps .fill {
  position: absolute; left: 15px; top: 16px; width: 3px; height: 0;
  background: var(--route); border-radius: 2px; display: none;
}
.js .steps::before { background: var(--line); }
.js .steps .fill { display: block; }
.js .steps .k { border-color: var(--line); color: var(--slate); transition: border-color .3s, background-color .3s, color .3s; }
.js .steps li.on .k { border-color: var(--route); color: var(--ink); }
.js .steps li:nth-of-type(3).on .k { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.steps li { position: relative; padding-left: 3.5rem; }
.steps li + li { margin-top: 2.25rem; }
.steps .k {
  position: absolute; left: 0; top: -.1rem;
  width: 33px; height: 33px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--route);
  display: grid; place-items: center;
  font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
html:not(.js) .steps li:nth-of-type(3) .k { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.steps h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 700; }
.steps p { margin-top: .4rem; color: var(--slate); max-width: var(--measure); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); }
.rules { list-style: none; padding: 0; margin-top: 1.5rem; }
.rules li { padding-block: 1rem; border-top: 1px solid var(--line); max-width: 52ch; }
.rules li:last-child { border-bottom: 1px solid var(--line); }

.who p { margin-top: 1.1rem; max-width: var(--measure); color: var(--slate); }
.who p:first-of-type { margin-top: 1.4rem; color: var(--ink); font-size: 1.15rem; }

/* Контакт */
.contact { background: var(--paper); padding-block: clamp(3rem, 7vw, 5.5rem); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); }
.contact-text p { margin-top: 1rem; color: var(--slate); max-width: 42ch; }
.contact-text .mail { color: var(--ink); font-weight: 600; font-size: 1.15rem; text-underline-offset: .25em; text-decoration-color: var(--glass); text-decoration-thickness: 1.5px; }
.contact-text .note { margin-top: 2rem; font-size: .95rem; }

.form { display: grid; gap: 1.1rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: end; }
.form label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 600; }
.form .opt { font-weight: 400; color: var(--slate); }
.form input, .form textarea {
  font: inherit; font-size: 1rem; font-weight: 400; color: var(--ink);
  background: var(--stone); border: 1px solid transparent; border-bottom-color: var(--line);
  border-radius: 6px 6px 0 0; padding: .75rem .8rem; width: 100%;
}
.form input:focus, .form textarea:focus { outline: none; border-bottom: 2px solid var(--focus); background: #E6ECEB; }
.form textarea { resize: vertical; min-height: 8rem; }
.form .btn { justify-self: start; margin-top: .3rem; }
.form .btn[disabled] { opacity: .6; cursor: progress; }
.status { font-weight: 600; }
.status:empty { display: none; }
.status.ok { color: var(--route); }
.status.err { color: #9B2C2C; }
.privacy { font-size: .85rem; color: var(--slate); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 2rem 2.5rem; font-size: .9rem; color: var(--slate); }

/* Телефон і планшет */
@media (max-width: 900px) {
  .top { flex-wrap: wrap; gap: 1rem 1.5rem; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 1.25rem; }
  .langs { margin-left: auto; }
  .hero, .how, .pair, .contact-grid { grid-template-columns: 1fr; }
  .hero-map { max-width: 520px; }
  .hero-map figcaption { text-align: left; margin-left: 0; }
  .side { position: static; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 2rem); }
  .nav { font-size: .9rem; gap: 1rem; }
  .form .row { grid-template-columns: 1fr; }
  .map .c { font-size: 18px; }
}
