/* ========================================================================
   Variables
   ======================================================================== */

:root {
  /* Color palette */
  --color-background: #f7f7f9;
  --color-surface: #ffffff;
  --color-text: #1c1c1f;
  --color-text-muted: #60626b;
  --color-border-subtle: #dde0e8;

  --color-primary: #1b4b82; /* trustworthy deep blue */
  --color-primary-soft: #e2ebf5;
  --color-primary-strong: #12345a;

  --color-success: #1b8066;
  --color-warning: #b87911;
  --color-danger: #b3261e;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  --color-focus-ring: #ffb81c; /* accessible contrast accent */

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-mono: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-md: 1.0625rem; /* 17px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (px converted to rem assuming 16px root) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-7: 1.75rem;  /* 28px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-sm: 0.25rem;  /* 4px */
  --radius-md: 0.5rem;   /* 8px */
  --radius-lg: 0.75rem;  /* 12px */
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.12);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 180ms ease-out;
  --transition-slow: 240ms ease-out;
}

/* Respect prefers-reduced-motion for global smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ========================================================================
   Reset / Normalize
   ======================================================================== */

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

* {
  margin: 0;
}

html,
body {
  height: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button {
  border: none;
  background: none;
  padding: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Prevent text overflow in narrow layouts */
body {
  word-wrap: break-word;
}

/* ========================================================================
   Base Styles
   ======================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  background-color: var(--color-background);
  color: var(--color-text);
}

main {
  min-height: 60vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--gray-900);
  margin-bottom: var(--space-3);
}

h1 {
  font-size: clamp(var(--font-size-3xl), 3vw + 1rem, var(--font-size-5xl));
}

h2 {
  font-size: clamp(var(--font-size-2xl), 2vw + 0.75rem, var(--font-size-4xl));
}

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

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

h5 {
  font-size: var(--font-size-base);
}

h6 {
  font-size: var(--font-size-sm);
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}

strong,
b {
  font-weight: 600;
}

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

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

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

hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-6) 0;
}

code,
pre {
  font-family: var(--font-mono);
}

/* ========================================================================
   Accessibility & Focus
   ======================================================================== */

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================================================
   Utilities
   ======================================================================== */

/* Layout containers */

.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  max-width: 1200px;
}

.section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section--alt {
  background-color: var(--gray-50);
}

/* Flex helpers */

.flex {
  display: flex;
}

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

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

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

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

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

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

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

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

.justify-around {
  justify-content: space-around;
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

/* Grid helpers */

.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Spacing utilities (limited, commonly used) */

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.pt-8 { padding-top: var(--space-8); }
.pb-8 { padding-bottom: var(--space-8); }

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

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

/* 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: 0;
}

/* ========================================================================
   Components
   ======================================================================== */

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: var(--font-size-sm);
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast);
}

.button-primary {
  background-color: var(--color-primary);
  color: #ffffff !important;
  box-shadow: var(--shadow-sm);
}

.button-primary:hover {
  background-color: var(--color-primary-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.button-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.button-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.button-outline:hover {
  background-color: var(--color-primary-soft);
}

.button-ghost {
  background-color: transparent;
  color: var(--color-primary);
}

.button[disabled],
.button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  transform: none;
}

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

/* Form controls */

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: #ffffff;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    background-color var(--transition-normal);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--gray-400);
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-soft);
  outline: none;
}

.textarea {
  min-height: 140px;
  resize: vertical;
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: var(--color-danger);
}

.field-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-1);
  color: var(--gray-800);
}

.field-hint {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
  margin-top: var(--space-1);
}

.field-error {
  font-size: var(--font-size-xs);
  color: var(--color-danger);
  margin-top: var(--space-1);
}

/* Card */

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.card--subtle {
  box-shadow: var(--shadow-sm);
}

.card-header {
  margin-bottom: var(--space-4);
}

.card-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-1);
}

.card-meta {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
}

/* Testimonial block (for testimonials page/sections) */

.testimonial {
  position: relative;
  padding-top: var(--space-4);
}

.testimonial-quote {
  font-style: italic;
  color: var(--color-text-muted);
}

.testimonial-author {
  margin-top: var(--space-3);
  font-weight: 500;
  color: var(--gray-800);
}

.testimonial-role {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
}

/* Process / step list styling */

.steps {
  counter-reset: process-step;
}

.step {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: var(--space-4);
}

.step::before {
  counter-increment: process-step;
  content: counter(process-step);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: 600;
}

.step-title {
  font-weight: 600;
  margin-bottom: var(--space-1);
  color: var(--gray-900);
}

.step-body {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Callout / notice for standards and engagement info */

.callout {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: #ffffff;
  padding: var(--space-4);
}

.callout--info {
  border-left: 4px solid var(--color-primary);
}

.callout--success {
  border-left: 4px solid var(--color-success);
}

.callout-title {
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.callout-body {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Page header (hero) */

.page-hero {
  padding-top: var(--space-16);
  padding-bottom: var(--space-12);
}

.page-hero__eyebrow {
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: var(--space-2);
}

.page-hero__title {
  margin-bottom: var(--space-3);
}

.page-hero__subtitle {
  max-width: 40rem;
  color: var(--color-text-muted);
}

/* Simple site header / navigation foundation */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background-color: rgba(247, 247, 249, 0.9);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.site-nav a {
  font-size: var(--font-size-sm);
  color: var(--gray-700);
}

.site-nav a:hover {
  color: var(--color-primary-strong);
}

.site-nav a[aria-current="page"] {
  color: var(--color-primary-strong);
  font-weight: 600;
}

/* Footer base */

.site-footer {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
  background-color: var(--gray-900);
  color: #e5e7eb;
}

.site-footer a {
  color: #e5e7eb;
}

.site-footer a:hover {
  color: #ffffff;
}

.site-footer__muted {
  color: #9ca3af;
  font-size: var(--font-size-xs);
}

/* Contact info emphasis */

.contact-highlight {
  font-weight: 500;
  color: var(--gray-900);
}

.contact-highlight a {
  color: var(--color-primary-strong);
}

.contact-highlight a:hover {
  text-decoration: underline;
}
