/* ==========================================================
   STILLWATER WELLNESS & MED SPA — Design System
   Aesthetic: "Sanctuary Luxe" — warm, layered, organic luxury
   ========================================================== */

/* --- Reset & Box Model --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: auto; /* Lenis handles smooth scroll */
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.7;
  overflow-x: hidden;
}

/* --- CSS Custom Properties --- */
:root {
  /* Brand Palette */
  --primary: #1a3a3a;
  --primary-light: #264d4d;
  --primary-dark: #0f2424;
  --secondary: #c9a86c;
  --secondary-light: #d4b97f;
  --secondary-dark: #b08f55;
  --accent: #e8d5b7;
  --accent-light: #f0e2cc;

  /* Neutrals */
  --bg-light: #f9f6f1;
  --bg-warm: #f3ede3;
  --bg-cream: #faf8f4;
  --white: #ffffff;
  --text-dark: #2c2c2c;
  --text-body: #444444;
  --text-muted: #777777;
  --text-light: #999999;
  --border: rgba(26, 58, 58, 0.08);
  --border-gold: rgba(201, 168, 108, 0.3);

  /* Typography Scale — fluid clamp() */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Montserrat', 'Helvetica Neue', sans-serif;

  --text-hero: clamp(3rem, 6vw + 1rem, 6rem);
  --text-h1: clamp(2.25rem, 4vw + 0.5rem, 4rem);
  --text-h2: clamp(1.75rem, 3vw + 0.5rem, 3rem);
  --text-h3: clamp(1.25rem, 2vw + 0.25rem, 1.75rem);
  --text-h4: clamp(1.1rem, 1.5vw + 0.25rem, 1.35rem);
  --text-body-lg: clamp(1rem, 1.2vw, 1.2rem);
  --text-body: 1rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;
  --text-label: 0.6875rem;

  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;
  --space-section: clamp(5rem, 10vw, 8rem);

  /* Layout */
  --max-width: 1320px;
  --max-width-narrow: 800px;
  --max-width-wide: 1440px;
  --gutter: clamp(1.5rem, 4vw, 3rem);

  /* Effects */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 40px;
  --radius-pill: 100px;

  --shadow-sm: 0 2px 8px rgba(26, 58, 58, 0.04);
  --shadow-md: 0 8px 30px rgba(26, 58, 58, 0.06);
  --shadow-lg: 0 16px 50px rgba(26, 58, 58, 0.08);
  --shadow-xl: 0 24px 80px rgba(26, 58, 58, 0.1);
  --shadow-gold: 0 8px 30px rgba(201, 168, 108, 0.15);

  --glass-bg: rgba(249, 246, 241, 0.7);
  --glass-blur: blur(20px);
  --glass-border: 1px solid rgba(255, 255, 255, 0.3);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --duration-slow: 0.6s;
  --duration-reveal: 0.8s;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--primary);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }

.text-hero {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.text-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-body-lg);
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-body);
  max-width: 600px;
}

.text-label {
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--secondary);
}

.text-accent {
  color: var(--secondary);
}

p {
  font-size: var(--text-body);
  color: var(--text-body);
  line-height: 1.8;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

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

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Section Dividers --- */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header .text-label {
  margin-bottom: var(--space-sm);
  display: block;
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header .text-subtitle {
  margin-inline: auto;
}

/* Gold line accent */
.gold-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
  margin: var(--space-md) auto;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.25rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border: 1px solid var(--primary);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border-gold);
}

.btn-secondary:hover {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: var(--white);
  border: none;
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--secondary-light), var(--secondary));
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn-sm {
  padding: 0.625rem 1.5rem;
  font-size: var(--text-xs);
}

.btn-lg {
  padding: 1.25rem 3rem;
  font-size: var(--text-body);
}

/* --- Selections --- */
::selection {
  background: var(--accent);
  color: var(--primary);
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

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

/* --- Focus Styles (a11y) --- */
:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
