/* =============================================================
   AULTER — core.css
   Global resets · Typography · Layout foundation
   Overflow/pull protection — V3 DNA §5.4 + §3.2 + §9
   ============================================================= */

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

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

/* ── Root — V3 §5.4 overflow lock ── */
html {
  font-size:                16px;
  scroll-behavior:          smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x:               hidden;   /* prevent horizontal overflow at root */
  max-width:                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;   /* belt-and-braces horizontal lock */
  max-width:        100%;
  position:         relative;
  transition:
    background-color var(--transition-base),
    color            var(--transition-base);
}

/* ── Transition surfaces ── */
header, section, footer, .card, .navbar, input, textarea, select {
  transition:
    background-color var(--transition-base),
    border-color     var(--transition-base),
    color            var(--transition-base);
}

/* ── Links ── */
a {
  color:           var(--accent-light);
  text-decoration: none;
  transition:      color var(--transition-fast);
}
a:hover { color: #fff; }

[data-theme="light"] a       { color: var(--accent); }
[data-theme="light"] a:hover { color: var(--primary); }

/* ── Media ── */
img, video {
  max-width: 100%;
  height:    auto;
  display:   block;
}

/* ── Headings — V3 §3.3 ── */
h1, h2, h3, h4, h5, h6 {
  font-family:   'Inter', 'Plus Jakarta Sans', sans-serif;
  font-weight:   700;
  line-height:   1.2;
  color:         var(--text);
  margin-bottom: var(--space-md);
}

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

/* ── Body text ── */
p {
  font-size:     15px;
  line-height:   1.7;
  color:         var(--text);
  margin-bottom: var(--space-md);
}
p:last-child { margin-bottom: 0; }

small, .text-caption {
  font-size: 13px;
  color:     var(--muted);
}

/* ── Lists ── */
ul, ol {
  padding-left:  var(--space-lg);
  margin-bottom: var(--space-md);
}
li { margin-bottom: var(--space-xs); font-size: 15px; }

/* ── HR ── */
hr {
  border:     none;
  border-top: 1px solid var(--border);
  margin:     var(--space-lg) 0;
}

/* ── Focus — V3 §7.3 ── */
:focus-visible {
  outline:        2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Selection ── */
::selection {
  background-color: var(--accent);
  color:            #ffffff;
}

/* ── Scrollbar ── */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-md); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
