/* ==========================================================================
   PetFiles — Base Styles (Reset + Typography + Container)
   ========================================================================== */

/* 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-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--color-primary-light);
}

/* Links in body text need underline for accessibility (not just color) */
main p a,
main li a,
.accordion__content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}

h1 {
  font-size: var(--font-size-4xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-size-3xl);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

p {
  color: var(--color-text-secondary);
  max-width: 65ch;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-2xl);
}

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

/* Section spacing */
.section {
  padding: var(--space-9xl) 0;
}

.section--alt {
  background-color: var(--color-surface);
}

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

.section__header p {
  margin: var(--space-lg) auto 0;
  font-size: var(--font-size-md);
}

/* Utility */
.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-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-lg); }

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

  .container {
    padding: 0 var(--space-lg);
  }
}

@media (max-width: 480px) {
  h1 { font-size: var(--font-size-2xl); }
  h2 { font-size: var(--font-size-xl); }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
