/*
Theme Name: MusicSmile
Theme URI: https://musicsmile.ru
Author: MusicSmile
Author URI: https://musicsmile.ru
Description: Фирменная тема сайта MusicSmile — музыкальные подарки с персональной музыкой. Лёгкая, быстрая тема с посадочными страницами, чат-ботами Telegram/MAX и Яндекс.Метрикой.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: musicsmile
Tags: custom-menu, custom-logo, one-column, block-styles
*/

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #33424A;
  background: #FFFDF7;
}
body.ms-lock { overflow: hidden; }
h1, h2, h3, h4, h5 {
  font-family: 'Rubik', 'Inter', sans-serif;
  color: #0F2E2B;
  line-height: 1.22;
  margin: 0 0 14px;
  font-weight: 700;
}
h1 { font-size: clamp(30px, 4.6vw, 44px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(25px, 3.2vw, 34px); letter-spacing: -0.01em; }
h3 { font-size: 20px; }
p { margin: 0 0 14px; }
a { color: #0E8A7E; text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; }
ul, ol { margin: 0 0 14px; padding-left: 20px; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.sec { padding: 72px 0; }
.sec--tight { padding: 46px 0; }
.sec--mint { background: #EAF8F4; }
.sec--sand { background: #FFF4E2; }
.ms-main { min-height: 50vh; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: #fff; padding: 8px 14px; z-index: 999; border-radius: 8px; }

.ms-kicker {
  display: inline-block;
  font-family: 'Rubik', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0E8A7E;
  margin-bottom: 10px;
}
.ms-kicker--light { color: #7FE0C8; }
.ms-sec-head { max-width: 720px; margin: 0 auto 38px; text-align: center; }
.ms-sec-head p { color: #64737B; }

.ms-grid { display: grid; gap: 20px; }
.ms-grid--4 { grid-template-columns: repeat(4, 1fr); }
.ms-grid--3 { grid-template-columns: repeat(3, 1fr); }
.ms-grid--2 { grid-template-columns: repeat(2, 1fr); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border: 0;
  border-radius: 14px;
  font-family: 'Rubik', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: linear-gradient(135deg, #0FA394 0%, #1E8FE0 100%); color: #fff; box-shadow: 0 10px 24px rgba(15, 143, 160, 0.28); }
.btn--primary:hover { color: #fff; box-shadow: 0 14px 30px rgba(15, 143, 160, 0.38); }
.btn--warm { background: linear-gradient(135deg, #FFB43A 0%, #FF7A59 100%); color: #402510; box-shadow: 0 10px 24px rgba(255, 140, 70, 0.30); }
.btn--warm:hover { color: #402510; box-shadow: 0 14px 30px rgba(255, 140, 70, 0.4); }
.btn--ghost { background: #fff; color: #0F2E2B; box-shadow: inset 0 0 0 2px #D7E4E0; }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px #0FA394; }
.btn--dark { background: #0F2E2B; color: #fff; }
.btn--dark:hover { color: #fff; }
.btn--light { background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35); }
.btn--light:hover { color: #fff; }
.btn--lg { padding: 16px 30px; font-size: 17px; border-radius: 16px; }
.btn--block { display: flex; width: 100%; }
.ms-btnrow { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.ms-btnrow--col { flex-direction: column; align-items: stretch; }

/* ============ Header ============ */
.ms-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 253, 247, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #E6EEE9;
  transition: box-shadow 0.2s ease;
}
.ms-header.is-scrolled { box-shadow: 0 8px 24px rgba(15, 46, 43, 0.08); }
.ms-header__in { display: flex; align-items: center; gap: 26px; min-height: 72px; }
.ms-logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.ms-logo:hover { text-decoration: none; }
.ms-logo__txt {
  font-family: 'Rubik', sans-serif;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0F2E2B;
}
.ms-logo__txt em { font-style: normal; background: linear-gradient(135deg, #0FA394 0%, #1E8FE0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ms-nav { margin-left: auto; }
.ms-nav__list { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.ms-nav__list a {
  display: block;
  padding: 8px 11px;
  border-radius: 10px;
  font-family: 'Rubik', sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  color: #24413C;
}
.ms-nav__list a:hover { background: #EAF8F4; color: #0E8A7E; text-decoration: none; }
.ms-header__act { display: flex; align-items: center; gap: 12px; }
.ms-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: #fff;
  border-radius: 12px;
  border: 0;
  box-shadow: inset 0 0 0 2px #D7E4E0;
  cursor: pointer;
}
.ms-burger span { display: block; height: 2.5px; border-radius: 2px; background: #0F2E2B; transition: transform 0.2s ease, opacity 0.2s ease; }
body.ms-nav-open .ms-burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
body.ms-nav-open .ms-burger span:nth-child(2) { opacity: 0; }
body.ms-nav-open .ms-burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============ Footer ============ */
.ms-footer { background: #0C2B27; color: #B9CFC9; margin-top: 40px; }
.ms-footer a { color: #DFF3EC; }
.ms-footer a:hover { color: #fff; }
.ms-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 34px;
  padding: 52px 0 34px;
}
.ms-footer .ms-logo__txt { color: #fff; }
.ms-footer__brand p { font-size: 14px; margin-top: 14px; color: #9DBAB3; }
.ms-footer h4 { color: #fff; font-size: 15px; margin: 4px 0 14px; letter-spacing: 0.02em; }
.ms-footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ms-footer__nav a { font-size: 14.5px; color: #B9CFC9; }
.ms-footer__contact p { font-size: 14.5px; margin: 0 0 9px; }
.ms-footer__bots .btn { margin-bottom: 10px; font-size: 15px; padding: 12px 18px; }
.ms-footer__legal { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 20px 0 26px; font-size: 12.8px; line-height: 1.7; color: #7FA098; }
.ms-footer__legal p { margin: 0 0 6px; }
.ms-footer__legal a { color: #9DBAB3; text-decoration: underline; }

/* ============ Modal ============ */
.ms-modal { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 18px; }
.ms-modal[hidden] { display: none; }
.ms-modal__backdrop { position: absolute; inset: 0; background: rgba(8, 30, 34, 0.62); opacity: 0; transition: opacity 0.22s ease; }
.ms-modal__box {
  position: relative;
  width: 100%;
  max-width: 470px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: #FFFDF7;
  border-radius: 24px;
  padding: 30px 28px 26px;
  text-align: center;
  box-shadow: 0 30px 90px rgba(8, 30, 34, 0.4);
  opacity: 0;
  transform: translateY(18px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.ms-modal.is-open .ms-modal__backdrop { opacity: 1; }
.ms-modal.is-open .ms-modal__box { opacity: 1; transform: none; }
.ms-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #EAF3F0;
  color: #46615B;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.ms-modal__close:hover { background: #DCEBE6; }
.ms-modal__art { margin: 2px 0 10px; }
.ms-modal__box h3 { font-size: 22px; margin-bottom: 8px; }
.ms-modal__lead { font-size: 14.5px; color: #64737B; margin-bottom: 18px; }
.ms-modal__btn {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px 18px;
  border-radius: 16px;
  text-decoration: none;
  text-align: left;
  margin-bottom: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ms-modal__btn:hover { text-decoration: none; transform: translateY(-2px); }
.ms-modal__btn--tg { background: #2AABEE; color: #fff; box-shadow: 0 10px 22px rgba(42, 171, 238, 0.32); }
.ms-modal__btn--max { background: linear-gradient(135deg, #6E5BFF 0%, #8B7BFF 100%); color: #fff; box-shadow: 0 10px 22px rgba(110, 91, 255, 0.32); }
.ms-modal__btn-ico { display: flex; width: 42px; height: 42px; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.18); border-radius: 12px; flex-shrink: 0; }
.ms-modal__btn-txt { display: flex; flex-direction: column; line-height: 1.3; }
.ms-modal__btn-txt strong { font-family: 'Rubik', sans-serif; font-size: 16px; font-weight: 600; }
.ms-modal__btn-txt small { font-size: 12.5px; opacity: 0.88; }
.ms-modal__alt { font-size: 13.5px; color: #64737B; margin: 14px 0 4px; }
.ms-modal__micro { font-size: 12px; color: #8B979D; margin: 0; line-height: 1.55; }

/* ============ Breadcrumbs ============ */
.ms-crumbs { font-size: 13.5px; color: #64737B; margin-bottom: 16px; }
.ms-crumbs a { color: #64737B; }
.ms-crumbs a:hover { color: #0E8A7E; }
.ms-crumbs span { color: #9AA7AD; margin: 0 6px; }

/* ============ Ticks list ============ */
.ms-ticks { list-style: none; padding: 0; margin: 16px 0 4px; display: grid; gap: 10px; }
.ms-ticks li { position: relative; padding-left: 32px; }
.ms-ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0FA394 0%, #1E8FE0 100%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.6 16.8 4.8 12l-1.6 1.6 6.4 6.4L21.6 7.2 20 5.6z'/%3E%3C/svg%3E") center/contain no-repeat, linear-gradient(#000, #000);
  -webkit-mask-composite: destination-out;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.6 16.8 4.8 12l-1.6 1.6 6.4 6.4L21.6 7.2 20 5.6z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask-composite: exclude;
}
/* simpler cross-browser tick */
.ms-ticks li::after {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0FA394 0%, #1E8FE0 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ms-ticks li::before { display: none; }

/* ============ FAQ ============ */
.ms-faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.ms-faq__item {
  background: #fff;
  border: 1px solid #E3ECE8;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
}
.ms-faq__item[open] { border-color: #BCE3D8; box-shadow: 0 10px 26px rgba(15, 46, 43, 0.07); }
.ms-faq__item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 20px;
  font-family: 'Rubik', sans-serif;
  font-weight: 600;
  font-size: 16.5px;
  color: #0F2E2B;
}
.ms-faq__item summary::-webkit-details-marker { display: none; }
.ms-faq__icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #EAF8F4;
  color: #0E8A7E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  transition: transform 0.2s ease;
}
.ms-faq__item[open] .ms-faq__icon { transform: rotate(45deg); background: linear-gradient(135deg, #0FA394 0%, #1E8FE0 100%); color: #fff; }
.ms-faq__a { padding: 0 20px 18px; color: #516068; font-size: 15px; }
.ms-faq__a p { margin: 0; }
.ms-faq__a a { font-weight: 600; }

/* ============ Prose (generic page content) ============ */
.ms-prose { max-width: 800px; }
.ms-prose h2 { margin-top: 34px; }
.ms-prose h3 { margin-top: 26px; }
.ms-prose ul li, .ms-prose ol li { margin-bottom: 7px; }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .ms-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .ms-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .ms-nav {
    position: fixed;
    top: 71px;
    left: 0;
    right: 0;
    background: #FFFDF7;
    border-bottom: 1px solid #E6EEE9;
    box-shadow: 0 24px 40px rgba(15, 46, 43, 0.14);
    padding: 14px 20px 18px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-height: calc(100vh - 72px);
    overflow: auto;
  }
  body.ms-nav-open .ms-nav { opacity: 1; transform: none; pointer-events: auto; }
  .ms-nav__list { flex-direction: column; gap: 2px; }
  .ms-nav__list a { padding: 12px 14px; font-size: 16px; }
  .ms-burger { display: flex; }
  .ms-header__act .btn { display: none; }
}
@media (max-width: 720px) {
  .sec { padding: 52px 0; }
  .ms-grid--4, .ms-grid--3, .ms-grid--2 { grid-template-columns: 1fr; }
  .ms-footer__grid { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
}
