/* ==========================================================================
   Seedistry Base Styles, Reset, Typography & Accessibility Foundations
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--color-bg-cream);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg-cream);
  color: var(--color-text-primary);
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

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

a {
  color: var(--color-forest);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-heading);
  line-height: 1.24;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-hero); margin-bottom: var(--space-4); }
h2 { font-size: var(--text-2xl); margin-bottom: var(--space-3); }
h3 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
h4 { font-size: var(--text-lg); margin-bottom: var(--space-2); }

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

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

ul, ol {
  padding-left: var(--space-5);
  margin-bottom: var(--space-4);
}

li {
  margin-bottom: var(--space-1);
}

/* Accessible Focus States */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 9999;
  background: var(--color-forest);
  color: var(--color-bg-cream);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  top: var(--space-3);
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section {
  padding: var(--space-12) 0;
}

.section-sm {
  padding: var(--space-8) 0;
}

.bg-stone { background-color: var(--color-bg-stone); }
.bg-sage { background-color: var(--color-bg-sage); }
.bg-white { background-color: var(--color-bg-white); }
.bg-forest { background-color: var(--color-bg-forest); color: var(--color-text-inverse); }
.bg-forest h1, .bg-forest h2, .bg-forest h3, .bg-forest h4 { color: var(--color-text-inverse); }

.urdu-text {
  font-family: var(--font-urdu);
}

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

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