/* ============================================================
   BASE.CSS — ABI's Beauty Care & Academy
   Reset, Base Styles, Typography Foundation
   ============================================================ */

/* ── Complete Reset ──────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── HTML ─────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ── Body ─────────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--bg-primary);
  overflow-x: hidden;
  max-width: 100vw;
  line-height: 1.7;
  letter-spacing: 0.3px;
  position: relative;
  min-height: 100vh;
}

/* Animated gradient background overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(80, 166, 91, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(80, 166, 91, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse 100% 80% at 50% 50%, rgba(17, 17, 17, 0.8) 0%, transparent 100%),
    linear-gradient(180deg, #181818 0%, #111111 30%, #0d0d0d 60%, #111111 80%, #181818 100%);
  background-size: 200% 200%, 200% 200%, 100% 100%, 100% 100%;
  animation: gradientShift 15s ease infinite;
  z-index: -1;
  pointer-events: none;
}

/* Lock scroll on mobile menu open */
body.menu-open {
  overflow: hidden;
}

/* ── Custom Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0d0d0d;
}

::-webkit-scrollbar-thumb {
  background: rgba(80, 166, 91, 0.35);
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(80, 166, 91, 0.6);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(80, 166, 91, 0.35) #0d0d0d;
}

/* ── Selection ───────────────────────────────────────────────── */
::selection {
  background: var(--color-primary);
  color: var(--color-white);
}

::-moz-selection {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ── Container ───────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

/* ── Base Elements ───────────────────────────────────────────── */
img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-highlight);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-white);
  line-height: 1.2;
  font-weight: 700;
}

p {
  margin-bottom: var(--space-md);
}

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

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font-family: var(--font-body);
  outline: none;
}

/* ── Section Base ────────────────────────────────────────────── */
.section {
  padding: var(--space-3xl) 0;
  position: relative;
  z-index: 2;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--color-white);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.5px;
}

.section__subtitle {
  font-family: var(--font-subheading);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--color-text-muted);
  font-style: italic;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section__divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-highlight));
  margin: var(--space-md) auto;
  border-radius: 2px;
  border: none;
  position: relative;
}

.section__divider::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-highlight));
  filter: blur(8px);
  opacity: 0.4;
  border-radius: 4px;
}

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

  body::before {
    animation: none;
  }

  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}
