/* ==========================================================================
   PERFECT ECOTECH - BASE & RESET
   Strict rule: SMALLEST VISIBLE FONT IS 14PX (0.875rem)
   ========================================================================== */

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

html {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: var(--lh-body);
  color: var(--color-body);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  color: var(--color-body);
  background-color: var(--color-bg);
}

main {
  flex: 1 0 auto;
}

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

h1 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
}

h3 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
}

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

p {
  margin-bottom: var(--spacing-4);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
}

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

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

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

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: var(--fs-base);
  color: inherit;
}

/* Accessible Focus States */
:focus-visible {
  outline: 2px solid var(--color-water);
  outline-offset: 2px;
}

/* Text Selection */
::selection {
  background-color: var(--color-water-light);
  color: var(--color-primary-navy);
}

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