/* Shared by both directions: brand tokens, a small reset, focus, the preview
   ribbon and a few utilities. Layout lives in each site's styles.css. */

:root {
  /* Brand */
  --navy: #0A3D78;
  --navy-deep: #062A55;
  --royal: #2B7FC4;        /* decorative strokes and borders only */
  --royal-ink: #1F6FAE;    /* royal for text and text-bearing fills: 5.3:1 on white */
  --sky: #8EC3EB;          /* fill behind dark ink, or text on navy; never text on white */
  --ice: #F3F7FC;
  --mist: #DDEAF6;

  /* Text and lines */
  --ink: #0B1F3A;
  --muted: #45566E;
  --line: #D6E2EF;
  --line-strong: #B7CAE0;
  --on-navy: #DDEAF6;
  --on-navy-soft: #C6DBEF;

  /* Type */
  --font-display: "Cinzel Decorative", Cinzel, Georgia, serif;
  --font-caps: Cinzel, Georgia, serif;
  --font-body: Figtree, "Segoe UI", system-ui, sans-serif;

  /* Interaction */
  --focus: #1F6FAE;
  --tap: 44px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

a { color: var(--navy); }
a:hover { color: var(--navy-deep); }

button,
input { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
ul[role="list"],
ol[role="list"] { list-style: none; margin: 0; padding: 0; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.on-dark :focus-visible,
.on-dark:focus-visible { outline-color: #FFFFFF; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 18px;
  border-radius: 6px;
  background: var(--navy);
  color: #FFFFFF;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; color: #FFFFFF; }

/* Hide the browser's own clear button; each search field has a proper one. */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }

/* ------------------------------------------------------------ Preview ribbon */

.preview-ribbon {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100vw - 32px);
  padding: 4px 4px 4px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 8px 24px rgba(6, 42, 85, .28);
}
.preview-ribbon__dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--sky);
}
.preview-ribbon__text { padding: 8px 0; }
.preview-ribbon__close {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #FFFFFF;
}
.js .preview-ribbon__close { display: inline-flex; }
.preview-ribbon__close:hover { background: rgba(255, 255, 255, .14); }
.preview-ribbon__close:focus-visible { outline-color: #FFFFFF; outline-offset: -3px; border-radius: 50%; }

@media (pointer: coarse) {
  .preview-ribbon__close { width: var(--tap); height: var(--tap); }
}

/* ------------------------------------------------------------ Video */

/* A 16:9 box holding either the poster link or, once played, the player. */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--navy-deep);
}
.video__poster {
  position: absolute;
  inset: 0;
  display: block;
  color: #FFFFFF;
  text-decoration: none;
}
.video__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.015); /* trims the thin dark edge YouTube thumbnails carry */
  transition: transform .6s var(--ease);
}
.video__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 42, 85, 0) 45%, rgba(6, 42, 85, .45) 100%);
  transition: background-color .3s var(--ease);
}
.video__poster:hover img { transform: scale(1.035); }
.video__poster:hover::after { background-color: rgba(6, 42, 85, .12); }
.video__poster:focus-visible { outline-offset: -6px; outline-color: #FFFFFF; border-radius: inherit; }
.video__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ------------------------------------------------------------ Motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
