:root {
  --color-chalk-white: #F5F5F0;
  --color-cobalt-blue: #0047AB;
  --color-clay-orange: #D2691E;
  --color-eucalyptus-green: #4B8B3B;
  --color-ink: #2B2B2B;
  --color-muted-text: #6B6B6B;
  --color-white: #FFFFFF;
  --color-timber: #A67B5B;
  --color-card-surface: #FAFAF7;
  --color-border-subtle: #E0E0D8;

  --font-heading: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --text-display-size: clamp(3rem, 5vw + 1rem, 4rem);
  --text-h1-size: clamp(2.25rem, 4vw + 0.75rem, 3rem);
  --text-h2-size: clamp(1.75rem, 3vw + 0.5rem, 2.25rem);
  --text-h3-size: clamp(1.375rem, 2vw + 0.5rem, 1.75rem);
  --text-h4-size: 1.25rem;
  --text-body-size: 1rem;
  --text-small-size: 0.875rem;
  --text-caption-size: 0.75rem;

  --text-display-line-height: 1.1;
  --text-h1-line-height: 1.2;
  --text-h2-line-height: 1.3;
  --text-h3-line-height: 1.4;
  --text-h4-line-height: 1.5;
  --text-body-line-height: 1.6;
  --text-small-line-height: 1.5;
  --text-caption-line-height: 1.4;

  --text-display-weight: 700;
  --text-h1-weight: 700;
  --text-h2-weight: 600;
  --text-h3-weight: 600;
  --text-h4-weight: 600;
  --text-body-weight: 400;
  --text-small-weight: 400;
  --text-caption-weight: 400;

  --space-4xs: 0.25rem;
  --space-3xs: 0.5rem;
  --space-2xs: 0.75rem;
  --space-xs: 1rem;
  --space-sm: 1.5rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  --container-max-width: 1200px;
  --container-gutter-desktop: 1.5rem;
  --container-gutter-mobile: 1rem;
  --section-padding-desktop: 6rem;
  --section-padding-mobile: 3rem;
  --card-padding-standard: 1.5rem;
  --card-padding-feature: 3rem;
  --grid-gutter-desktop: 1.5rem;
  --grid-gutter-mobile: 1rem;

  --radius-small: 4px;
  --radius-medium: 12px;
  --radius-large: 24px;
  --radius-pill: 999px;

  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-header-scroll: 0 2px 8px rgba(0, 0, 0, 0.06);

  --transition-fast: 200ms ease-in-out;
  --focus-outline: 2px solid var(--color-cobalt-blue);
  --focus-outline-offset: 2px;

  --border-subtle: 1px solid var(--color-border-subtle);

  --organic-blob-radius: 50% / 60% 40% 30% 70%;
  --image-warm-filter: sepia(10%);

  --touch-target-min: 44px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  font-weight: var(--text-body-weight);
  line-height: var(--text-body-line-height);
  color: var(--color-ink);
  background-color: var(--color-chalk-white);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  filter: var(--image-warm-filter);
}

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

button {
  background: none;
  border: none;
  cursor: pointer;
  min-height: var(--touch-target-min);
  min-width: var(--touch-target-min);
}

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

a:hover {
  color: var(--color-clay-orange);
}

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

ul,
ol {
  list-style-position: inside;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-ink);
  font-weight: var(--text-h1-weight);
  line-height: var(--text-h1-line-height);
  margin-block-end: var(--space-sm);
}

h1 {
  font-size: var(--text-h1-size);
  line-height: var(--text-h1-line-height);
  font-weight: var(--text-h1-weight);
}

h2 {
  font-size: var(--text-h2-size);
  line-height: var(--text-h2-line-height);
  font-weight: var(--text-h2-weight);
  margin-block-end: var(--space-sm);
}

h3 {
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line-height);
  font-weight: var(--text-h3-weight);
  margin-block-end: var(--space-xs);
}

h4 {
  font-size: var(--text-h4-size);
  line-height: var(--text-h4-line-height);
  font-weight: var(--text-h4-weight);
  margin-block-end: var(--space-2xs);
}

p {
  margin-block-end: var(--space-sm);
}

p:last-child {
  margin-block-end: 0;
}

blockquote {
  margin-block-end: var(--space-sm);
  padding-inline-start: var(--space-sm);
  border-inline-start: 3px solid var(--color-clay-orange);
  color: var(--color-muted-text);
}

blockquote:last-child {
  margin-block-end: 0;
}

figure {
  margin-block-end: var(--space-sm);
}

figure:last-child {
  margin-block-end: 0;
}

figcaption {
  font-size: var(--text-caption-size);
  line-height: var(--text-caption-line-height);
  color: var(--color-muted-text);
  margin-block-start: var(--space-3xs);
}

small {
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
}

strong {
  font-weight: 600;
}

hr {
  border: none;
  border-block-start: var(--border-subtle);
  margin-block: var(--space-md);
}

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-gutter-desktop);
}

