/* ==========================================================================
   Первый экран и шапка (дизайн «Обменяй-КА — Hero», desktop 1440 / mobile 390).
   Все классы с префиксом hx-, чтобы не пересекаться со старыми .btn, .card,
   .logo из styles.css. Токены взяты из UI-спецификации макета.
   ========================================================================== */
:root {
  --hx-peach: #DE9B63;
  --hx-peach-2: #EBA061;
  --hx-peach-warm: #F4AE73;
  --hx-peach-light: #FFEBDA;
  --hx-peach-cream: #FFF6EE;
  --hx-bg-soft: #FFF9F4;
  --hx-ink: #212121;
  --hx-ink-2: #3A3A3A;
  --hx-muted: #747474;
  --hx-grad: linear-gradient(321deg, #FFC594 0%, #F4AE73 69.68%);
  --hx-grad-deep: linear-gradient(321deg, #D68F55 0%, #EBA061 69.68%);
  --hx-shadow-card: 0 16px 40px rgba(178, 133, 97, .14);
  --hx-shadow-cta: 0 14px 28px rgba(222, 155, 99, .32);
  --hx-header-h: 84px;
}

/* Якоря не прячутся под липкой шапкой */
section[id] {
  scroll-margin-top: var(--hx-header-h);
}

/* ---------------------------------- Шапка ---------------------------------- */
.hx-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(222, 155, 99, .08);
}

.hx-header-inner {
  max-width: 1440px;
  height: var(--hx-header-h);
  margin: 0 auto;
  padding: 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hx-logo {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: baseline;
  font: 700 22px/1 'Poppins', sans-serif;
  letter-spacing: -.02em;
  color: var(--hx-ink);
  white-space: nowrap;
}

.hx-logo .hx-accent {
  position: relative;
  color: var(--hx-peach);
}

.hx-logo .hx-accent::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: -1px;
  height: 6px;
  background: rgba(244, 174, 115, .28);
  border-radius: 4px;
  z-index: -1;
}

.hx-menu {
  display: flex;
  align-items: center;
  gap: 34px;
}

.hx-menu a {
  position: relative;
  padding: 6px 2px;
  font: 500 14.5px/1 'Poppins', sans-serif;
  color: var(--hx-ink-2);
  white-space: nowrap;
  transition: color .18s;
}

.hx-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 2px;
  background: var(--hx-peach);
  border-radius: 2px;
  transition: right .22s ease;
}

.hx-menu a:hover,
.hx-menu a.active {
  color: var(--hx-peach);
}

.hx-menu a:hover::after,
.hx-menu a.active::after {
  right: 0;
}

.hx-menu .hx-menu-mobile,
.hx-menu .hx-menu-login {
  display: none;
}

.hx-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hx-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid var(--hx-peach);
  background: #fff;
  color: var(--hx-peach);
  font: 600 14px/1 'Poppins', sans-serif;
  white-space: nowrap;
  transition: background .18s, color .18s, box-shadow .18s;
}

.hx-btn-ghost:hover {
  background: var(--hx-peach);
  color: #fff;
  box-shadow: 0 8px 18px rgba(222, 155, 99, .24);
}

.hx-burger {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--hx-peach-light);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.hx-burger i,
.hx-burger i::before,
.hx-burger i::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--hx-peach);
  border-radius: 2px;
  transition: transform .2s, background .2s;
}

.hx-burger i {
  position: relative;
}

.hx-burger i::before,
.hx-burger i::after {
  content: "";
  position: absolute;
  left: 0;
}

.hx-burger i::before {
  top: -5px;
}

.hx-burger i::after {
  top: 5px;
}

.hx-header.is-open .hx-burger i {
  background: transparent;
}

.hx-header.is-open .hx-burger i::before {
  transform: translateY(5px) rotate(45deg);
}

.hx-header.is-open .hx-burger i::after {
  transform: translateY(-5px) rotate(-45deg);
}

/* ------------------------------- Первый экран ------------------------------ */
.hx-hero {
  background: #fff;
  overflow: hidden;
}

.hx-hero-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 64px 56px;
  display: grid;
  grid-template-columns: minmax(0, 660px) minmax(0, 1fr);
  gap: 64px;
}

.hx-left {
  min-width: 0;
}

.hx-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: var(--hx-peach-light);
  color: #8A5A32;
  font: 600 12.5px/1.2 'Poppins', sans-serif;
  letter-spacing: .02em;
}

.hx-kicker-badge {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1.5px var(--hx-peach);
}

.hx-kicker svg,
.hx-btn svg {
  display: block;
}

.hx-h1 {
  margin: 22px 0;
  max-width: 640px;
  font: 600 56px/1.1 'Poppins', sans-serif;
  letter-spacing: -.02em;
  color: var(--hx-ink);
  text-wrap: balance;
}

