:root {
  --blue: #00afca;
  --blue-dark: #0082a3;
  --gold: #fec50c;
  --ink: #0d1b2a;
  --ink-2: #13283d;
  --paper: #f4f9fc;
  --white: #fff;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

.container { width: min(1140px, 92%); margin: 0 auto; }
.narrow { width: min(760px, 92%); margin: 0 auto; }
.accent { color: var(--blue-dark); }
.section-dark .accent { color: var(--gold); }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid #e3edf4;
}
.topbar-inner { display: flex; align-items: center; gap: 24px; padding: 12px 0; }
.logo { font-weight: 800; text-decoration: none; color: var(--ink); font-size: 18px; letter-spacing: .5px; }
.nav { display: flex; gap: 20px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; }
.nav a:hover { color: var(--blue-dark); }

/* Buttons */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), #ffab00);
  color: var(--ink);
  border: none;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 6px 18px rgba(254,197,12,.4);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(254,197,12,.5); }
.btn-small { padding: 9px 18px; font-size: 14px; }
.btn-big { width: 100%; padding: 16px; font-size: 18px; }
.btn-ghost { background: transparent; border: 2px solid var(--white); color: var(--white); box-shadow: none; }
.btn-outline { background: transparent; border: 2px solid var(--blue); color: var(--blue-dark); box-shadow: none; }
.btn-outline:hover { background: var(--blue); color: #fff; }

/* Hero */
.hero {
  background:
    radial-gradient(circle at 85% 15%, rgba(254,197,12,.25), transparent 40%),
    linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 55%, var(--blue-dark) 100%);
  color: #fff;
  padding: 70px 0 80px;
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.badge {
  display: inline-block;
  background: rgba(0,175,202,.25);
  border: 1px solid var(--blue);
  color: #9be9f7;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.1; margin-bottom: 18px; }
.hero h1 .accent { color: var(--gold); }
.lead { font-size: 18px; color: #cfe6f2; max-width: 540px; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.stats { display: flex; gap: 34px; flex-wrap: wrap; }
.stats div { display: flex; flex-direction: column; }
.stats b { font-size: 28px; color: var(--gold); }
.stats span { font-size: 13px; color: #a9c6d6; }

/* Hero art */
.hero-art {
  position: relative;
  min-height: 340px;
  background: linear-gradient(180deg, #0e3a56, #0a2740);
  border-radius: 26px;
  border: 2px solid rgba(0,175,202,.4);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.art-sun {
  position: absolute; top: 26px; right: 34px;
  width: 74px; height: 74px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold), #ff9800);
  box-shadow: 0 0 60px rgba(254,197,12,.7);
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.08); } }
.art-tower, .art-court, .art-boat { position: absolute; }
.art-tower { font-size: 84px; bottom: 40px; left: 34px; animation: float 4s ease-in-out infinite; }
.art-court { font-size: 70px; bottom: 130px; left: 140px; animation: float 5s ease-in-out infinite .5s; }
.art-boat { font-size: 64px; bottom: 26px; right: 40px; animation: float 6s ease-in-out infinite 1s; }
@keyframes float { 50% { transform: translateY(-14px); } }
.art-card {
  position: absolute;
  background: rgba(255,255,255,.95);
  color: var(--ink);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13px;
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
.art-card b { color: var(--blue-dark); }
.art-card-1 { top: 40px; left: 26px; animation: float 4.5s ease-in-out infinite; }
.art-card-2 { top: 130px; right: 26px; animation: float 5.5s ease-in-out infinite .8s; }

/* Sections */
.section { padding: 72px 0; }
.section h2 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 8px; }
.section-sub { color: #56707f; margin-bottom: 38px; }
.section-dark { background: var(--ink); color: #eaf4fa; }
.section-dark h2 { color: #fff; }
.section-cta { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); color: #fff; }
.section-cta h2 { color: #fff; text-align: center; margin-bottom: 26px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 26px; }
.card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 2px solid #e3edf4;
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(13,27,42,.14); }
.card-hot { border-color: var(--gold); box-shadow: 0 14px 36px rgba(254,197,12,.35); }
.card-ribbon {
  position: absolute; top: -14px; right: 18px;
  background: var(--gold); color: var(--ink);
  font-weight: 800; font-size: 13px;
  padding: 5px 14px; border-radius: 999px;
}
.card-emoji { font-size: 44px; margin-bottom: 8px; }
.card h3 { font-size: 22px; margin-bottom: 6px; }
.price { font-size: 30px; font-weight: 800; color: var(--blue-dark); margin-bottom: 16px; }
.card ul { list-style: none; margin-bottom: 22px; font-size: 15px; color: #3b5464; }
.card li { padding: 5px 0; }
.card .btn { margin-top: auto; text-align: center; }

/* Timeline */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.timeline { list-style: none; margin-top: 24px; counter-reset: step; }
.timeline li {
  position: relative;
  padding: 0 0 22px 34px;
  border-left: 3px solid rgba(0,175,202,.5);
  margin-left: 8px;
  color: #cfe0ec;
}
.timeline li::before {
  content: "";
  position: absolute; left: -11px; top: 4px;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(254,197,12,.2);
}
.timeline b { color: #fff; }

.court-box {
  background: linear-gradient(160deg, var(--ink-2), #0a2740);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: 30px 26px;
  text-align: center;
}
.court-emoji { font-size: 56px; animation: float 3s ease-in-out infinite; }
.court-box h3 { margin: 10px 0 8px; color: var(--gold); }
.court-box p { color: #b9d2e0; font-size: 15px; }
.counter { display: flex; justify-content: center; gap: 16px; margin-top: 20px; }
.counter div {
  background: rgba(0,175,202,.15);
  border: 1px solid rgba(0,175,202,.5);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 78px;
}
.counter b { display: block; font-size: 26px; color: #fff; }

/* FAQ */
.faq details {
  background: #fff;
  border: 2px solid #e3edf4;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 14px;
}
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin-top: 10px; color: #4a6274; }

/* Form */
#bookForm { background: rgba(255,255,255,.12); padding: 26px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.3); }
#bookForm label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 16px; }
#bookForm input, #bookForm select, #bookForm textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
#bookForm input:focus, #bookForm select:focus, #bookForm textarea:focus { outline: none; border-color: var(--gold); }
#bookForm input.err, #bookForm select.err { border-color: #ff5252; animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-msg { margin-top: 14px; font-weight: 700; min-height: 22px; text-align: center; }

/* Footer */
.footer { background: var(--ink); color: #8fb0c4; padding: 22px 0; font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ================= FX: слои и эффекты ================= */
#fxLayer {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 90;
}

/* Ripple на кнопках и карточках */
.btn, .card { position: relative; overflow: hidden; }
.ripple {
  position: absolute;
  background: rgba(255,255,255,.55);
  border-radius: 50%;
  transform: scale(0);
  animation: rip .6s ease-out forwards;
  pointer-events: none;
  z-index: 3;
}
@keyframes rip { to { transform: scale(2.4); opacity: 0; } }

/* Сияющий фон героя */
.hero { position: relative; }
.hero::before {
  content: "";
  position: absolute; inset: -40%;
  background:
    radial-gradient(circle at 20% 60%, rgba(0,175,202,.35), transparent 35%),
    radial-gradient(circle at 75% 30%, rgba(254,197,12,.28), transparent 35%),
    radial-gradient(circle at 50% 90%, rgba(177,140,255,.25), transparent 40%);
  animation: aurora 16s linear infinite;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
@keyframes aurora {
  0%   { transform: translate(0,0) rotate(0deg); }
  50%  { transform: translate(-4%, 3%) rotate(6deg); }
  100% { transform: translate(0,0) rotate(0deg); }
}

/* Градиентный текст с бегущим бликом */
h1 .accent, .freetag-hash {
  background: linear-gradient(90deg, var(--gold), #fff6cf, var(--gold), #ffab00, var(--gold));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 4s linear infinite;
}
@keyframes shine { to { background-position: -300% 0; } }

/* Пульс primary-кнопок */
.hero-actions .btn, .btn-big { animation: glowPulse 2.6s ease-in-out infinite; }
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(254,197,12,.4), 0 0 0 rgba(254,197,12,0); }
  50% { box-shadow: 0 6px 18px rgba(254,197,12,.55), 0 0 34px rgba(254,197,12,.55); }
}

/* Карточки: градиентный оверлей и свечение хита */
.card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(0,175,202,.16), rgba(254,197,12,.16));
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.card:hover::after { opacity: 1; }
.card-hot { animation: hotGlow 3s ease-in-out infinite; }
@keyframes hotGlow {
  0%,100% { box-shadow: 0 14px 36px rgba(254,197,12,.3); }
  50% { box-shadow: 0 14px 46px rgba(254,197,12,.55), 0 0 30px rgba(254,197,12,.3); }
}

/* Пояявление блоков при скролле */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.on { opacity: 1; transform: none; }

/* Бегущая строка */
.ticker {
  overflow: hidden;
  background: var(--gold);
  color: var(--ink);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  padding: 9px 0;
  font-weight: 800;
  letter-spacing: .6px;
  white-space: nowrap;
}
.ticker-track { display: inline-block; animation: marquee 22s linear infinite; }
.ticker-track span { margin: 0 26px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* #freeмамаптица */
.freetag {
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, rgba(254,197,12,.2), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(0,175,202,.25), transparent 40%),
    var(--ink);
  color: #fff;
  padding: 74px 0 80px;
  text-align: center;
  overflow: hidden;
}
.freetag-box {
  position: relative;
  z-index: 1;
  border: 3px dashed var(--gold);
  border-radius: 28px;
  padding: 44px 24px;
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(4px);
}
.freetag-hash {
  display: block;
  font-size: clamp(30px, 7vw, 72px);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 14px;
}
.freetag-sub { color: #cfe6f2; margin-bottom: 26px; font-size: 17px; }
.freetag-count { margin-top: 18px; color: #a9c6d6; font-size: 15px; }
.freetag-count b { color: var(--gold); font-size: 20px; }

/* Кнопка мьюта в шапке */
.btn-ghost-dark {
  background: transparent;
  border: 2px solid var(--ink);
  color: var(--ink);
  box-shadow: none;
  animation: none;
}
.btn-ghost-dark:hover { background: var(--ink); color: #fff; }
.topbar .btn-small:last-child { animation: none; }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(6,17,28,.7);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-box {
  background: #fff; border-radius: 22px;
  padding: 34px 30px; max-width: 420px; width: 100%;
  text-align: center;
  animation: pop .25s ease-out;
}
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.modal-emoji { font-size: 58px; }
.modal-box h3 { margin: 8px 0; }
.modal-box p { color: #4a6274; margin-bottom: 20px; }

/* ================= Меню-бургер ================= */
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px; height: 44px;
  padding: 10px;
  background: var(--ink);
  border: none; border-radius: 12px;
  cursor: pointer;
}
.burger span {
  display: block; height: 3px; width: 100%;
  background: var(--gold); border-radius: 3px;
  transition: transform .25s, opacity .25s;
}
.burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ================= Адаптив ================= */

/* --- Ноутбуки / планшеты-ландшафт --- */
@media (max-width: 1024px) {
  .section { padding: 56px 0; }
  .hero { padding: 54px 0 64px; }
  .hero-inner { gap: 28px; }
  .art-tower { font-size: 68px; }
  .art-court { left: 110px; font-size: 58px; }
  .topbar-inner { gap: 14px; }
}

/* --- Планшеты и телефоны (вертикаль) --- */
@media (max-width: 860px) {
  .hero-inner, .split { grid-template-columns: 1fr; }
  .hero-art { min-height: 300px; order: -1; }
  .form-row { grid-template-columns: 1fr; }

  /* выпадающее меню */
  .burger { display: flex; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #e3edf4;
    box-shadow: 0 18px 34px rgba(13,27,42,.16);
    padding: 6px 0;
    margin: 0;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 15px 22px; font-size: 17px; border-bottom: 1px solid #eef5f9; }
  .nav a:last-of-type { border-bottom: none; }
  .nav-mute { margin: 10px 22px 14px; display: inline-block !important; }

  .stats { gap: 22px; }
  .stats b { font-size: 24px; }
  .split { gap: 30px; }
}

/* --- Только телефоны --- */
@media (max-width: 600px) {
  .container, .narrow { width: min(1140px, 92%); }
  .section { padding: 44px 0; }
  .hero { padding: 40px 0 48px; }
  .hero h1 { font-size: clamp(28px, 8.5vw, 40px); }
  .lead { font-size: 16px; }
  .badge { font-size: 12px; }

  .topbar-inner { padding: 9px 0; gap: 8px; }
  .logo { font-size: 15px; }
  .hide-mobile { display: none !important; }
  .btn { padding: 13px 22px; font-size: 16px; } /* палец ≥ 44px */
  .btn-small { padding: 9px 14px; font-size: 13px; }

  .hero-actions { gap: 10px; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .hero-art { min-height: 250px; }
  .art-tower { font-size: 56px; left: 20px; bottom: 30px; }
  .art-court { font-size: 46px; left: 84px; bottom: 110px; }
  .art-boat { font-size: 46px; right: 22px; }
  .art-card { font-size: 11px; padding: 8px 10px; max-width: 58%; }
  .art-card-1 { left: 14px; top: 22px; }
  .art-card-2 { right: 12px; top: 110px; }

  .cards { grid-template-columns: 1fr; gap: 20px; }
  .card { padding: 24px 20px; }
  .price { font-size: 26px; }

  .counter { gap: 10px; flex-wrap: wrap; }
  .counter div { min-width: 70px; padding: 8px 10px; }
  .counter b { font-size: 22px; }

  #bookForm { padding: 20px 16px; }
  #bookForm input, #bookForm select, #bookForm textarea { font-size: 16px; } /* без зума в iOS */

  .freetag { padding: 52px 0 58px; }
  .freetag-box { padding: 32px 16px; }

  .footer-inner { flex-direction: column; gap: 6px; text-align: center; }
  .ticker { font-size: 13px; }

  .modal-box { padding: 26px 20px; }
}

/* --- Очень маленькие экраны (<360px) --- */
@media (max-width: 360px) {
  .logo span { display: none; }
  .hero h1 { font-size: 26px; }
  .stats { gap: 14px; }
  .stats b { font-size: 21px; }
}

/* --- Планшеты-портреты крупные --- */
@media (min-width: 861px) and (max-width: 1100px) {
  .cards { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}

/* --- Ландшафт на телефоне: не растягиваем на всю высоту --- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding: 26px 0 32px; }
  .hero-art { min-height: 210px; }
  .section { padding: 34px 0; }
  .art-court { display: none; }
}

/* --- Настольные мыши: hover-эффекты; тач-устройства: убираем липкие ховеры --- */
@media (hover: none) {
  .card:hover { transform: none; box-shadow: none; }
  .btn:hover { transform: none; }
}

/* --- Уважение к prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --- Безопасные зоны (челки/вырезы) --- */
.topbar { padding-top: env(safe-area-inset-top); }
body { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
img, canvas, video { max-width: 100%; height: auto; }
#fxLayer { height: 100dvh; }
