/* =========================================================
   ESS Employee Portal
   Dependency-free styles (Bootstrap Icons only).
   Light theme, solid colours – no background gradients.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --font-display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Brand – ESS red from the logo, navy from the ESS Central sign-in */
  --red: #e31b2c;
  --navy: #13235b;
  --navy-dark: #0c1840;
  --red-dark: #c4121f;
  --blue: #1f5fe0;
  --violet: #7c3aed;
  --teal: #0d9488;
  --green: #16a34a;
  --amber: #d97706;

  /* Surfaces */
  --bg: #f8f9fb;
  --surface: #ffffff;
  --sunken: #f1f3f7;
  --border: #e4e7ee;
  --border-strong: #cfd4df;
  --text: #0e1526;
  --muted: #4b5570;
  --faint: #8790a6;
  --header-bg: rgba(255, 255, 255, .88);
  --shadow: 0 24px 60px -28px rgba(14, 21, 38, .28);
  --shadow-sm: 0 8px 24px -14px rgba(14, 21, 38, .22);
  --shadow-xs: 0 1px 2px rgba(14, 21, 38, .06);

  --radius: 16px;
  --radius-lg: 22px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-loading { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.12; letter-spacing: -.02em; }
p { margin: 0; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

::selection { background: rgba(227, 27, 44, .16); }

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

kbd {
  font-family: var(--font-mono);
  font-size: .72em;
  line-height: 1;
  padding: .32em .5em;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  background: var(--surface);
  color: var(--muted);
}

.kbd-combo { display: inline-flex; gap: .3em; align-items: center; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }

.accent { color: var(--red); }

/* =========================================================
   Intro – logo fades in, hairline fills, logo glides to header
   ========================================================= */
.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #fff;
  transition: opacity .8s var(--ease-in-out) .15s, visibility .8s .15s;
}

.intro__stage { display: grid; justify-items: center; gap: 18px; }

#introLogo {
  width: clamp(170px, 18vw, 220px);
  opacity: 0;
  transform: translateY(10px);
  animation: introIn 1s var(--ease) .1s forwards;
}

.intro__label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--faint);
  opacity: 0;
  animation: introIn .9s var(--ease) .35s forwards;
}

.intro__line {
  display: block;
  width: 140px;
  height: 1px;
  background: var(--border);
  overflow: hidden;
  opacity: 0;
  animation: introIn .9s var(--ease) .45s forwards;
}

.intro__line span {
  display: block;
  height: 100%;
  background: var(--navy);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

@keyframes introIn { to { opacity: 1; transform: none; } }

.intro.is-leaving { opacity: 0; visibility: hidden; }
.intro.is-leaving .intro__label,
.intro.is-leaving .intro__line { opacity: 0; transition: opacity .3s; animation: none; }

.flying-logo { position: fixed; z-index: 210; margin: 0; transform-origin: 0 0; pointer-events: none; }

/* =========================================================
   Background – interactive constellation only
   ========================================================= */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.bg__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120; }
.scroll-progress span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--red); }

/* =========================================================
   Header
   ========================================================= */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color .4s var(--ease), border-color .4s, height .4s var(--ease);
}

.header.is-scrolled {
  --header-h: 66px;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  border-bottom-color: var(--border);
}

.header__inner { display: flex; align-items: center; gap: 24px; }

.brand { display: flex; align-items: center; gap: 14px; margin-right: auto; }
.brand__logo { height: 46px; width: auto; transition: height .4s var(--ease); }
.is-scrolled .brand__logo { height: 40px; }

.brand__text { display: flex; flex-direction: column; line-height: 1.15; padding-left: 14px; border-left: 1px solid var(--border-strong); }
.brand__text strong { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.brand__text small { font-size: 11.5px; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 4px; }

.nav__link {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  transition: color .25s, background-color .25s;
}

.nav__link:hover { color: var(--text); background: var(--sunken); }
.nav__link.is-active { color: var(--text); }

.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
}

.nav__link .bi { font-size: 11px; margin-left: 2px; }

.header__actions { display: flex; align-items: center; gap: 8px; }

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 8px 0 14px;
  font-size: 13.5px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color .25s, color .25s;
}

