/* ---------------------------------------------------------------------------
   HES website: site layer.

   Loaded after the pinned Design System tokens in /assets/css/tokens/, which are
   byte-identical copies of HES Design System 2.0.0-alpha.18 (commit 48064a6).
   See design-system-snapshot/SNAPSHOT.md. This file only composes those tokens;
   it defines no new colors, weights or durations. Deliberate departures from the
   Design System are listed in README.md, "Design System conformance".

   Breakpoints are literal values, per tokens/breakpoints.js: a CSS custom property
   cannot be evaluated inside a media query. Mobile first:
     tablet  >= 768px    gutter 32px
     desktop >= 1024px   gutter 48px
   --------------------------------------------------------------------------- */

/* Fonts: self-hosted Inter and Inter Tight, weights 400 and 500 only.
   SIL Open Font License 1.1; the license text ships beside each file. The folder
   names carry the package version, so the one-year immutable cache stays safe:
   new font bytes get a new path. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter-5.3.0/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/inter-5.3.0/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter-tight-5.3.0/inter-tight-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/inter-tight-5.3.0/inter-tight-latin-500-normal.woff2") format("woff2");
}

/* ---- Layout variables (composed from tokens) ---- */
:root {
  --gutter: var(--gutter-mobile);
  --section-space: var(--space-8);
  --band-space: var(--space-8);
  /* Single-line logo height. The approved SVG's artboard holds some padding, but not
     the full clear space (the H-mark cap height on every side), so the header keeps
     the Design System NavBar's 30px inside the 64px bar. Height only; width always
     follows the artwork's aspect ratio. */
  --logo-height: 24px;
  --motif-height: 56px;
  /* Open mobile menu: header bar + panel (top padding, two 48px rows with 1px rules,
     bottom padding, 1px rule). Used to keep focused content clear of it. */
  --menu-open-height: calc(var(--nav-height) + var(--space-2) + 2 * (48px + 1px) + var(--space-4) + 1px);
}
@media (min-width: 360px) {
  :root {
    --logo-height: 30px;
  }
}
@media (min-width: 768px) {
  :root {
    --gutter: var(--gutter-tablet);
    --section-space: var(--space-9);
    --band-space: var(--space-9);
    --motif-height: 112px;
  }
}
@media (min-width: 1024px) {
  :root {
    --gutter: var(--gutter-desktop);
    --section-space: var(--space-10);
    --motif-height: 160px;
  }
}

/* ---- Page frame ---- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Keep focused and anchored content clear of the sticky header (WCAG 2.4.11),
     and keep the bottom of a focus ring on screen. */
  scroll-padding-block-start: calc(var(--nav-height) + var(--space-3));
  scroll-padding-block-end: var(--space-3);
}
html:has(.site-nav__menu[open]) {
  scroll-padding-block-start: calc(var(--menu-open-height) + var(--space-3));
}
body {
  display: flex;
  flex-direction: column;
  min-block-size: 100vh;
}
main {
  flex: 1 0 auto;
}
main:focus {
  outline: none;
}
/* tokens/base.css selects text as white on HES Orange (3.40:1). Use Charcoal Blue
   and white instead (10.75:1), inverted on the dark band. */
