/* =============================================================
   DENTAL INSIGHT THEME — Base Reset & Global Styles
   ============================================================= */

/* ── Modern CSS 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%;
  /* Disable native smooth scroll when ScrollSmoother is active */
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-white);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ── Scrollbar Styling ────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-bg-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* ── Selection ───────────────────────────────────────────── */
::selection {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* ── Typography Base ─────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-white);
}

h1 { font-size: clamp(var(--font-size-4xl), 6vw, var(--font-size-6xl)); }
h2 { font-size: clamp(var(--font-size-3xl), 4vw, var(--font-size-5xl)); }
h3 { font-size: clamp(var(--font-size-2xl), 3vw, var(--font-size-4xl)); }
h4 { font-size: clamp(var(--font-size-xl), 2vw, var(--font-size-3xl)); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  max-width: 68ch;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-out);
}

a:hover {
  color: var(--color-white);
}

strong, b {
  font-weight: var(--font-weight-semibold);
  color: var(--color-white);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ── Lists ───────────────────────────────────────────────── */
ul, ol {
  list-style: none;
}

/* ── Media ───────────────────────────────────────────────── */
img, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ── Forms ───────────────────────────────────────────────── */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  outline: none;
}

/* ── Focus Visible ───────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Utility Classes ─────────────────────────────────────── */
.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;
}

.text-primary   { color: var(--color-primary); }
.text-muted     { color: var(--color-text-muted); }
.text-white     { color: var(--color-white); }
.text-center    { text-align: center; }
.text-left      { text-align: left; }
.text-right     { text-align: right; }

.font-bold      { font-weight: var(--font-weight-bold); }
.font-semibold  { font-weight: var(--font-weight-semibold); }
.font-medium    { font-weight: var(--font-weight-medium); }

.uppercase      { text-transform: uppercase; }
.tracking-wider { letter-spacing: var(--letter-spacing-wider); }

.hidden         { display: none !important; }
.invisible      { visibility: hidden; }

/* Prevent layout shifts during GSAP animations */
.will-animate {
  will-change: transform, opacity;
}

/* GSAP split-text ready class */
.split-ready {
  overflow: hidden;
}

/* Fade-in initial state (GSAP sets opacity:1 on play) */
[data-gsap-from] {
  opacity: 0;
}
