@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Inter:wght@400;500;600;700;800&family=Source+Serif+4:ital,wght@0,500;0,600;0,700;1,500;1,600;1,700&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
  scrollbar-width: thin;
  scrollbar-color: #1E8F4F #e7f0ea;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  max-width: 100%;
  transition: background-color var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1, h2 {
  font-family: var(--font-serif);
  font-weight: 600;
}

h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1.125rem, 2.5vw, 1.375rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--space-md);
  max-width: 72ch;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background-color: var(--primary);
  color: #fff;
}

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

::-webkit-scrollbar-track {
  background: #e7f0ea;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #26a35a 0%, #14532d 100%);
  border: 2px solid #e7f0ea;
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #C4A056 0%, #1E8F4F 100%);
}

::-webkit-scrollbar-corner {
  background: #e7f0ea;
}

[data-theme="dark"] {
  scrollbar-color: #1E8F4F #121a16;
}

[data-theme="dark"] ::-webkit-scrollbar-track,
[data-theme="dark"] ::-webkit-scrollbar-corner {
  background: #121a16;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #26a35a 0%, #14532d 100%);
  border-color: #121a16;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #C4A056 0%, #1E8F4F 100%);
}

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

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--primary);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-md);
  color: #fff;
}
