/* Samal Cakes — сайт v1. Токены направления «Глазурь»: SamalCakes/Design/Glaze.swift. */

@font-face {
  font-family: "Onest";
  src: url("/fonts/Onest-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/InterTight-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f4efea;
  --card: #fff;
  --card2: #ece5df;
  --stage: #0e0a09;
  --ink: #1e1614;
  --ink2: #6b5f5a;
  --ink3: #7f736d; /* темнее, чем в приложении (#9C908A): AA на сливочном фоне */
  --line: rgba(30, 22, 20, .07);
  --line2: rgba(30, 22, 20, .12);
  --cherry: #c81e2d;
  --cherry-deep: #8f0e1b;
  --cherry-soft: #f8e3e4;
  --on-cherry: #fff8f4;
  --gold-light: #f7de9a;
  --gold: #d9a84a;
  --glaze: linear-gradient(135deg, #d8323f, #c81e2d 50%, #a51424);
  --gutter: 16px;
  --wrap: 1160px;
  --r: 22px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --num: "Inter Tight", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.55 var(--font);
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--cherry); text-underline-offset: 3px; }
a:hover { color: var(--cherry-deep); }
:focus-visible { outline: 3px solid var(--cherry); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-weight: 650; letter-spacing: -.02em; line-height: 1.12; margin: 0; }
p { margin: 0; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 12px; z-index: 50; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ---------- Шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244, 239, 234, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: block; flex: none; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--cherry); }
.nav .hide-sm { display: none; }
@media (min-width: 760px) { .nav .hide-sm { display: inline; } }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 24px; border-radius: 999px; border: 0;
  background: var(--cherry); color: var(--on-cherry);
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--cherry-deep); color: var(--on-cherry); }
.btn:active { transform: scale(.97); }
.btn--light { background: var(--on-cherry); color: var(--cherry-deep); }
.btn--light:hover { background: #fff; color: var(--cherry); }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px;
  border-radius: 999px; background: var(--card); color: var(--ink);
  font-size: 13px; font-weight: 600; box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cherry); }

/* ---------- Бейджи магазинов ---------- */
.stores-badges { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-start; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; }
.badge img { height: 48px; width: auto; }
.badge__soon { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: inherit; opacity: .8; }
.badge.is-soon img { opacity: .42; filter: grayscale(1); }
.badge.is-soon { cursor: default; }
a.badge:hover img { transform: translateY(-1px); }

/* ---------- Первый экран ---------- */
.hero { position: relative; background: var(--stage); color: var(--on-cherry); overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media video, .hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14, 10, 9, .55) 0%, rgba(14, 10, 9, 0) 26%, rgba(14, 10, 9, .15) 46%, rgba(14, 10, 9, .92) 78%, var(--stage) 100%);
}
.hero__inner { position: relative; min-height: min(92svh, 860px); display: flex; flex-direction: column; justify-content: flex-end; padding-top: 120px; padding-bottom: 32px; }
.hero__logo { width: 220px; height: auto; margin-bottom: 18px; }
.hero h1 { font-size: clamp(32px, 8.4vw, 60px); max-width: 15ch; }
.hero__lead { margin-top: 14px; font-size: 17px; color: rgba(255, 248, 244, .82); max-width: 36ch; }
.hero .stores-badges { margin-top: 26px; }
.hero__tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.hero__tab {
  height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 248, 244, .22); background: rgba(255, 248, 244, .08); color: var(--on-cherry);
  font: 600 13px/1 var(--font);
}
.hero__tab[aria-pressed="true"] { background: var(--on-cherry); color: var(--ink); border-color: transparent; }
.hero__tab:hover { border-color: rgba(255, 248, 244, .6); }

@media (min-width: 960px) {
  .hero__inner { min-height: 0; display: grid; grid-template-columns: 1fr 380px; gap: 64px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
  .hero__media { position: relative; inset: auto; grid-column: 2; grid-row: 1; aspect-ratio: 9 / 16; border-radius: 32px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
  .hero__media::after { background: linear-gradient(180deg, rgba(14, 10, 9, 0) 70%, rgba(14, 10, 9, .35)); }
  .hero__text { grid-column: 1; grid-row: 1; }
  .hero__logo { width: 300px; margin-bottom: 28px; }
  .hero__lead { font-size: 19px; }
}

/* ---------- Секции ---------- */
.section { padding: 64px 0; }
.section__head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; max-width: 640px; }
.section__head h2 { font-size: clamp(28px, 5.6vw, 42px); }
.section__head p { color: var(--ink2); font-size: 17px; }
.kicker { font-size: 13px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--cherry); }

