/* ============================================================
   Page Factory — shared design system (loaded once, site-wide)
   ------------------------------------------------------------
   This is the framework that used to be repeated inside every
   page's per-page CSS. Consolidate a project's shared styles
   here; keep only page-specific overrides in each page's CSS.
   Brand a site by editing the :root tokens below.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800;900&family=Open+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand palette — override per site */
  --pf-accent: #0e38ae;
  --pf-accent-dark: #0a2a85;
  --pf-accent-light: #1a4fd4;
  --pf-ink: #111722;
  --pf-ink-soft: #4f5766;
  --pf-paper: #ffffff;
  --pf-panel: #f0f5ff;
  --pf-border: #d6e0ee;

  /* Type */
  --pf-font-display: 'Montserrat', Helvetica, Arial, sans-serif;
  --pf-font-body: 'Open Sans', system-ui, -apple-system, sans-serif;

  /* Rhythm */
  --pf-container: 1180px;
  --pf-gutter: 28px;
  --pf-section-y: 80px;
  --pf-radius: 12px;
}

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

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

body {
  margin: 0;
  font-family: var(--pf-font-body);
  color: var(--pf-ink);
  background: var(--pf-paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--pf-font-display);
  line-height: 1.12;
  color: var(--pf-ink);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 900; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--pf-accent); text-decoration: none; }
a:hover { color: var(--pf-accent-light); text-decoration: underline; }

img, video, svg { max-width: 100%; height: auto; }

/* Layout ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--pf-container);
  margin-inline: auto;
  padding-inline: var(--pf-gutter);
}

.pf-section { padding-block: var(--pf-section-y); }
.pf-section--alt { background: var(--pf-panel); }
.pf-section--dark { background: var(--pf-ink); color: #e0eaf8; }
.pf-section--dark h1,
.pf-section--dark h2,
.pf-section--dark h3 { color: #fff; }

/* Buttons --------------------------------------------------- */
.pf-btn {
  display: inline-block;
  padding: 16px 40px;
  border-radius: 6px;
  font-family: var(--pf-font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  background: var(--pf-accent);
  color: #fff !important;
  border: 2px solid var(--pf-accent);
}
.pf-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(0,0,0,.16);
  text-decoration: none;
}
.pf-btn--outline {
  background: transparent;
  color: var(--pf-accent) !important;
}

/* Simple grid helpers -------------------------------------- */
.pf-grid { display: grid; gap: 24px; }
.pf-grid--2 { grid-template-columns: repeat(2, 1fr); }
.pf-grid--3 { grid-template-columns: repeat(3, 1fr); }
.pf-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Archive/list fallback ------------------------------------- */
.pf-list { padding-block: 56px; }
.pf-list__item { padding-block: 20px; border-bottom: 1px solid var(--pf-border); }
.pf-404 { padding-block: 96px; text-align: center; }

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

@media (max-width: 1024px) {
  .pf-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .pf-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  :root { --pf-section-y: 56px; --pf-gutter: 20px; }
  .pf-grid--2, .pf-grid--3, .pf-grid--4 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
