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

:root {
  --gold-1: #b8893a;
  --gold-2: #d4af6a;
  --gold-3: #f0d894;
  --gold-deep: #8a6420;
  --radius: 18px;
  --radius-sm: 12px;
  --max-w: 480px;
  --pad: 20px;
  --gap: 16px;
}

html[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #fbf7ef;
  --surface: #ffffff;
  --surface-2: #f7f1e3;
  --text: #1a1612;
  --text-muted: #6b5a44;
  --border: rgba(184, 137, 58, 0.22);
  --shadow: 0 6px 22px rgba(138, 100, 32, 0.10);
}

html[data-theme="dark"] {
  --bg: #0a0807;
  --bg-soft: #14100b;
  --surface: #181410;
  --surface-2: #221a12;
  --text: #f4ead6;
  --text-muted: #b7a98d;
  --border: rgba(212, 175, 106, 0.25);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s ease, color 0.5s ease;
}

.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  padding: 14px 0 4px;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.theme-toggle:hover { transform: rotate(15deg); border-color: var(--gold-2); }

.theme-icon { display: none; }
html[data-theme="light"] .theme-icon--dark { display: block; }
html[data-theme="dark"]  .theme-icon--light { display: block; }

.hero {
  text-align: center;
  padding: 8px 0 28px;
}

.hero__logo-wrap {
  position: relative;
  display: inline-block;
  width: min(78vw, 320px);
}

.hero__logo {
  display: block;
  margin: 0 auto;
  width: 100%;
  height: auto;
}

.hero__logo-label {
  position: absolute;
  left: 50%;
  top: 62%;
  transform: translate(-50%, -50%);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(11px, 3.5vw, 16px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(240, 216, 148, 0.35);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

html[data-theme="dark"] .hero__logo-label { opacity: 1; }

.hero__tagline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(20px, 5.6vw, 26px);
  line-height: 1.25;
  margin: 22px auto 0;
  max-width: 360px;
  color: var(--text);
  letter-spacing: 0.01em;
}

.hero__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px 0 4px;
}
.hero__divider::before,
.hero__divider::after {
  content: '';
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-2));
}
.hero__divider::after { background: linear-gradient(90deg, var(--gold-2), transparent); }
.hero__divider-dot {
  width: 6px; height: 6px;
  background: var(--gold-2);
  transform: rotate(45deg);
  margin: 0 10px;
}

/* ---- Tiles 2×2 ---- */
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-top: 14px;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px 22px;
  box-shadow: var(--shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 150px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  color: inherit;
  width: 100%;
}

.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(212,175,106,0.06), transparent 60%);
  pointer-events: none;
}

.tile:hover {
  transform: translateY(-2px);
  border-color: var(--gold-2);
  box-shadow: 0 12px 28px rgba(184, 137, 58, 0.18);
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--gold-3) 40%, var(--gold-2) 70%, transparent 100%);
  box-shadow: 0 0 8px rgba(240, 216, 148, 0.9);
  pointer-events: none;
  z-index: 5;
  transform: translate(-50%, -50%);
  animation: sparkleFly 0.7s ease-out forwards;
}

@keyframes sparkleFly {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(0.3);
  }
}

.tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-2);
  margin-bottom: 4px;
}

.tile__icon svg {
  width: 56px;
  height: 56px;
}

@media (min-width: 520px) {
  .tile__icon svg { width: 64px; height: 64px; }
}

.tile__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: clamp(10.5px, 2.9vw, 12.5px);
  line-height: 1.28;
  letter-spacing: 0.04em;
  color: var(--text);
  text-transform: uppercase;
  hyphens: none;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
  margin: 0;
}

@media (min-width: 520px) {
  .tile__title { font-size: 14px; }
  .tile { padding: 26px 22px; min-height: 170px; }
}