.hx-hl {
  color: var(--hx-peach);
  background: linear-gradient(transparent 80%, rgba(244, 174, 115, .28) 80%, rgba(244, 174, 115, .28) 94%, transparent 94%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hx-p1 {
  max-width: 600px;
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.62;
  color: var(--hx-muted);
  text-wrap: pretty;
}

.hx-note {
  position: relative;
  max-width: 600px;
  padding: 16px 20px 16px 24px;
  border-radius: 16px;
  background: var(--hx-peach-cream);
  border: 1px solid rgba(222, 155, 99, .14);
}

.hx-note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  background: var(--hx-peach);
  border-radius: 2px;
}

.hx-note p {
  max-width: none;
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--hx-muted);
  text-wrap: pretty;
}

.hx-note b {
  color: var(--hx-ink);
  font-weight: 600;
}

.hx-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  max-width: 600px;
  margin-top: 26px;
}

.hx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 58px;
  padding: 0 30px;
  border-radius: 999px;
  font: 600 16px/1 'Poppins', sans-serif;
  letter-spacing: -.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .22s cubic-bezier(.2, .7, .2, 1), box-shadow .22s, background .18s, color .18s, filter .22s;
}

.hx-btn-primary {
  border: 0;
  background: var(--hx-grad);
  color: #fff;
  box-shadow: var(--hx-shadow-cta);
}

.hx-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(222, 155, 99, .42);
  filter: brightness(1.02);
}

.hx-btn-secondary {
  padding: 0 26px;
  background: #fff;
  color: var(--hx-peach);
  border: 1.75px solid var(--hx-peach);
}

.hx-btn-secondary:hover {
  transform: translateY(-2px);
  background: var(--hx-peach);
  color: #fff;
  box-shadow: 0 12px 22px rgba(222, 155, 99, .28);
}

.hx-btn:active {
  transform: translateY(0);
}

.hx-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  max-width: 640px;
  margin-top: 30px;
}

.hx-perk {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 14px/1.3 'Poppins', sans-serif;
  color: var(--hx-ink-2);
}

.hx-perk img {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}

/* Правая колонка: персиковая область с иллюстрацией, карточками и плашкой */
.hx-right {
  min-width: 0;
  padding-top: 16px;
}

.hx-peach {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 700px;
  padding: 0 32px 32px;
  border-radius: 80px 110px 90px 60px;
  /* Вертикальный переход подобран под края иллюстрации shelf.webp,
     чтобы картинка сливалась с фоном без видимой границы */
  background: linear-gradient(180deg, #FDD1A9 0%, #F0B485 38%, #E6A26C 70%, #E09A63 100%);
  box-shadow: 0 30px 70px rgba(212, 140, 88, .28), inset 0 1px 0 rgba(255, 255, 255, .35);
  overflow: hidden;
  isolation: isolate;
}

.hx-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .35);
  pointer-events: none;
  z-index: -1;
}

.hx-ring.r1 {
  width: 520px;
  height: 520px;
  right: -140px;
  top: -160px;
  opacity: .55;
}

.hx-ring.r2 {
  width: 340px;
  height: 340px;
  left: -90px;
  bottom: -100px;
  opacity: .45;
}

.hx-illu {
  flex: 1 0 auto;
  margin: 0 -32px;
  aspect-ratio: 1152 / 640;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
}

.hx-illu img {
  width: 100%;
  height: auto;
  max-width: none;
}

.hx-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.hx-card {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(222, 155, 99, .14);
  box-shadow: var(--hx-shadow-card);
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s;
}

.hx-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 46px rgba(178, 133, 97, .22);
}

.hx-card-icon {
  display: block;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
}

.hx-card-num {
  position: absolute;
  top: 18px;
  right: 20px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--hx-peach-light);
  color: var(--hx-peach);
  font: 600 12px/1 'Poppins', sans-serif;
  letter-spacing: .02em;
}

.hx-card h3 {
  margin: 0 0 8px;
  font: 600 18px/1.25 'Poppins', sans-serif;
  letter-spacing: -.01em;
  color: var(--hx-ink);
}

.hx-card p {
  margin: 0;
  font: 500 13.5px/1.5 'Poppins', sans-serif;
  color: var(--hx-muted);
}

.hx-arrow {
  margin: 0 4px;
  color: var(--hx-peach);
  font-weight: 700;
}

