/* Three Ridings Technology: shared styles.
   Layout and colour live inline on each element, exactly as approved in the
   design. This file holds only what cannot be inline: fonts, link states and
   the two animations. */

/* ---- Fonts (self-hosted, SIL Open Font License) ---- */
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
/* Inter is used only for the letters in the 3RT logo. */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ---- Page basics ---- */
html { scroll-behavior: smooth; }
body { margin: 0; background: #eef0ec; }
a { color: #6d4a8c; }
a:hover { color: #4f3368; }
a:focus-visible { outline: 2px solid #6d4a8c; outline-offset: 4px; }

/* ---- Headline reveal: first sentence, then the second 1.3s later ---- */
@keyframes headline-in { from { opacity: 0; } to { opacity: 1; } }
.headline-then { animation: headline-in 0.8s ease-out both; }
.headline-now  { animation: headline-in 0.8s ease-out 1.3s both; }

/* ---- Career bar: draws left to right once it scrolls into view ----
   site.js adds "wait" on load and swaps it for "run" when the bar is visible.
   Without JavaScript neither class is set, so the bar is simply shown.
   The 3s duration must match DURATION_MS in site.js. */
@keyframes career-draw {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
.career-bar.wait { clip-path: inset(0 100% 0 0); }
.career-bar.run  { animation: career-draw 3s linear both; }

/* ---- Visitors who ask for less motion get the finished page straight away ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .headline-then, .headline-now, .career-bar.run { animation: none; }
  .career-bar.wait { clip-path: none; }
}
