/* WEKI Ehitus OÜ — собственная вёрстка. Шрифт TildaSans под SIL OFL 1.1. */

/* ---------- tokens ---------- */
:root {
  --accent: #ff822e;
  --accent-soft: #f79e59;
  --accent-dark: #e56a15;
  --ink: #111111;
  --ink-muted: #5c5c5c;
  --line: #e2e2e2;
  --bg: #ffffff;
  --bg-alt: #f0f0f0;
  --bg-dark: #111111;
  --radius: 30px;
  --shell: 1200px;
  --pad: 16px;
  --font: 'TildaSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- layout ---------- */
.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--pad); }

.section { padding: 56px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; margin-bottom: 40px; }
.section__title { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.section__lead { margin-top: 12px; font-size: 16px; color: var(--ink-muted); }

@media (min-width: 768px) {
  :root { --pad: 32px; }
  .section { padding: 80px 0; }
  .section__title { font-size: 32px; }
  .section__lead { font-size: 18px; }
  .section__head { margin-bottom: 56px; }
}

@media (min-width: 1024px) {
  :root { --pad: 48px; }
  .section { padding: 104px 0; }
  .section__title { font-size: 40px; }
  .section__lead { font-size: 20px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 36px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color .2s ease-in-out, transform .2s ease-in-out;
}
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: translateY(1px); }

@media (min-width: 768px) { .btn { min-height: 60px; padding: 12px 48px; } }

/* ---------- header ---------- */
.header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 50;
}
.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.header__logo img { height: 44px; width: auto; }

.header__nav, .header__contacts, .header__langs { display: none; }

/* на мобиле шапка пустая — только бургер поверх обложки;
   логотип возвращается, когда меню раскрыто */
.header__bar { justify-content: flex-end; }
.header__logo { display: none; }
.header.is-open .header__bar { justify-content: space-between; }
.header.is-open .header__logo { display: block; }

.burger {
  position: relative;
  width: 28px;
  height: 20px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
}
.burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: #fff;
  transition: transform .25s ease, opacity .2s ease, background-color .2s ease;
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 8.5px; }
.burger span:nth-child(3) { top: 17px; }

/* мобильное меню */
.header__panel {
  display: none;
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 88px var(--pad) 40px;
  background: #fff;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,.12);
}
.header.is-open .header__panel { display: block; }
.header.is-open .header__logo { position: relative; z-index: 2; }
.header.is-open .burger { z-index: 2; filter: none; }
.header.is-open .burger span { background: var(--ink); }
.header.is-open .burger span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.header.is-open .burger span:nth-child(2) { opacity: 0; }
.header.is-open .burger span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

.header__panel .nav__list { display: grid; gap: 20px; margin-bottom: 28px; }
.header__panel .nav__link { font-size: 18px; font-weight: 500; }
.header__panel .header__contacts { display: grid; gap: 4px; font-size: 16px; margin-bottom: 20px; }
.header__panel .header__langs { display: flex; justify-content: center; gap: 16px; font-size: 17px; }

.lang { font-weight: 600; }
.lang[aria-current="true"] { color: var(--ink-muted); font-weight: 500; }

@media (min-width: 768px) {
  .header { position: static; background: #fff; }
  .header__bar { min-height: 84px; gap: 20px; justify-content: space-between; }
  .header__logo { display: block; }
  .header__logo img { height: 56px; }
  .burger, .header__panel { display: none !important; }

  .header__nav { display: block; flex: 1; }
  .nav__list { display: flex; justify-content: center; gap: 18px; }
  .nav__link {
    position: relative;
    font-size: 15px;
    font-weight: 500;
    padding-bottom: 4px;
    transition: color .2s ease;
  }
  .nav__link::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
  }
  .nav__link:hover::after, .nav__link[aria-current="true"]::after { transform: scaleX(1); }

  .header__contacts { display: grid; gap: 2px; font-size: 13px; text-align: right; white-space: nowrap; }
  .header__contacts a { display: block; padding: 3px 0; min-height: 24px; }
  .header__contacts a:hover { text-decoration: underline; }
  .header__langs { display: flex; gap: 12px; font-size: 15px; }
}

