/* ============================================
   ADVANCED HEALING — Base Styles
   Modern Reset + Global Typography + Utilities
   ============================================ */

/* === MODERN CSS RESET === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Smooth scrolling for the entire document */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Custom scrollbar — cream track, gold thumb */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dark) var(--bg-secondary);
}

/* === BODY === */
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Animated moving background — very subtle pastel washes on cream */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: 
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(201,168,76,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 60% 60% at 80% 60%, rgba(196,160,212,0.05) 0%, transparent 50%);
  background-size: 150% 150%, 200% 200%;
  animation: meshMove 35s ease-in-out infinite;
  pointer-events: none;
  will-change: background-position;
}

@keyframes meshMove {
  0% { background-position: 0% 50%, 100% 0%; }
  50% { background-position: 100% 25%, 0% 100%; }
  100% { background-position: 0% 50%, 100% 0%; }
}

/* === TEXT SELECTION === */
::selection {
  background-color: var(--gold);
  color: #ffffff;
}

::-moz-selection {
  background-color: var(--gold);
  color: #ffffff;
}

/* === HEADINGS === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

h1 {
  font-size: var(--text-6xl);
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

/* === LINKS === */
a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-smooth),
              text-decoration-color var(--duration-base) var(--ease-smooth);
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* === IMAGES === */
img {
  max-width: 100%;
  display: block;
  height: auto;
}

/* === LISTS === */
ul, ol {
  list-style: none;
}

/* === CONTAINER SYSTEM === */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  width: 100%;
}

.container-wide {
  max-width: var(--container-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  width: 100%;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  width: 100%;
}

/* === GRADIENT TEXT UTILITY === */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* === SECTION PADDING === */
.section-padding {
  padding-block: var(--space-32);
}

.section-padding-sm {
  padding-block: var(--space-20);
}

/* === MISC RESETS === */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Remove default fieldset/legend styles */
fieldset {
  border: none;
}

/* Ensure table consistency */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Prevent overflow on the page */
main {
  overflow-x: hidden;
}