.search-trigger:hover { color: var(--text); border-color: var(--border-strong); }

/* Header entrance (JS-gated so content never hides without JS) */
.js .header .nav,
.js .header__actions,
.js .brand__text { opacity: 0; transform: translateY(-8px); }

.js .is-ready .header .nav,
.js .is-ready .header__actions,
.js .is-ready .brand__text { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }

.js .is-ready .brand__text { transition-delay: .5s; }
.js .is-ready .header .nav { transition-delay: .6s; }
.js .is-ready .header__actions { transition-delay: .7s; }

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color .25s;
}

.icon-btn:hover { border-color: var(--border-strong); }

.menu-toggle { display: none; }

.menu-toggle span {
  position: absolute;
  width: 16px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .35s var(--ease);
}

.menu-toggle span:first-child { transform: translateY(-3.5px); }
.menu-toggle span:last-child { transform: translateY(3.5px); }
.menu-toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 8px 0 26px;
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s, background-color .3s;
  will-change: transform;
}

/* Arrow sits in a round chip at the end of the pill */
.btn .bi {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 17px;
  border-radius: 50%;
  transition: transform .45s var(--ease), background-color .3s, color .3s;
}

.btn--primary { color: #fff; background: var(--red); box-shadow: 0 14px 30px -14px rgba(227, 27, 44, .75); }
.btn--primary .bi { color: var(--red); background: #fff; }
.btn--primary:hover { background: var(--red-dark); box-shadow: 0 18px 36px -14px rgba(227, 27, 44, .8); }
.btn--primary:hover .bi { transform: translateX(3px) rotate(-45deg); }

.btn--ghost { padding: 0 26px 0 8px; color: var(--text); border: 1px solid var(--border-strong); background: var(--surface); }
.btn--ghost .bi { color: var(--navy); background: var(--sunken); }
.btn--ghost:hover { border-color: var(--navy); }
.btn--ghost:hover .bi { color: #fff; background: var(--navy); }

.ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255, 255, 255, .35);
  transform: scale(0);
  animation: ripple .7s var(--ease) forwards;
  z-index: 3;
}

.btn--ghost .ripple { background: rgba(19, 35, 91, .08); }

@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 32px) 0 72px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.eyebrow #greeting { color: var(--text); font-weight: 600; }
.eyebrow__sep { width: 1px; height: 14px; background: var(--border-strong); }

.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--red);
  animation: ping 1.8s var(--ease) infinite;
}

@keyframes ping {
  from { transform: scale(.5); opacity: 1; }
  to { transform: scale(1.8); opacity: 0; }
}

.hero__title {
  margin: 22px 0 18px;
  font-size: clamp(38px, 4.6vw, 64px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.04;
}

/* Word-by-word rise, built by JS */
.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }

.split-word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease);
  transition-delay: calc(var(--i) * 70ms + 150ms);
}

.is-ready .split-word > span { transform: none; }

.hero__lead { max-width: 580px; font-size: clamp(16px, 1.35vw, 17.5px); line-height: 1.7; color: var(--muted); }

.hero__typed { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 16px; color: var(--muted); }
.hero__typed .bi { margin-right: 4px; color: var(--red); }

.typed { font-weight: 600; color: var(--text); box-shadow: inset 0 -.32em 0 rgba(227, 27, 44, .14); }

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -.18em;
  background: var(--red);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }

.status-strip { display: flex; flex-wrap: wrap; gap: 10px; }

.status-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.status-chip > .bi { font-size: 18px; color: var(--muted); }
.status-chip strong { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.status-chip small { display: block; font-size: 12px; color: var(--faint); }

.status-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--faint); flex: none; }
.is-open .status-dot { background: var(--green); }

.is-open .status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--green);
  animation: ping 2s var(--ease) infinite;
}

.is-closed .status-dot { background: var(--amber); }

/* ---------- Orbit ---------- */
.orbit { position: relative; width: 100%; max-width: 560px; aspect-ratio: 1; margin-left: auto; }

/* Desktop: lift the orbit so its centre lines up with the headline + intro copy */
@media (min-width: 961px) {
  .orbit { top: -76px; }
}