/* ---- Socials ---- */
.socials {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.social {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 6px 10px;
  color: var(--gold-2);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.social:hover {
  transform: translateY(-2px);
  border-color: var(--gold-2);
  background: var(--surface-2);
}

.social svg { width: 22px; height: 22px; }

.social__label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.social__badge {
  position: absolute;
  top: -9px;
  right: 50%;
  transform: translateX(50%);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, var(--gold-deep), var(--gold-2));
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.social--soon { padding-top: 14px; }

/* ---- Promo (Ирина) ---- */
.promo {
  margin-top: 22px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--gold-2);
  border-radius: var(--radius);
  padding: 22px 18px 20px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(184, 137, 58, 0.12);
}

.promo__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 8px;
  color: var(--gold-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.promo__icon svg { width: 32px; height: 32px; }

.promo__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.25;
  color: var(--text);
}

.promo__text {
  font-size: 13px;
  color: var(--text-muted);
  margin: 8px 0 16px;
}

.promo__btn {
  display: inline-block;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--gold-deep), var(--gold-2) 60%, var(--gold-3));
  color: #1a1612;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(184, 137, 58, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.promo__btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(184, 137, 58, 0.45); }

/* ---- Footer ---- */
.footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 26px 0 30px;
  letter-spacing: 0.04em;
}
.footer__name {
  color: var(--gold-2);
  font-weight: 500;
}

/* ---- Modal "скоро" ---- */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalIn 0.25s ease;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 7, 0.55);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}
.modal__card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--gold-2);
  border-radius: var(--radius);
  max-width: 360px;
  width: 100%;
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: 0;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}
.modal__close:hover { color: var(--gold-2); }
.modal__icon {
  font-size: 32px;
  color: var(--gold-2);
  margin-bottom: 6px;
}
.modal__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.modal__text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.modal__btn {
  display: inline-block;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--gold-deep), var(--gold-2));
  color: #1a1612;
  border: 0;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@media (min-width: 520px) {
  .social__label { font-size: 12px; }
  .social svg { width: 24px; height: 24px; }
  .promo__title { font-size: 19px; }
}

/* ---- Hero logo: дыхание букв (inner glow pulse) ---- */
.hero__logo {
  animation: logoBreathe 6s ease-in-out infinite;
}

@keyframes logoBreathe {
  0%, 100% { filter: brightness(1) saturate(1); }
  50% { filter: brightness(1.06) saturate(1.08); }
}

html[data-theme="dark"] .hero__logo {
  animation: logoBreatheDark 6s ease-in-out infinite;
}

@keyframes logoBreatheDark {
  0%, 100% { filter: brightness(1) saturate(1.05); }
  50% { filter: brightness(1.14) saturate(1.15); }
}

/* Shimmer-волна по МК и звёздам — медленная, только тёмная тема */
.hero__logo-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(112deg,
    transparent 30%,
    rgba(255, 248, 215, 0.0) 40%,
    rgba(255, 250, 220, 0.50) 50%,
    rgba(255, 248, 215, 0.0) 60%,
    transparent 70%);
  background-size: 400% 100%;
  background-position: 200% 0;
  -webkit-mask-image: url('assets/mask-mk-stars-512.png');
          mask-image: url('assets/mask-mk-stars-512.png');
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: shimmerSweep 14s ease-in-out infinite;
}

html[data-theme="dark"] .hero__logo-wrap::before { opacity: 1; }

@keyframes shimmerSweep {
  0% { background-position: 200% 0; }
  50%, 100% { background-position: -150% 0; }
}

/* Пульсация звёзд (золотой overlay на светлой, белёсый на тёмной) */
.hero__logo-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(212, 168, 71, 0.85);
  -webkit-mask-image: url('assets/mask-stars-512.png');
          mask-image: url('assets/mask-stars-512.png');
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  pointer-events: none;
  animation: starsBreath 4.5s ease-in-out infinite;
}

html[data-theme="dark"] .hero__logo-wrap::after {
  background: rgba(255, 244, 210, 0.45);
}

@keyframes starsBreath {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* ---- Hero stars canvas (only dark theme) ---- */
.hero__stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 0;
}
.hero { position: relative; }
.hero__logo, .hero__tagline, .hero__divider { position: relative; z-index: 1; }
html[data-theme="dark"] .hero__stars { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero__logo { animation: none; }
  .hero__stars { display: none; }
}