/* Карточки приложения */
.features { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .features { grid-template-columns: repeat(5, 1fr); } }
.feature { background: var(--card); border-radius: var(--r); padding: 22px 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.feature__icon { width: 48px; height: 48px; border-radius: 16px; background: var(--cherry-soft); color: var(--cherry); display: grid; place-items: center; margin-bottom: 6px; }
.feature__icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 19px; }
.feature p { color: var(--ink2); font-size: 15px; }
.feature--main { background: var(--glaze); color: var(--on-cherry); }
.feature--main p { color: rgba(255, 248, 244, .86); }
.feature--main .feature__icon { background: rgba(255, 248, 244, .16); color: var(--on-cherry); }
@media (min-width: 640px) and (max-width: 1039px) { .feature--main { grid-column: span 2; } }
.download { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; background: var(--card); border-radius: var(--r); padding: 22px 20px; }
.download p { font-weight: 600; font-size: 17px; flex: 1 1 260px; }

/* Акция */
.promo { background: var(--glaze); color: var(--on-cherry); border-radius: 32px; padding: 32px 22px; display: grid; gap: 28px; overflow: hidden; position: relative; }
.promo .kicker { color: var(--gold-light); }
.promo h2 { font-size: clamp(30px, 6vw, 46px); margin-top: 10px; }
.promo__lead { margin-top: 12px; font-size: 18px; color: rgba(255, 248, 244, .9); max-width: 34ch; }
.promo__facts { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.promo__facts li { display: flex; gap: 12px; align-items: baseline; font-size: 16px; }
.promo__facts li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-light); transform: translateY(-2px); }
.promo .btn { margin-top: 26px; }
.ticket {
  align-self: center; justify-self: center; width: min(100%, 340px); aspect-ratio: 1.75;
  background: var(--on-cherry); color: var(--ink); border-radius: 18px; position: relative;
  display: grid; grid-template-columns: 1fr 1px auto; align-items: stretch; transform: rotate(-4deg);
  box-shadow: 0 24px 50px rgba(60, 0, 8, .35);
  -webkit-mask: radial-gradient(circle 12px at calc(100% - 92px) 0, transparent 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 12px at calc(100% - 92px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 12px at calc(100% - 92px) 0, transparent 98%, #000) top / 100% 51% no-repeat,
        radial-gradient(circle 12px at calc(100% - 92px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}
.ticket__main { padding: 20px 18px; display: flex; flex-direction: column; justify-content: space-between; }
.ticket__brand { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 13px; color: var(--cherry); text-transform: uppercase; letter-spacing: .06em; }
.ticket__brand img { width: 22px; height: 22px; }
.ticket__no { font-family: var(--num); font-weight: 700; font-size: 38px; letter-spacing: -.02em; line-height: 1; }
.ticket__label { font-size: 13px; color: var(--ink2); }
.ticket__cut { border-left: 2px dashed var(--line2); margin: 14px 0; }
.ticket__side { width: 90px; display: grid; place-items: center; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink2); padding: 8px; }
.ticket__side b { display: block; font-family: var(--num); font-size: 22px; color: var(--cherry); }
.prizes { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.prizes li { background: rgba(255, 248, 244, .14); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 14px; }
@media (min-width: 900px) {
  .promo { grid-template-columns: 1.3fr 1fr; padding: 56px; align-items: center; }
  .ticket { width: 360px; }
}

/* Игра */
.game { background: var(--stage); color: var(--on-cherry); border-radius: 32px; overflow: hidden; display: grid; }
.game__art { aspect-ratio: 4 / 3; overflow: hidden; }
.game__art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.game__body { padding: 28px 22px 32px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.game .kicker { color: var(--gold-light); }
.game h2 { font-size: clamp(30px, 6vw, 46px); }
.game p { color: rgba(255, 248, 244, .8); font-size: 17px; max-width: 38ch; }
.game .btn { margin-top: 10px; }
@media (min-width: 900px) {
  .game { grid-template-columns: 1fr 1fr; }
  .game__art { aspect-ratio: auto; min-height: 460px; order: 2; }
  .game__body { padding: 56px; justify-content: center; }
}

/* Кондитерские */
.finder { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; align-items: center; }
.search { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; background: var(--card); border-radius: 16px; }
.search svg { width: 18px; height: 18px; color: var(--ink3); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 16px var(--font); color: var(--ink); }
.search:focus-within { box-shadow: 0 0 0 2px var(--cherry); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--card); color: var(--ink); font: 600 14px/1 var(--font);
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-cherry); }
.store-count { color: var(--ink2); font-size: 14px; margin-bottom: 12px; }
.store-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .store-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .store-list { grid-template-columns: repeat(3, 1fr); } }
.store { background: var(--card); border-radius: 18px; padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 4px; }
.store__name { font-weight: 650; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.store__addr { color: var(--ink2); font-size: 15px; }
.store__hours { font-size: 14px; color: var(--ink2); display: flex; align-items: center; gap: 6px; }
.store__hours .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink3); }
.store__hours.is-open .dot { background: #1f8a4c; }
.store__hours.is-open { color: #17663a; }
.store__actions { display: flex; gap: 16px; margin-top: 8px; font-size: 15px; font-weight: 600; flex-wrap: wrap; }
.store__actions a { text-decoration: none; }
.store__actions a:hover { text-decoration: underline; }
.store-empty, .store-fallback { background: var(--card); border-radius: 18px; padding: 22px 20px; color: var(--ink2); }
.store-fallback strong { color: var(--ink); }
.more { margin-top: 16px; display: flex; justify-content: center; }
.btn--ghost { background: var(--card); color: var(--ink); }
.btn--ghost:hover { background: var(--card2); color: var(--ink); }

/* ---------- Подвал ---------- */
.foot { background: var(--card2); padding: 48px 0 36px; margin-top: 32px; font-size: 15px; }
.foot__grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot__grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.foot__logo { width: 180px; height: auto; margin-bottom: 14px; }
.foot h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink2); margin-bottom: 12px; font-weight: 650; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { color: var(--cherry); text-decoration: underline; }
.foot__legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line2); color: var(--ink2); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot .muted { color: var(--ink2); }

/* ---------- Правовые страницы ---------- */
.doc { padding: 40px 0 24px; }
.doc .wrap { max-width: calc(760px + 2 * var(--gutter)); }
.doc__head { margin-bottom: 28px; }
.doc__head h1 { font-size: clamp(32px, 7vw, 48px); margin-top: 10px; }
.doc__meta { color: var(--ink2); margin-top: 12px; font-size: 15px; }
.doc__body { background: var(--card); border-radius: 28px; padding: 28px 20px; }
@media (min-width: 700px) { .doc__body { padding: 44px 48px; } }
.doc__body h2 { font-size: 23px; margin: 34px 0 12px; }
.doc__body h2:first-child { margin-top: 0; }
.doc__body h3 { font-size: 18px; margin: 22px 0 8px; }
.doc__body p, .doc__body li { color: #3a2f2c; }
.doc__body p + p { margin-top: 10px; }
.doc__body ul, .doc__body ol { padding-left: 22px; margin: 10px 0; display: grid; gap: 6px; }
.doc__body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.doc__body th, .doc__body td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line2); }
.doc__body th { font-weight: 650; color: var(--ink); }
.table-scroll { overflow-x: auto; }
.note { background: var(--cherry-soft); border-radius: 16px; padding: 14px 16px; margin: 16px 0; color: var(--ink); }
.todo { background: #fff2bf; color: #5a4300; border-radius: 6px; padding: 0 4px; font-weight: 600; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: baseline; }
.steps li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--cherry); color: var(--on-cherry); display: grid; place-items: center; font: 650 14px/1 var(--num); transform: translateY(6px); }
.faq details { border-bottom: 1px solid var(--line2); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 17px; padding: 14px 28px 14px 0; list-style: none; position: relative; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 24px; font-weight: 400; color: var(--cherry); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 16px; display: grid; gap: 8px; }
.contacts { list-style: none; padding: 0 !important; display: grid; gap: 10px !important; grid-template-columns: 1fr; }
@media (min-width: 600px) { .contacts { grid-template-columns: 1fr 1fr; } }
.contacts li { background: var(--bg); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.contacts span { font-size: 13px; color: var(--ink2); }
.contacts a { font-weight: 650; text-decoration: none; }

/* 404 */
.lost { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.lost img { width: 96px; height: 96px; margin: 0 auto 18px; }
.lost h1 { font-size: clamp(30px, 7vw, 44px); }
.lost p { color: var(--ink2); margin: 12px auto 24px; max-width: 34ch; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Поправки после просмотра скриншотов */
.hero__text { position: relative; z-index: 1; }
@media (max-width: 479px) {
  .nav a[href="/support"] { display: none; }
  .badge img { height: 44px; }
}
.ticket__side { width: 96px; }
.ticket__side b { font-size: 18px; white-space: nowrap; margin: 2px 0; }
@media (max-width: 959px) {
  .hero__media::after {
    background: linear-gradient(180deg, rgba(14, 10, 9, .5) 0%, rgba(14, 10, 9, 0) 16%, rgba(14, 10, 9, .35) 30%, rgba(14, 10, 9, .86) 46%, rgba(14, 10, 9, .97) 62%, var(--stage) 100%);
  }
  .hero__media video, .hero__media img { object-position: 50% 20%; }
  .hero__logo { width: 190px; }
}
