/* «Я ношу ___» (assets/features/ya-noshu.js): строка-предложение над фильтрами каталога.
   Тонкий Source Serif, поле — пропуск в строке с волосяной линией; название аромата курсивом, как заглавие.
   Под строкой — «стена» известных названий через косую черту, как строка указателя: её нажимают, а не печатают.
   Результат — «Вы носите» слева и три флакона с нашей полки справа. */
.yn { position: relative; z-index: 6; margin: calc(-1 * clamp(12px, 3.2vw, 48px)) 0 clamp(52px, 6vw, 92px); }
.yn__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.yn__side { grid-column: 1 / span 3; padding-top: 1.75rem; }
.yn__main { grid-column: 4 / -1; min-width: 0; }

/* Предложение: «Я ношу ________» */
.yn__line {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .3em;
  font: 300 clamp(1.9rem, 3.2vw, 3.3rem)/1.18 var(--f-display);
  letter-spacing: -.018em; font-optical-sizing: auto;
}
.yn__lbl { cursor: text; }
/* поле остаётся в строке, пока в него помещается «Baccarat Rouge 540»; иначе переносится на свою строку */
.yn__field { position: relative; display: block; flex: 0 1 12em; min-width: 0; }
.yn__input {
  display: block; width: 100%; margin: 0; padding: 0 1.15em .1em 0;
  font: italic 300 1em/1.18 var(--f-display); letter-spacing: -.012em; color: var(--ink);
  background: none; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0;
  outline: none; caret-color: var(--ink); text-overflow: ellipsis;
  -webkit-appearance: none; appearance: none;
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.yn__input:hover { border-bottom-color: var(--mute); }
.yn__input:focus { border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.yn__input::-ms-clear { display: none; }
.yn__ph {
  position: absolute; left: 0; top: 0; right: 0;
  font: italic 250 1em/1.18 var(--f-display); letter-spacing: -.012em; color: var(--mute); opacity: .7;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.yn__field.has-value .yn__ph { opacity: 0; }
.yn__clear {
  position: absolute; right: -8px; bottom: .1em; width: 40px; height: 40px;
  display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--mute);
  transition: color .3s;
}
.yn__clear:hover { color: var(--ink); }
.yn__clear .ico { width: 18px; height: 18px; }

/* Стена названий: строка указателя через косую черту. Наведение — подчёркивание, выбранное — курсив */
.yn__pick { margin-top: clamp(20px, 2.2vw, 30px); }
.yn__cap { margin-bottom: 10px; color: var(--mute); }
.yn__wall {
  max-width: 54rem; min-height: 1.6em;
  font: 300 clamp(1.125rem, 1.45vw, 1.4rem)/1.62 var(--f-display); letter-spacing: -.006em; color: var(--ink);
  text-wrap: pretty;
}
.yn__opt { cursor: pointer; white-space: nowrap; transition: color .3s; }
.yn__opt-n {
  text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: transparent; text-underline-offset: .2em;
  transition: text-decoration-color .3s;
}
.yn__opt:hover .yn__opt-n, .yn__opt[aria-selected="true"] .yn__opt-n { text-decoration-color: currentColor; }
.yn__opt-b {
  margin-left: .45em; font: 500 .6875rem/1 var(--f-text); letter-spacing: .2em; text-transform: uppercase; color: var(--mute);
  vertical-align: .32em; white-space: nowrap;
}
.yn__wall.is-pop .yn__opt-b { display: none; }
.yn__opt:not(:last-child)::after { content: "/"; display: inline-block; margin: 0 .16em 0 .42em; color: var(--line-2); }
.yn__opt.is-chosen { color: var(--ink); }
.yn__opt.is-chosen .yn__opt-n { font-style: italic; text-decoration-color: currentColor; }
.yn.has-res .yn__opt:not(.is-chosen) { color: var(--mute); }
.yn.has-res .yn__opt:not(.is-chosen):hover { color: var(--ink); }
.yn__nomatch { font-style: italic; color: var(--mute); }

/* подсказка под стеной: примеры можно нажать */
.yn__hint { margin-top: 14px; max-width: 38rem; font-size: .9375rem; line-height: 1.6; color: var(--mute); text-wrap: pretty; }
.yn.has-res .yn__hint { display: none; }
.yn__try {
  padding: 0; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; background: none;
  font: inherit; line-height: 1.3; color: var(--ink); transition: border-color .3s;
}
.yn__try:hover { border-bottom-color: var(--ink); }

/* Результат */
.yn__res { margin-top: clamp(34px, 3.6vw, 52px); transition: opacity .45s var(--ease); }
.yn__res:empty { display: none; }
.yn__res.is-stale { opacity: .35; }
.yn__res > * { animation: ynRise .8s var(--ease) both; }
.yn__k { color: var(--mute); }
.yn__lead { font: italic 300 clamp(1.2rem, 1.55vw, 1.5rem)/1.3 var(--f-display); letter-spacing: -.008em; text-wrap: balance; }

.yn__out {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr); column-gap: clamp(28px, 3.6vw, 64px); row-gap: 34px;
  padding-top: 22px; border-top: 1px solid var(--ink);
}
/* «Вы носите»: этикетка — подпись, название курсивом, дом, год и ноты, наличие */
.yn__you { display: grid; align-content: start; gap: 10px; min-width: 0; }
.yn__you-n { margin-top: 4px; font: italic 300 clamp(2rem, 3vw, 3.1rem)/1.02 var(--f-display); letter-spacing: -.02em; text-wrap: balance; overflow-wrap: anywhere; }
.yn__you-m { font-size: .875rem; line-height: 1.55; color: var(--mute); }
.yn__you-s { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; font-size: 1rem; line-height: 1.45; }
.yn__you-s .ico { width: 16px; height: 16px; flex: none; transform: translateY(3px); stroke-width: 1.6; }
.yn__you-s:not(.is-on) { font: italic 300 1.0625rem/1.4 var(--f-display); color: var(--mute); }
.yn__price { white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.yn__price small { font-size: .8125rem; color: var(--mute); }
.yn__acts { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; }

/* Три флакона с полки: фото, дом, название, чем похож и чем отличается, цена */
.yn__near { display: grid; gap: 18px; align-content: start; min-width: 0; }
.yn__tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
.yn__tile { display: grid; align-content: start; gap: 6px; min-width: 0; animation: ynRise .8s var(--ease) both; animation-delay: calc(var(--i) * .08s); }
.yn__th { margin-bottom: 12px; }
.yn__th > .photo { transition: transform 1.2s var(--ease); transform-origin: 50% 90%; }
.yn__tile:hover .yn__th > .photo { transform: scale(1.03); }
.yn__tile .sr-brand { margin-bottom: 0; }
.yn__tn {
  justify-self: start; padding: 0; border: 0; background: none; color: inherit; text-align: left;
  font: 300 1.375rem/1.1 var(--f-display); letter-spacing: -.01em;
}
.yn__tn:hover { font-style: italic; }
.yn__why { font-size: .875rem; line-height: 1.45; color: var(--mute); text-wrap: pretty; }
.yn__why em { font-style: normal; color: var(--ink); }
.yn__tf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.yn__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 10px; }
.yn__cmp .ico { width: 19px; height: 19px; }

.yn__ask { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; font-size: .9375rem; line-height: 1.5; color: var(--mute); }
.yn__links { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 26px; color: var(--ink); }
.yn__tel::after { right: 0; }
.yn__none { display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line-2); }

@keyframes ynRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
  .yn__out { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .yn { margin-top: -12px; }
  .yn__in { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
  .yn__side, .yn__main { grid-column: 1 / -1; }
  .yn__side { padding-top: 0; }
  .yn__line { font-size: 1.8rem; }
  .yn__field { flex: 1 0 8.6em; }
  .yn__wall { font-size: 1.125rem; line-height: 1.6; }
  /* на телефоне — двенадцать самых частых названий */
  .yn__wall.is-pop .yn__opt:nth-child(n+13) { display: none; }
  .yn__wall.is-pop .yn__opt:nth-child(12)::after { content: none; }
  .yn__tiles { gap: 12px; }
  .yn__tn { font-size: 1.0625rem; }
  .yn__why { font-size: .8125rem; }
  .yn__tf { flex-direction: column; align-items: flex-start; gap: 8px; }
  .yn__acts .btn { flex: 1 1 auto; }
  .yn__foot .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .yn__res > *, .yn__tile { animation: none; }
  .yn__res { transition: none; }
}
