:root {
  --bg: #06060c;
  --gold: #c9a050;
  --gold2: #e0c878;
  --gold-dark: #8b6914;
  --text: #e8e6e3;
  --text2: #9a9790;
  --card: #111118;
  --border: #222230;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== STARS ===== */
.stars-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.star { position: absolute; background: white; border-radius: 50%; animation: twinkle var(--duration) ease-in-out infinite; animation-delay: var(--delay); opacity: 0; }
@keyframes twinkle { 0%, 100% { opacity: 0.1; transform: scale(1); } 50% { opacity: 0.8; transform: scale(2); } }

/* ===== FOG ===== */
.fog-layer {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(ellipse at 50% 30%, rgba(201, 160, 80, 0.04) 0%, transparent 70%),
              radial-gradient(ellipse at 20% 80%, rgba(201, 160, 80, 0.03) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}

/* ===== LAYOUT ===== */
main { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; padding: 0 28px; }
section { padding: 100px 0; }
h2 { font-family: 'Cinzel', serif; font-size: 34px; font-weight: 700; text-align: center; margin-bottom: 40px; letter-spacing: 2px; color: var(--gold); }

/* ===== IMAGES ===== */
.artifact-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease, filter 0.8s ease; }
.artifact-img:hover { transform: scale(1.04); filter: brightness(1.15) saturate(1.1); }
.artifact-img--round { border-radius: 50%; }
.artifact-img--small { border-radius: 18px; width: 72px; height: 72px; }
.artifact-img--inline { border-radius: 16px; width: 64px; height: 64px; }

/* ===== PARALLAX ===== */
.parallax-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
}
@supports (-webkit-overflow-scrolling: touch) {
  .parallax-bg { background-attachment: scroll; }
}
.parallax-overlay {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(6, 6, 12, 0.3);
  pointer-events: none;
}

