/* Основа: сброс, типографика, кромка (шапка), подвал, кнопки, формы. */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--len-100);
  background-image: var(--osnova);
  color: var(--tush);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.6;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
li { margin-bottom: 0.3em; }

a { color: inherit; text-decoration-color: rgba(38, 54, 79, 0.4); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--marena); }

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

.h1 { font-size: var(--step-h1); }
.h2 { font-size: var(--step-h2); margin-bottom: 0.5em; }
.h3 { font-size: var(--step-h3); }

.quiet { color: var(--tush-dim); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--marena); color: var(--len-text);
  padding: 0.7rem 1.1rem; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------ кромка страницы */

.demo-strip {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--marena);
  color: var(--len-text);
  font-size: 0.8rem;
  line-height: 1.35;
  padding: 0.45rem clamp(0.9rem, 3vw, 2rem);
}
.demo-strip__dot {
  width: var(--uzel); height: var(--uzel); flex: 0 0 auto;
  background: var(--len-text);
  transform: rotate(45deg);
}

.top {
  position: sticky; top: 0; z-index: 40;
  background: var(--vayda);
  color: var(--len-text);
  border-bottom: 1px solid var(--vayda-deep);
}
.top__inner {
  display: flex; align-items: center; gap: clamp(0.8rem, 2.4vw, 2rem);
  padding: 0.65rem clamp(0.9rem, 3vw, 2rem);
}

/* орнаментальная кромка: ряд ромбов, как метки раппорта на кромке полотна */
.top__seam {
  height: 10px;
  background-image:
    linear-gradient(45deg, var(--marena) 25%, transparent 25%, transparent 75%, var(--marena) 75%),
    linear-gradient(45deg, var(--marena) 25%, transparent 25%, transparent 75%, var(--marena) 75%);
  background-size: 14px 14px;
  background-position: 0 -4px, 7px -11px;
  opacity: 0.9;
}

.mark { display: flex; align-items: baseline; gap: 0.55rem; text-decoration: none; flex: 0 0 auto; }
.mark__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
}
.mark__name--big { font-size: 1.4rem; }
.mark__line {
  width: var(--uzel); height: var(--uzel);
  background: var(--marena);
  transform: rotate(45deg);
}
.mark__tag { font-size: var(--step-tiny); color: var(--len-text-dim); }

.top-nav { margin-left: auto; }
.top-nav__list {
  display: flex; flex-wrap: wrap; gap: 0 clamp(0.6rem, 1.3vw, 1.3rem);
  list-style: none; margin: 0; padding: 0;
}
.top-nav__link {
  display: inline-block; padding: 0.3rem 0;
  font-size: 0.9rem; color: var(--len-text-dim); text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.top-nav__link:hover { color: var(--len-text); }
.top-nav__link.is-active { color: var(--len-text); box-shadow: inset 0 -2px 0 var(--marena); }

.top__tools { display: flex; align-items: center; gap: 0.5rem; flex: 0 0 auto; }

.wardrobe-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px; padding: 0.35rem 0.8rem;
  border: 1px solid rgba(237, 233, 222, 0.35);
  color: var(--len-text); text-decoration: none; font-size: 0.9rem;
}
.wardrobe-link:hover { border-color: var(--marena); }
.wardrobe-link__count {
  min-width: 1.5rem; height: 1.5rem; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 0.75rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(237, 233, 222, 0.35);
}
.wardrobe-link.is-full .wardrobe-link__count {
  background: var(--marena); border-color: var(--marena);
}

.burger {
  display: none; align-items: center; gap: 0.5rem;
  min-height: 44px; padding: 0.35rem 0.8rem;
  background: transparent; border: 1px solid rgba(237, 233, 222, 0.35);
  color: var(--len-text); font: inherit; font-size: 0.9rem; cursor: pointer;
}
.burger__bar {
  width: 16px; height: 8px;
  border-top: 1px solid currentColor; border-bottom: 1px solid currentColor;
}

/* ------------------------------------------------------------ меню-ящик */