::selection {
  background: var(--surface-dark);
  color: var(--hes-white);
}
.hes-on-dark ::selection {
  background: var(--hes-white);
  color: var(--hes-charcoal-blue);
}
h1,
h2 {
  text-wrap: balance;
}
h1 {
  font-size: var(--size-hero-mobile);
  line-height: 36px;
}
@media (min-width: 768px) {
  h1 {
    font-size: var(--size-hero);
    line-height: var(--line-hero);
  }
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  box-sizing: border-box;
  inline-size: 100%;
  max-inline-size: calc(var(--container-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* Keeps a phrase together where it fits, and still lets it wrap inside itself
   when it does not (narrow screens, enlarged text spacing), so nothing overflows. */
.keep {
  display: inline-block;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  inset-block-start: -200px;
  inset-inline-start: var(--space-3);
  z-index: 200;
  padding: var(--space-2) var(--space-3);
  background: var(--surface-canvas);
  color: var(--text-heading);
  font: var(--type-nav);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.skip-link:focus {
  inset-block-start: var(--space-3);
}

/* ---- Text links: color-only hover ----
   The Design System hover is Slate to HES Orange text. HES Orange text on white is
   3.40:1, below the 4.5:1 that 14px text needs, so the orange moves to the underline
   (a non-text cue, 3:1 required, 3.40:1 measured) and the text darkens instead.
   Every link class sets its own hover color, because tokens/base.css a:hover
   (HES Orange) otherwise wins. */
.link {
  color: var(--text-link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
  transition: color var(--duration-base), text-decoration-color var(--duration-base);
}
.link:hover,
.skip-link:hover {
  color: var(--text-heading);
  text-decoration-line: underline;
  text-decoration-color: var(--accent-brand);
}

/* ---- Icons: Lucide, 1.75px stroke, sized 16/20/24/32 only ---- */
.icon {
  display: block;
  flex: none;
  inline-size: 20px;
  block-size: 20px;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 100; /* --z-nav in the Design System's tokens/elevation.css */
  background: var(--surface-canvas);
  border-block-end: 1px solid var(--border-subtle);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-block-size: var(--nav-height);
}
.site-header__brand {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
}
.site-header__brand {
  min-inline-size: 0;
}
.site-header__brand img,
.site-footer__logo img {
  block-size: var(--logo-height);
  inline-size: auto;
  max-inline-size: 100%;
  /* If a very narrow screen squeezes the box, scale the artwork, never distort it. */
  object-fit: contain;
  object-position: left center;
}

/* Primary navigation, tablet and up */
.site-nav__list {
  display: none;
  align-items: center;
  gap: var(--space-2);
  /* Optical alignment: the last label ends on the gutter, not 16px inside it. */
  margin-inline-end: calc(-1 * var(--space-3));
}
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-control);
  color: var(--text-heading);
  font: var(--type-nav);
  text-decoration: none;
  transition: color var(--duration-base);
}
.site-nav__link:hover {
  color: var(--text-body);
  text-decoration: none;
}
.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline: var(--space-3);
  inset-block-end: var(--space-2);
  block-size: 2px;
  background: var(--accent-active-indicator);
}

/* Primary navigation, below tablet: a disclosure menu that needs no script */
.site-nav__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: 44px;
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--action-ghost-border);
  border-radius: var(--radius-control);
  color: var(--text-heading);
  font: var(--type-nav);
  list-style: none;
  cursor: pointer;
  transition: border-color var(--duration-base);
}
.site-nav__toggle::-webkit-details-marker {
  display: none;
}
.site-nav__toggle:hover {
  border-color: var(--action-ghost-border-hover);
}
.site-nav__toggle:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.site-nav__menu .icon-close,
.site-nav__menu[open] .icon-open {
  display: none;
}
.site-nav__menu[open] .icon-close {
  display: block;
}
.site-nav__panel {
  position: absolute;
  inset-inline: 0;
  inset-block-start: 100%;
  padding: var(--space-2) var(--gutter) var(--space-4);
  background: var(--surface-canvas);
  border-block-end: 1px solid var(--border-subtle);
}
.site-nav__panel a {
  display: flex;
  align-items: center;
  min-block-size: 48px;
  padding-inline-start: var(--space-3);
  border-inline-start: 2px solid transparent;
  border-block-end: 1px solid var(--border-subtle);
  color: var(--text-heading);
  font: var(--type-nav);
  text-decoration: none;
  transition: color var(--duration-base);
}
.site-nav__panel a:hover {
  color: var(--text-body);
  text-decoration: none;
}
.site-nav__panel a[aria-current="page"] {
  border-inline-start-color: var(--accent-active-indicator);
}

@media (min-width: 768px) {
  .site-nav__list {
    display: flex;
  }
  .site-nav__menu {
    display: none;
  }
}

/* ---- Buttons: 4px radius, 40px height, color-only states ---- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-block-start: var(--space-3);
}
.button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-inline-size: var(--button-width-secondary);
  min-block-size: var(--button-height);
  padding: var(--button-padding) var(--space-3);
  border: 3px solid transparent;
  border-radius: var(--radius-control);
  font: var(--type-button);
  text-align: center;
  text-decoration: none;
  max-inline-size: 100%;
  cursor: pointer;
  transition: background-color var(--duration-base), border-color var(--duration-base), color var(--duration-base);
}
.button:hover {
  text-decoration: none;
}
.button--secondary {
  background: var(--action-secondary-bg);
  color: var(--action-secondary-fg);
}
.button--secondary:hover {
  background: var(--action-secondary-bg-hover);
  color: var(--action-secondary-fg);
}
.button--ghost {
  border-width: 1px;
  border-color: var(--action-ghost-border);
  padding: calc(var(--button-padding) + 2px) calc(var(--space-3) + 2px);
  background: var(--action-ghost-bg);
  color: var(--action-ghost-fg);
}
.button--ghost:hover {
  border-color: var(--action-ghost-border-hover);
  color: var(--action-ghost-fg);
}

/* ---- Type roles ---- */
.lead {
  max-inline-size: 40rem;
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  /* Promo size. The token line height (20px) is shorter than the 22px type and
     collides when the line wraps; 30px follows the Design System website kit. */
  font-size: var(--size-promo);
  line-height: 30px;
}
.label {
  font: var(--type-category);
  color: var(--text-body);
}
.label + h1 {
  /* Product name and title read as one credit: 8px apart, not the 24px stack gap. */
  margin-block-start: calc(var(--space-2) - var(--space-4));
}
.prose {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-inline-size: 30rem;
}

/* ---- Sections ---- */
.section {
  padding-block: var(--section-space);
}
/* Opening statement: fills the first screen below the header and centers its
   content vertically, per the Design System's one-message-per-screen rule. It stops
   64px short of the fold so the next section shows and invites a scroll, and it is
   capped so very tall windows do not open on a mostly empty page. */
