/* Songfetti — песни на заказ. Палитра «конфетти на сцене»: тёмная сцена героя, светлые разделы, яркие точки. */
:root {
  --night: #150b33; --night-2: #2a1162;
  --ink: #1b1236; --ink-2: #4c4466; --muted: #6f6790;
  --paper: #ffffff; --mist: #f6f2ff; --blush: #fff2f7; --line: #e8e1f6; --card: #ffffff;
  --pink: #ff2e7e; --orange: #ff8a1f; --yellow: #ffd23f; --green: #14c296; --blue: #2e8bff; --violet: #7b4dff;
  --cta: linear-gradient(135deg, #ff2e7e 0%, #ff5a4e 50%, #ff8a1f 100%);
  --ok: #0f9d6e; --warn: #c77700; --bad: #d62d4b;
  --radius: 20px; --radius-s: 12px;
  --shadow: 0 14px 40px -18px rgba(42, 17, 98, .45);
  --shadow-s: 0 6px 18px -10px rgba(42, 17, 98, .35);
  --display: "Bricolage Grotesque", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f4eeff; --ink-2: #cfc6ea; --muted: #a79ccb;
    --paper: #0f0826; --mist: #160d33; --blush: #1c0f2e; --line: #33285a; --card: #1a1140;
    --shadow: 0 14px 40px -18px rgba(0, 0, 0, .8); --shadow-s: 0 6px 18px -10px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f4eeff; --ink-2: #cfc6ea; --muted: #a79ccb;
  --paper: #0f0826; --mist: #160d33; --blush: #1c0f2e; --line: #33285a; --card: #1a1140;
  --shadow: 0 14px 40px -18px rgba(0, 0, 0, .8); --shadow-s: 0 6px 18px -10px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* иначе .busy/.panel с display:flex не прячутся атрибутом hidden */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--body); overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; margin: 0 0 .4em; }