.section {
  padding-block: var(--section-padding-desktop);
}

.section--compact {
  padding-block: var(--section-padding-mobile);
}

.card {
  background-color: var(--color-card-surface);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
  padding: var(--card-padding-standard);
}

.card > :last-child {
  margin-block-end: 0;
}

.panel {
  background-color: var(--color-card-surface);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-soft);
  padding: var(--card-padding-feature);
}

.panel > :last-child {
  margin-block-end: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  font-weight: 500;
  line-height: 1.2;
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-small);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: var(--touch-target-min);
  min-width: var(--touch-target-min);
  text-align: center;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background-color: var(--color-cobalt-blue);
  color: var(--color-chalk-white);
}

.btn--primary:hover {
  background-color: #003a8c;
  color: var(--color-chalk-white);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-cobalt-blue);
  border-color: var(--color-cobalt-blue);
}

.btn--secondary:hover {
  background-color: var(--color-cobalt-blue);
  color: var(--color-chalk-white);
}

.btn--tertiary {
  background-color: transparent;
  color: var(--color-cobalt-blue);
  padding-inline: var(--space-3xs);
  min-width: auto;
}

.btn--tertiary:hover {
  text-decoration: underline;
  color: var(--color-clay-orange);
}

.btn--accent {
  background-color: var(--color-clay-orange);
  color: var(--color-chalk-white);
}

.btn--accent:hover {
  background-color: #b85a1a;
  color: var(--color-chalk-white);
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
  font-weight: 500;
  padding: var(--space-4xs) var(--space-2xs);
  border-radius: var(--radius-pill);
  background-color: var(--color-clay-orange);
  color: var(--color-chalk-white);
  min-height: 24px;
}

.tag--green {
  background-color: var(--color-eucalyptus-green);
}

.tag--blue {
  background-color: var(--color-cobalt-blue);
}

.tag--muted {
  background-color: var(--color-muted-text);
}

.surface-dark {
  background-color: var(--color-eucalyptus-green);
  color: var(--color-chalk-white);
}

.surface-dark h1,
.surface-dark h2,
.surface-dark h3,
.surface-dark h4,
.surface-dark h5,
.surface-dark h6 {
  color: var(--color-chalk-white);
}

.surface-dark a {
  color: var(--color-chalk-white);
}

.surface-dark a:hover {
  color: var(--color-clay-orange);
}

.surface-dark .card,
.surface-dark .panel {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--color-chalk-white);
}

.surface-dark .card h1,
.surface-dark .card h2,
.surface-dark .card h3,
.surface-dark .card h4,
.surface-dark .panel h1,
.surface-dark .panel h2,
.surface-dark .panel h3,
.surface-dark .panel h4 {
  color: var(--color-chalk-white);
}

.surface-dark .tag {
  background-color: var(--color-clay-orange);
}

.surface-dark .tag--green {
  background-color: var(--color-chalk-white);
  color: var(--color-eucalyptus-green);
}

.surface-dark .tag--blue {
  background-color: var(--color-chalk-white);
  color: var(--color-cobalt-blue);
}

.surface-dark .tag--muted {
  background-color: rgba(255, 255, 255, 0.3);
  color: var(--color-chalk-white);
}

.organic-image {
  border-radius: var(--organic-blob-radius);
  overflow: hidden;
}

.organic-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 1000;
  background-color: var(--color-cobalt-blue);
  color: var(--color-chalk-white);
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-small);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-sm);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.flex {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.flex > * {
  min-width: 0;
}

.flex--nowrap {
  flex-wrap: nowrap;
}

.flex--align-center {
  align-items: center;
}

.flex--align-start {
  align-items: flex-start;
}

.flex--align-end {
  align-items: flex-end;
}

.flex--justify-center {
  justify-content: center;
}

.flex--justify-between {
  justify-content: space-between;
}

.flex--justify-end {
  justify-content: flex-end;
}

.flex--column {
  flex-direction: column;
}

.flex--gap-xs {
  gap: var(--space-2xs);
}

.flex--gap-sm {
  gap: var(--space-xs);
}

.flex--gap-md {
  gap: var(--space-sm);
}

.flex--gap-lg {
  gap: var(--space-md);
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--grid-gutter-desktop);
}

.grid-auto > * {
  min-width: 0;
}

@media (max-width: 768px) {
  .container {
    padding-inline: var(--container-gutter-mobile);
  }

  .section {
    padding-block: var(--section-padding-mobile);
  }

  .card {
    padding: var(--space-sm);
  }

  .panel {
    padding: var(--space-sm);
  }

  .grid-auto {
    gap: var(--grid-gutter-mobile);
  }

  .flex {
    gap: var(--space-xs);
  }

  .flex--gap-md {
    gap: var(--space-sm);
  }

  .flex--gap-lg {
    gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .card {
    padding: var(--space-xs);
  }

  .panel {
    padding: var(--space-xs);
  }

  .btn {
    width: 100%;
  }
}