.drawer {
  position: fixed; inset: 0; z-index: 60;
  background: var(--vayda); color: var(--len-text);
  padding: 1.1rem clamp(0.9rem, 3vw, 2rem) 2.4rem;
  overflow-y: auto;
}
.drawer[hidden] { display: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; }
.drawer__title { font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.1em; }
.drawer__close {
  min-height: 44px; padding: 0.4rem 1rem;
  background: transparent; border: 1px solid rgba(237, 233, 222, 0.35);
  color: var(--len-text); font: inherit; cursor: pointer;
}
.drawer__list { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.drawer__list li { border-bottom: 1px solid rgba(237, 233, 222, 0.18); margin: 0; }
.drawer__list a {
  display: block; padding: 0.85rem 0;
  font-family: var(--font-display); font-size: 1.05rem; text-decoration: none;
}
.drawer__list--legal a { font-family: var(--font-text); font-size: 0.9rem; color: var(--len-text-dim); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.7rem 1.4rem;
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 600;
  border: 1px solid var(--vayda); border-radius: 0;
  cursor: pointer; text-decoration: none;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.btn--thread { background: var(--vayda); color: var(--len-text); }
.btn--thread:hover { background: var(--marena); border-color: var(--marena); }
.btn--thread:disabled {
  background: transparent; color: var(--tush-dim);
  border-color: var(--len-300); cursor: not-allowed;
}
.btn--chalk { background: transparent; color: inherit; border-color: currentColor; }
.btn--chalk:hover { background: var(--vayda); border-color: var(--vayda); color: var(--len-text); }
.btn--wide { width: 100%; }

.linklike {
  background: none; border: 0; padding: 0; font: inherit; color: inherit;
  cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em;
}

/* ---------------------------------------------------------------- формы */

.form { display: grid; gap: 0.9rem; min-width: 0; }
.form__intro { color: inherit; opacity: 0.8; font-size: var(--step-small); margin: 0; }
.form__row {
  display: grid; gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
}

.field { display: grid; gap: 0.3rem; min-width: 0; }
.field__label { font-size: var(--step-small); opacity: 0.75; }
.field__input {
  min-height: 48px; min-width: 0; width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--len-100);
  border: 1px solid var(--vayda);
  border-radius: 0;
  font: inherit; color: var(--tush);
}
.field__input::placeholder { color: #7D857F; }
.field__input:focus-visible { border-color: var(--marena); }
.field--inline { max-width: 22rem; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.consent {
  display: grid; grid-template-columns: auto 1fr; gap: 0.65rem; align-items: start;
  font-size: var(--step-small); line-height: 1.45;
}
.consent input {
  width: 20px; height: 20px; margin-top: 0.2rem;
  accent-color: var(--marena); cursor: pointer;
}

.form__note {
  margin: 0; padding: 0.7rem 0.85rem;
  border: 1px solid var(--marena);
  font-size: var(--step-small);
}

/* --------------------------------------------------- cookie-уведомление */

.cookie {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  padding: 0.85rem clamp(0.9rem, 3vw, 2rem);
  background: var(--orekh); color: var(--len-text);
}
.cookie[hidden] { display: none; }
.cookie__text { margin: 0; font-size: var(--step-small); max-width: 62ch; }
.cookie__text a { color: var(--len-text); }
.cookie__actions { display: flex; gap: 0.6rem; margin-left: auto; }
.cookie .btn { min-width: 8.5rem; border-color: var(--len-text); }
.cookie .btn--chalk:hover { background: var(--len-text); color: var(--orekh); }

/* --------------------------------------------------------------- подвал */

.bottom {
  margin-top: 0;
  background: var(--vayda);
  color: var(--len-text-dim);
  border-top: 10px solid var(--marena);
}
.bottom__inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  border-bottom: 1px solid rgba(237, 233, 222, 0.18);
}
.bottom__col {
  padding: clamp(1.4rem, 3vw, 2.4rem) clamp(0.9rem, 2vw, 1.6rem);
  border-right: 1px solid rgba(237, 233, 222, 0.18);
}
.bottom__col:last-child { border-right: 0; }
.bottom__col--mark .mark__name--big { color: var(--len-text); display: block; margin-bottom: 0.7rem; }
.bottom__note { font-size: var(--step-small); max-width: 34ch; }
.bottom__note--quiet { opacity: 0.7; }
.bottom__title {
  font-family: var(--font-display); font-size: var(--step-tiny);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--len-text); margin-bottom: 0.8rem;
}
.bottom__list { list-style: none; margin: 0; padding: 0; font-size: var(--step-small); }
.bottom__list li { margin-bottom: 0.45rem; }
.bottom__list a { text-decoration: none; }
.bottom__list a:hover { color: var(--len-text); }
.bottom__address { font-style: normal; font-size: var(--step-small); line-height: 1.7; }
.bottom__address a { color: var(--len-text); }

.bottom__line {
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between;
  padding: 0.9rem clamp(0.9rem, 3vw, 2rem);
  font-size: var(--step-tiny);
}

/* ------------------------------------------------------------- крошки */

.crumbs {
  padding: 0.7rem clamp(0.9rem, 3vw, 2rem);
  font-size: var(--step-small);
  border-bottom: var(--shov-thin);
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; margin: 0; padding: 0; }
.crumbs li { color: var(--tush-dim); margin: 0; }
.crumbs li + li::before { content: "◇"; margin-right: 0.45rem; color: var(--len-300); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
