/* ==========================================================================
   Outwest FM Theme — styles
   --------------------------------------------------------------------------
   Rules that cannot be expressed as a token override. Colours, the type
   scale and hero tokens live in tokens.css; layout, regions and component
   styling come from the base theme (apebox_theme).
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. Font
   --------------------------------------------------------------------------- */
/* Inter variable font (weights 100–900), self-hosted. SIL Open Font License
   1.1 — the licence and copyright notice are embedded in the font file. */
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter/Inter-VariableFont_opsz-wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------------------
   2. Typography — heading and paragraph styles of the Arizto site
   --------------------------------------------------------------------------- */
/* Sizes come from the type scale in tokens.css through the base theme's own
   h1–h6 rules (h1 xxl, h2 xl, h3 lg, h4 mlg); only what differs from the
   base theme's terminal styling is set here. The base theme's
   "h*:first-child { margin-top: 0 }" still applies. */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  margin: var(--space-sm) 0 var(--space-md);
  line-height: var(--leading-none);
}

/* The base theme upper-cases and letter-spaces h1 like a pane title. */
h1 {
  text-transform: none;
  letter-spacing: -0.02em;
}

h4,
h5,
h6 {
  font-weight: 600;
}

h5,
h6 {
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-sm);
}

h6 {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Reading text is one step larger than UI text. */
p {
  font-size: var(--font-size-body);
  line-height: var(--leading-normal);
}

/* ---------------------------------------------------------------------------
   3. Fixed top menu
   --------------------------------------------------------------------------- */
/* The header stays pinned to the top of the viewport and the content starts
   below it. On the homepage the home_hero_block module (hero-header.css/js)
   drops that offset so the hero runs behind the header, and makes the header
   translucent until the page is scrolled; everywhere else, and once scrolled,
   the base theme's solid header band shows.

   Menus that should be part of this bar belong in the Header region. The
   Main menu / Secondary menu regions render as a separate band below it. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

/* :where() keeps this at single-id specificity so the hero module's
   "#content:has(> #hero) { margin-top: 0 }" still wins on the homepage. */
:where(#header) ~ #content {
  margin-top: var(--header-height);
}

/* If the navigation band is in use it sits directly under the fixed header
   and takes the offset instead of the content. */
:where(#header) + #navigation {
  margin-top: var(--header-height);
}

:where(#header) + #navigation + #content {
  margin-top: 0;
}

/* In-page anchors (and the skip link target) stop below the fixed header. */
html {
  scroll-padding-top: var(--header-height);
}

/* The base theme hides the header in print; drop its offset too. */
@media print {
  :where(#header) ~ #content,
  :where(#header) + #navigation {
    margin-top: 0;
  }
}
