/* ============================================================
   ADVANCED SYSTEMS — Modern CSS Reset + Google Fonts
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ─── Box Sizing ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ─── Root ───────────────────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

/* ─── Body ───────────────────────────────────────────────── */
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--gray-800);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Headings ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--gray-900);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

/* ─── Paragraphs & Text ──────────────────────────────────── */
p {
  margin: 0 0 1rem;
  line-height: var(--leading-relaxed);
}

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

/* ─── Links ──────────────────────────────────────────────── */
a {
  color: var(--primary-violet);
  text-decoration: none;
  transition: color var(--transition-base);
}
a:hover { color: var(--primary-orange); }

/* ─── Lists ──────────────────────────────────────────────── */
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

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

/* ─── Forms ──────────────────────────────────────────────── */
button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  margin: 0;
}

button { cursor: pointer; border: none; background: none; }

input, textarea, select {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--primary-violet);
  box-shadow: 0 0 0 3px rgba(91,44,126,.15);
}

textarea { resize: vertical; }

/* ─── Tables ─────────────────────────────────────────────── */
table { border-collapse: collapse; width: 100%; }
th, td { padding: var(--space-3) var(--space-4); text-align: left; }

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

/* ─── Selection ──────────────────────────────────────────── */
::selection {
  background-color: var(--violet-100);
  color: var(--violet-dark);
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb {
  background: var(--violet-light);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-violet); }

/* ─── Utility: sr-only ───────────────────────────────────── */
.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;
}

/* ─── Container ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

@media (max-width: 576px) {
  .container { padding-left: var(--space-4); padding-right: var(--space-4); }
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
}
