@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500&family=Source+Sans+3:wght@300;400;500&display=swap');

/*=================================================
  SYSTEM TOKENS
=================================================*/

:root {
  /* Core Palette */
  --color-sage: #B0C4B1;
  --color-mist: #D9E4DD;
  --color-blush: #EDAFB8;
  --color-charcoal: #4A5759;
  --color-slate: #6C7573;
  --color-white: #FFFFFF;
  --color-porcelain: #F7E1D7;
  --color-silver: #D8D6CF;
  --color-sage-dark: #4A5759;
  --color-blush-soft: #F7E1D7;
  --color-taupe: #DEDBD2;

  /* Tints & Utilities */
  --tint-sage-06: rgba(176, 196, 177, 0.024);
  --tint-sage-08: rgba(176, 196, 177, 0.032);
  --tint-sage-12: rgba(176, 196, 177, 0.048);
  --tint-blush-08: rgba(237, 175, 184, 0.032);
  --tint-blush-16: rgba(237, 175, 184, 0.064);
  --tint-taupe-16: rgba(222, 219, 210, 0.064);

  /* Semantic aliases (for legacy selectors) */
  --primary-color: var(--color-sage);
  --accent-color: var(--color-blush);
  --accent-hover: var(--color-blush-soft);
  --text-color: var(--color-charcoal);
  --text-secondary-color: var(--color-slate);
  --bg-color: var(--color-white);
  --light-bg: var(--color-porcelain);
  --card-bg: var(--color-white);
  --border-color: var(--color-silver);
  --border-color-alt: var(--color-taupe);
  --success-color: var(--color-sage);
  --info-color: var(--color-taupe);
  --emphasis-color: var(--color-blush);
  --critical-color: var(--color-sage-dark);

  /* Typography */
  --font-family-body: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  --font-family-heading: 'Fraunces', 'Times New Roman', serif;
  --font-family-meta: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;

  --font-size-base: 1.125rem; /* 18px */
  --font-size-lg: 1.1875rem;  /* 19px */
  --font-size-sm: 0.925rem;
  --font-size-xs: 0.8125rem;

  --line-height-body: 1.65;
  --line-height-heading: 1.3;
  --letter-spacing-tight: 0; /* neutral */

  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;

  /* Spacing & Layout */
  --space-xxs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.625rem;
  --space-md: 0.875rem;     /* 14px - reduced from 16px */
  --space-lg: 1.125rem;     /* 18px - reduced from 24px */
  --space-xl: 1.5rem;       /* 24px - reduced from 32px */
  --space-2xl: 2rem;        /* 32px - reduced from 40px */
  --space-3xl: 2.75rem;     /* 44px - reduced from 64px */

  --section-padding-top: 72px;      /* reduced from 112px */
  --section-padding-bottom: 60px;    /* reduced from 96px */
  --section-padding-mobile: 40px;    /* reduced from 64px */
  --card-padding: 1.375rem;          /* 22px - reduced from 32px */
  --grid-gap: 1.125rem;              /* 18px - reduced from 24px */
  --border-radius-md: 10px; /* 10px - subtle rounded */
  --border-radius-btn: 8px; /* 8px for buttons */
  --border-width: 1px;
  --border-color-card: #E3E5E1; /* Soft border for cards */
  --layout-max-width: 1180px;
  --text-max-width: 720px;

  /* Effects */
  --focus-ring-color: var(--color-sage);
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;
  --transition-base: 150ms ease-out;

  /* Elevation placeholders (shadows removed) */
  --soft-shadow: none;
  --hover-shadow: none;
  --shadow-light: none;
  --shadow-medium: none;
  --shadow-heavy: none;
}

@media (min-width: 1200px) {
  :root {
    --font-size-base: var(--font-size-lg);
  }
}

/*=================================================
  BASE TYPOGRAPHY & ELEMENTS
=================================================*/

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-family-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  font-weight: var(--weight-regular);
  color: var(--color-charcoal);
  background: var(--color-white);
}

main {
  display: block;
}

section {
  padding: var(--section-padding-mobile) 0;
}

@media (min-width: 768px) {
  section {
    padding: var(--section-padding-top) 0 var(--section-padding-bottom);
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--weight-regular);
  color: var(--color-charcoal);
  line-height: var(--line-height-heading);
  margin-top: 0;
}

h1 {
  font-size: clamp(2.25rem, 2rem + 1vw, 3rem);
  margin-bottom: 1.125rem; /* reduced from 28px to 18px */
  letter-spacing: var(--letter-spacing-tight);
}

h2 {
  font-size: clamp(1.8rem, 1.6rem + 0.5vw, 2.35rem);
  margin-bottom: 1rem; /* reduced from 24px to 16px */
  letter-spacing: var(--letter-spacing-tight);
}

h3 {
  font-size: clamp(1.45rem, 1.3rem + 0.3vw, 1.8rem);
  margin-bottom: 0.875rem; /* reduced from 20px to 14px */
}

h4 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem; /* reduced from 16px to 12px */
}

h5 {
  font-size: 1.15rem;
  margin-bottom: 0.625rem; /* reduced from 13.6px to 10px */
}

h6 {
  font-size: 1rem;
  margin-bottom: 0.5rem; /* reduced from 12px to 8px */
}

p,
ul,
ol,
table,
figure,
pre {
  margin-top: 0;
  margin-bottom: var(--space-sm);
}

