/* Курилка Cherry: розово-гламурная игра 2000-х. Сцена и пачка нарисованы, сигареты и дым рисуются кодом. Секции размечены data-section-type. */

:root {
  --plum: #43102e;
  --hot: #ff4fa3;
  --pink: #ff9bd1;
  --blush: #ffd9ee;
  --cream: #fff4fa;
  --leo: #ffb0d8;
  --pixel: "Vaibik Handjet", "TikTok Sans", system-ui, sans-serif;
  --body: "TikTok Sans", system-ui, sans-serif;
  --leo-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Crect width='56' height='56' fill='%23ffb0d8'/%3E%3Cg fill='%233b0a2c'%3E%3Cpath d='M9 13c4-6 12-6 15-1 3 5-1 11-7 12-6 1-11-2-8-11z'/%3E%3Cpath d='M35 31c5-4 13-1 13 5s-7 10-12 7c-5-3-7-8-1-12z'/%3E%3Cpath d='M31 5c3-2 8 0 7 4-1 3-6 3-8 1-1-2-2-4 1-5z'/%3E%3Cpath d='M3 41c3-3 9-2 9 2 0 4-6 6-9 3-2-2-2-4 0-5z'/%3E%3C/g%3E%3Cg fill='%23ff4fa8'%3E%3Ccircle cx='17' cy='21' r='2'/%3E%3Ccircle cx='44' cy='40' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

body { margin: 0; background: var(--plum); color: var(--plum); font-family: var(--body); font-size: 18px; line-height: 1.45; font-weight: 500; }
main { position: relative; z-index: 2; background-color: #ffd3ea; background-image: linear-gradient(118deg, #ffd3ea 0%, #ff9fd4 22%, #fff0f8 42%, #ff7fc2 62%, #ffc4e4 80%, #ffe3f3 100%); background-size: 320% 320%; animation: sm-shimmer 16s ease-in-out infinite; overflow: hidden; }
main::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background-image: radial-gradient(circle, #fff 1.2px, transparent 1.8px); background-size: 26px 26px; opacity: .38; animation: sm-glitter 5s steps(4) infinite; }
h1, h2, h3 { font-family: var(--pixel); font-weight: 600; font-stretch: 100%; font-variation-settings: "ELGR" 1, "ELSH" 2; letter-spacing: -.01em; }
p { font-family: var(--body); }
[hidden] { display: none !important; }

@keyframes sm-shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes sm-glitter { 0% { background-position: 0 0; } 50% { background-position: 13px 9px; } 100% { background-position: 0 0; } }
@keyframes sm-glitter-text { from { background-position: 0% 0%; } to { background-position: 200% 0%; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: linear-gradient(#ffa6d6 0%, #ff58a8 46%, #dc1f7b 51%, #ff7ab8 100%); color: #fff; font: 700 13px/1 var(--body); letter-spacing: .05em; text-transform: uppercase; border: 2px solid var(--plum); border-radius: 12px; padding: 15px 22px; text-shadow: 0 1px 0 rgba(67, 16, 46, .55); text-decoration: none; cursor: pointer; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .85), inset 0 -3px 0 rgba(107, 15, 69, .35), 0 4px 0 var(--plum); transition: transform .15s ease, box-shadow .15s ease, opacity .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 1px 0 var(--plum); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 0 2px 0 var(--plum); }
.btn--line { background: linear-gradient(#fffaff, #ffd9ee); color: var(--plum); text-shadow: none; }
.sm-age { display: inline-grid; place-items: center; min-width: 46px; height: 32px; padding: 0 10px; background: #fff; color: var(--plum); font: 600 17px/1 var(--pixel); box-shadow: 0 0 0 3px var(--plum), 3px 3px 0 3px var(--plum); }

/* Первый экран */
.sm-hero { position: relative; z-index: 1; display: flex; align-items: center; min-height: 100svh; padding: 120px var(--gutter) 72px; }
.sm-hero__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 4vw, 64px); align-items: center; width: 100%; max-width: 1320px; margin: 0 auto; }
.sm-hero__copy { display: grid; justify-items: start; gap: 26px; }
.sm-hero__kicker { display: flex; align-items: center; gap: 14px; font-size: 16px; font-weight: 600; }
.sm-hero__title { font-size: clamp(64px, 8.4vw, 132px); line-height: .95; letter-spacing: -.02em; color: #fff; text-shadow: 0 4px 0 var(--plum), 0 8px 0 var(--plum), 0 12px 0 var(--plum); }
.sm-hero__lead { max-width: 30ch; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.4; font-weight: 500; }
.sm-hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* Сцена курилки: нарисованная комната, пачка, сигарета, пепельница, дым */
.sm-stage { position: relative; display: grid; gap: 14px; padding: clamp(14px, 2vw, 22px); background: #fff; border: 4px solid var(--plum); box-shadow: 10px 10px 0 var(--plum), inset 0 0 0 6px #ffe7f4; }
.sm-scene { position: relative; height: clamp(380px, 42vw, 460px); overflow: hidden; border: 3px solid var(--plum); background-color: #ffd0e8; }
.sm-scene__bg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; pointer-events: none; user-select: none; }

.sm-pack { position: absolute; left: 4%; bottom: 4%; z-index: 3; width: 200px; height: 335px; }
.sm-pack__picks { position: absolute; top: 0; left: 22px; right: 22px; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; height: 100px; }
.sm-pick { position: relative; width: 24px; height: 100px; padding: 0; border: 2px solid var(--plum); border-radius: 6px 6px 4px 4px; background: var(--paper-bg); box-shadow: 2px 3px 0 rgba(67, 16, 46, .3); visibility: hidden; cursor: pointer; transform: translateY(70px); transition: transform .7s cubic-bezier(.2, .8, .2, 1), visibility .7s; }
.sm-pick::before { content: ""; position: absolute; left: -2px; right: -2px; top: -2px; height: 30%; background: var(--filter-bg); border: 2px solid var(--plum); border-radius: 6px 6px 3px 3px; }
.sm-pick::after { content: attr(data-name); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); padding: 6px 8px; background: #fff; border: 2px solid var(--plum); box-shadow: 3px 3px 0 var(--plum); font: 600 15px/1 var(--pixel); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.sm-pack[data-open="true"] .sm-pick { visibility: visible; transform: translateY(-20px); }
.sm-pack[data-open="true"] .sm-pick:nth-child(2) { transition-delay: .08s; }
.sm-pack[data-open="true"] .sm-pick:nth-child(3) { transition-delay: .16s; }
.sm-pack[data-open="true"] .sm-pick:nth-child(4) { transition-delay: .24s; }
.sm-pack[data-open="true"] .sm-pick:hover, .sm-pack[data-open="true"] .sm-pick:focus-visible { transform: translateY(-32px); }
.sm-pack[data-open="true"] .sm-pick:hover::after, .sm-pack[data-open="true"] .sm-pick:focus-visible::after { opacity: 1; }
.sm-pick.is-taken { visibility: hidden !important; }
.sm-pick:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.sm-pack__body { position: absolute; top: 35px; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0; padding: 0; border: 0; background: none; color: var(--plum); font: inherit; cursor: pointer; transition: transform .25s ease; }
.sm-pack__body:hover { transform: translate(-2px, -2px); }
.sm-pack__body:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.sm-pack__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(6px 7px 0 rgba(67, 16, 46, .9)); user-select: none; pointer-events: none; }
.sm-pack__label { position: absolute; left: 0; right: 0; top: 12%; height: 17%; display: grid; place-items: center; font-family: var(--pixel); font-size: 22px; font-weight: 600; line-height: 1; text-align: center; color: transparent; background: linear-gradient(100deg, #fff 0%, #ffd7ec 18%, #fff 33%, #ffb0d8 50%, #fff 66%, #ffd7ec 82%, #fff 100%) 0 0 / 260% 100%; -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 2px 0 var(--plum)) drop-shadow(0 0 1px var(--plum)); animation: sm-glitter-text 3.2s linear infinite; pointer-events: none; }
.sm-pack__age { position: absolute; left: 50%; top: 74%; transform: translateX(-50%); padding: 4px 6px; background: var(--plum); color: #fff; font: 600 13px/1 var(--pixel); pointer-events: none; }

/* Стол: сигарета и пепельница лежат на стекле, справа от пачки */
.sm-table { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.sm-cig { position: absolute; left: 46%; right: auto; width: 40%; top: 70%; z-index: 2; height: 30px; margin-top: -15px; rotate: -3deg; --burn: 0; filter: drop-shadow(0 6px 0 rgba(67, 16, 46, .25)); }
.sm-cig.is-on { animation: sm-cig-in .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes sm-cig-in { from { transform: translate(-70px, -30px) rotate(-16deg); opacity: 0; } to { transform: none; opacity: 1; } }
.sm-cig__ash { position: absolute; top: 0; bottom: 0; left: 0; width: calc(var(--burn) * 72%); border-radius: 4px 0 0 4px; background: linear-gradient(#fbf7f9, #c4bcc1 60%, #9b9298); }
.sm-cig__paper { position: absolute; top: 0; bottom: 0; left: calc(var(--burn) * 72%); width: calc((1 - var(--burn)) * 72%); background: repeating-linear-gradient(90deg, rgb(255 255 255 / .42) 0 1px, transparent 1px 5px), var(--paper-bg); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), inset 0 -2px 0 rgba(67, 16, 46, .28); }
.sm-cig__paper::after { content: ""; position: absolute; left: 0; right: 0; top: 40%; height: 1px; background: rgb(67 16 46 / .18); }
.sm-cig__filter { position: absolute; top: 0; bottom: 0; right: 0; width: 28%; border-radius: 0 10px 10px 0; background: radial-gradient(circle, rgb(67 16 46 / .38) 1px, transparent 1.6px) 0 0 / 5px 5px, var(--filter-bg); box-shadow: inset -3px 0 0 rgba(67, 16, 46, .25), inset 0 0 0 2px var(--plum); }
.sm-cig__ember { position: absolute; top: 50%; left: calc(var(--burn) * 72%); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: radial-gradient(circle, #fff 0 18%, #ffd45c 30%, #ff3d8f 58%, rgba(255, 61, 143, 0) 72%); box-shadow: 0 0 10px 3px rgba(255, 79, 163, .7); opacity: 0; }
.sm-stage.is-lit .sm-cig__ember { opacity: 1; animation: sm-ember .5s ease-in-out infinite alternate; }
@keyframes sm-ember { from { transform: scale(.82); } to { transform: scale(1.18); } }
.sm-cig__flame { position: absolute; top: -30px; left: calc(var(--burn) * 72% - 8px); width: 18px; height: 40px; border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%; background: radial-gradient(ellipse at 50% 80%, #fff 0 18%, #ffd45c 36%, #ff4fa3 70%, rgba(255, 79, 163, 0) 100%); opacity: 0; transform-origin: 50% 100%; }
.sm-stage.is-lighting .sm-cig__flame { opacity: 1; animation: sm-flame .16s ease-in-out infinite alternate; }
@keyframes sm-flame { from { transform: scale(.9, .94) skewX(-3deg); } to { transform: scale(1.06, 1.08) skewX(3deg); } }
.sm-cig[data-style="pearl"] .sm-cig__paper { background-size: 200% 100%; animation: sm-pearl 6s linear infinite; }
@keyframes sm-pearl { from { background-position: 0% 0; } to { background-position: 200% 0; } }

.sm-cig[data-style="pink"], .sm-pick[data-style="pink"] { --paper-bg: linear-gradient(90deg, #fff0f8 0%, #ffb0d8 45%, #ff7ab8 100%); --filter-bg: repeating-linear-gradient(90deg, #ffffff 0 6px, #ffd0ea 6px 12px); }
.sm-cig[data-style="leopard"], .sm-pick[data-style="leopard"] { --paper-bg: var(--leo-url) 0 0 / 40px 40px, #ffb0d8; --filter-bg: linear-gradient(90deg, #43102e, #7a1d52 50%, #43102e); }
.sm-cig[data-style="chrome"], .sm-pick[data-style="chrome"] { --paper-bg: linear-gradient(180deg, #ffffff 0%, #c2c9d8 24%, #f6f8ff 44%, #7c8496 66%, #e9edf7 84%, #9aa2b4 100%); --filter-bg: linear-gradient(180deg, #ffffff, #98a0b4 50%, #e6eaf4); }
.sm-cig[data-style="pearl"], .sm-pick[data-style="pearl"] { --paper-bg: linear-gradient(90deg, #fffafd 0%, #ffe1f2 30%, #e7d4ff 58%, #d9f3ff 78%, #fff6fb 100%); --filter-bg: linear-gradient(90deg, #ffffff, #f7d6ec 50%, #ffffff); }

.sm-lighter { position: absolute; left: 38%; top: 56%; z-index: 3; width: 22px; height: 84px; border: 2px solid var(--plum); border-radius: 8px 8px 10px 10px; background: linear-gradient(90deg, #fff, #cfd6e4 40%, #7d8498 70%, #fff); opacity: 0; pointer-events: none; }
.sm-stage.is-lighting .sm-lighter { animation: sm-lighter 1.2s ease both; }
@keyframes sm-lighter { 0% { opacity: 0; transform: translate(-30px, -150px) rotate(30deg); } 35% { opacity: 1; transform: translate(0, -40px) rotate(4deg); } 60% { opacity: 1; transform: translate(0, -40px) rotate(-6deg); } 100% { opacity: 0; transform: translate(0, -70px) rotate(10deg); } }

.sm-ashtray { position: absolute; left: 62%; width: 30%; top: 78%; z-index: 1; height: 50px; border: 3px solid var(--plum); border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, #ffffff 0, #f3e6f0 22%, #c9d0de 52%, #7d8598 78%, #e9edf7 100%); box-shadow: inset 0 -8px 0 rgba(67, 16, 46, .2), inset 0 0 0 6px rgba(255, 255, 255, .45), 0 6px 0 var(--plum); }
.sm-smoke { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; pointer-events: none; }

.sm-status { min-height: 1.3em; font-size: 17px; font-weight: 600; line-height: 1.3; }
.sm-controls { display: flex; flex-wrap: wrap; gap: 12px; }
.sm-sound[aria-pressed="false"] { background: var(--blush); }

/* Музыка */
.sm-music { position: relative; z-index: 1; padding: clamp(72px, 12svh, 140px) var(--gutter); background: var(--plum); color: #fff; }
.sm-music__inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 64px); align-items: center; max-width: 1200px; margin: 0 auto; }
.sm-music__copy { display: grid; justify-items: start; gap: 24px; }
.sm-music__title { font-size: clamp(34px, 5vw, 64px); line-height: 1; color: var(--pink); }
.sm-music__player { display: grid; place-items: center; min-height: 200px; padding: 22px; background: var(--leo-url) 0 0 / 56px 56px, var(--leo); border: 4px solid #fff; box-shadow: 10px 10px 0 var(--hot); }
.sm-music__player iframe { display: block; width: 100%; height: 200px; border: 0; }

/* Подвал */
.sm-footer { position: relative; display: grid; gap: 56px; padding: clamp(56px, 8svh, 96px) var(--gutter) clamp(48px, 7svh, 80px); background: var(--plum); color: #fff; }
.sm-footer__top { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; max-width: 1240px; width: 100%; margin: 0 auto; }
.sm-footer__actions { display: flex; flex-wrap: wrap; gap: 14px; max-width: 1240px; width: 100%; margin: 0 auto; }
.sm-footer__title { font-family: var(--pixel); font-size: clamp(48px, 6vw, 92px); font-weight: 600; line-height: .92; color: var(--pink); max-width: 12ch; }
.sm-footer__info { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; align-content: start; font-size: 16px; line-height: 1.5; }
.sm-footer__info b { display: block; margin-bottom: 4px; color: var(--blush); font-weight: 600; }
.sm-footer__info a { font-weight: 600; text-decoration: none; }
.sm-footer__legal { display: flex; flex-wrap: wrap; gap: 6px 20px; grid-column: 1 / -1; color: var(--blush); font-size: 14px; }
.sm-pill { margin: 0; padding: .7em 1.3em; border: 3px solid #fff; border-radius: 999px; background: #fff; color: var(--plum); font-weight: 600; font-size: clamp(16px, 1.6vw, 20px); white-space: nowrap; text-decoration: none; box-shadow: 0 5px 0 var(--hot); }
.sm-pill--dark { background: var(--hot); color: #fff; box-shadow: 0 5px 0 #fff; }

@media (max-width: 1080px) {
  .sm-hero__grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 860px) {
  .sm-hero { min-height: 0; padding: 104px 16px 56px; }
  .sm-hero__title { font-size: clamp(56px, 17vw, 96px); }
  .sm-scene { height: 600px; }
  .sm-pack { left: 4%; bottom: 3%; transform: scale(.74); transform-origin: 0 100%; }
  .sm-cig { left: 44%; width: 52%; top: 46%; }
  .sm-lighter { left: 36%; top: 34%; }
  .sm-ashtray { left: 56%; width: 40%; top: 76%; height: 54px; }
  .sm-music__inner { grid-template-columns: 1fr; }
  .sm-footer__top { grid-template-columns: 1fr; gap: 28px; }
  .sm-footer__info { gap: 16px 20px; font-size: 15px; }
}
@media (max-width: 520px) {
  .sm-pack { transform: scale(.66); }
  .sm-pack__label { font-size: 20px; }
  .sm-controls .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  main, main::before, .sm-pack__label, .sm-cig[data-style="pearl"] .sm-cig__paper { animation: none !important; }
  .sm-stage.is-lit .sm-cig__ember, .sm-stage.is-lighting .sm-cig__flame, .sm-stage.is-lighting .sm-lighter, .sm-cig.is-on { animation: none !important; }
  .sm-stage.is-lighting .sm-lighter { opacity: 0; }
  .sm-pick, .sm-pack__body { transition: none !important; }
}
