/* =====================================================================
   SEO Tribe — Base (reset, typography, layout primitives)
   ===================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-18);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color var(--t-fast);
}
a:hover { color: var(--color-primary-700); text-decoration: underline; }

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

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25em; }
li { margin-bottom: var(--space-2); }
li::marker { color: var(--color-accent); }

strong, b { font-weight: var(--fw-semi); }

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-12) 0;
}

/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-primary);
  margin: 0 0 var(--space-4);
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.25rem, 4.5vw + 1rem, 4rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.75rem, 2.6vw + 1rem, 2.75rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.375rem, 1.4vw + 1rem, 1.75rem); }
h4 { font-size: var(--fs-20); }
h5 { font-size: var(--fs-18); }
h6 { font-size: var(--fs-16); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---- Layout primitives ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container--narrow { max-width: 880px; }
.container--wide   { max-width: 1320px; }

.section {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
}
.section--tight  { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section--alt    { background: var(--color-bg-alt); }
.section--soft   { background: var(--color-bg-soft); }
.section--dark   { background: var(--color-primary); color: var(--color-on-primary); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--color-on-primary); }

.section-head { max-width: 720px; margin-bottom: var(--space-10); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--fs-14);
  font-weight: var(--fw-semi);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-600);
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--color-accent-600);
  border-radius: 2px;
}
.lede {
  font-size: clamp(1.125rem, 0.6vw + 1rem, 1.25rem);
  color: var(--color-text-muted);
  line-height: var(--lh-loose);
  max-width: 60ch;
}
.section-head--center .lede { margin-inline: auto; }

/* ---- Grids ---- */
.grid { display: grid; gap: var(--space-6); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--pricing { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-5); }

/* ---- Utilities ---- */
.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;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: var(--space-3) var(--space-5);
  z-index: 9999;
  font-weight: var(--fw-semi);
  border-radius: 0 0 var(--radius-md) 0;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--color-accent-600);
  outline-offset: 3px;
  border-radius: 4px;
}

.text-muted  { color: var(--color-text-muted); }
.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.text-pretty  { text-wrap: pretty; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.hide-mobile { display: none; }
@media (min-width: 768px) {
  .hide-mobile { display: initial; }
  .hide-desktop { display: none; }
}