p {
  max-width: var(--text-max-width);
}

strong,
b {
  font-weight: var(--weight-medium);
}

em {
  font-style: italic;
}

i {
  font-style: italic;
}

/* FontAwesome and icon styling */
.fa,
.fas,
.far,
.fab,
.fal,
i[class*="fa-"] {
  color: var(--color-sage);
  font-style: normal;
}

small {
  font-size: var(--font-size-xs);
}

.label,
.meta,
.meta-label {
  font-family: var(--font-family-meta);
  font-size: var(--font-size-xs);
  font-weight: var(--weight-regular);
  letter-spacing: 0;
  color: var(--color-slate);
}

/*=================================================
  LINKS & FOCUS
=================================================*/

a {
  color: var(--color-charcoal);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-sage);
  text-decoration: underline;
  text-decoration-color: var(--color-blush);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

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

/*=================================================
  LISTS
=================================================*/

ul,
ol {
  padding-left: 1.5rem; /* 24px */
}

li {
  margin-bottom: 0.5rem; /* 8px approx */
}

.list-unstyled {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

/*=================================================
  BLOCKQUOTES & CALLOUTS
=================================================*/

blockquote {
  margin: var(--space-lg) 0;
  padding: var(--space-lg);
  background: var(--color-white);
  border: var(--border-width) solid var(--color-silver);
  border-left-width: 4px;
  border-left-color: var(--color-sage);
  border-radius: calc(var(--border-radius-md) - 0.25rem);
  font-family: var(--font-family-heading);
  font-weight: var(--weight-regular);
  font-size: clamp(1.2rem, 1.1rem + 0.3vw, 1.5rem);
  line-height: var(--line-height-body);
}

blockquote cite {
  display: block;
  margin-top: var(--space-sm);
  font-family: var(--font-family-body);
  font-size: var(--font-size-xs);
  color: var(--color-slate);
}

/*=================================================
  CODE & PRE
=================================================*/

code,
pre {
  font-family: 'IBM Plex Mono', 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.95em;
}

code {
  padding: 0.1rem 0.3rem;
  background: var(--color-porcelain);
  border: var(--border-width) solid var(--color-silver);
  border-radius: 0.5rem;
}

pre {
  padding: 0.85rem 1.25rem;
  background: var(--color-porcelain);
  border: var(--border-width) solid var(--color-silver);
  border-radius: 0.5rem;
  white-space: pre-wrap;
}

/*=================================================
  TABLES
=================================================*/

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  border: var(--border-width) solid var(--color-silver);
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

thead {
  background: var(--color-porcelain);
  font-family: var(--font-family-heading);
  font-weight: var(--weight-regular);
}

th,
td {
  padding: 0.875rem 1.25rem;
  border-bottom: var(--border-width) solid var(--color-silver);
  text-align: left;
  vertical-align: top;
}

td.numeric,
th.numeric {
  text-align: right;
}

tr:hover td {
  background: var(--tint-sage-06);
}

caption {
  padding: var(--space-sm) 0;
  text-align: left;
  font-family: var(--font-family-meta);
  font-size: var(--font-size-xs);
  letter-spacing: 0;
  color: var(--color-slate);
}

/*=================================================
  FORMS
=================================================*/

label {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-family: var(--font-family-meta);
  font-size: 0.95rem;
  font-weight: var(--weight-regular);
  letter-spacing: 0;
  color: var(--color-charcoal);
}

input,
textarea,
select {
  width: 100%;
  font-family: var(--font-family-body);
  font-size: 1rem;
  font-weight: var(--weight-regular);
  line-height: 1.5;
  padding: 0.8rem 1rem;
  color: var(--color-charcoal);
  background: var(--color-white);
  border: var(--border-width) solid var(--color-silver);
  border-radius: var(--border-radius-md);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-sage);
  box-shadow: 0 0 0 calc(var(--focus-ring-width)) rgba(176, 196, 177, 0.25);
}

input::placeholder,
textarea::placeholder {
  color: rgba(74, 87, 89, 0.5);
}

.form-help {
  margin-top: 0.35rem;
  font-size: var(--font-size-xs);
  color: var(--color-slate);
}

/*=================================================
  BUTTON RESET (component variants live in styles.css)
=================================================*/

button,
[type="button"],
[type="submit"],
[type="reset"],
.btn {
  font-family: var(--font-family-body);
  font-size: 1rem;
  font-weight: var(--weight-regular);
  line-height: 1.5;
  border: none;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: background-color var(--transition-base), border-color var(--transition-base), color var(--transition-base);
}

button:disabled,
[type="button"]:disabled,
[type="submit"]:disabled,
[type="reset"]:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

/*=================================================
  IMAGES & MEDIA
=================================================*/

img,
picture,
video {
  max-width: 100%;
  display: block;
  border-radius: var(--border-radius-md);
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 0.5rem;
  font-size: var(--font-size-xs);
  color: var(--color-slate);
  text-align: center;
}

/*=================================================
  GLOBAL UTILITIES
=================================================*/

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

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-uppercase {
  text-transform: none;
  letter-spacing: 0;
}

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

/*=================================================
  PRINT
=================================================*/

@media print {
  body {
    font-size: 12pt;
  }

  a {
    text-decoration: underline;
  }

  nav,
  .btn {
    display: none !important;
  }
}