.orbit__rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.orbit__ring {
  fill: none;
  stroke: var(--navy);
  stroke-opacity: .14;
  stroke-width: 1;
  stroke-dasharray: 2 6;
  transform-origin: 300px 300px;
}

.orbit__ring--main { stroke: var(--navy); stroke-opacity: .22; stroke-dasharray: none; }

.orbit__core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 32%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  z-index: 5;
}

.orbit__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(227, 27, 44, .35);
  animation: corePulse 3.6s var(--ease) infinite;
}

.orbit__pulse--late { animation-delay: 1.8s; border-color: rgba(19, 35, 91, .3); }

@keyframes corePulse {
  from { transform: scale(1); opacity: .9; }
  to { transform: scale(2); opacity: 0; }
}

.orbit__plate {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, .85), 0 30px 60px -24px rgba(14, 21, 38, .35);
  animation: float 6s ease-in-out infinite;
}

.orbit__plate img { width: 72%; }

@keyframes float { 50% { transform: translateY(-6px); } }

/* Orbit entrance (plays when the orbit scrolls into view) */
.js .orbit__ring { opacity: 0; transform: scale(.4); }
.js .orbit__core { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
.js .orbit.is-in .orbit__ring { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1.4s var(--ease); }
.js .orbit.is-in .orbit__ring:nth-of-type(1) { transition-delay: .25s; }
.js .orbit.is-in .orbit__ring:nth-of-type(2) { transition-delay: .4s; }
.js .orbit.is-in .orbit__ring:nth-of-type(3) { transition-delay: .55s; }
.js .orbit.is-in .orbit__core { opacity: 1; transform: translate(-50%, -50%); transition: opacity .6s var(--ease) .15s, transform 1.1s var(--ease) .15s; }

.orbit__nodes { position: absolute; inset: 0; }

.orbit-node {
  --size: 62px;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  display: grid;
  place-items: center;
  font-size: 25px;
  color: rgb(var(--app-rgb));
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 14px 30px -16px rgba(14, 21, 38, .45);
  will-change: transform, opacity;
  opacity: 0;
  transition: border-color .25s, box-shadow .25s;
}

.orbit-node:hover,
.orbit-node:focus-visible {
  border-color: rgb(var(--app-rgb));
  box-shadow: 0 0 0 5px rgba(var(--app-rgb), .12), 0 18px 36px -14px rgba(14, 21, 38, .5);
  outline: none;
}

.orbit-node__label {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
  border-radius: 8px;
  background: var(--navy);
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity .25s, transform .3s var(--ease);
  pointer-events: none;
}

.orbit-node:hover .orbit-node__label,
.orbit-node:focus-visible .orbit-node__label { opacity: 1; transform: translate(-50%, 0); }

.orbit-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--c);
  will-change: transform, opacity;
  opacity: 0;
}

/* ---------- Scroll cue ---------- */
.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); opacity: .55; transition: opacity .3s; }
.scroll-cue:hover { opacity: 1; }

.scroll-cue__mouse { display: block; position: relative; width: 24px; height: 38px; border: 1.5px solid var(--border-strong); border-radius: 14px; }

.scroll-cue__mouse span {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--text);
  animation: wheel 1.8s var(--ease) infinite;
}

@keyframes wheel {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(12px); opacity: 0; }
}

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; padding: 16px 0; border-block: 1px solid var(--border); background: var(--surface); }

.ticker__track { display: flex; align-items: center; gap: 22px; width: max-content; animation: marquee 40s linear infinite; }

.ticker__track span {
  font-family: var(--font-display);
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  color: var(--muted);
}

.ticker__track .bi { font-size: 22px; color: var(--red); }

@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   Sections
   ========================================================= */
.section { position: relative; padding: clamp(40px, 5vw, 64px) 0; }
.section + .section { padding-top: 8px; }
.section__head { max-width: 760px; margin-bottom: clamp(26px, 3.5vw, 40px); }

.kicker {
  display: inline-block;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--red);
}

.section__title { font-size: clamp(30px, 4vw, 48px); font-weight: 700; letter-spacing: -.035em; }
.section__lead { margin-top: 16px; font-size: 17px; color: var(--muted); max-width: 640px; }

