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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

h2 {
  font-size: 28px;
  letter-spacing: 0.01em;
}

h3 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
}

p {
  color: var(--text-secondary);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

section {
  padding: var(--space-9) 0;
  position: relative;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--gold);
  color: var(--bg-primary);
  font-weight: 600;
  border-radius: 0 0 var(--border-radius-sm) 0;
}

.skip-link:focus {
  top: 0;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Selection */
::selection {
  background: rgba(201, 169, 110, 0.3);
  color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 110, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 169, 110, 0.3);
}

/* Background blobs (desktop only) */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-background);
}

body::before {
  width: 600px;
  height: 600px;
  top: 30%;
  left: 10%;
  background: radial-gradient(ellipse, rgba(142, 107, 199, 0.06), transparent 70%);
  animation: blobFloat1 25s infinite ease-in-out;
}

body::after {
  width: 500px;
  height: 500px;
  top: 60%;
  right: 10%;
  background: radial-gradient(ellipse, rgba(201, 169, 110, 0.04), transparent 70%);
  animation: blobFloat2 25s infinite ease-in-out;
}

@keyframes blobFloat1 {
  0%, 100% { transform: translateX(0) translateY(0); }
  33% { transform: translateX(20px) translateY(-15px); }
  66% { transform: translateX(-15px) translateY(10px); }
}

@keyframes blobFloat2 {
  0%, 100% { transform: translateX(0) translateY(0); }
  33% { transform: translateX(-20px) translateY(10px); }
  66% { transform: translateX(15px) translateY(-15px); }
}

/* Noise overlay */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/noise.png');
  background-repeat: repeat;
  opacity: 0.02;
  pointer-events: none;
  z-index: var(--z-background);
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-preloader);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

.preloader.hidden {
  opacity: 0;
  pointer-events: none;
}

.preloader-inner {
  text-align: center;
}

.preloader-star {
  color: var(--gold);
  margin-bottom: 16px;
  animation: preloaderSpin 3s infinite linear;
  opacity: 0.7;
}

@keyframes preloaderSpin {
  0% { transform: rotate(0deg) scale(1); opacity: 0.5; }
  50% { transform: rotate(180deg) scale(1.15); opacity: 1; }
  100% { transform: rotate(360deg) scale(1); opacity: 0.5; }
}

.preloader-text {
  display: block;
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 600;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: preloaderPulse 1.5s infinite ease-in-out;
}

.preloader-sub {
  display: block;
  margin-top: 8px;
  font: 400 14px/1 var(--font-body);
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

/* Sparkle particles */
.sparkle-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  pointer-events: none;
  animation: sparkleFloat 4s infinite ease-in-out;
}

.sparkle-particle:nth-child(odd) {
  width: 2px;
  height: 2px;
  background: var(--gold-light);
}

@keyframes sparkleFloat {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  20% { opacity: 0.8; }
  50% { opacity: 1; transform: translateY(-20px) scale(1); }
  80% { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-40px) scale(0.3); }
}

/* Section CTA */
.section-cta {
  text-align: center;
  margin-top: var(--space-8);
}

.section-cta p {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-5);
}

@media (min-width: 768px) {
  body {
    font-size: 16.5px;
  }

  h1 {
    font-size: 60px;
  }

  h2 {
    font-size: 42px;
  }

  h3 {
    font-size: 26px;
  }

  section {
    padding: var(--space-10) 0;
  }

  .container {
    padding: 0 var(--container-padding-md);
  }
}
