/* HOU2+'s loading screens (11 Nov 2026, Tony): the three Houghton squares, flat, with a glitch over them (sliced,
   shifted, Houghton blue / yellow colour split) as each page of the sign-in hand-off loads, before and after sign-in.
   Shown by index.html straight away and by BrandLoading (src/components/ui/Loading.tsx). Self-contained. (.h2-logo,
   the glitching logo, is kept for later use.) */
@font-face { font-family: 'Michroma'; font-weight: 400; font-display: block; src: url('/fonts/michroma-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 100 700; font-display: swap; src: url('/fonts/ibm-plex-sans-latin-wght-normal.woff2') format('woff2-variations'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url('/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }
html, body { margin: 0; height: 100%; background: #000; }
.tc-splash {
  position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  background: #000; color: #ececec; font-family: 'IBM Plex Sans', system-ui, sans-serif; transition: opacity .45s ease;
}
.tc-splash.is-hidden { opacity: 0; pointer-events: none; }
.tc-splash__label { font: 500 11px/1 'IBM Plex Mono', monospace; letter-spacing: .16em; text-transform: uppercase; color: #40aaf0; }
.tc-splash__text { font-size: 15px; max-width: 36ch; text-align: center; line-height: 1.5; color: #cdcdd3; }

/* ---- before sign-in: the flat logo, glitch over the whole design (the squares themselves stay still) */
.h2-logo { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .28em; font: 400 clamp(30px, 6.4vw, 64px)/1 'Michroma', 'Segoe UI', sans-serif; white-space: nowrap;
  animation: h2-logo 2.4s steps(1, end) infinite; will-change: transform, clip-path, filter, opacity; }
.h2-logo .h2-top { color: #fff; letter-spacing: .02em; }
.h2-logo .h2-row { display: inline-flex; align-items: center; gap: .32em; }
.h2-logo .h2-grp { background: linear-gradient(180deg, #e2e2e2 0%, #b4b4b4 48%, #8d8d8d 52%, #6e6e6e 100%); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .02em; margin-right: .3em; }
.h2-logo i { position: relative; display: inline-block; width: .62em; height: .62em; margin-left: .18em; border: 1px solid rgba(255,255,255,.28); }
.h2-logo i::after, .h2-spin i::after { content: ''; position: absolute; right: 10%; top: 10%; width: 26%; height: 26%; background: rgba(255,255,255,.92); }
.h2-logo i.b, .h2-spin i.b { background: linear-gradient(180deg, #5cc4ff, #2f8fd6); }
.h2-logo i.g, .h2-spin i.g { background: linear-gradient(180deg, #a6e34f, #6fa82d); }
.h2-logo i.y, .h2-spin i.y { background: linear-gradient(180deg, #ffd23d, #e09a10); }
@keyframes h2-logo {
  0% { opacity: 0; }
  2% { opacity: 1; transform: translateX(-10px) skewX(-16deg); clip-path: inset(0 0 62% 0); filter: drop-shadow(-5px 0 #40aaf0) drop-shadow(5px 0 #f5b41e); }
  5% { transform: translateX(8px); clip-path: inset(55% 0 8% 0); filter: drop-shadow(4px 0 #40aaf0) drop-shadow(-4px 0 #8cc63f); }
  8% { transform: translateX(-4px); clip-path: inset(25% 0 40% 0); opacity: .7; }
  10% { transform: none; clip-path: none; opacity: 1; filter: drop-shadow(-2px 0 #40aaf0) drop-shadow(2px 0 #f5b41e); }
  12% { opacity: .3; filter: none; }
  13% { opacity: 1; }
  15%, 60% { transform: none; clip-path: none; filter: none; opacity: 1; }
  62% { transform: translateX(9px) skewX(10deg); clip-path: inset(0 0 70% 0); filter: drop-shadow(5px 0 #40aaf0) drop-shadow(-5px 0 #8cc63f); }
  64% { transform: translateX(-7px); clip-path: inset(68% 0 0 0); filter: drop-shadow(-4px 0 #f5b41e) drop-shadow(4px 0 #40aaf0); }
  66% { transform: translateX(2px); clip-path: inset(38% 0 24% 0); opacity: .6; }
  68%, 100% { transform: none; clip-path: none; filter: none; opacity: 1; }
}

/* ---- after sign-in: the three squares, still, the glitch over them as a group (no spinning) */
.h2-spin { display: inline-flex; gap: 14px; animation: h2-logo 2.4s steps(1, end) infinite; will-change: transform, clip-path, filter, opacity; }
.h2-spin i { position: relative; display: block; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.28); }

@media (prefers-reduced-motion: reduce) { .h2-logo, .h2-spin { animation: none; } }

/* ---- the Microsoft sign-in wait (/sso?ms=...): the squares turn one after another instead of glitching */
.h2-spin.is-turning { animation: none; }
.h2-spin.is-turning i { animation: h2-turn 1.4s cubic-bezier(.5,0,.3,1) infinite; }
.h2-spin.is-turning i.g { animation-delay: .16s; }
.h2-spin.is-turning i.y { animation-delay: .32s; }
@keyframes h2-turn { 0% { transform: rotate(0deg); } 60%, 100% { transform: rotate(180deg); } }
@media (prefers-reduced-motion: reduce) { .h2-spin.is-turning i { animation-duration: 5s; } }