/* ===== HERO ===== */
.hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 0; position: relative; }
.hero-glow { position: absolute; top: 20%; left: 50%; transform: translate(-50%, -50%); width: 600px; height: 600px; background: radial-gradient(circle, rgba(201, 160, 80, 0.06) 0%, transparent 70%); pointer-events: none; }
.hero-artifact { width: 200px; height: 200px; border-radius: 50%; margin-bottom: 40px; position: relative; z-index: 1; }
.artifact-ring { position: absolute; top: -10px; left: -10px; width: calc(100% + 20px); height: calc(100% + 20px); border-radius: 50%; border: 1px solid rgba(201, 160, 80, 0.3); pointer-events: none; animation: ringPulse 3s ease-in-out infinite; }
@keyframes ringPulse { 0%, 100% { transform: scale(1); opacity: 0.4; } 50% { transform: scale(1.06); opacity: 0.8; } }
.hero-overline { font-family: 'Cinzel', serif; font-size: 14px; color: var(--gold); letter-spacing: 6px; text-transform: uppercase; margin-bottom: 16px; }
.hero h1 { font-family: 'Cinzel', serif; font-size: clamp(52px, 10vw, 88px); font-weight: 900; line-height: 1; letter-spacing: 4px; margin-bottom: 20px; }
.gold { background: linear-gradient(180deg, var(--gold2) 0%, var(--gold) 50%, var(--gold-dark) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: 17px; color: var(--text2); max-width: 480px; margin-bottom: 40px; line-height: 1.7; }
.hero-footnote { font-size: 12px; color: #555; margin-top: 20px; letter-spacing: 1px; }

/* ===== FORM ===== */
.hero-form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 440px; }
.hero-form input { flex: 1; min-width: 180px; padding: 16px 20px; background: rgba(17, 17, 24, 0.8); border: 1px solid var(--border); border-radius: 14px; color: var(--text); font-size: 17px; font-family: 'Inter', sans-serif; outline: none; transition: border-color 0.3s; }
.hero-form input:focus { border-color: var(--gold); }
.hero-form input::placeholder { color: #555; }
.btn-primary { padding: 16px 32px; background: linear-gradient(135deg, var(--gold-dark), var(--gold)); color: #0a0a0f; font-weight: 700; font-size: 16px; font-family: 'Cinzel', serif; letter-spacing: 1px; border: none; border-radius: 14px; cursor: pointer; transition: all 0.3s; white-space: nowrap; }
.btn-primary:hover { background: linear-gradient(135deg, var(--gold), var(--gold2)); box-shadow: 0 8px 30px rgba(201, 160, 80, 0.3); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ===== TRUST ===== */
.trust { display: flex; justify-content: center; gap: 56px; flex-wrap: wrap; padding: 0 0 60px; text-align: center; }
.trust-item { font-size: 14px; color: var(--text2); letter-spacing: 1px; }
.trust-icon { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto 14px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,0.5); transition: transform 0.3s; }
.trust-item:hover .trust-icon { transform: translateY(-6px); }

/* ===== HOW ===== */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.how-step { text-align: center; padding: 36px 28px; background: var(--card); border-radius: 20px; border: 1px solid var(--border); transition: border-color 0.3s, transform 0.3s; }
.how-step:hover { border-color: var(--gold); transform: translateY(-6px); }
.how-num { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; background: rgba(201, 160, 80, 0.12); color: var(--gold); font-family: 'Cinzel', serif; font-weight: 700; font-size: 20px; border-radius: 50%; margin-bottom: 18px; }
.how-step h3 { font-family: 'Cinzel', serif; font-size: 17px; font-weight: 600; margin-bottom: 10px; letter-spacing: 1px; }
.how-step p { font-size: 14px; color: var(--text2); line-height: 1.6; }

/* ===== DIVIDER ===== */
.divider { padding: 40px 0; }
.divider-frieze { width: 100%; height: 200px; border-radius: 20px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,0.6); }

/* ===== WHAT ===== */
.what-list { list-style: none; display: grid; gap: 16px; max-width: 560px; margin: 0 auto; }
.what-list li { display: flex; gap: 22px; align-items: center; padding: 22px 26px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; transition: border-color 0.3s, transform 0.3s; }
.what-list li:hover { border-color: var(--gold); transform: translateX(8px); }
.what-list li strong { display: block; color: var(--text); font-family: 'Cinzel', serif; font-size: 16px; letter-spacing: 1px; margin-bottom: 4px; }
.what-list li p { font-size: 13px; color: var(--text2); line-height: 1.5; margin: 0; }
.what-icon { width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,0.5); }

/* ===== CTA ===== */
.cta { text-align: center; padding: 80px 0 120px; }
.cta-artifact { width: 100%; height: 400px; border-radius: 24px; margin: 0 auto 48px; overflow: hidden; position: relative; box-shadow: 0 16px 48px rgba(0,0,0,0.6); }
.cta-artifact-overlay { position: absolute; bottom: 0; left: 0; width: 100%; height: 50%; background: linear-gradient(to top, rgba(6,6,12,0.9), transparent); pointer-events: none; }
.cta h2 { position: relative; z-index: 2; }
.cta .hero-form { margin: 0 auto; position: relative; z-index: 2; }

/* ===== FOOTER ===== */
footer {
  padding: 48px 28px 28px;
  color: #777;
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto 28px;
}

.footer-brand-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 2px;
  cursor: default;
  user-select: none;
  transition: color 0.3s;
}

.footer-brand:hover {
  color: var(--gold2);
}

.footer-tagline {
  color: #666;
  font-size: 12px;
  letter-spacing: 1px;
}

.footer-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #777;
  text-decoration: none;
  font-size: 12px;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-sep {
  color: #444;
}

