/**
 * Base Styles
 *
 * CSS reset and foundational styles for the Wellness Center theme.
 */

/* ═══════════════════════════════════════════════════════════════════════════
   CSS RESET
   ═══════════════════════════════════════════════════════════════════════════ */

*,
*::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-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
  color: var(--color-body);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: calc(var(--top-bar-height) + var(--nav-height));
}

/* ═══════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-tight);
  color: var(--color-ink);
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
  margin-bottom: var(--spacing-md);
  color: var(--color-body);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-gold-dark);
}

strong, b {
  font-weight: var(--font-weight-semibold);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LISTS
   ═══════════════════════════════════════════════════════════════════════════ */

ul, ol {
  list-style: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   IMAGES & MEDIA
   ═══════════════════════════════════════════════════════════════════════════ */

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  border-style: none;
  max-width: 100%;
  height: auto;
}

/* Guard against stray horizontal scroll (clip keeps position:sticky working) */
html,
body {
  overflow-x: clip;
}

/* Custom scroll progress bar — a thin vertical track on the right edge that
   FILLS from the top as the page scrolls (replaces the native scrollbar). */
.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  width: 6px;
  height: 100vh;
  background: rgba(168, 110, 22, 0.12); /* faint gold track */
  z-index: var(--z-tooltip);
  pointer-events: none;
}

.scroll-progress__bar {
  display: block;
  width: 100%;
  height: 0;
  background: var(--color-gold);
  border-radius: 0; /* square */
  will-change: height;
}

/* Hide the native scrollbar (no thumb, no arrows, no padding) */
html {
  scrollbar-width: none; /* Firefox */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════════════ */

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

button,
input {
  overflow: visible;
}

button,
select {
  text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
  cursor: pointer;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

textarea {
  overflow: auto;
  resize: vertical;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

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

.container--wide {
  max-width: var(--container-wide);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

.section {
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
  padding-left: var(--section-padding-x);
  padding-right: var(--section-padding-x);
}

.section--bg-white {
  background-color: var(--color-bg-primary);
}

.section--bg-light {
  background-color: var(--color-bg-secondary);
}

.section--bg-warm {
  background-color: var(--color-bg-warm);
  border-top: 1px solid var(--color-border-warm);
  border-bottom: 1px solid var(--color-border-warm);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Base eyebrow - simple uppercase label without line */
.eyebrow {
  display: block;
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 10px;
}

.eyebrow--navy {
  color: var(--color-navy-600);
}

/* Kicker - Editorial-style section labels with golden line */
.section-eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-widest);
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 20px;
}

.section-eyebrow::before,
.kicker::before {
  content: "—";
  font-weight: var(--font-weight-bold);
  color: var(--color-gold);
}

/* Light variant for dark backgrounds */
.kicker.light,
.section-eyebrow--light {
  color: var(--color-gold);
}

.kicker.light::before,
.section-eyebrow--light::before {
  color: var(--color-gold);
}

/* Center alignment */
.kicker.center,
.section-eyebrow.center {
  justify-content: center;
}

.section-title,
.h-sec {
  font-size: clamp(33px, 4.4vw, 54px);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-ink);
  margin-bottom: var(--spacing-md);
}

.lead {
  font-size: 21px;
}

.text-center .lead {
  margin-left: auto;
  margin-right: auto;
}

.section-line {
  display: none; /* Hidden in new design - using kicker line instead */
}

.section-line--center {
  margin-left: auto;
  margin-right: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   VISIBILITY UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Base fade-in (up) */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in from left */
.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fade in from right */
.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fade in with scale */
.fade-in-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered animation delays for children */
.stagger-children > *:nth-child(1) { transition-delay: 0s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.5s; }
.stagger-children > *:nth-child(7) { transition-delay: 0.6s; }
.stagger-children > *:nth-child(8) { transition-delay: 0.7s; }

/* Animation delay utilities */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .fade-in-left,
  .fade-in-right,
  .fade-in-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Disable scroll-reveal / loading animations on mobile.
   Elements render in their final state immediately — no fade, slide,
   scale, or staggered delay — regardless of the JS .visible toggle. */
@media (max-width: 768px) {
  .fade-in,
  .fade-in-left,
  .fade-in-right,
  .fade-in-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .stagger-children > *,
  .delay-1,
  .delay-2,
  .delay-3,
  .delay-4,
  .delay-5 {
    transition-delay: 0s;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   WORDPRESS SPECIFIC
   ═══════════════════════════════════════════════════════════════════════════ */

.alignleft {
  float: left;
  margin-right: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.alignright {
  float: right;
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--spacing-md);
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  color: var(--color-body);
  margin-top: var(--spacing-sm);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
