/**
 * Save & Upgrade — Base: reset, typography, layout shells, header, footer.
 */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
img { background: var(--sand); }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--accent-hover); }

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

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 800; }
h1 { font-size: var(--fs-h1); font-weight: 900; letter-spacing: -0.04em; line-height: 1.02; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.03em; line-height: 1.15; }
h3 { font-size: var(--fs-h3); letter-spacing: -0.02em; line-height: 1.25; }
p { margin: 0; }

::selection { background: var(--accent); color: var(--paper); }

/* ----------------------------------------------------------- Accessibility */

.su-sr-only,
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.su-skip-link {
  position: absolute;
  left: var(--s4); top: -100px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px; font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--r-md);
  transition: top 120ms ease;
}
.su-skip-link:focus { top: var(--s4); color: var(--paper); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

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

/* ------------------------------------------------------------------ Layout */

.su-wrap {
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: var(--gutter);
  width: 100%;
}
.su-wrap--article { max-width: calc(var(--article) + var(--gutter) * 2); }

.su-stack { display: flex; flex-direction: column; }
.su-eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.su-eyebrow--sm { font-size: 11px; letter-spacing: 0.16em; }
.su-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
}
.su-section-head h2 { font-size: 28px; }
.su-section-note { font-size: 14px; font-weight: 600; color: var(--on-ink); }
.su-section-link { font-size: 14px; font-weight: 700; color: var(--accent-dark); }

.su-media {
  background: var(--sand);
  overflow: hidden;
  display: block;
}
.su-media img { width: 100%; height: 100%; object-fit: cover; }
.su-media--3x2 { aspect-ratio: 3 / 2; }
.su-media--1x1 { aspect-ratio: 1 / 1; }

/* Empty-image fallback: keeps the box present so grids stay aligned. */
.su-media--empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--meta); font-size: 12px; font-weight: 600;
}

/* ------------------------------------------------------------------ Header */

.su-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 90;
  transition: transform 220ms ease;
}
/* Scroll-direction sticky: hide on scroll-down, reveal on scroll-up. */
.su-header.is-hidden { transform: translateY(-100%); }
.admin-bar .su-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .su-header { top: 46px; } }

.su-header__inner {
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}

.su-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  flex-shrink: 0;
}
.su-logo:hover { color: var(--ink); }
.su-logo svg { width: 34px; height: 34px; flex-shrink: 0; }
.su-logo img { max-height: 40px; width: auto; }
.su-logo__text {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.035em;
  white-space: nowrap;
}
.su-logo__amp { color: var(--accent); }
@media (max-width: 1023px) {
  .su-logo svg { width: 28px; height: 28px; }
  .su-logo__text { font-size: 18px; }
}

.su-nav { display: flex; gap: 26px; font-size: 14.5px; font-weight: 600; }
.su-nav a { color: var(--muted); }
.su-nav a:hover { color: var(--accent); }
.su-nav .current-menu-item > a,
.su-nav .current-menu-parent > a,
.su-nav .current-menu-ancestor > a {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}
.su-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; }
/* One level of dropdown; deeper menus flatten into it. */
.su-nav li { position: relative; }
.su-nav .sub-menu {
  position: absolute;
  top: 100%; left: 0;
  display: none;
  flex-direction: column;
  gap: 0;
  min-width: 210px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s2);
  box-shadow: var(--shadow-float);
  z-index: 10;
}
.su-nav li:hover > .sub-menu,
.su-nav li:focus-within > .sub-menu { display: flex; }
.su-nav .sub-menu a { display: block; padding: 8px 12px; border-radius: var(--r-sm); }
.su-nav .sub-menu a:hover { background: var(--sand); }

.su-search-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  width: 200px;
  color: var(--meta);
  font-size: 14px;
  background: none;
  cursor: pointer;
  text-align: left;
  flex-shrink: 0;
}
.su-search-pill:hover { border-color: var(--accent); color: var(--muted); }
.su-search-pill svg { flex-shrink: 0; }

.su-header__mobile { display: none; align-items: center; gap: var(--s2); }
.su-icon-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--ink); border-radius: var(--r-md);
}
.su-icon-btn:hover { color: var(--accent); }

