/* ============================================================
   VISA ABORDO CONSULTING — BASE STYLES
   CSS reset + root typography + layout primitives.
   Load order: tokens.css → base.css → animations.css → components.css
   ============================================================ */

/* ── MODERN RESET ──────────────────────────────────────────── */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  hanging-punctuation: first last;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-normal);
  line-height: var(--lh-relaxed);
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}

/* Offset page content below fixed navbar */
main {
  padding-top: var(--navbar-height);
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-snug);
  color: var(--text-primary);
  overflow-wrap: break-word;
}

p {
  overflow-wrap: break-word;
  max-width: 72ch;
}

a {
  color: inherit;
  text-decoration: none;
}

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

input, button, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  line-height: inherit;
}

ul, ol { list-style: none; }

table { border-collapse: collapse; }

/* ── ACCESSIBILITY ─────────────────────────────────────────── */

.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;
}

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

/* ── CONTAINER ─────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (max-width: 640px) {
  .container {
    padding-inline: var(--space-4);
  }
}

/* ── SECTION SPACING ───────────────────────────────────────── */

.section {
  padding-block: var(--space-24);
}

.section--sm {
  padding-block: var(--space-16);
}

.section--lg {
  padding-block: var(--space-32);
}

@media (max-width: 768px) {
  .section    { padding-block: var(--space-16); }
  .section--sm { padding-block: var(--space-12); }
  .section--lg { padding-block: var(--space-20); }
}

/* Alternating section backgrounds */
.section--white     { background-color: var(--bg-page); }
.section--gray      { background-color: var(--bg-surface); }
.section--primary   { background: var(--gradient-primary); color: var(--text-inverse); }
.section--dark      { background-color: var(--color-primary-900); color: var(--text-inverse); }
.section--teal-mesh { background: var(--gradient-teal-mesh); }
.section--soft-teal { background: var(--gradient-soft-teal); }

/* ── SECTION HEADER ────────────────────────────────────────── */

.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: var(--space-12);
}

.section-header--left {
  text-align: left;
  margin-inline: 0;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: var(--space-4);
}

.section-eyebrow::before,
.section-eyebrow::after {
  content: '';
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.section-title em {
  font-style: normal;
  color: var(--brand-primary);
}

.section-title .highlight {
  color: var(--brand-accent);
}

.section-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
}

/* On dark section, invert text */
.section--primary .section-eyebrow,
.section--dark .section-eyebrow {
  color: var(--color-accent-300);
}

.section--primary .section-title,
.section--dark .section-title {
  color: var(--text-inverse);
}

.section--primary .section-desc,
.section--dark .section-desc {
  color: rgba(255,255,255,.75);
}

/* ── GRID HELPERS ──────────────────────────────────────────── */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width:  768px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width:  640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Auto-fit responsive grids */
.grid-auto-sm { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-6); }
.grid-auto-md { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-6); }
.grid-auto-lg { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-8); }

/* ── FLEX HELPERS ──────────────────────────────────────────── */

.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-center   { justify-content: center; }
.justify-between  { justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

/* ── TYPOGRAPHY UTILITIES ──────────────────────────────────── */

.text-xs   { font-size: var(--text-xs);   }
.text-sm   { font-size: var(--text-sm);   }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg);   }
.text-xl   { font-size: var(--text-xl);   }
.text-2xl  { font-size: var(--text-2xl);  }
.text-3xl  { font-size: var(--text-3xl);  }
.text-4xl  { font-size: var(--text-4xl);  }
.text-5xl  { font-size: var(--text-5xl);  }
.text-6xl  { font-size: var(--text-6xl);  }
.text-7xl  { font-size: var(--text-7xl);  }

.font-heading { font-family: var(--font-heading); }
.font-body    { font-family: var(--font-body); }

.fw-light     { font-weight: var(--fw-light); }
.fw-normal    { font-weight: var(--fw-normal); }
.fw-medium    { font-weight: var(--fw-medium); }
.fw-semibold  { font-weight: var(--fw-semibold); }
.fw-bold      { font-weight: var(--fw-bold); }
.fw-extrabold { font-weight: var(--fw-extrabold); }

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-primary-c   { color: var(--text-primary); }
.text-secondary-c { color: var(--text-secondary); }
.text-brand       { color: var(--brand-primary); }
.text-accent      { color: var(--brand-accent); }
.text-inverse     { color: var(--text-inverse); }

/* ── SPACING UTILITIES ─────────────────────────────────────── */

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

/* ── DIVIDER ───────────────────────────────────────────────── */

.divider {
  border: none;
  height: 1px;
  background: var(--border-subtle);
}

.divider--gradient {
  background: linear-gradient(90deg, transparent, var(--border-default), transparent);
}

/* ── MISC ──────────────────────────────────────────────────── */

.rounded-full { border-radius: var(--radius-full); }

.overflow-hidden { overflow: hidden; }

/* ── DECORATIVE ORBS ───────────────────────────────────────── */
/* Usage: <div class="visual-orb visual-orb--teal visual-orb--lg" style="top:-200px;right:-150px"></div> */

.visual-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: var(--gradient-orb-teal);
  animation: driftOrb 16s ease-in-out infinite;
}

.visual-orb--blue  { background: var(--gradient-orb-blue); }
.visual-orb--glow  { background: var(--gradient-orb-glow); }

.visual-orb--xs  { width: 160px; height: 160px; }
.visual-orb--sm  { width: 260px; height: 260px; }
.visual-orb--md  { width: 380px; height: 380px; }
.visual-orb--lg  { width: 520px; height: 520px; }
.visual-orb--xl  { width: 680px; height: 680px; }

.visual-orb--slow  { animation-duration: 22s; }
.visual-orb--fast  { animation-duration: 10s; }
.visual-orb--delay { animation-delay: -7s; }

/* Selection */
::selection {
  background: var(--color-accent-100);
  color: var(--color-accent-900);
}

/* Scrollbar — subtle and on-brand */
::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: var(--color-gray-300); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--color-gray-400); }