.shortcut-hint { display: block; margin-top: 12px; font-size: 14px; color: var(--faint); }
.shortcut-hint kbd { font-size: 12px; }

/* =========================================================
   App cards – content only
   ========================================================= */
.apps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transform: translateY(var(--ty, 0));
  transition: transform .6s var(--ease), border-color .3s, box-shadow .5s var(--ease);
}

.app-card:hover { --ty: -4px; border-color: rgba(var(--app-rgb), .4); box-shadow: 0 28px 60px -30px rgba(var(--app-rgb), .45), 0 12px 30px -20px rgba(14, 21, 38, .25); }

/* Coloured top rule appears on hover */
.app-card::after {
  content: "";
  position: absolute;
  left: 30px; right: 30px; top: -1px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: rgb(var(--app-rgb));
  transform: scaleX(0);
  transition: transform .6s var(--ease);
}

.app-card:hover::after { transform: scaleX(1); }

.app-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }

.app-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  font-size: 22px;
  border-radius: 14px;
  color: #fff;
  background: rgb(var(--app-rgb));
  box-shadow: 0 10px 22px -12px rgba(var(--app-rgb), .9);
  transition: transform .5s var(--ease-spring);
}

.app-card:hover .app-icon { transform: translateY(-2px) rotate(-6deg); }

.app-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  color: rgb(var(--app-rgb));
  border-radius: 999px;
  background: rgba(var(--app-rgb), .08);
}

.app-card__title { font-size: clamp(23px, 2.2vw, 28px); font-weight: 700; letter-spacing: -.03em; }

/* Whole card is clickable through the title link */
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.stretched:focus-visible { outline: none; }
.app-card:has(.stretched:focus-visible) { outline: 2px solid rgb(var(--app-rgb)); outline-offset: 3px; }

.app-card__desc { margin-top: 10px; font-size: 15.5px; color: var(--muted); max-width: 54ch; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; padding: 0; list-style: none; }

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
  border: 1px solid rgba(var(--app-rgb), .14);
  border-radius: 999px;
  background: rgba(var(--app-rgb), .05);
  transition: background-color .3s, border-color .3s;
}

.chips .bi { color: rgb(var(--app-rgb)); }
.app-card:hover .chips li { background: rgba(var(--app-rgb), .09); border-color: rgba(var(--app-rgb), .24); }

.app-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.app-meta { display: grid; gap: 2px; min-width: 0; }

.app-url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-url .bi { color: var(--green); }

.app-recent { font-size: 12px; color: var(--muted); white-space: nowrap; }
.app-recent::before { content: "●"; margin-right: 6px; font-size: 8px; vertical-align: 2px; color: rgb(var(--app-rgb)); }
.app-recent:empty { display: none; }

/* Soft-tinted pill in the app's colour; fills solid when the card is hovered */
.launch-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  height: 42px;
  padding: 0 6px 0 18px;
  font-size: 14px;
  font-weight: 600;
  color: rgb(var(--app-rgb));
  border-radius: 999px;
  background: rgba(var(--app-rgb), .09);
  transition: background-color .35s, color .35s, box-shadow .35s;
}

.launch-pill .bi {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-size: 14px;
  color: #fff;
  border-radius: 50%;
  background: rgb(var(--app-rgb));
  transition: transform .45s var(--ease), background-color .35s, color .35s;
}

