/* ==========================================================================
   Base Styles - Reset & Typography Foundation
   ========================================================================== */

/* -------------------------------------------------------------------------
   Modern CSS Reset
   ------------------------------------------------------------------------- */

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

* {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

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

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

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

ul,
ol {
  list-style: none;
}

/* -------------------------------------------------------------------------
   Body & Base Typography
   ------------------------------------------------------------------------- */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  background-color: var(--color-cream);
  position: relative;
  overflow-x: hidden;
}

/* -------------------------------------------------------------------------
   Headings - Fraunces Display Font
   ------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

h1 {
  font-size: var(--text-4xl);
  font-weight: var(--weight-light);
}

h2 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-regular);
}

h3 {
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
}

h4 {
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
}

/* -------------------------------------------------------------------------
   Paragraph & Body Text
   ------------------------------------------------------------------------- */

p {
  line-height: var(--leading-relaxed);
  color: var(--color-text-light);
}

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

strong,
b {
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

em,
i {
  font-style: italic;
}

/* -------------------------------------------------------------------------
   Links
   ------------------------------------------------------------------------- */

a {
  color: var(--color-sage-dark);
  text-decoration: underline;
  text-decoration-color: var(--color-sage-light);
  text-underline-offset: 0.15em;
  transition: color var(--transition-fast),
              text-decoration-color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--color-sage);
  text-decoration-color: var(--color-sage);
}

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

/* -------------------------------------------------------------------------
   Selection
   ------------------------------------------------------------------------- */

::selection {
  background-color: var(--color-sage-muted);
  color: var(--color-text);
}

/* -------------------------------------------------------------------------
   Focus Styles
   ------------------------------------------------------------------------- */

:focus {
  outline: none;
}

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

/* -------------------------------------------------------------------------
   Scrollbar Styling (subtle)
   ------------------------------------------------------------------------- */

::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-sage-light);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-cream);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-sage);
}

/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-sage-light) var(--color-cream);
}

