/* ------------------------------------------------------------------
   THE SIGNATURE PIECE: Squarespace 7.1 "Fluid Engine" grid.
   Every content section is a CSS Grid of 24 content columns flanked
   by two flexible gutter columns. Blocks are placed by grid-area:
        grid-area: rowStart / colStart / rowEnd / colEnd;
   Content columns are 2..25 (col 1 and col 26 are the gutters).
   Tailwind can't express the minmax()+gutter track list cleanly, so
   this stays as a small hand-written CSS layer — it is the core of
   how the original builds layout.
   ------------------------------------------------------------------ */
:root {
  --sqs-site-max-width: 1500px;
  --sqs-site-gutter: 4vw;
  --sqs-mobile-site-gutter: 6vw;
  --cell-gap: 11px;
}

/* Desktop: 24 columns */
.fluid-engine {
  display: grid;
  row-gap: var(--cell-gap);
  column-gap: var(--cell-gap);
  --grid-gutter: calc(var(--sqs-site-gutter, 4vw) - var(--cell-gap));
  --cell-max-width: calc(
    (var(--sqs-site-max-width, 1500px) - (var(--cell-gap) * (24 - 1))) / 24
  );
  grid-template-columns:
    minmax(var(--grid-gutter), 1fr)
    repeat(24, minmax(0, var(--cell-max-width)))
    minmax(var(--grid-gutter), 1fr);
}

/* Mobile: the original collapses the same section to an 8-column grid */
@media (max-width: 767px) {
  .fluid-engine {
    --grid-gutter: calc(var(--sqs-mobile-site-gutter, 6vw) - var(--cell-gap));
    --cell-max-width: calc(
      (var(--sqs-site-max-width, 1500px) - (var(--cell-gap) * (8 - 1))) / 8
    );
    grid-template-columns:
      minmax(var(--grid-gutter), 1fr)
      repeat(8, minmax(0, var(--cell-max-width)))
      minmax(var(--grid-gutter), 1fr);
  }
  /* On mobile every block spans the full 8-col content area and stacks
     in document order — desktop grid-area row placement would otherwise
     make blocks overlap since only the column gets reset here. */
  .fe-block { grid-column: 2 / 10 !important; grid-row: auto !important; }
}

/* Full-bleed section background layer sits behind the content-wrapper */
.section-background { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.page-section { position: relative; }
.content-wrapper { position: relative; z-index: 1; }

/* ------------------------------------------------------------------
   TYPE SCALE — Georgia (display) / Lexend (everything else).
   Sizes are fluid between a 768px and 1440px viewport, clamped to the
   desktop min/max from the type spec.
   ------------------------------------------------------------------ */
.text-hero {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(52px, calc(42.857px + 1.1905vw), 60px);
  line-height: 1.05;
}
.text-h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(42px, calc(35.143px + 0.893vw), 48px);
  line-height: 1.1;
}
.text-h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(34px, calc(29.429px + 0.595vw), 38px);
  line-height: 1.15;
}
.text-h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(26px, calc(21.429px + 0.595vw), 30px);
  line-height: 1.2;
}
.text-body {
  font-family: "Lexend", ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(18px, calc(15.714px + 0.298vw), 20px);
  line-height: 1.6;
}
/* text-small is scoped to nav menus only — see usage below */
.text-small {
  font-family: "Lexend", ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.5;
}
.text-btn {
  font-family: "Lexend", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1;
}

/* ------------------------------------------------------------------
   ACCESSIBILITY
   ------------------------------------------------------------------ */

/* Skip link (WCAG 2.4.1 Bypass Blocks) — the header carries a logo, a
   dropdown, and a CTA before main content, so keyboard and screen-reader
   users get a way past it. Off-screen until focused, then pinned top-left. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: #14181a;
  color: #fff;
  font-family: "Lexend", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  border-bottom-right-radius: 8px;
}
.skip-link:focus {
  left: 0;
}

/* Keyboard-toggled state for the header dropdown; the hover/focus-within
   variants live on the markup as Tailwind utilities. See js/main.js. */
.header-nav-folder.is-open .header-nav-folder-content {
  display: block;
}

/* Visible focus indicator (WCAG 2.4.7, and 1.4.11 for the ring itself).
   Ink on the light sections is 15.6:1 against #f4efe6 and 17.9:1 against
   white; the header is dark green, so the ring flips to white there for
   11.9:1. The gold accent is deliberately NOT used — #c9a24b is only
   2.1:1 on the cream background, well under the 3:1 non-text minimum. */
:focus-visible {
  outline: 3px solid #14181a;
  outline-offset: 2px;
  border-radius: 2px;
}
#header :focus-visible,
#mobileMenu :focus-visible {
  outline-color: #ffffff;
}

/* Respect prefers-reduced-motion: drop the header/logo transitions and any
   scroll-triggered animation for users who ask for less movement. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