@media (max-width: 1023px) {
  .su-nav, .su-search-pill { display: none; }
  .su-header__mobile { display: flex; }
}

/* Drawer ------------------------------------------------------------------ */

.su-drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  visibility: hidden;
}
.su-drawer[data-open="true"] { visibility: visible; }
.su-drawer__scrim {
  position: absolute; inset: 0;
  background: rgba(20, 24, 28, 0.5);
  opacity: 0;
  transition: opacity 200ms ease;
}
.su-drawer[data-open="true"] .su-drawer__scrim { opacity: 1; }
.su-drawer__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(360px, 88vw);
  background: var(--paper);
  padding: var(--s5) var(--s5) var(--s8);
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 220ms ease;
  overscroll-behavior: contain;
}
.su-drawer[data-open="true"] .su-drawer__panel { transform: none; }
.su-drawer__head { display: flex; align-items: center; justify-content: space-between; }
.su-drawer__nav { display: flex; flex-direction: column; }
.su-drawer__nav ul { list-style: none; margin: 0; padding: 0; }
.su-drawer__nav li { border-bottom: 1px solid var(--line); }
.su-drawer__nav a {
  display: block;
  padding: 14px 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.su-drawer__nav a:hover { color: var(--accent); }
.su-drawer__nav .sub-menu a { font-size: 15px; font-weight: 600; color: var(--muted); padding-left: var(--s4); }
.su-drawer__nav .sub-menu li:last-child { border-bottom: 0; }

/* Header search panel ----------------------------------------------------- */

.su-header-search {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.su-header-search[data-open="true"] { display: block; }
.su-header-search .su-wrap { padding-block: var(--s3); }

/* ------------------------------------------------------------------ Footer */

.su-footer { background: var(--ink); color: var(--paper); }
.su-footer a { color: var(--on-ink); }
.su-footer a:hover { color: var(--paper); }
.su-footer__inner {
  max-width: var(--content);
  margin-inline: auto;
  padding: var(--s8) var(--gutter) var(--s6);
  display: flex;
  flex-direction: column;
  gap: 44px;
}
.su-footer__cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--s7);
}
.su-footer__brand { display: flex; flex-direction: column; gap: 14px; }
.su-footer__brand .su-logo { color: var(--paper); }
.su-footer__brand .su-logo__text { font-size: 18px; }
.su-footer__brand .su-logo svg { width: 28px; height: 28px; }
.su-footer__blurb { font-size: 14px; color: var(--on-ink); line-height: 1.6; max-width: 30ch; }
.su-footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.su-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.su-footer__title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--paper);
}
.su-footer__bottom {
  border-top: 1px solid var(--ink-line);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--on-ink-dim);
}

/* Slim footer (archives) */
.su-footer--slim .su-footer__inner {
  padding: var(--s7) var(--gutter);
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
}
.su-footer--slim .su-logo__text { font-size: 16px; }
.su-footer--slim .su-logo svg { width: 26px; height: 26px; }
.su-footer--slim .su-footer__bottom { border: 0; padding: 0; }

@media (max-width: 1023px) {
  .su-footer__cols { grid-template-columns: 1fr 1fr; gap: var(--s6); }
  .su-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 479px) {
  .su-footer__cols { grid-template-columns: 1fr; }
  .su-footer__bottom { flex-direction: column; gap: var(--s2); }
}

/* ---------------------------------------------------- WordPress core bits */

.alignleft { float: left; margin: 0 var(--s5) var(--s4) 0; }
.alignright { float: right; margin: 0 0 var(--s4) var(--s5); }
.aligncenter { margin-inline: auto; }
.alignwide, .alignfull { max-width: none; }

.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption {
  font-size: 13px;
  color: var(--meta);
  padding-top: var(--s2);
  line-height: 1.5;
}

.su-admin-notice {
  border: 1px dashed var(--hair);
  background: var(--sand);
  border-radius: var(--r-md);
  padding: var(--s3) var(--s4);
  font-size: 13px;
  color: var(--muted);
}
