/* ==========================================================================
   02 — Reset, fonts, typography, layout primitives
   ========================================================================== */

/* --- Fonts ------------------------------------------------------------- */
/* Sofia Sans is a variable font: one file covers weights 100–900. */
@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/sofia-sans-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sofia Sans";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/sofia-sans-latin-var-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Editorial accent, used inside headings via .nyght-span */
@font-face {
  font-family: "Nyght Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/nyght-serif-italic.ttf") format("truetype");
}
/* Upright cut of the same face — the homepage review quotes use it. */
@font-face {
  font-family: "Nyght Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/nyght-serif-regular.ttf") format("truetype");
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Clips the off-canvas drawer out of the scrollable area without creating
     a scroll container (which would break position: sticky). */
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--c-body-bg);
  color: var(--c-text);
  font-family: var(--ff-base);
  font-size: var(--fs-body);
  font-weight: var(--fw-normal);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* clip, not hidden: `overflow-x: hidden` forces overflow-y to compute to
     auto, which makes body a scroll container and silently kills every
     position: sticky on the page (the outcome card stack, the service rails).
     html already clips the off-canvas drawer; this is belt and braces. */
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
}
button { background: none; border: 0; padding: 0; cursor: pointer; }

a { color: var(--c-link); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--c-link-hover); }

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

/* --- Headings ---------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--ff-base);
  font-weight: var(--fw-bold);
  color: var(--c-heading);
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); }
h5 { font-size: var(--fs-h5); line-height: var(--lh-h5); }

/* Italic serif accent inside headings — preserves the original .nyght-span */
.nyght-span {
  font-family: var(--ff-accent);
  font-weight: 400;
  font-style: italic;
}

/* --- Layout primitives ------------------------------------------------- */
/*
 * Container.
 *
 * Elementor nests two boxes: an outer one capped at --container-max (1344 /
 * 1024 / 767 by breakpoint), then the content at 96% *of that*. So at 1440 the
 * content is 1344 x 0.96 = 1290 wide, starting at x=75 — not 1344 at x=48.
 * Taking 96% of the viewport instead put every element on every page 27px off.
 */
.bx-container {
  width: var(--container-inner);
  max-width: calc(var(--container-max) * var(--container-ratio));
  margin-inline: auto;
}
.bx-container--wide { --container-inner: 97%; --container-ratio: .97; }

.bx-section { padding-block: var(--space-section); }
.bx-section--lg { padding-block-start: var(--space-section-lg); }
.bx-section--flush-top { padding-block-start: 0; }
.bx-section--flush-bottom { padding-block-end: 0; }

.bx-section--dark {
  background: var(--c-navy);
  color: var(--c-on-dark);
}
.bx-section--dark h1,
.bx-section--dark h2,
.bx-section--dark h3,
.bx-section--dark h4,
.bx-section--dark h5 { color: var(--c-on-dark); }

.bx-section--cream { background: var(--c-bg-lite); }

/* In-page anchors must clear the fixed header */
[id] { scroll-margin-top: calc(var(--header-h) + 24px); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 12px 20px;
  background: var(--c-white);
  color: var(--c-text);
  font-weight: var(--fw-bold);
}
.skip-link:focus { left: 8px; top: 8px; }

/* Icon sprite */
.bx-icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex: none;
  display: inline-block;
  vertical-align: -.125em;
}