h1 { font-size: clamp(2.3rem, 6.4vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 16px; top: 12px; z-index: 50; background: var(--paper); padding: 8px 14px; border-radius: 10px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

/* шапка */
.top { position: sticky; top: 0; z-index: 30; backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--night) 82%, transparent); color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 1.35rem/1 var(--display); color: #fff; text-decoration: none; letter-spacing: -.02em; }
.logo svg { width: 34px; height: 34px; flex: 0 0 34px; }
.top .btn.small { white-space: nowrap; }
.top nav { display: flex; gap: 22px; margin-inline-start: auto; align-items: center; }
.top nav a { color: rgba(255,255,255,.86); text-decoration: none; font-weight: 600; font-size: .95rem; }
.top nav a:hover { color: #fff; }
.langpick { position: relative; }
.langpick select { appearance: none; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px; padding: 7px 30px 7px 12px; font: 600 .9rem var(--body); max-width: 150px; cursor: pointer; }
.langpick::after { content: "▾"; position: absolute; inset-inline-end: 11px; top: 50%; transform: translateY(-50%); pointer-events: none; opacity: .8; font-size: .8rem; }
.langpick option { color: #111; }
@media (max-width: 760px) { .top nav a.hide-s { display: none; } .top nav { gap: 10px; } }
@media (max-width: 520px) {
  .top nav .btn.small { display: none; }            /* на телефоне главный призыв — в первом экране */
  .langpick select { max-width: 132px; }
  .quick { border-radius: 22px; padding: 10px; }
  .quick input { flex-basis: 100%; }
  .quick .btn { width: 100%; }
}

/* кнопки */
.btn { --bg: var(--cta); display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer;
  background: var(--bg); color: #fff; font: 800 1.05rem/1 var(--display); letter-spacing: -.01em; text-decoration: none;
  padding: 17px 28px; border-radius: 999px; box-shadow: 0 12px 30px -12px rgba(255, 46, 126, .8); transition: transform .15s ease, box-shadow .15s ease, filter .15s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(255, 46, 126, .9); filter: saturate(1.1); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .55; cursor: progress; transform: none; }
.btn.small { padding: 11px 18px; font-size: .95rem; }
.btn.ghost { --bg: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--pink); }
.btn.light { --bg: #fff; color: var(--night); box-shadow: 0 12px 30px -14px rgba(0,0,0,.5); }

/* герой-сцена */
.hero { position: relative; color: #fff; background:
    radial-gradient(900px 480px at 78% 12%, rgba(123, 77, 255, .55), transparent 62%),
    radial-gradient(700px 420px at 8% 90%, rgba(255, 46, 126, .38), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, #1d0d45 100%);
  overflow: hidden; isolation: isolate; }
.hero canvas.confetti { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero .wrap { padding: clamp(56px, 10vw, 118px) 0 clamp(64px, 9vw, 110px); display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 36px; } }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 700 .82rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase;
  color: var(--yellow); background: rgba(255, 210, 63, .12); border: 1px solid rgba(255, 210, 63, .3); padding: 8px 12px; border-radius: 999px; margin-bottom: 20px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--yellow), #ff9d5c 45%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { font-size: clamp(1.05rem, 2.2vw, 1.28rem); color: rgba(255,255,255,.86); max-width: 36em; margin-bottom: 30px; }
.quick { display: flex; gap: 10px; flex-wrap: wrap; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); padding: 8px; border-radius: 999px; max-width: 560px; }
.quick input { flex: 1 1 200px; min-width: 0; background: transparent; border: 0; color: #fff; font: 600 1.05rem var(--body); padding: 12px 16px; }
.quick input::placeholder { color: rgba(255,255,255,.62); }
.quick input:focus { outline: none; }
.note { color: rgba(255,255,255,.72); font-size: .92rem; margin-top: 14px; }
.hero .listen { display: inline-flex; gap: 8px; align-items: center; margin-top: 18px; color: #fff; font-weight: 700; text-decoration: none; opacity: .9; }
.hero .listen:hover { opacity: 1; text-decoration: underline; }
.stage-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 28px; padding: 22px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.7); backdrop-filter: blur(6px); }
.stage-card .ttl { font: 800 1.35rem/1.15 var(--display); margin: 10px 0 4px; }
.stage-card .for { color: rgba(255,255,255,.72); margin: 0 0 14px; }
.stage-card .lyr { font-size: .95rem; color: rgba(255,255,255,.82); white-space: pre-line; max-height: 150px; overflow: hidden; mask-image: linear-gradient(#000 60%, transparent); }

/* плеер */
.player { display: flex; align-items: center; gap: 14px; }
.play { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; background: var(--cta); color: #fff;
  display: grid; place-items: center; box-shadow: 0 10px 24px -10px rgba(255, 46, 126, .9); transition: transform .15s; }
.play:hover { transform: scale(1.06); }
.play svg { width: 22px; height: 22px; }
.wave { flex: 1 1 auto; height: 56px; min-width: 0; cursor: pointer; }
.time { font: 600 .82rem/1 var(--body); color: var(--muted); min-width: 40px; text-align: end; font-variant-numeric: tabular-nums; }
.hero .time, .gift .time { color: rgba(255,255,255,.7); }

/* разделы */
section { padding: clamp(64px, 9vw, 112px) 0; }
section.alt { background: var(--mist); }
section.pinky { background: var(--blush); }
.head { max-width: 760px; margin-bottom: 40px; }
.head p { color: var(--ink-2); font-size: 1.1rem; }
.center { text-align: center; margin-inline: auto; }

/* демо-карточки */
.demos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.demo { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-s); display: flex; flex-direction: column; gap: 12px; }
.demo .meta { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font: 700 .75rem/1 var(--body); letter-spacing: .04em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; background: var(--mist); color: var(--ink-2); }
.tag.c0 { background: #ffe3ee; color: #b0114f; } .tag.c1 { background: #fff0d6; color: #9a4b00; } .tag.c2 { background: #dcf7ee; color: #0a7457; }
.tag.c3 { background: #e0edff; color: #1d5fc2; } .tag.c4 { background: #ece5ff; color: #5a2fd6; } .tag.c5 { background: #fff7cc; color: #7a5b00; }
.demo h3 { margin: 0; }
.demo .who { color: var(--muted); margin: -6px 0 0; font-size: .95rem; }
.skeleton { height: 150px; border-radius: var(--radius); background: linear-gradient(90deg, var(--mist), var(--line), var(--mist)); background-size: 200% 100%; animation: sh 1.4s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

/* шаги */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: st; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 24px; box-shadow: var(--shadow-s); }
.step::before { counter-increment: st; content: counter(st); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  font: 800 1.2rem/1 var(--display); color: #fff; margin-bottom: 16px; background: var(--c, var(--pink)); }
.step:nth-child(2) { --c: var(--violet); } .step:nth-child(3) { --c: var(--green); }
.step p { color: var(--ink-2); margin: 0; }

/* поводы */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line);
  font-weight: 700; text-decoration: none; color: var(--ink); cursor: pointer; transition: border-color .15s, transform .15s; font-size: .98rem; }
.chip:hover { border-color: var(--pink); transform: translateY(-1px); }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--pink)); display: inline-block; }
.chip[aria-pressed="true"] { border-color: transparent; background: var(--ink); color: var(--paper); }

/* почему */
.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 980px) { .why { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .why { grid-template-columns: 1fr; } }
.why div { padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.why b { display: block; font: 800 1.12rem/1.2 var(--display); margin-bottom: 6px; }
.why p { color: var(--ink-2); margin: 0; font-size: .98rem; }
.why .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; background: var(--c); color: #fff; }
.why .ico svg { width: 22px; height: 22px; }

/* цены */
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 900px) { .prices { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
.price { position: relative; background: var(--card); border: 1.5px solid var(--line); border-radius: 26px; padding: 28px 24px; display: flex; flex-direction: column; box-shadow: var(--shadow-s); }
.price.hot { border: 0; background: linear-gradient(var(--card), var(--card)) padding-box, var(--cta) border-box; border: 2.5px solid transparent; box-shadow: var(--shadow); }
.price .badge { position: absolute; top: -14px; inset-inline-start: 24px; background: var(--cta); color: #fff; font: 800 .78rem/1 var(--body); letter-spacing: .05em; text-transform: uppercase; padding: 8px 12px; border-radius: 999px; }
.price h3 { font-size: 1.4rem; margin: 0; }
.price .d { color: var(--muted); margin: 2px 0 16px; }
.amount { font: 800 2.6rem/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.amount s { font: 600 1rem var(--body); color: var(--muted); margin-inline-start: 8px; letter-spacing: 0; }
.amount small { display: block; margin-top: 8px; font: 600 .9rem var(--body); color: var(--muted); letter-spacing: 0; }
.price ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; flex: 1; }
.price li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.price li::before { content: ""; flex: 0 0 18px; height: 18px; margin-top: 4px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath d='M8 13.2 4.8 10l-1.1 1.1L8 15.4l8.3-8.3-1.1-1.1z'/%3E%3C/svg%3E") center/14px no-repeat; }
.local { text-align: center; color: var(--muted); font-size: .92rem; margin-top: 18px; }

/* языки */
.langs { display: flex; flex-wrap: wrap; gap: 8px; }
.langs span { padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: .95rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; font: 700 1.1rem/1.4 var(--display); padding: 16px 32px 16px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; inset-inline-end: 4px; top: 12px; font-size: 1.6rem; color: var(--pink); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--ink-2); padding-inline-end: 32px; }

/* финальный призыв */
.band { background: var(--cta); color: #fff; border-radius: 34px; padding: clamp(36px, 6vw, 64px); text-align: center; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.band h2 { color: #fff; }
.band p { color: rgba(255,255,255,.92); font-size: 1.15rem; }

/* подвал */
footer { background: var(--night); color: rgba(255,255,255,.78); padding: 56px 0 40px; font-size: .95rem; }
footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 820px) { footer .cols { grid-template-columns: 1fr 1fr; } }
footer h4 { color: #fff; font: 800 1rem var(--display); margin: 0 0 12px; }
footer a { color: rgba(255,255,255,.78); text-decoration: none; display: block; padding: 3px 0; }
footer a:hover { color: #fff; }
footer .fine { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 20px; font-size: .85rem; color: rgba(255,255,255,.6); }

/* формы (создание песни) */
.form { display: grid; gap: 22px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: clamp(20px, 4vw, 34px); box-shadow: var(--shadow-s); }
.panel h2 { font-size: 1.5rem; display: flex; align-items: center; gap: 12px; }
.panel h2 .n { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--c, var(--pink)); color: #fff; font-size: 1rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }
label { display: block; font-weight: 700; margin-bottom: 8px; }
.field { margin-bottom: 18px; }
input[type=text], input[type=email], textarea, select.input { width: 100%; font: 500 1.02rem/1.45 var(--body); color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 13px 14px; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select.input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 20%, transparent); }
textarea { min-height: 120px; resize: vertical; }
textarea.lyrics { min-height: 420px; font: 500 1rem/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.hint { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.err { color: var(--bad); font-weight: 700; margin-top: 10px; min-height: 1.2em; }
.hp { position: absolute; inset-inline-start: -5000px; width: 1px; height: 1px; overflow: hidden; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.busy { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; background: var(--mist); font-weight: 600; }
.busy .spinner { border-color: color-mix(in srgb, var(--violet) 30%, transparent); border-top-color: var(--violet); }

/* страница заказа */
.order-hero { background: linear-gradient(180deg, var(--night), #24104f); color: #fff; padding: 56px 0 90px; }
.order-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.order-card { margin-top: -60px; }
.state { display: flex; gap: 16px; align-items: flex-start; }
.pulse { width: 64px; height: 64px; border-radius: 20px; flex: 0 0 auto; background: var(--cta); display: grid; place-items: center; color: #fff; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); box-shadow: 0 0 0 12px rgba(255, 46, 126, .12); } }
.eq { display: flex; gap: 4px; align-items: flex-end; height: 26px; }
.eq span { width: 5px; background: #fff; border-radius: 3px; animation: eq 1s ease-in-out infinite; }
.eq span:nth-child(2) { animation-delay: .15s; } .eq span:nth-child(3) { animation-delay: .3s; } .eq span:nth-child(4) { animation-delay: .45s; }
@keyframes eq { 0%, 100% { height: 6px; } 50% { height: 26px; } }
.files { display: grid; gap: 12px; margin-top: 18px; }
.file { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: var(--mist); }
.copyrow { display: flex; gap: 10px; flex-wrap: wrap; }
.copyrow input { flex: 1 1 260px; }
.lyrics-view { white-space: pre-line; color: var(--ink-2); }

/* подарочная страница */
.gift { min-height: 100vh; min-height: 100svh; color: #fff; display: grid; place-items: center; text-align: center; padding: 40px 16px; position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(900px 600px at 50% 0%, rgba(123, 77, 255, .6), transparent 60%), radial-gradient(800px 500px at 50% 100%, rgba(255, 46, 126, .45), transparent 60%), var(--night); }
.gift canvas.confetti { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.gift .box { width: min(640px, 100%); }
.gift h1 { font-size: clamp(2.4rem, 8vw, 4.4rem); }
.gift .from { color: rgba(255,255,255,.8); font-size: 1.15rem; }
.gift .player { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); padding: 14px; border-radius: 999px; margin: 26px 0; }
.gift .lyrics-view { color: rgba(255,255,255,.86); font-size: 1.05rem; max-width: 30em; margin: 0 auto 30px; }

/* баннер языка и мелочи */
.langbar { position: fixed; inset-inline: 12px; bottom: 12px; z-index: 40; max-width: 520px; margin-inline: auto; display: flex; gap: 12px; align-items: center;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.langbar p { margin: 0; flex: 1; font-weight: 600; }
.langbar button.x { background: none; border: 0; color: var(--muted); font-size: 1.4rem; cursor: pointer; }
.legal h2 { font-size: 1.4rem; margin-top: 2em; }
.legal { color: var(--ink-2); }
[dir="rtl"] .arr { display: inline-block; transform: scaleX(-1); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