.app-card:hover .launch-pill { color: #fff; background: rgb(var(--app-rgb)); box-shadow: 0 12px 24px -12px rgba(var(--app-rgb), .9); }
.app-card:hover .launch-pill .bi { color: rgb(var(--app-rgb)); background: #fff; }
.app-card:hover .launch-pill .bi-arrow-up-right { transform: rotate(45deg); }
.app-card:hover .launch-pill .bi-arrow-right { transform: translateX(2px) rotate(-45deg); }

.app-card.is-launching { animation: launch .6s var(--ease); }

@keyframes launch {
  40% { transform: scale(.985); }
  100% { transform: none; }
}

/* ---------- ESS Central – single sign-on card ---------- */
.app-card--feature { grid-column: 1 / -1; padding: clamp(26px, 3.4vw, 44px); }
.app-card--feature::after { left: clamp(26px, 3.4vw, 44px); right: clamp(26px, 3.4vw, 44px); }
.app-card--feature .app-card__title { font-size: clamp(30px, 3.2vw, 40px); }
.app-card--feature .app-card__desc { font-size: 16.5px; }

/* Primary app: solid ESS red sign-in */
.app-card--feature .launch-pill { height: 48px; padding: 0 7px 0 22px; font-size: 15px; color: #fff; background: var(--red); box-shadow: 0 12px 26px -14px rgba(227, 27, 44, .8); }
.app-card--feature .launch-pill .bi { width: 34px; height: 34px; color: var(--red); background: #fff; }
.app-card--feature:hover .launch-pill { background: var(--red-dark); }

.feature {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 56px);
}

.feature__info { display: flex; flex-direction: column; min-width: 0; }

/* 1 → 2 → 3 sign-in strip */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 26px;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.steps li {
  position: relative;
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}

.steps li span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--red);
  border: 1.5px solid rgba(227, 27, 44, .35);
  border-radius: 50%;
  background: var(--surface);
  transition: background-color .4s, color .4s, border-color .4s;
}

/* Dashed connector between step numbers */
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 38px;
  right: 4px;
  border-top: 1.5px dashed var(--border-strong);
}

.app-card--feature:hover .steps li span { color: #fff; background: var(--red); border-color: var(--red); }
.app-card--feature:hover .steps li:nth-child(2) span { transition-delay: .12s; }
.app-card--feature:hover .steps li:nth-child(3) span { transition-delay: .24s; }

.modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Tiles sit above the card's stretched link; JS routes their clicks to the login */
.module {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 14px;
  padding: 16px 16px 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .3s, box-shadow .4s var(--ease), transform .4s var(--ease);
}

.module::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: rgb(var(--m-rgb));
  transform: scaleY(0);
  transition: transform .4s var(--ease);
}

.module:hover {
  border-color: rgba(var(--m-rgb), .45);
  box-shadow: 0 14px 30px -20px rgba(var(--m-rgb), .8);
  transform: translateY(-3px);
}

.module:hover::before { transform: scaleY(1); }

.module__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  font-size: 18px;
  border-radius: 12px;
  color: rgb(var(--m-rgb));
  background: rgba(var(--m-rgb), .1);
  transition: background-color .3s, color .3s, transform .5s var(--ease-spring);
}

.module:hover .module__icon { color: #fff; background: rgb(var(--m-rgb)); transform: rotate(-8deg) scale(1.05); }

.module strong { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.35; transition: color .3s; }
.module:hover strong { color: rgb(var(--m-rgb)); }
.module small { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* Staggered entrance for the module tiles */
.js .module { opacity: 0; transform: translateY(12px); }
.js .is-in .module { opacity: 1; transform: none; transition: opacity .7s var(--ease) var(--md), transform .7s var(--ease) var(--md), border-color .3s, box-shadow .4s var(--ease); }
.js .is-in.is-settled .module { --md: 0s; }
.js .is-in .module:hover { transform: translateY(-3px); }
.module:nth-child(1) { --md: .25s; }
.module:nth-child(2) { --md: .32s; }
.module:nth-child(3) { --md: .39s; }
.module:nth-child(4) { --md: .46s; }
.module:nth-child(5) { --md: .53s; }
.module:nth-child(6) { --md: .6s; }

/* ---------- Corporate banner card ---------- */
.app-card--banner { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 18px; padding: 20px 26px; }
.app-card--banner::after { left: 26px; right: 26px; }
.app-card--banner .app-card__title { font-size: 19px; }
.app-card--banner .app-card__desc { margin-top: 2px; font-size: 14.5px; }
.banner__text { flex: 1; min-width: 0; }
.app-card--banner .app-meta { flex: none; }

/* =========================================================
   About
   ========================================================= */

.about { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 80px); align-items: center; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.badge .bi { color: var(--blue); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.stat {
  position: relative;
  padding: 22px 20px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform .5s var(--ease), border-color .3s, box-shadow .5s;
}

.stat:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }

.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat__label { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.4; }

.stat__bar { display: block; height: 3px; margin-top: 18px; border-radius: 3px; background: var(--sunken); overflow: hidden; }

.stat__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1.8s var(--ease) calc(var(--d, 0s) + .2s);
}

.stat:nth-child(even) .stat__bar span { background: var(--navy); }
.stat.is-in .stat__bar span { transform: scaleX(1); }

/* Partner marquee */
.marquee {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid;
  gap: 12px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__row { overflow: hidden; padding: 2px 0; }
.marquee__track { display: flex; gap: 12px; width: max-content; animation: marquee 45s linear infinite; }
.marquee__row--reverse .marquee__track { animation-direction: reverse; animation-duration: 55s; }
.marquee:hover .marquee__track { animation-play-state: paused; }

.pchip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color .3s;
}

.pchip .bi { font-size: 11px; color: var(--red); }
.pchip:hover { border-color: var(--border-strong); }
.pchip--soft { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--muted); padding: 9px 16px; }

