/*
 * Хиро главной (resources/views/index.blade.php + js/home-hero.js).
 * Подключается только на главной, до main.css — поэтому селекторы начинаются с .public-site.
 *
 * Система кнопок: кнопки — Unbounded 600, обычный регистр; капс — только заголовки и мелкие
 * метки JetBrains Mono. Цвет по роли: розовая — одно главное действие экрана (поиск),
 * тёмная — обычные действия, белая — на тёмном фоне второстепенные.
 */
.public-site .home-hero {
  --hh-bg: #17111a;
  --hh-fg: #fff;
  --hh-muted: rgb(255 255 255 / 64%);
  --hh-line: rgb(255 255 255 / 12%);
  --hh-chip: rgb(255 255 255 / 7%);
  --hh-chip-hover: rgb(255 255 255 / 14%);
  --hh-mark-o: .14;
  position: relative; isolation: isolate; overflow-x: clip;
  padding-top: 24px; border-radius: 0 0 60px 60px;
  background: var(--hh-bg); color: var(--hh-fg);
}
.public-site .home-hero + main > .container:first-child { padding-top: 32px; }
.home-hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; pointer-events: none; }

/* ---------- шапка главной: стекло, без поиска ---------- */
.public-site .header--hero {
  --header-account-height: 48px;
  --header-account-bg: rgb(255 255 255 / 10%);
  --header-account-fg: #fff;
  --header-account-active-bg: rgb(255 255 255 / 16%);
  padding: 0;
}
.public-site .header--hero .header__inner {
  height: 68px; padding: 8px 10px 8px 20px; gap: 24px;
  background: rgb(255 255 255 / 7%); border: 1px solid rgb(255 255 255 / 14%); box-shadow: none;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #fff;
}
.public-site .header--hero .header__logo img { height: 40px; max-width: none; }
.public-site .header--hero .header__nav { display: flex; gap: 4px; margin-left: auto; }
.public-site .header--hero .header__nav a { padding: 10px 14px; border-radius: 99px; color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; transition: background .2s; }
.public-site .header--hero .header__nav a:hover { background: rgb(255 255 255 / 10%); }
.public-site .header--hero .header__account-visible.header__account-pill--login { height: var(--header-account-height); padding: 0 24px; background: #fff; color: var(--text-main, #0d0e12); }
.public-site .header--hero .header__account-pill--login:hover { background: #e9e9ee; }
.public-site .header--hero .header__account-pill-label { font: 600 14px/1.4 "Unbounded", sans-serif; text-transform: none; }
.public-site .header--hero .header__account-pill-arrow { display: none; }
.public-site .header--hero #burger {
  --line: rgb(255 255 255 / 82%);
  width: 46px; height: 46px; background: rgb(255 255 255 / 6%); border: 1px solid rgb(255 255 255 / 14%);
  transition: background .2s, border-color .2s, transform .2s;
}
.public-site .header--hero #burger:hover { background: rgb(255 255 255 / 12%); border-color: rgb(255 255 255 / 24%); }
.public-site .header--hero #burger[aria-expanded="true"] { --line: var(--text-main, #0d0e12); background: #fff; border-color: #fff; }
/* средняя полоска — фоном самого .burger__inner, крайние — :before / :after из main.css */
.public-site .header--hero .burger__inner {
  width: 18px; height: 12px;
  background: linear-gradient(var(--line), var(--line)) left center / 18px 1.6px no-repeat;
  transition: background-size .2s ease;
}
.public-site .header--hero .burger__inner:before,
.public-site .header--hero .burger__inner:after {
  width: 18px; height: 1.6px; background: var(--line);
  transition: transform .28s ease-in-out, width .25s ease, background-color .2s;
}
.public-site .header--hero .burger__inner:after { width: 10px; }
.public-site .header--hero #burger:hover .burger__inner:after { width: 18px; }
/* открыто: средняя исчезает, крайние сходятся в крестик */
.public-site .header--hero #burger[aria-expanded="true"] .burger__inner { background-size: 0 1.6px; }
.public-site .header--hero #burger[aria-expanded="true"] .burger__inner:after { width: 18px; }
.public-site .header--hero #burger[aria-expanded="true"] .burger__inner:before { transform: translateY(5.2px) rotate(45deg); }
.public-site .header--hero #burger[aria-expanded="true"] .burger__inner:after { transform: translateY(-5.2px) rotate(-45deg); }

/* ---------- раскладка ---------- */
/* .public-site — чтобы padding не перебил .container из main.css */
.public-site .home-hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center;
  padding-top: 72px; padding-bottom: 48px;
}
.public-site .home-hero__title {
  margin: 0; color: var(--hh-fg); font-family: "Unbounded", sans-serif; font-weight: 800;
  font-size: clamp(32px, 4.6vw, 62px); line-height: .98; letter-spacing: -.03em; text-transform: uppercase;
  overflow-wrap: normal;
}
.home-hero__line { display: block; }
.hh-rotator { display: block; height: 1.02em; overflow: hidden; color: var(--brand, #c96da9); }
.hh-rotator__list { transform: translateY(var(--phrase-offset, 0)); display: flex; flex-direction: column; transition: transform .6s cubic-bezier(.7, 0, .2, 1); }
.hh-rotator__list.is-resetting { transition: none; }
.hh-rotator__list > span { height: 1.02em; white-space: nowrap; }
.home-hero__lead { max-width: 540px; margin: 22px 0 0; font-size: 18px; line-height: 1.55; color: var(--hh-muted); }

/* ---------- поиск ---------- */
.hh-search { position: relative; z-index: 5; max-width: 620px; margin-top: 32px; }
.hh-search__box {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 22px; background: #fff;
  box-shadow: 0 0 0 6px rgb(201 109 169 / 22%), 0 24px 60px -20px rgb(0 0 0 / 45%);
}
.hh-search__icon { flex: none; width: 22px; height: 22px; margin-left: 12px; color: #98a2b3; }
.public-site .hh-search input {
  flex: 1; min-width: 0; height: 56px; padding: 0; border: 0; outline: 0; border-radius: 0; background: transparent;
  font: 600 18px/1 "Golos Text", sans-serif; color: var(--text-main, #0d0e12);
}
.hh-search input::placeholder { color: #98a2b3; }
.public-site .hh-search #search-reset { position: static; transform: none; flex: none; width: 32px; height: 32px; color: #98a2b3; }
.hh-search__btn {
  flex: none; height: 56px; padding: 0 28px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--brand, #c96da9); color: #fff;
  font: 600 15px/1 "Unbounded", sans-serif; letter-spacing: -.01em;
  transition: background .2s, transform .15s;
}
.hh-search__btn:hover { background: var(--brand-hover, #b55b95); }
/* main.css: .public-site :is(input, textarea, select, button) { font-family: inherit } — сильнее одиночного класса,
   поэтому шрифт кнопок задаём через .public-site; тот же шрифт и толщина, что у «Открыть» (.action-btn--offer) */
.public-site .hh-search__btn,
.public-site .hh-coupon__btn { font-family: var(--font-display, "Unbounded"), sans-serif; font-weight: 600; }
.hh-search__btn:active { transform: scale(.97); }
.public-site .hh-search #search-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px); width: auto; margin: 0; color: var(--text-main, #0d0e12);
}
.public-site .hh-search .search-list__inner { padding: 8px; border-radius: 20px; box-shadow: 0 24px 60px -12px rgb(0 0 0 / 35%); }
.public-site .hh-search .search-list__item > a { border-radius: 14px; }
.public-site .hh-search .search-list__item + .search-list__item > a { border-top: 0; }
.public-site .hh-search .search-list__item-name { color: var(--text-main, #0d0e12); font-weight: 600; }
.public-site .hh-search .search-list__empty { padding: 12px 14px; font-size: 14px; color: #667085; }
.public-site .hh-search .search-list__item-name strong { color: var(--brand-hover, #b55b95); }

/* ---------- чипсы категорий ---------- */
.hh-chips { display: flex; flex-wrap: wrap; gap: 8px; max-width: 640px; margin-top: 18px; }
.hh-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 6px;
  border: 1px solid var(--hh-line); border-radius: 99px; background: var(--hh-chip); color: var(--hh-fg);
  font-weight: 600; font-size: 14px; text-decoration: none; transition: background .3s, border-color .3s;
}
.hh-chip:hover { background: var(--hh-chip-hover); color: var(--hh-fg); }
.hh-chip.is-active { border-color: var(--brand, #c96da9); background: rgb(201 109 169 / 18%); }
.hh-chip img { width: 28px; height: 28px; padding: 4px; border-radius: 50%; background: #fff; object-fit: contain; }
.hh-chip small { font: 700 11px "JetBrains Mono", monospace; color: var(--hh-muted); }

.hh-promises { display: flex; gap: 32px; margin-top: 36px; }
.hh-promise strong { display: block; font: 800 30px/1 "Unbounded", sans-serif; letter-spacing: -.03em; }
.hh-promise span { display: block; margin-top: 6px; font-size: 13px; color: var(--hh-muted); }
.hh-promise + .hh-promise { padding-left: 32px; border-left: 1px solid var(--hh-line); }

/* ---------- колода купонов (десктоп) ---------- */
.hh-deck { position: relative; height: 460px; perspective: 1200px; }
.hh-deck__stage { position: relative; height: 100%; transform-style: preserve-3d; transition: transform .25s ease-out; }
.hh-coupon {
  --notch: 14px;
  position: absolute; left: 50%; top: 50%; width: min(420px, 100%); translate: -50% -50%;
  overflow: hidden; border-radius: 26px; background: #fff; color: var(--text-main, #0d0e12);
  -webkit-mask: radial-gradient(circle var(--notch) at 0 64%, #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% 64%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at 0 64%, #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% 64%, #0000 98%, #000) right / 51% 100% no-repeat;
  filter: drop-shadow(0 30px 40px rgb(0 0 0 / 28%));
  transition: transform .7s cubic-bezier(.6, 0, .2, 1), opacity .7s;
  will-change: transform;
}
.hh-coupon[data-pos="0"] { transform: translate3d(0, 0, 0) rotate(-2deg); z-index: 3; }
.hh-coupon[data-pos="1"] { transform: translate3d(34px, -26px, -80px) rotate(5deg); z-index: 2; opacity: .9; }
.hh-coupon[data-pos="2"] { transform: translate3d(64px, -50px, -160px) rotate(11deg); z-index: 1; opacity: .7; }
.hh-coupon[data-pos="hidden"] { transform: translate3d(64px, -50px, -200px) rotate(11deg); z-index: 0; opacity: 0; pointer-events: none; }
.hh-coupon[data-pos="out"] { transform: translate3d(-140%, 40px, 0) rotate(-24deg); z-index: 4; opacity: 0; pointer-events: none; }
.hh-coupon[data-pos="1"], .hh-coupon[data-pos="2"] { pointer-events: none; }
.hh-coupon__top { padding: 26px 24px 18px; }
.hh-coupon__shop { display: flex; align-items: center; gap: 12px; }
.hh-coupon__logo { flex: none; width: 44px; height: 44px; border-radius: 14px; object-fit: contain; background: #f4f5f8; }
.hh-coupon__logo--txt { display: grid; place-items: center; background: var(--text-main, #0d0e12); color: #fff; font-weight: 900; }
.hh-coupon__name { font-weight: 800; font-size: 16px; letter-spacing: -.02em; }
.hh-coupon__cat, .hh-coupon__type, .hh-coupon__meta { font: 700 11px "JetBrains Mono", monospace; text-transform: uppercase; }
.hh-coupon__cat { color: #667085; font-weight: 600; }
.hh-coupon__type { flex: none; display: inline-flex; align-items: center; height: 26px; margin-left: auto; padding: 0 10px; border-radius: 99px; font-size: 10px; background: #faf0f6; color: #b55b95; }
.hh-coupon__type--promotion { background: #eef8f2; color: #3e7a55; }
.hh-coupon__value { margin-top: 22px; font: 800 52px/1 "Unbounded", sans-serif; letter-spacing: -.05em; overflow-wrap: anywhere; }
.hh-coupon__value--long { font-size: 36px; }
.hh-coupon__desc { min-height: 22px; margin-top: 10px; font-size: 16px; line-height: 1.4; color: #3a3f4a; }
.hh-coupon__bottom { display: flex; align-items: center; gap: 8px; padding: 20px 24px 14px; border-top: 2px dashed #e7e8ec; }
.hh-coupon__code {
  flex: 1; min-width: 0; height: 50px; display: flex; align-items: center; padding: 0 14px; border-radius: 14px;
  background: #faf0f6; color: #b55b95; font: 700 17px "JetBrains Mono", monospace; letter-spacing: .12em;
}
.hh-coupon__btn {
  height: 50px; padding: 0 18px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--text-main, #0d0e12); color: #fff; font: 600 13px/1 "Unbounded", sans-serif; letter-spacing: -.01em;
  transition: background .2s, transform .15s;
}
.hh-coupon__btn:hover { background: var(--brand, #c96da9); }
.hh-coupon__btn:active { transform: scale(.97); }
.hh-coupon__btn--wide { flex: 1; }
.hh-coupon__meta { display: flex; justify-content: space-between; gap: 12px; padding: 0 24px 20px; color: #98a2b3; font-weight: 600; }
.hh-coupon__meta b { color: var(--text-main, #0d0e12); }
.hh-deck__nav { position: absolute; left: 50%; bottom: 0; display: flex; gap: 6px; translate: -50% 0; }
.hh-deck__dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--hh-line); cursor: pointer; transition: width .3s, background .3s; }
.hh-deck__dot.is-active { width: 28px; background: var(--brand, #c96da9); }

/* ---------- лента «Чаще всего берут» ---------- */
.hh-ticker { display: flex; align-items: center; gap: 16px; padding: 18px 0 40px; border-top: 1px solid var(--hh-line); }
.hh-ticker__label { flex: none; font: 700 11px "JetBrains Mono", monospace; text-transform: uppercase; color: var(--hh-muted); }
.hh-ticker__viewport { position: relative; flex: 1; overflow: hidden; padding-block: 4px; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.hh-ticker__viewport.is-drag { cursor: grabbing; }
.hh-ticker__viewport::before, .hh-ticker__viewport::after { content: ""; position: absolute; top: 0; bottom: 0; z-index: 1; width: 40px; pointer-events: none; }
.hh-ticker__viewport::before { left: 0; background: linear-gradient(90deg, var(--hh-bg), transparent); }
.hh-ticker__viewport::after { right: 0; background: linear-gradient(-90deg, var(--hh-bg), transparent); }
.hh-ticker__track { display: flex; gap: 10px; width: max-content; will-change: transform; }
.hh-ticker__item {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 5px;
  border: 1px solid var(--hh-line); border-radius: 99px; background: var(--hh-chip); color: var(--hh-muted);
  font: 500 13px "Golos Text", sans-serif; white-space: nowrap; cursor: pointer;
}
.hh-ticker__item:hover { border-color: var(--brand, #c96da9); }
.hh-ticker__item img, .hh-ticker__mono { width: 26px; height: 26px; border-radius: 50%; background: #fff; object-fit: contain; -webkit-user-drag: none; }
.hh-ticker__mono { display: grid; place-items: center; color: var(--text-main, #0d0e12); font-weight: 900; font-size: 11px; }
.hh-ticker__offer b, .hh-ticker__offer em { color: var(--hh-fg); font-style: normal; font-weight: 700; }

/* ---------- летающие знаки ---------- */
.hh-marks { position: absolute; inset: 0; }
.hh-mark { position: absolute; left: 0; top: 0; opacity: calc(var(--hh-mark-o) * var(--k, 1)); will-change: transform; transition: opacity .5s; }
.hh-mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hh-mark .eye { transform-box: fill-box; transform-origin: center; }
.hh-mark .pupil { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.hh-mark.is-wink, .hh-mark.is-spin { opacity: calc(var(--hh-mark-o) * 2.6); }
.hh-mark.is-wink .eye { animation: hh-blink 1.2s ease-in-out; }
.hh-mark.is-spin svg { animation: hh-turn 1.3s cubic-bezier(.6, 0, .2, 1); }
@keyframes hh-blink { 0%, 100% { transform: scaleY(1); } 18%, 28% { transform: scaleY(.06); } 44% { transform: scaleY(1); } 58%, 66% { transform: scaleY(.06); } 80% { transform: scaleY(1); } }
@keyframes hh-turn { to { transform: rotate(360deg); } }

/* ---------- адаптив ---------- */
@media (max-width: 1024px) {
  .public-site .header--hero .header__nav { display: none; }
  .public-site .home-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 48px; }
  .hh-deck { height: 420px; }
}
@media (max-width: 767px) {
  .public-site .home-hero { padding-top: 12px; border-radius: 0 0 36px 36px; }
  .public-site .header--hero .header__inner { height: 64px; gap: 8px; padding: 8px 8px 8px 16px; }
  /* на главной — полный светлый логотип и на телефоне */
  .public-site .header--hero .header__logo--desktop { display: block; min-width: 0; flex: 0 1 auto; margin-right: auto; }
  .public-site .header--hero .header__logo--mobile { display: none; }
  .public-site .header--hero .header__logo img { width: auto; height: 38px; max-width: 100%; object-fit: contain; object-position: left center; }
  /* «Войти» на главной видно и на телефоне (на других страницах вход — в бургер-меню);
     кабинет залогиненного пользователя по-прежнему в меню, чтобы шапка не переполнялась */
  .public-site .header--hero .header__account:has(.header__account-visible.header__account-pill--login) { display: block; }
  .public-site .header--hero { --header-account-height: 46px; }
  .public-site .header--hero .header__account-visible.header__account-pill--login { padding: 0 18px; }
  .public-site .home-hero__grid { padding-top: 36px; padding-bottom: 24px; }
  .public-site .home-hero__title { font-size: clamp(25px, 8vw, 29px); }
  .hh-rotator__list > span { transform: scaleX(var(--phrase-scale, 1)); transform-origin: left; }
  .home-hero__lead { font-size: 16px; }
  .hh-search__box { flex-wrap: wrap; border-radius: 18px; }
  .public-site .hh-search input { height: 48px; font-size: 16px; }
  .hh-search__btn { width: 100%; height: 50px; }
  .hh-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -10px; padding: 0 10px; scrollbar-width: none; }
  .hh-chips::-webkit-scrollbar { display: none; }
  .hh-chip { flex: none; }
  .hh-promises { gap: 16px; }
  .hh-promise + .hh-promise { padding-left: 16px; }
  .hh-promise strong { font-size: 22px; }
  .hh-promise span { font-size: 12px; }
  /* на телефоне колоды нет — офферы показывает лента */
  .hh-deck { display: none; }
  .hh-ticker { padding-bottom: 32px; }
  .hh-ticker__label { display: none; }
  .hh-ticker__item { height: 44px; padding: 0 16px 0 6px; font-size: 14px; }
  .hh-ticker__offer b, .hh-ticker__offer em { font-size: 15px; }
  .hh-ticker__item img, .hh-ticker__mono { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero *, .home-hero *::before, .home-hero *::after { animation: none !important; transition: none !important; }
}
