:root {
  --bg: #fdf8f3;
  --card: #ffffff;
  --soft: #f6ecff;
  --ink: #2d1e3e;
  --muted: #8a7799;
  --accent: #c026a7;
  --accent2: #e8b04b;
  --border: #ecdff5;
  --code-bg: #2d1e3e;
  --code-text: #d9f7e3;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 5vw;
  background: rgba(253, 248, 243, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.nav-links { display: flex; gap: 22px; }

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
}

.nav-links a:hover { color: var(--accent); }

.hero {
  background:
    linear-gradient(180deg, rgba(45,30,62,.25), rgba(253,248,243,0) 60%, var(--bg)),
    url("images/hero.jpg") center/cover no-repeat;
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding: 60px 5vw;
}

.hero-inner {
  max-width: 640px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(6px);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(45,30,62,.18);
}

.hero-tag {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .8rem;
}

.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 12px 0; }

.accent {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub { color: var(--muted); margin-bottom: 22px; font-size: 1.05rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hero-counter { margin-top: 18px; color: var(--muted); font-size: .9rem; }
.hero-counter strong { color: var(--accent); }

.marquee {
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  padding: 10px 0;
}

.marquee-track {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.section { max-width: 1080px; margin: 0 auto; padding: 70px 5vw 0; }

.section h2 { font-size: 2rem; margin-bottom: 6px; }

.section-sub { color: var(--muted); margin-bottom: 28px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(45,30,62,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(192,38,167,.14);
}

.card-emoji { font-size: 2rem; margin-bottom: 10px; }
.card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.card p { color: var(--muted); font-size: .93rem; }
.price { margin-top: 12px; font-weight: 700; color: var(--accent) !important; font-size: 1.05rem !important; }

.card-soft {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(45,30,62,.06);
}

.promo {
  max-width: 1080px;
  margin: 70px auto 0;
  padding: 0 5vw;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 44px rgba(45,30,62,.12);
}

.promo img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }

.promo-text {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.promo-text h2 { color: #fff; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(45,30,62,.1);
  transition: transform .25s ease;
  cursor: pointer;
}

.gallery img:hover { transform: scale(1.03); }

.masters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.master {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}

.master img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--soft);
  margin-bottom: 14px;
}

.master .funfact { color: var(--muted); font-size: .88rem; font-style: italic; margin-top: 8px; }

.review-box { text-align: center; max-width: 720px; margin: 0 auto; }

.review-text {
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-style: italic;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.review-author { color: var(--accent); font-weight: 700; margin-top: 12px; }

.review-dots { margin-top: 16px; display: flex; justify-content: center; gap: 8px; }

.review-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background .2s;
}

.review-dots span.active { background: var(--accent); }

.jwt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.jwt-grid h3 { margin-bottom: 10px; font-size: 1.05rem; }

.code-box {
  background: var(--code-bg);
  border-radius: 12px;
  padding: 16px;
  font-family: "Fira Code", Consolas, monospace;
  font-size: .78rem;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--code-text);
  overflow-x: auto;
  min-height: 120px;
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contacts-grid h3 { margin: 14px 0 4px; font-size: 1rem; }
.contacts-grid h3:first-child { margin-top: 0; }

.map-stub {
  background:
    radial-gradient(circle at 30% 30%, #efe3f7 0 12%, transparent 13%),
    radial-gradient(circle at 70% 60%, #e3f0f7 0 10%, transparent 11%),
    repeating-linear-gradient(45deg, #f4eefa 0 24px, #eee2f4 24px 48px);
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  min-height: 240px;
}

.map-pin { font-size: 2.4rem; animation: bounce 1.6s ease infinite; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.center-actions { text-align: center; margin-top: 28px; }

.btn {
  display: inline-block;
  padding: 11px 22px;
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(192,38,167,.35);
}

.btn-big { padding: 14px 28px; font-size: 1.05rem; }

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-ghost:hover { background: rgba(192,38,167,.08); box-shadow: none; }

.btn-link {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: .85rem;
  text-decoration: underline;
  margin: 0 8px;
}

.btn-link:hover { color: var(--accent); }

footer {
  text-align: center;
  padding: 60px 20px 40px;
  color: var(--muted);
  font-size: .9rem;
}

.footer-links { margin-top: 10px; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink);
  color: #fff;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: .95rem;
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
  transition: transform .35s ease;
  z-index: 200;
  pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); }

.sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  font-size: 14px;
  animation: sparkle-fade .8s ease forwards;
}

@keyframes sparkle-fade {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-30px) scale(.4); }
}

.rain-emoji {
  position: fixed;
  top: -40px;
  font-size: 26px;
  z-index: 998;
  pointer-events: none;
  animation: rain-fall linear forwards;
}

@keyframes rain-fall {
  to { transform: translateY(110vh) rotate(360deg); }
}

.error-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }

.error-box {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
  max-width: 560px;
  margin: 30px 20px;
  box-shadow: 0 16px 44px rgba(45,30,62,.12);
}

.error-box h1 { font-size: 5rem; color: var(--accent); }
.error-box h2 { margin-bottom: 16px; }
.error-box .code-box { text-align: left; margin: 20px 0; }

@media (max-width: 800px) {
  .nav-links { display: none; }
  .promo, .jwt-grid, .contacts-grid { grid-template-columns: 1fr; }
  .hero { min-height: 60vh; }
}
