/* ==========================================================================
   Лёгкость — базовый слой: шрифт, токены, типографика, общие компоненты.
   Источник цифр — docs/SPEC.md (снят с site.legkost.app).
   ========================================================================== */

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

:root {
  /* Цвета */
  --bg: #fbf6ef;
  --band: #fff8ee;
  --line: #f4ede2;
  --card-line: #efe6d8;
  --warm: #fff4e6;
  --warm-line: #f3dcc2;
  --ink: #1c1814;
  --ink-2: #4a4036;
  --muted: #5f554b;
  --muted-2: #6e6358;
  --accent: #8a6238;
  --link: #b4541c;
  --orange: #d9531f;
  --star: #c9601c;
  --grad: linear-gradient(135deg, #ffc56f, #ff8a5c);
  --grad-icon: linear-gradient(135deg, #ffe7c2, #ffd0b0);
  --grad-logo: linear-gradient(135deg, #ffb35c, #f0894a 45%, #e4623a);

  /* Геометрия */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 30px;
  --shadow-card: 0 2px 10px rgba(60, 40, 20, 0.06);
  --shadow-soft: 0 18px 40px rgba(120, 80, 40, 0.1), 0 2px 10px rgba(60, 40, 20, 0.05);
  --shadow-cta: 0 10px 22px rgba(255, 138, 92, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 86px;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--link);
}

h1,
h2,
h3,
p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

button {
  cursor: pointer;
}

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

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --------------------------------------------------------------------------
   Шапка
   -------------------------------------------------------------------------- */

.nav {
  position: relative;
  z-index: 30;
}

.nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 4px;
}

.logo {
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.6px;
  line-height: 1.2;
  text-decoration: none;
  color: #e4623a;
  background: var(--grad-logo);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.top-pill {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  background: #fff;
  border: 1.5px solid var(--card-line);
  border-radius: 999px;
  padding: 7px 12px;
  white-space: nowrap;
}

.nav-links,
.nav .nav-cta {
  display: none;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.nav-back .arr {
  width: 8px;
  height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}

/* --------------------------------------------------------------------------
   Кнопки
   -------------------------------------------------------------------------- */

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 18px 22px;
  border: 0;
  border-radius: 17px;
  background: var(--grad);
  color: #231c15;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.2px;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--shadow-cta);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cta:active {
  transform: scale(0.985);
  box-shadow: 0 6px 14px rgba(255, 138, 92, 0.26);
}

.chev {
  width: 9px;
  height: 9px;
  border-right: 2.5px solid #231c15;
  border-top: 2.5px solid #231c15;
  transform: rotate(45deg);
  flex: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 13px 22px;
  border-radius: 15px;
  border: 1.5px solid transparent;
  background: none;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.btn-primary {
  background: var(--grad);
  color: #231c15;
  box-shadow: 0 8px 18px rgba(255, 138, 92, 0.26);
}

.btn-primary:active {
  transform: scale(0.985);
}

.btn-ghost {
  background: #fff;
  border-color: var(--card-line);
  color: var(--ink-2);
}

.btn-ghost:hover {
  background: #fffaf3;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(138, 98, 56, 0.3);
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Поля и подсказки
   -------------------------------------------------------------------------- */

.hint {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--muted);
}

.hint strong,
.hint b {
  font-weight: 800;
  color: var(--ink);
}

.hint-warn {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--warm-line);
  border-radius: 12px;
  background: var(--warm);
  color: #7a4b22;
}

.field-error {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 700;
  color: #a3341c;
}

.field-error::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #d9531f;
  vertical-align: 1px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Футер
   -------------------------------------------------------------------------- */

.foot {
  padding: 26px 0 40px;
  border-top: 1.5px solid var(--line);
  font-size: 12.5px;
  line-height: 1.6;
  font-weight: 500;
  color: var(--muted);
}

.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
}

.foot a {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Брейкпоинты
   -------------------------------------------------------------------------- */

@media (min-width: 1024px) {
  .wrap {
    max-width: 1240px;
    padding: 0 40px;
  }

  .nav {
    position: sticky;
    top: 0;
    background: rgba(251, 246, 239, 0.9);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1.5px solid transparent;
    transition: border-color 0.2s ease;
  }

  .nav.stuck {
    border-bottom-color: var(--card-line);
  }

  .nav-in {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .logo {
    font-size: 29px;
  }

  .top-pill {
    display: none;
  }

  .nav-links {
    display: flex;
    gap: 30px;
    margin-left: auto;
    margin-right: 8px;
  }

  .nav-links a {
    font-size: 15.5px;
    font-weight: 600;
    color: var(--ink-2);
    text-decoration: none;
  }

  .nav .nav-cta {
    display: inline-flex;
    width: auto;
    min-width: 0;
    min-height: 48px;
    padding: 12px 22px;
    font-size: 16px;
    border-radius: 14px;
    box-shadow: 0 6px 14px rgba(255, 138, 92, 0.24);
  }

  .foot {
    padding: 34px 0 44px;
    font-size: 13.5px;
  }
}

@media (hover: hover) {
  .cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(255, 138, 92, 0.36);
  }

  .nav-links a:hover {
    color: var(--ink);
  }

  .nav-back:hover {
    color: var(--ink);
  }

  .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(255, 138, 92, 0.34);
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta,
  .btn,
  .nav,
  .roll,
  summary::after {
    transition: none;
  }
}