.section--hero {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  min-block-size: min(calc(100vh - var(--nav-height) - 1px - var(--space-8)), 48rem);
  min-block-size: min(calc(100svh - var(--nav-height) - 1px - var(--space-8)), 48rem);
}
.intro__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-inline-size: 48rem;
}

/* The one Charcoal Blue band per page. .hes-on-dark (tokens/colors.css) flips the
   text, border and ghost-button tokens for the dark surface. */
.band {
  padding-block: var(--band-space);
  background: var(--surface-dark);
}
.band__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
}
.band__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  min-inline-size: 0;
  max-inline-size: 48rem;
}
@media (min-width: 768px) {
  .band__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: var(--space-7);
  }
}

/* Forward-motion motif: the approved monogram vector, placed once per page as a
   section-end marker. Scales down on smaller screens, never tiled or rotated. */
.motif {
  justify-self: end;
  block-size: var(--motif-height);
  inline-size: auto;
}
/* The homepage teaser keeps the motif smaller than the Screening Room title band. */
.band--teaser .motif {
  block-size: min(var(--motif-height), 112px);
}

/* Status: prominent text with a quiet rule, so it never reads as a button and never
   depends on color. On phones the two phrases stack and the separator is hidden. */
.status {
  padding-inline-start: var(--space-3);
  border-inline-start: 2px solid var(--text-heading);
  color: var(--text-heading);
  font: var(--type-category);
}
.status__part {
  display: block;
}
.status__sep {
  display: none;
}
@media (min-width: 768px) {
  .status__part {
    display: inline-block;
  }
  .status__sep {
    display: inline;
  }
}

/* ---- Screening Room rows ---- */
.rows {
  display: flex;
  flex-direction: column;
}
.row {
  display: grid;
  gap: var(--space-3);
  padding-block: var(--space-6);
  border-block-start: 1px solid var(--border-subtle);
}
.row:first-child {
  padding-block-start: 0;
  border-block-start: 0;
}
.row:last-child {
  padding-block-end: 0;
}
.row__body {
  min-inline-size: 0;
}
@media (min-width: 768px) {
  .row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: var(--space-5);
  }
}

.facts {
  margin: 0;
}
.facts__row {
  display: grid;
  gap: var(--space-1);
  padding-block: var(--space-3);
  border-block-start: 1px solid var(--border-subtle);
}
.facts__row:first-child {
  padding-block-start: 0;
  border-block-start: 0;
}
.facts dt {
  color: var(--text-heading);
  font: var(--type-nav);
  line-height: var(--line-body);
}
.facts dd {
  margin: 0;
  font: var(--type-body);
  color: var(--text-body);
  overflow-wrap: anywhere;
}
@media (min-width: 768px) {
  .facts__row {
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: var(--space-4);
  }
}

/* ---- 404 ---- */
.link-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.link-list a {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  min-inline-size: 44px;
}

/* ---- Footer: light surface, so each page keeps a single dark band ---- */
.site-footer {
  padding-block: var(--space-7);
  background: var(--surface-alt);
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
}
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
}
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  min-inline-size: 44px;
  color: var(--text-heading);
  font: var(--type-nav);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--duration-base), color var(--duration-base);
}
.footer-nav a:hover {
  color: var(--text-heading);
  text-decoration-line: underline;
  text-decoration-color: var(--accent-brand);
}
.site-footer__meta,
.site-footer__legal {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.site-footer__meta {
  padding-block-start: var(--space-4);
  border-block-start: 1px solid var(--border-default);
}
.site-footer__meta p {
  font-size: var(--size-fine);
  line-height: var(--line-body);
  overflow-wrap: anywhere;
}
@media (min-width: 1024px) {
  .site-footer__meta {
    flex-direction: row;
    justify-content: space-between;
    gap: var(--space-5);
  }
  .site-footer__legal {
    flex-direction: row;
    gap: var(--space-5);
  }
}

/* ---- Touch: larger hit areas without changing the layout rhythm ---- */
@media (pointer: coarse) {
  .button {
    min-block-size: 44px;
  }
  .site-footer__meta .link,
  .facts .link {
    display: inline-block;
    padding-block: 12px;
    margin-block: -12px;
  }
}

/* ---- Accessibility media features ---- */
@media (prefers-reduced-motion: reduce) {
  /* tokens/motion.css collapses --duration-base, which every transition here uses.
     The Design System's composite --transition-* tokens (used by tokens/base.css on
     links) hard-code 0.33s, so this catches those too. */
  *,
  *::before,
  *::after {
    transition-duration: 0.01s !important;
  }
}
@media (forced-colors: active) {
  .site-nav__link[aria-current="page"]::after {
    background: CanvasText;
  }
  .site-nav__panel a {
    border-inline-start-color: Canvas;
  }
  .site-nav__panel a[aria-current="page"] {
    border-inline-start-color: CanvasText;
  }
  .band {
    border-block: 1px solid CanvasText;
  }
}
@media print {
  .site-header {
    position: static;
  }
  .skip-link,
  .site-nav {
    display: none;
  }
}
