/* ============================================================
   CORE.CSS — Chedders Domain Services
   Global resets · Typography · Layout foundation
   V3 §5.4 — overflow-x + max-width on html & body
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
  font-size: 100%;
}

body {
  font-family: 'Inter', 'Plus Jakarta Sans', 'Manrope', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(24px, 4vw, 42px); letter-spacing: -0.02em; }
h2 { font-size: clamp(20px, 3vw, 28px); }
h3 { font-size: clamp(16px, 2vw, 20px); }
h4 { font-size: 17px; }

p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

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

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

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

ul, ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

code {
  font-family: 'Fira Mono', 'Courier New', monospace;
  font-size: 13px;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
  color: var(--text);
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-md);
}

.container,
.container-xl,
.container-xxl {
  max-width: 1320px;
  padding-left: 24px;
  padding-right: 24px;
}

/* V3 §9 — reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in-up { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