.hx-plate {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 22px;
  background: var(--hx-grad-deep);
  color: #fff;
  box-shadow: 0 20px 40px rgba(178, 133, 97, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.hx-plate-ico {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hx-plate-ico img {
  width: 40px;
  height: 40px;
}

.hx-plate-txt {
  flex: 1;
  min-width: 0;
}

.hx-plate-title {
  font: 600 18px/1.2 'Poppins', sans-serif;
  letter-spacing: -.005em;
}

.hx-plate-sub {
  margin-top: 4px;
  font: 500 13.5px/1.35 'Poppins', sans-serif;
  opacity: .92;
}

.hx-split {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font: 600 12px/1 'Poppins', sans-serif;
  white-space: nowrap;
}

.hx-split i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hx-split .dot {
  opacity: .5;
}

/* Вспомогательный порядок блоков: на мобильном плашка и карточки
   встают в поток левой колонки (как в макете Mobile 390) */
.hx-mobile-only {
  display: none;
}

/* ------------------------------ Адаптив ------------------------------------ */
@media (max-width: 1360px) {
  .hx-menu {
    gap: 24px;
  }

  .hx-hero-inner {
    gap: 48px;
  }

  .hx-h1 {
    font-size: 50px;
  }
}

@media (max-width: 1500px) {
  .hx-split {
    display: none;
  }
}

@media (max-width: 1200px) {
  .hx-header-inner,
  .hx-hero-inner {
    padding-left: 40px;
    padding-right: 40px;
  }

  .hx-hero-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px;
  }

  .hx-h1 {
    font-size: 44px;
  }

  .hx-cards {
    grid-template-columns: 1fr;
  }

  .hx-peach {
    min-height: 0;
    padding: 0 28px 28px;
    border-radius: 60px 80px 70px 48px;
  }

  .hx-illu {
    margin: 0 -28px;
  }
}

/* Планшет и мобильный: меню уходит в бургер, первый экран в одну колонку */
@media (max-width: 1100px) {
  .hx-burger {
    display: inline-flex;
  }

  .hx-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    background: #fff;
    border-bottom: 1px solid rgba(222, 155, 99, .14);
    box-shadow: 0 20px 30px rgba(178, 133, 97, .12);
  }

  .hx-header.is-open .hx-menu {
    display: flex;
  }

  .hx-menu a {
    padding: 14px 4px;
    font-size: 16px;
    border-bottom: 1px solid rgba(222, 155, 99, .10);
  }

  .hx-menu a::after {
    display: none;
  }

  .hx-menu .hx-menu-mobile {
    display: block;
  }

  .hx-menu .hx-menu-login {
    display: none;
  }
}

@media (max-width: 640px) {
  .hx-menu a.hx-menu-login {
    display: flex;
    height: 48px;
    margin-top: 16px;
    padding: 0 22px;
    border: 1.5px solid var(--hx-peach);
    color: var(--hx-peach);
    font-weight: 600;
    font-size: 15px;
  }
}

@media (max-width: 1024px) {
  .hx-hero-inner {
    display: block;
    max-width: 720px;
    padding: 32px 40px 48px;
  }

  .hx-right {
    display: none;
  }

  .hx-mobile-only {
    display: block;
  }

  .hx-plate.hx-mobile-only {
    display: flex;
  }

  .hx-h1 {
    font-size: 44px;
    line-height: 1.12;
  }

  .hx-perks {
    display: grid;
    gap: 12px;
  }

  .hx-plate {
    margin-top: 20px;
    padding: 14px 16px;
    gap: 12px;
    border-radius: 20px;
    box-shadow: var(--hx-shadow-cta);
  }

  .hx-plate-ico {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .hx-plate-ico img {
    width: 30px;
    height: 30px;
  }

  .hx-plate-title {
    font-size: 15px;
  }

  .hx-plate-sub {
    margin-top: 3px;
    font-size: 12.5px;
  }

  .hx-m-illu {
    margin-top: 26px;
    border-radius: 32px;
    overflow: hidden;
    background: var(--hx-grad);
  }

  .hx-m-illu img {
    width: 100%;
    height: auto;
    aspect-ratio: 1152 / 700;
    object-fit: cover;
    object-position: center 72%;
  }

  .hx-cards {
    margin-top: 16px;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .hx-header-inner {
    height: 56px;
    padding: 0 20px;
  }

  :root {
    --hx-header-h: 56px;
  }

  .hx-logo {
    font-size: 19px;
  }

  /* Как в макете Mobile 390: в шапке только логотип и бургер,
     «Войти» переезжает в выпадающее меню */
  .hx-header-right .hx-btn-ghost {
    display: none;
  }

  .hx-hero-inner {
    padding: 24px 20px 40px;
  }

  .hx-kicker {
    gap: 8px;
    padding: 6px 12px 6px 8px;
    font-size: 11.5px;
    letter-spacing: 0;
  }

  .hx-kicker-badge {
    flex-basis: 18px;
    width: 18px;
    height: 18px;
  }

  .hx-h1 {
    margin: 16px 0;
    font-size: 36px;
    line-height: 1.14;
  }

  .hx-p1 {
    font-size: 15.5px;
    line-height: 1.6;
  }

  .hx-note {
    padding: 14px 16px 14px 20px;
  }

  .hx-note p {
    font-size: 14.5px;
  }

  .hx-cta {
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
  }

  .hx-btn {
    width: 100%;
    height: 56px;
    font-size: 15.5px;
  }

  .hx-perks {
    margin-top: 22px;
  }

  .hx-cards {
    grid-template-columns: 1fr;
  }

  .hx-card {
    padding: 18px;
  }

  .hx-card h3 {
    font-size: 16px;
  }

  .hx-card p {
    font-size: 13px;
    line-height: 1.5;
  }
}

@media (max-width: 360px) {
  .hx-h1 {
    font-size: 32px;
  }
}
