/* =========================================
   BRIGHTSMILE DENTAL — BASE STYLES
   Typography scale, body defaults, global utilities
   ========================================= */

/* ── Body ── */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  color: var(--color-text-primary);
  background-color: var(--color-white);
  line-height: var(--leading-relaxed);
}

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-navy);
  letter-spacing: var(--tracking-tight);
}

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

/* ── Paragraphs ── */
p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

p + p {
  margin-top: var(--space-2);
}

/* ── Links ── */
a {
  color: var(--color-teal);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-teal-dark);
}

a:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Selection ── */
::selection {
  background-color: var(--color-teal);
  color: var(--color-white);
}

/* ── Focus (global) ── */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}

/* ── Scrollbar (WebKit) ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-soft-blue);
}

::-webkit-scrollbar-thumb {
  background: var(--color-teal);
  border-radius: var(--radius-pill);
}

/* ── Utility: Screen reader 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-width: 0;
}

/* ── Utility: Skip Link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-2);
  z-index: var(--z-banner);
  padding: var(--space-1) var(--space-3);
  background: var(--color-teal);
  color: var(--color-white);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-md);
  transition: top var(--transition-fast);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-2);
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 2px;
}

/* ── Utility: Text colors ── */
.text-navy      { color: var(--color-navy) !important; }
.text-teal      { color: var(--color-teal) !important; }
.text-gold      { color: var(--color-accent-gold) !important; }
.text-white     { color: var(--color-white) !important; }
.text-muted     { color: var(--color-text-muted) !important; }
.text-secondary { color: var(--color-text-secondary) !important; }

/* ── Utility: Font sizes ── */
.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); }

/* ── Utility: Font weights ── */
.font-normal   { font-weight: var(--weight-normal); }
.font-medium   { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }
.font-bold     { font-weight: var(--weight-bold); }

/* ── Utility: Text alignment ── */
.text-left    { text-align: left; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }

/* ── Utility: Display ── */
.block   { display: block; }
.inline  { display: inline; }
.flex    { display: flex; }
.grid    { display: grid; }
.hidden  { display: none !important; }

/* ── Utility: Flex helpers ── */
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-start    { display: flex; align-items: center; justify-content: flex-start; }
.flex-col      { display: flex; flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.items-center  { align-items: center; }
.gap-1  { gap: var(--space-1); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }

/* ── Utility: Backgrounds ── */
.bg-white       { background-color: var(--color-white); }
.bg-navy        { background-color: var(--color-navy); }
.bg-teal        { background-color: var(--color-teal); }
.bg-soft-blue   { background-color: var(--color-soft-blue); }
.bg-muted-mint  { background-color: var(--color-muted-mint); }
.bg-warm-neutral{ background-color: var(--color-warm-neutral); }

/* ── Utility: Overflow ── */
.overflow-hidden { overflow: hidden; }

/* ── Overline / Label text ── */
.overline {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-teal);
}

/* ── Star ratings ── */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--color-accent-gold);
  font-size: var(--text-lg);
}