/* =========================================================
   Offices
   ========================================================= */
.offices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.office-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform .5s var(--ease), border-color .3s, box-shadow .5s;
}

.office-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .7s var(--ease);
}

.office-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.office-card:hover::after { transform: scaleX(1); }

.office-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  font-size: 20px;
  color: var(--red);
  border-radius: 12px;
  background: rgba(227, 27, 44, .07);
}

.office-card__label { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.office-card h3 { margin: 6px 0 14px; font-size: 25px; font-weight: 700; }
.office-card address { font-style: normal; font-size: 15px; color: var(--muted); line-height: 1.7; }

.office-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 22px; }

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  transition: border-color .25s;
}

.link-pill .bi { color: var(--muted); transition: color .25s; }
.link-pill:hover { border-color: var(--navy); }
.link-pill:hover .bi { color: var(--red); }

.week { display: flex; gap: 6px; margin-bottom: 18px; }

.week span {
  flex: 1;
  display: grid;
  place-items: center;
  height: 34px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}

.week span.off { color: var(--faint); background: var(--bg); border-style: dashed; }
.week span.is-today { color: #fff; border-color: var(--navy); background: var(--navy); }

.daybar { height: 6px; border-radius: 6px; background: var(--sunken); overflow: hidden; }
.daybar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--green); transition: width 1.6s var(--ease); }

.hours-status { margin-top: 12px; font-size: 14px; color: var(--muted); }
.hours-status strong { color: var(--text); }

/* =========================================================
   Footer
   ========================================================= */
.footer { position: relative; padding: 40px 0 24px; border-top: 1px solid var(--border); background: var(--surface); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer__brand { display: flex; align-items: center; gap: 18px; }
.footer__brand .brand__logo { height: 52px; }
.footer__brand p { font-size: 14px; color: var(--muted); max-width: 300px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 6px; }
.footer__links a { padding: 6px 12px; font-size: 14px; color: var(--muted); border-radius: 8px; transition: color .25s, background-color .25s; }
.footer__links a:hover { color: var(--text); background: var(--sunken); }

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--faint);
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity .4s, visibility .4s, transform .5s var(--ease);
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-3px); }
.to-top svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.to-top circle { fill: none; stroke: var(--border); stroke-width: 2.5; }
.to-top .to-top__progress { stroke: var(--red); stroke-linecap: round; stroke-dasharray: 132; stroke-dashoffset: 132; }
.to-top .bi { font-size: 18px; }

/* =========================================================
   Command palette
   ========================================================= */
.palette { position: fixed; inset: 0; z-index: 150; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }

.palette__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 21, 38, .35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fadeIn .25s var(--ease);
}

.palette__panel {
  position: relative;
  width: 100%;
  max-width: 600px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 40px 100px -24px rgba(14, 21, 38, .45);
  overflow: hidden;
  animation: paletteIn .3s var(--ease);
}

@keyframes fadeIn { from { opacity: 0; } }
@keyframes paletteIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } }

.palette__search { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.palette__search .bi { font-size: 18px; color: var(--muted); }

.palette__search input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 17px;
  color: var(--text);
  background: none;
  border: 0;
  outline: none;
}

