/* ===========================================================================
   01 · BASE
   Reset, focus, and the small set of Divi defaults that fight the system.
   =========================================================================== */

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

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

body,
body.et-db {
  background: var(--surface-primary);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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


/* ---------------------------------------------------------------------------
   Divi neutralisation

   Divi outputs #page-container-scoped rules from Theme Options, which beat a
   bare selector. Two consequences, both documented in the README:

   1. Leave Divi > Theme Options > General > Typography EMPTY. If a font or size
      is set there, it wins and the type scale silently stops applying.
   2. The !important flags below are the minimum needed to hold the scale when
      Theme Options has stale values. They are deliberate, not laziness.
   --------------------------------------------------------------------------- */
#page-container,
#et-boc .et-l {
  font-family: var(--text) !important;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
}

/* Divi's default link colour is a global setting; ours is inherited ink. */
#page-container a { color: inherit; }

/* No rounded corners, anywhere. Divi rounds buttons and inputs by default. */
#page-container .et_pb_button,
#page-container input,
#page-container select,
#page-container textarea,
#page-container .et_pb_image_wrap,
#page-container .et_pb_blurb_content img {
  border-radius: var(--radius) !important;
}

/* No drop shadows. On a palette with no black, shadows read muddy and cheap. */
#page-container .et_pb_module,
#page-container .et_pb_image_wrap,
#page-container .et_pb_button {
  box-shadow: none !important;
}

/* Divi's button arrow. The system has no arrow-on-hover convention. */
#page-container .et_pb_button:after,
#page-container .et_pb_button:before { display: none !important; }


/* ---------------------------------------------------------------------------
   Focus · WCAG 2.4.7 and 1.4.11
   River Slate at 11.81:1. Light Walnut is 2.75:1 and cannot carry this.
   --------------------------------------------------------------------------- */
:focus-visible,
#page-container :focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* On River Slate grounds the ring inverts or it disappears into the ground. */
.surface-slate :focus-visible,
.on-contrast :focus-visible,
.blenn-footer :focus-visible {
  outline-color: var(--gv-field);
}

/* Never remove focus. If a module strips it, restore it here rather than
   accepting the module's default. */
#page-container a:focus,
#page-container button:focus { outline-offset: 3px; }


/* ---------------------------------------------------------------------------
   Skip link · first focusable element, visible on focus
   --------------------------------------------------------------------------- */
.blenn-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999999;
  background: var(--surface-contrast);
  color: var(--cta-ink);
  padding: var(--sp-3) var(--sp-5);
  font-family: var(--text);
  font-size: var(--fs-btn);
  letter-spacing: var(--ls-btn);
  text-transform: uppercase;
  text-decoration: none;
}
.blenn-skip:focus {
  left: var(--sp-5);
  top: var(--sp-5);
}


/* ---------------------------------------------------------------------------
   Selection · uses the palette rather than the browser blue
   --------------------------------------------------------------------------- */
::selection {
  background: var(--gv-linen);
  color: var(--gv-walnut);
}


/* ---------------------------------------------------------------------------
   Reduced motion · WCAG 2.3.3. This is a requirement, not a nicety.
   --------------------------------------------------------------------------- */
@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;
  }
}