@media (min-width: 1180px) {
  .nav__list { gap: 28px; }
  .nav__link { font-size: 17px; }
  .header__contacts { font-size: 15px; }
  .header__langs { font-size: 17px; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 96px var(--pad) 72px;
  text-align: center;
  color: #fff;
  background: #2a2a2a center/cover no-repeat;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, .62);
}
.hero__inner { position: relative; z-index: 1; max-width: 900px; }
.hero__title {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 20px rgba(0,0,0,.35);
}
.hero__sub { margin-top: 20px; font-size: 16px; line-height: 1.5; text-shadow: 0 1px 12px rgba(0,0,0,.35); }

.hero__arrow {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 1;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #fff;
  animation: nudge 2.4s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

@media (min-width: 768px) {
  .hero { min-height: calc(100svh - 84px); padding: 80px var(--pad); }
  .hero__title { font-size: 40px; }
  .hero__sub { font-size: 20px; }
}
@media (min-width: 1024px) {
  .hero__title { font-size: 52px; }
}

/* ---------- преимущества ---------- */
.perks { display: grid; gap: 40px; }
.perk { text-align: center; }
.perk__icon { width: 64px; height: 64px; margin: 0 auto 20px; color: var(--accent); }
.perk__title { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.perk__text { color: var(--ink-muted); }

@media (min-width: 768px) {
  .perks { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .perk__title { font-size: 22px; }
}

/* ---------- услуги ---------- */
.services { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.service {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color .2s ease, transform .2s ease;
}
.service:hover { border-color: var(--accent); transform: translateY(-2px); }
.service__num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.service__name { font-size: 16px; font-weight: 500; }

@media (min-width: 768px) {
  .services { gap: 16px; }
  .service { flex: 0 1 calc(50% - 8px); padding: 20px 24px; }
}
@media (min-width: 1024px) {
  .service { flex: 0 1 calc(33.333% - 11px); }
}

/* ---------- этапы ---------- */
.steps { display: grid; gap: 28px; counter-reset: step; }
.step { position: relative; padding-left: 60px; }
.step__num {
  position: absolute;
  left: 0; top: 0;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}
.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 21px; top: 52px; bottom: -20px;
  width: 2px;
  background: var(--accent);
  opacity: .35;
}
.step__title { font-size: 19px; font-weight: 700; margin-bottom: 8px; padding-top: 8px; }
.step__text { color: var(--ink-muted); }

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .step { padding-left: 0; padding-top: 64px; }
  .step__num { left: 0; }
  .step:not(:last-child)::before {
    left: 52px; top: 21px; bottom: auto;
    width: auto; right: -24px; height: 2px;
  }
  .step__title { padding-top: 0; }
}

/* ---------- галерея ---------- */
.gallery { display: grid; gap: 16px; }
.gallery__item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-alt);
}
.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.gallery__item.is-hidden { display: none; }

.gallery__more { display: flex; justify-content: center; margin-top: 32px; }

@media (min-width: 768px) {
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .gallery__more { margin-top: 40px; }
}

/* ---------- форма ---------- */
.form { max-width: 760px; margin: 0 auto; }
.form__row { margin-bottom: 20px; }
.form__label { display: block; margin-bottom: 8px; font-size: 15px; }
.form__input, .form__textarea {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 4px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form__textarea { min-height: 120px; resize: vertical; }
.form__input:focus, .form__textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 130, 46, .18);
}
.form__error { display: block; margin-top: 6px; font-size: 14px; color: #c0392b; min-height: 20px; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.form__captcha { display: flex; justify-content: center; }
.form__captcha:has(iframe) { margin-bottom: 20px; }
.form__fallback { margin-top: 4px; text-align: center; font-size: 15px; color: var(--ink); }
.form__submit { display: flex; justify-content: center; margin-top: 8px; }
.form__note { margin-top: 20px; text-align: center; font-size: 14px; color: var(--ink-muted); }
.form__success {
  display: none;
  padding: 20px;
  text-align: center;
  font-size: 18px;
  color: var(--ink);
}
.form__success.is-visible { display: block; }
.form.is-sent .form__body { display: none; }

/* ---------- контакты ---------- */
.contacts { text-align: center; }
.contacts__line { font-size: 22px; line-height: 1.4; font-weight: 500; }
.contacts__line a:hover { color: var(--accent); }
.contacts__socials { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }
.contacts__social {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  transition: background-color .2s ease;
}
.contacts__social:hover { background: var(--accent); }

@media (min-width: 768px) { .contacts__line { font-size: 30px; } }
@media (min-width: 1024px) { .contacts__line { font-size: 36px; } }

/* ---------- футер ---------- */
.footer {
  padding: 28px 0;
  background: var(--bg-dark);
  color: #fff;
  font-size: 14px;
}
.footer__inner { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.footer a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.footer a:hover { color: #fff; }

/* ---------- появление при скролле ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease-out, transform .5s ease-out; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- служебное ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 200;
  padding: 12px 20px;
  background: #fff;
  color: var(--ink);
}
.skip-link:focus { left: 16px; top: 16px; }