.footer-bottom {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-rekv p {
  font-size: 12px;
  color: #888;
  margin: 0;
}

.footer-contacts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-contacts a {
  color: #888;
  text-decoration: none;
  font-size: 12px;
  transition: color 0.3s;
}

.footer-contacts a:hover {
  color: var(--gold);
}

.footer-copy {
  font-size: 11px;
  color: #555;
  width: 100%;
  text-align: center;
  margin-top: 16px;
}

/* ===== АДАПТИВ ФУТЕРА ===== */
@media (max-width: 640px) {
  footer {
    padding: 36px 16px 24px;
    text-align: center;
  }

  .footer-top {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .footer-brand-row {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
  }

  .footer-contacts {
    justify-content: center;
  }
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 6, 12, 0);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: background 1s ease, opacity 1s ease, visibility 1s ease;
  backdrop-filter: blur(0px);
  padding: 24px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  background: rgba(6, 6, 12, 0.94);
  backdrop-filter: blur(8px);
  transition: background 0.8s ease, opacity 0.8s ease, visibility 0.8s ease, backdrop-filter 0.8s ease;
}

.modal-card {
  background: var(--card);
  border: 1px solid rgba(201, 160, 80, 0);
  border-radius: 28px;
  padding: 48px 48px;
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(50px) scale(0.9);
  opacity: 0;
  filter: blur(4px);
  transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.8s ease,
              border-color 0.8s ease,
              box-shadow 0.8s ease,
              filter 0.8s ease;
  box-shadow: 0 0 0px rgba(201, 160, 80, 0);
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
  filter: blur(0px);
  border-color: var(--gold);
  box-shadow: 0 0 80px rgba(201, 160, 80, 0.15);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--text2);
  font-size: 32px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.5s ease 0.6s, color 0.3s;
  line-height: 1;
}

.modal-overlay.active .modal-close {
  opacity: 1;
}

.modal-close:hover {
  color: var(--gold);
}

.modal-glyph {
  text-align: center;
  margin-bottom: 16px;
}

.modal-glyph img {
  display: block;
  margin: 0 auto;
}

.modal-name {
  font-family: 'Cinzel', serif;
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.modal-sub {
  text-align: center;
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 28px;
  letter-spacing: 1px;
}

.modal-text {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 32px;
  min-height: 40px;
  white-space: pre-line;
  font-family: 'Inter', sans-serif;
  overflow-wrap: break-word;
  transition: opacity 2s ease-out;
}

/* ===== MODAL OFFER ===== */
.modal-offer {
  text-align: center;
  padding: 32px 28px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  border: 1px solid var(--border);
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.modal-offer.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.modal-offer-title {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.modal-price-new {
  font-family: 'Cinzel', serif;
  font-size: 44px;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 20px;
}

.modal-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 14px;
}

.modal-form input {
  flex: 1;
  min-width: 180px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  outline: none;
}

.modal-form input:focus {
  border-color: var(--gold);
}

.modal-form input::placeholder {
  color: #555;
}

.modal-message {
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  display: none;
}

.modal-message.success {
  display: block;
  background: rgba(74, 222, 128, 0.08);
  color: #4ade80;
}

.modal-message.error {
  display: block;
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
}

.modal-guarantee {
  font-size: 12px;
  color: #888;
  margin-top: 16px;
  letter-spacing: 0.5px;
}

.modal-card::-webkit-scrollbar { width: 4px; }
.modal-card::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
body.no-scroll { overflow: hidden; }

/* ===== АДМИН-ЛОГИН ===== */
#adminLoginOverlay {
  z-index: 2000;
}

#adminLoginOverlay.active {
  opacity: 1;
  visibility: visible;
}

#adminLoginOverlay .modal-card {
  max-width: 400px;
  text-align: center;
}

#adminLoginForm {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

#adminLoginForm input {
  flex: 1;
  min-width: 180px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  outline: none;
}

#adminLoginForm input:focus {
  border-color: var(--gold);
}

#adminLoginForm input::placeholder {
  color: #555;
}

#adminLoginMessage {
  margin-top: 14px;
  font-size: 13px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  main { padding: 0 16px; }
  h2 { font-size: 26px; }
  section { padding: 60px 0; }
  .hero h1 { font-size: 42px; }
  .hero-artifact { width: 150px; height: 150px; }
  .modal-card { padding: 32px 24px; }
  .trust { gap: 28px; }
  .divider-frieze { height: 150px; }
  .cta-artifact { height: 250px; }
  .how-grid { grid-template-columns: 1fr; }
}