/* ============================================
   BASE.CSS — Design System Foundation
   Maddy's Dancing Tails
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --color-brand: #6A1806;
  --color-brand-hover: #4D1104;
  --color-primary: #1E1E1E;
  --color-secondary: #6F6F6F;
  --color-accent: #F3E6C2;
  --color-accent-light: #FDFBF7;
  --color-accent-dark: #d6c69e;
  --color-bg: #FFFDF9;
  --color-section-bg: #F8F4EE;
  --color-card: #FFFFFF;
  --color-border: #E8E2D8;
  --color-border-light: #F4EFEB;
  --color-success: #22C55E;
  --color-error: #EF4444;

  /* Typography */
  --font-heading: 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;

  --fs-display: clamp(3rem, 6vw + 1rem, 6rem);
  --fs-h1: clamp(2.5rem, 5vw + 0.5rem, 4.5rem);
  --fs-h2: clamp(2rem, 4vw + 0.5rem, 3.25rem);
  --fs-h3: clamp(1.375rem, 2.5vw + 0.5rem, 2rem);
  --fs-h4: clamp(1.125rem, 1.5vw + 0.5rem, 1.5rem);
  --fs-body: 1.0625rem;
  --fs-body-lg: 1.125rem;
  --fs-small: 0.875rem;
  --fs-caption: 0.8125rem;
  --fs-tag: 0.75rem;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  --lh-tight: 1.1;
  --lh-snug: 1.25;
  --lh-normal: 1.6;
  --lh-relaxed: 1.8;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  --section-py: clamp(80px, 10vw, 120px);
  --container-max: 1280px;
  --container-px: clamp(20px, 4vw, 40px);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-accent: 0 8px 24px rgba(200, 155, 94, 0.25);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  /* Z-Index Scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-primary);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

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

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-primary);
  letter-spacing: -0.03em;
}

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

p {
  color: var(--color-secondary);
  line-height: var(--lh-normal);
}

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

.display-heading {
  font-size: var(--fs-display);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: -0.04em;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.container--narrow {
  max-width: 900px;
}

.container--wide {
  max-width: 1440px;
}

.section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
  position: relative;
}

.section--no-pb { padding-bottom: 0; }
.section--no-pt { padding-top: 0; }

/* ---------- Section Header ---------- */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-3xl);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: var(--fs-tag);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-brand);
  margin-bottom: var(--space-lg);
}

.section-tag::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--color-brand);
  border-radius: 2px;
}

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

.section-header p {
  font-size: var(--fs-body-lg);
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- 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;
}

.text-center { text-align: center; }
.text-left { text-align: left; }

.mx-auto { margin-left: auto; margin-right: auto; }

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Image with object-fit */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-rounded {
  border-radius: var(--radius-lg);
}

/* Divider */
.divider {
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 3px;
  margin: var(--space-lg) 0;
}

/* Selection */
::selection {
  background: var(--color-accent);
  color: #fff;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

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

/* ---------- Responsive Helpers ---------- */
@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hide-tablet { display: none !important; }
}

@media (min-width: 1024px) {
  .hide-desktop { display: none !important; }
}
