/* arweiss — стили сайта. Токены в :root, дальше блоки по порядку страницы. */

@font-face {
  font-family: "Onest";
  src: url("fonts/onest-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("fonts/onest-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #5c5c5c;
  --soft: #f5f5f5;
  --soft-2: #ececec;
  --line: #e4e4e4;
  --accent: #2a4bff;
  --accent-ink: #ffffff;
  --radius: 24px;
  --radius-sm: 14px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); font-weight: 400; }
.accent { color: var(--accent); }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
}
.skip:focus { top: 16px; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: #1c38d6; }
.btn--soft { background: var(--soft); }
.btn--soft:hover { background: var(--soft-2); }
.btn--ghost { min-height: 44px; padding: 0 18px; }
.btn--ghost:hover { background: var(--soft); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #dfe4ff; }
.btn--outline { border-color: #6b6b6b; color: #fff; }
.btn--outline:hover { border-color: #fff; }

/* Шапка */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.header__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 600; letter-spacing: -.03em; min-height: 44px; }
.logo__mark { width: 22px; height: 22px; fill: currentColor; }
.nav { display: flex; gap: 4px; }
.nav a, .footer__nav a { padding: 10px 14px; border-radius: 10px; transition: background-color .2s; }
.nav a:hover, .footer__nav a:hover { background: var(--soft); }
.nav__cta, .menu-btn { display: none; }
.menu-btn { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--soft); cursor: pointer; place-items: center; }
.menu-btn__icon, .menu-btn__icon::before, .menu-btn__icon::after { display: block; width: 18px; height: 2px; border-radius: 1px; background: var(--ink); transition: transform .2s; }
.menu-btn__icon { position: relative; }
.menu-btn__icon::before, .menu-btn__icon::after { content: ""; position: absolute; left: 0; }
.menu-btn__icon::before { top: -6px; }
.menu-btn__icon::after { top: 6px; }
.menu-btn[aria-expanded="true"] .menu-btn__icon { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-btn__icon::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__icon::after { transform: translateY(-6px) rotate(-45deg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Первый экран */
.hero { padding-block: clamp(56px, 10vw, 128px) clamp(48px, 8vw, 96px); text-align: center; }
.hero__title {
  max-width: 13em; margin-inline: auto;
  font-size: clamp(2.5rem, 7.4vw, 5.5rem); font-weight: 600; line-height: 1; letter-spacing: -.045em;
  text-wrap: balance;
}
.hero__title em { font-style: italic; font-weight: 500; }
.hero__lead {
  max-width: 38em; margin: 28px auto 0;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: #2b2b2b; text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.hero__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-top: 56px; color: var(--muted); font-size: .9375rem; }
.hero__tags li { display: flex; align-items: center; gap: 10px; }
.hero__tags li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Секции */
.section { padding-block: clamp(48px, 8vw, 104px); }
.section__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: clamp(28px, 4vw, 48px); }
.section__head--stack { grid-template-columns: 1fr; align-items: start; justify-items: start; margin-bottom: 0; }
.section__title { font-size: clamp(2rem, 5vw, 3.75rem); font-weight: 600; line-height: 1.02; letter-spacing: -.04em; }
.section__lead { max-width: 34em; font-size: 1.0625rem; color: var(--muted); text-wrap: pretty; }

/* Работы */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--soft); cursor: pointer; font-size: .9375rem;
  transition: background-color .2s, color .2s;
}
.chip:hover { background: var(--soft-2); }
.chip.is-active { background: var(--ink); color: #fff; }

.works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px) clamp(16px, 2vw, 24px); }
.work { display: block; }
.work__cover {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3; border-radius: var(--radius);
  background: var(--soft-2);
}
.work__cover--dark { background: #0a0a0a; }
.work__cover--accent { background: #dfe4ff; }
.work__cover svg, .work__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
a.work:hover .work__cover svg, a.work:hover .work__cover img { transform: scale(1.03); }
.badge {
  position: absolute; top: 16px; right: 16px; z-index: 1;
  padding: 5px 12px; border-radius: 999px;
  background: #ffe36b; color: #0a0a0a; font-size: .8125rem; font-weight: 500;
}
.badge--demo { top: auto; right: auto; left: 16px; bottom: 16px; background: var(--accent); color: #fff; }
/* Скриншоты: лёгкое увеличение от левого верхнего угла прячет полосу прокрутки справа */
.work__cover img { object-position: left top; transform-origin: left top; transform: scale(1.03); }
a.work:hover .work__cover img { transform: scale(1.06); }
.work__meta { padding: 16px 4px 0; }
.work__type { font-size: .875rem; color: var(--muted); }
.work__title { margin-top: 2px; font-size: 1.25rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.25; }
.work__desc { margin-top: 4px; color: var(--muted); font-size: .9375rem; }
.works__empty { padding: 48px 0; color: var(--muted); text-align: center; }

/* Услуги */
.services { border-top: 1px solid var(--line); }
.service {
  display: grid; grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.3fr); gap: 8px 32px; align-items: baseline;
  padding-block: clamp(22px, 3vw, 36px); border-bottom: 1px solid var(--line);
}
.service__num { color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.service__title { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.service__text { color: #2b2b2b; max-width: 36em; text-wrap: pretty; }

/* Процесс */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.step { background: var(--soft); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; min-height: 220px; }
.step__num {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: .9375rem; font-weight: 500; margin-bottom: auto;
}
.step__title { margin-top: 32px; font-size: 1.25rem; font-weight: 500; letter-spacing: -.02em; }
.step p { margin-top: 6px; color: var(--muted); font-size: .9375rem; }

/* Вопросы */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px 64px; align-items: start; }
.faq .section__head .btn { margin-top: 8px; }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-size: 1.125rem; font-weight: 500; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 40px 24px 0; color: var(--muted); max-width: 40em; }

/* Заявка */
.order {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px 64px;
  background: var(--ink); color: #fff; border-radius: clamp(24px, 3vw, 36px);
  padding: clamp(24px, 5vw, 64px);
}
.order__title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 600; line-height: 1.02; letter-spacing: -.04em; }
.order__intro p { margin-top: 20px; color: #b8b8b8; max-width: 28em; text-wrap: pretty; }
.brief { display: grid; gap: 22px; }
.brief legend, .brief__field label { display: block; margin-bottom: 10px; font-size: .9375rem; font-weight: 500; }
.brief .muted { color: #a3a3a3; }
.brief__options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { position: relative; cursor: pointer; }
.option input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.option span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: #1f1f1f; border: 1px solid #3d3d3d; font-size: .9375rem;
  transition: background-color .2s, color .2s, border-color .2s;
}
.option:hover span { border-color: #8a8a8a; }
.option input:checked + span { background: #fff; color: var(--ink); border-color: #fff; }
.option input:focus-visible + span { outline: 3px solid #8fa2ff; outline-offset: 3px; }
.brief input[type="text"], .brief textarea {
  display: block; width: 100%; padding: 14px 16px;
  background: #1f1f1f; border: 1px solid #5a5a5a; border-radius: var(--radius-sm); color: #fff;
  transition: border-color .2s;
}
.brief textarea { resize: vertical; min-height: 120px; }
.brief ::placeholder { color: #9a9a9a; opacity: 1; }
.brief input[type="text"]:hover, .brief textarea:hover { border-color: #8a8a8a; }
.brief input[type="text"]:focus-visible, .brief textarea:focus-visible, .order .btn:focus-visible { outline-color: #8fa2ff; }
.brief [aria-invalid="true"] { border-color: #ff8f8f; }
.brief__error { margin-top: 8px; color: #ffb3b3; font-size: .9375rem; }
.brief__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.brief__note { color: #b8b8b8; font-size: .9375rem; }
.brief__note:empty { display: none; }
.brief__note a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* Контакты */
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.contact {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 150px; height: 100%; padding: 22px 24px; border-radius: var(--radius);
  background: var(--soft); transition: background-color .2s, color .2s;
}
.contact__label { font-size: .9375rem; color: var(--muted); transition: color .2s; }
.contact__value { font-size: 1.25rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.contact__arrow { position: absolute; top: 18px; right: 22px; font-size: 1.25rem; }
a.contact:hover { background: var(--ink); color: #fff; }
a.contact:hover .contact__label { color: #c4c4c4; }
.contact--empty { background: transparent; border: 1px dashed #b5b5b5; }
.contact--empty .contact__value { color: var(--muted); font-weight: 400; }

/* Подвал */
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 32px 40px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 4px; }
.footer__copy { color: var(--muted); font-size: .9375rem; }

/* Появление при прокрутке (класс ставит main.js, без JS всё видно сразу) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .header__cta { margin-left: auto; }
  .nav.is-open {
    display: grid; position: absolute; top: 100%; left: 0; right: 0;
    padding: 8px var(--gutter) 16px; background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px -16px rgba(0, 0, 0, .18);
  }
  .nav.is-open a { padding: 14px 4px; font-size: 1.125rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav.is-open a:last-child { border-bottom: 0; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq, .order { grid-template-columns: 1fr; }
  .service { grid-template-columns: 48px minmax(0, 1fr); }
  .service__text { grid-column: 2; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .section__head { grid-template-columns: 1fr; }
  .works { grid-template-columns: 1fr; }
  .hero { text-align: left; }
  .hero__title, .hero__lead { margin-inline: 0; }
  .hero__actions, .hero__tags { justify-content: flex-start; }
  .hero__tags { flex-direction: column; margin-top: 40px; }
  .faq details p { padding-right: 0; }
}
@media (max-width: 480px) {
  .header__cta { display: none; }
  .nav.is-open .nav__cta { display: block; color: var(--accent); font-weight: 500; }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; }
  .hero__actions .btn, .brief__actions .btn { width: 100%; }
  .service { grid-template-columns: 1fr; }
  .service__text { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