.palette__search input::placeholder { color: var(--faint); }

.palette__list { list-style: none; margin: 0; padding: 8px; max-height: min(420px, 55vh); overflow-y: auto; }

.palette__group { padding: 10px 12px 6px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }

.palette__item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: background-color .15s; }
.palette__item[aria-selected="true"] { background: var(--sunken); }

.palette__item-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  font-size: 17px;
  border-radius: 10px;
  color: rgb(var(--app-rgb, 75, 85, 112));
  background: rgba(var(--app-rgb, 75, 85, 112), .1);
}

.palette__item-text { flex: 1; min-width: 0; }
.palette__item-text strong { display: block; font-size: 14.5px; font-weight: 600; }
.palette__item-text small { display: block; font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette__item-text mark { background: none; color: var(--red); }

.palette__item .bi-arrow-return-left { color: var(--faint); opacity: 0; }
.palette__item[aria-selected="true"] .bi-arrow-return-left { opacity: 1; }

.palette__empty { padding: 36px 12px; text-align: center; color: var(--faint); font-size: 14px; }

.palette__foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--faint); background: var(--bg); }
.palette__foot kbd { margin-right: 4px; font-size: 11px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 160;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  border-radius: 12px;
  background: var(--navy);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition: opacity .3s, visibility .3s, transform .4s var(--ease);
}

.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast .bi { color: #4ade80; font-size: 18px; }

/* ---------- Reveal on scroll (JS-gated) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}

.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Cards own their transform (hover lift) once revealed */
.js .app-card[data-reveal].is-in { transform: translateY(var(--ty, 0)); }
.js .app-card[data-reveal].is-settled { transition: transform .6s var(--ease), border-color .3s, box-shadow .5s var(--ease); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .search-trigger span,
  .search-trigger kbd { display: none; }
  .search-trigger { width: 40px; padding: 0; justify-content: center; }

  /* Stack ESS Central: intro → modules → sign-in */
  .feature { display: flex; flex-direction: column; gap: 0; }
  .feature__info { display: contents; }
  .app-card--feature .app-card__desc { margin-bottom: 0; }
  .steps { margin-bottom: 0; }
  .modules { order: 1; margin: 24px 0; }
  .feature__info .app-card__foot { order: 2; }
}

@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .orbit { max-width: 440px; margin: 10px auto 0; }
  .scroll-cue { display: none; }
  .about { grid-template-columns: 1fr; }
  .offices { grid-template-columns: 1fr 1fr; }
  .office-card--hours { grid-column: 1 / -1; }

  .menu-toggle { display: inline-grid; }

  .nav {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
    visibility: hidden;
  }

  .js .header .nav,
  .js .is-ready .header .nav { opacity: 0; transform: translateY(-8px); transition: opacity .3s, visibility .3s, transform .4s var(--ease); }
  .js .is-ready .header .nav.is-open,
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }

  .nav__link { padding: 14px 16px; font-size: 16px; border-radius: 10px; }
  .nav__link.is-active::after { left: 0; right: auto; top: 12px; bottom: 12px; width: 3px; height: auto; }
}

@media (max-width: 720px) {
  .apps-grid,
  .offices,
  .modules { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand__text small { display: none; }
  .brand__logo { height: 38px; }
  .app-card { padding: 22px; }
  .app-card::after,
  .app-card--feature::after { left: 22px; right: 22px; }
  .app-url { display: none; }
  .steps li { font-size: 12px; }
  .app-card--banner { flex-wrap: wrap; }
  .app-card--banner .banner__text { flex-basis: calc(100% - 80px); }
  .orbit-node { --size: 52px; font-size: 21px; border-radius: 15px; }
  .status-chip { flex: 1 1 100%; }
  .btn { flex: 1 1 auto; justify-content: center; }
  .palette__foot { display: none; }
}

@media (max-width: 420px) {
  .brand__text { display: none; }
}

/* Keyboard hints are noise on touch devices */
@media (hover: none) {
  .shortcut-hint,
  .search-trigger kbd { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  .intro { display: none; }
  .js [data-reveal],
  .js .module { opacity: 1; transform: none; }
  .split-word > span { transform: none; }
}
