/* ==========================================================================
   Sheppard Family Travel - Base CSS
   Shared styles across all web pages
   ========================================================================== */

/* Import design tokens */
@import url('/shared/variables.css');

/* ==========================================================================
   CSS RESET & DEFAULTS
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  font-family: var(--font-body);
  background-color: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  font-weight: var(--font-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-regular);
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
}

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

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

p {
  font-size: var(--text-base);
  line-height: var(--leading-base);
}

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

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

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Text utilities */
.text-xs { font-size: var(--text-xs); line-height: var(--leading-xs); }
.text-sm { font-size: var(--text-sm); line-height: var(--leading-sm); }
.text-base { font-size: var(--text-base); line-height: var(--leading-base); }
.text-md { font-size: var(--text-md); line-height: var(--leading-md); }
.text-lg { font-size: var(--text-lg); line-height: var(--leading-lg); }
.text-xl { font-size: var(--text-xl); line-height: var(--leading-xl); }
.text-2xl { font-size: var(--text-2xl); line-height: var(--leading-2xl); }
.text-3xl { font-size: var(--text-3xl); line-height: var(--leading-3xl); }

.text-ink { color: var(--ink); }
.text-ink-light { color: var(--ink-light); }
.text-muted { color: var(--ink-muted); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

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

.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }
.font-accent { font-family: var(--font-accent); }

.font-light { font-weight: var(--font-light); }
.font-regular { font-weight: var(--font-regular); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }

.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: var(--tracking-wide); }
.tracking-wider { letter-spacing: var(--tracking-wider); }
.tracking-label { letter-spacing: var(--tracking-label); }

/* Spacing utilities */
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.p-xs { padding: var(--space-xs); }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.p-2xl { padding: var(--space-2xl); }

/* Layout utilities */
.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-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Background utilities */
.bg-cream { background-color: var(--cream); }
.bg-white { background-color: var(--white); }
.bg-pale { background-color: var(--pale); }
.bg-primary { background-color: var(--primary); }
.bg-accent { background-color: var(--accent); }

/* Border utilities */
.border { border: 1px solid var(--warm-sand); }
.border-primary { border-color: var(--primary); }
.rounded { border-radius: var(--card-radius); }
.rounded-full { border-radius: 100px; }

/* Shadow utilities */
.shadow { box-shadow: var(--card-shadow); }
.shadow-hover { box-shadow: var(--card-shadow-hover); }

/* ==========================================================================
   LAYOUT CONTAINERS
   ========================================================================== */

.page {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 80px 32px 60px;
}

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

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

@media (max-width: 600px) {
  .page {
    padding: 60px 24px 48px;
  }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-up {
  animation: fadeUp 0.6s var(--ease-default);
}

.animate-fade-in {
  animation: fadeIn 0.3s var(--ease-default);
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.15s; }
.stagger-3 { animation-delay: 0.2s; }
.stagger-4 { animation-delay: 0.25s; }
.stagger-5 { animation-delay: 0.3s; }

/* ==========================================================================
   FOCUS & ACCESSIBILITY
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.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;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  body {
    background: white;
    color: black;
  }

  .no-print {
    display: none !important;
  }

  a {
    text-decoration: underline;
  }
}
