/* THE SIGN-IN PAGE (decision 0324). Abacus's hero, in Bearing's own terms:
   the words rising into focus one after another, and in place of Abacus's
   soroban a compass whose needle follows the person.

   THE LOOK (Shaun, 24 November 2026: "need light here, blue waves", and of
   the three mocks he chose the navy panel with the waves beside it). Two
   halves. Left, a dark navy panel that holds the words and the one button,
   in the app's menu navy, so the door and the menu behind it are one colour.
   Right, Cornerstone's light wave: flat bands, deep blue at the bottom left
   to pale cyan at the top right, the same drawing as Home's hero
   (web/src/home-wave.css), with the compass redrawn light on it: a white
   face, a blue bezel, navy ticks and letters, white glass waypoints. Under
   900px the wave and compass are on top and the navy panel below.

   Colours are restated here because this page loads before, and without,
   the app's bundle. Everything on the wave is Cornerstone's palette, white
   or navy, written out: a partner's accent (--cyan, set by signin.js for a
   door, decision 1006) colours only what stands on navy, where it always
   stood, so no accent can leave words unreadable on a band.
   Motion is decoration: reduced motion stills all of it and nothing depends
   on it. Text is never faded in by opacity. */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url('/fonts/ibm-plex-sans.woff2') format('woff2'); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/ibm-plex-mono-500.woff2') format('woff2'); }

:root {
  --navy: #0b1628;
  --navy-2: #16294a;
  --primary: #2e76bc;
  /* The bright palette cyan. On navy it is the one action's colour. */
  --cyan: #4fdcfc;
  /* Ink and marks on the wave half. Never a door's accent. */
  --wave-ink: #0b1730;
  --wave-ink-soft: #2b4468;
  --wave-blue: #04559f;
  --wave-mark: #0670bb;
  --glass: rgba(255, 255, 255, .94);
  --on-ink: #ffffff;
  --on-ink-soft: #d5e2f1;
  --on-ink-muted: #9fb3cc;
  --font-ui: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-num: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  position: relative;
  font-family: var(--font-ui); color: var(--on-ink); overflow-x: hidden;
  background: var(--navy);
}

/* ------------------------------------------------------------------ the wave */
/* The drifting light and the fine grid, white on the wave. They lie inside
   the compass's half, under the compass and its words, and are kept low so
   the bands under them still read as bands. */
.si-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.si-orb { position: absolute; border-radius: 50%; filter: blur(70px); animation: si-drift 18s ease-in-out infinite alternate; }
.si-orb-a { width: 460px; height: 460px; left: -120px; top: -160px; background: rgba(255, 255, 255, .26); }
.si-orb-b { width: 380px; height: 380px; right: 6%; bottom: -180px; background: rgba(255, 255, 255, .2); animation-duration: 23s; }
.si-orb-c { width: 260px; height: 260px; right: -80px; top: 12%; background: rgba(255, 255, 255, .3); animation-duration: 27s; }
.si-grid {
  position: absolute; inset: -48px;
  background-image: linear-gradient(rgba(255, 255, 255, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .22) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 46%, #000 0%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 50% 46%, #000 0%, transparent 75%);
  animation: si-pan 40s linear infinite;
}
@keyframes si-drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(48px, 34px, 0) scale(1.14); } }
@keyframes si-pan { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(48px, 48px, 0); } }

/* ------------------------------------------------------------------ layout */
.si-main {
  position: relative; z-index: 1; flex: 1; width: 100%;
  display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); align-items: stretch;
}
/* The navy panel. Its words start where the eye expects on any width: a
   steady margin, which grows on a very wide screen so they stay near the
   wave rather than against the far edge. */
.si-copy {
  min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 56px clamp(32px, 4.5vw, 72px) 56px max(clamp(32px, 4.5vw, 72px), calc(45vw - 620px));
  background: var(--navy);
}

.si-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 6px 14px 6px 6px;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: rgba(255, 255, 255, .05);
  font: 600 12px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: #cfe6f7;
}
.si-eyebrow-mark { width: 24px; height: 24px; border-radius: 7px; }
/* A partner's or supplier's wordmark (decision 1006), on a white card so a
   dark logo reads on the navy panel. The card's padding is even on every side. */
.si-door { display: flex; margin: 0 0 18px; }
.si-door[hidden] { display: none; }
.si-door-logo {
  display: block; height: 56px; width: auto; max-width: min(320px, 100%); object-fit: contain;
  padding: 10px; border-radius: 12px; background: #ffffff; box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .5);
}
.si-eyebrow-mark.is-door { background: #ffffff; padding: 2px; object-fit: contain; }
.si-title {
  margin: 0; font: 600 clamp(36px, 5.2vw, 62px)/1.04 var(--font-ui); letter-spacing: -.02em; color: var(--on-ink);
}
.si-name {
  background: linear-gradient(90deg, var(--cyan) 0%, #7ff0ff 55%, var(--on-ink) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.si-lede { margin: 20px 0 0; max-width: 32em; font: 400 18px/1.55 var(--font-ui); color: var(--on-ink-soft); }
.si-note {
  display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(79, 220, 252, .45); background: rgba(79, 220, 252, .1);
  font: 600 13px/1.3 var(--font-ui); color: #cfeefb;
}
.si-note[hidden] { display: none; }
.si-note::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px rgba(79, 220, 252, .25); }

.si-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 32px; }
.si-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 26px 0 20px;
  border-radius: 999px; background: var(--cyan); color: var(--navy); text-decoration: none;
  font: 600 16px/1 var(--font-ui); box-shadow: 0 10px 28px -10px rgba(79, 220, 252, .7);
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.si-cta:hover { transform: translateY(-1px); background: #7ff0ff; box-shadow: 0 14px 32px -10px rgba(79, 220, 252, .8); }
.si-cta::after { content: '\2192'; font-weight: 700; transition: transform .18s ease; }
.si-cta:hover::after { transform: translateX(3px); }
.si-cta:focus-visible, .si-link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.si-cta.is-going { pointer-events: none; background: #b5faff; }
.si-cta.is-going::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--navy); border-right-color: transparent; animation: si-spin .7s linear infinite; }
@keyframes si-spin { to { transform: rotate(360deg); } }
.si-ms { width: 20px; height: 20px; flex: none; padding: 2px; background: #fff; border-radius: 4px; }
.si-link {
  min-height: 44px; padding: 0 8px; border: 0; background: transparent; cursor: pointer; border-radius: 6px;
  font: 600 14px/1 var(--font-ui); color: #cfe6f7; text-decoration: underline; text-underline-offset: 4px;
}
.si-link:hover { color: #fff; }
.si-link[hidden] { display: none; }
.si-small { margin: 18px 0 0; max-width: 34em; font: 400 13px/1.5 var(--font-ui); color: var(--on-ink-muted); }
.si-trust { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.si-trust:hover { color: #fff; }
.si-trust:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 3px; }

/* The words rise out of the dark and into focus, one after another. */
.si-reveal { filter: blur(10px) brightness(.1); transform: translate3d(0, 16px, 0); animation: si-rise .8s cubic-bezier(.2, .8, .2, 1) forwards; }
.si-copy > .si-reveal:nth-child(1) { animation-delay: .1s; }
.si-copy > .si-reveal:nth-child(2) { animation-delay: .22s; }
.si-copy > .si-reveal:nth-child(3) { animation-delay: .34s; }
.si-copy > .si-reveal:nth-child(4) { animation-delay: .4s; }
.si-copy > .si-reveal:nth-child(5) { animation-delay: .46s; }
.si-copy > .si-reveal:nth-child(6) { animation-delay: .56s; }
@keyframes si-rise { to { filter: none; transform: none; } }

/* ------------------------------------------------------------------ the compass */
/* The wave half. A sheen from the top right, then the bands: arcs about a
   point far off the bottom left corner, so each edge is a long slow curve
   and the deep blues keep to that corner. The .15 between two stops is the
   edge's own softening; a hard stop draws a staircase. Home's hero draws the
   same bands (web/src/home-wave.css). */
.si-compass {
  position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  perspective: 1000px; min-width: 0; padding: 76px 24px 84px; overflow: hidden; color: var(--wave-ink);
  background-color: #b5faff;
  background-image:
    linear-gradient(215deg, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, 0) 46%),
    radial-gradient(
      ellipse 165% 185% at -15% 120%,
      #04559f 0 22%,
      #0670bb 22.15% 30%,
      #0b8cd4 30.15% 39%,
      #17abe9 39.15% 49%,
      #2ec6f8 49.15% 60%,
      #4fdcfc 60.15% 72%,
      #7ff0ff 72.15% 84%,
      #b5faff 84.15%
    );
}
/* Never wider than leaves room for the east and west waypoints beside it,
   nor taller than leaves room for the heading under it. */
.si-tilt {
  position: relative; z-index: 1; width: 100%; max-width: min(440px, calc(100% - 190px), max(250px, 52vh)); aspect-ratio: 1; transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s cubic-bezier(.2, .8, .2, 1);
  animation: si-arrive 1.2s cubic-bezier(.2, .8, .2, 1) .15s backwards; touch-action: pan-y;
}
/* The compass turns in out of the light of the wave: soft and washed pale,
   then sharp. On the navy page it rose out of the dark; a dark disc on a
   light wave would read as a fault. */
@keyframes si-arrive { from { transform: scale(.86) rotate(-40deg); filter: blur(8px) brightness(1.2) saturate(.5); } to { transform: none; filter: none; } }
.si-dial { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 30px 38px rgba(4, 85, 159, .42)); }
.si-rim { fill: #ffffff; }
.si-tick { stroke: rgba(11, 23, 48, .38); stroke-width: 1.2; }
.si-tick.is-mid { stroke: rgba(11, 23, 48, .6); stroke-width: 1.6; }
.si-tick.is-major { stroke: #0b1730; stroke-width: 2.4; }
.si-deg { font: 500 11px/1 var(--font-num); fill: var(--wave-ink-soft); text-anchor: middle; dominant-baseline: central; }
.si-card { font: 600 22px/1 var(--font-ui); fill: #0b1730; text-anchor: middle; dominant-baseline: central; }
.si-card.is-north { fill: var(--wave-mark); }
.si-rose { transform-origin: 200px 200px; animation: si-turn 120s linear infinite; }
.si-rose-ring { fill: none; stroke: rgba(6, 112, 187, .38); stroke-width: 1.4; stroke-dasharray: 2 7; }
.si-rose-star { fill: rgba(46, 198, 248, .16); stroke: rgba(6, 112, 187, .42); stroke-width: 1; }
@keyframes si-turn { to { transform: rotate(360deg); } }
.si-needle { transform-box: view-box; }
.si-pulse { fill: none; stroke: var(--wave-mark); stroke-width: 2; opacity: 0; transform-origin: 200px 200px; }
.si-pulse.is-on { animation: si-ping 1.1s cubic-bezier(.2, .8, .2, 1); }
@keyframes si-ping { from { opacity: .9; transform: scale(.4); } to { opacity: 0; transform: scale(3); } }

/* The four waypoints: what lies in each direction, for whoever this is.
   White glass with navy ink; the one the needle points at is the navy block,
   and its letter wears the accent, on navy as the accent always is. */
.si-way {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
  border-radius: 999px; border: 1px solid #ffffff; background: var(--glass);
  box-shadow: 0 8px 20px -12px rgba(4, 85, 159, .65);
  font: 600 12px/1.2 var(--font-ui); color: var(--wave-ink); white-space: nowrap; cursor: default;
  transition: border-color .25s ease, background-color .25s ease, color .25s ease, transform .25s ease;
}
.si-way b {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: #e3f4fd; font: 600 11px/1 var(--font-num); color: var(--wave-blue);
}
.si-way.is-on { border-color: #0b1730; background: #0b1730; color: #fff; }
.si-way.is-on b { background: var(--cyan); color: var(--navy); }
.si-way-n { top: -6px; left: 50%; transform: translate(-50%, -100%); }
.si-way-s { bottom: -6px; left: 50%; transform: translate(-50%, 100%); }
.si-way-e { right: -10px; top: 50%; transform: translate(40%, -50%); }
.si-way-w { left: -10px; top: 50%; transform: translate(-40%, -50%); }

/* A real compass (live): the card turns under a fixed mark at the top, the
   waypoints ride round with it (signin.js places them), and the words for the
   way the phone faces are in the caption rather than on the pills. */
.si-lubber { fill: #0b1730; stroke: #ffffff; stroke-width: 1.5; stroke-linejoin: round; opacity: 0; transition: opacity .4s ease; }
.si-tilt.is-live .si-lubber { opacity: 1; }
.si-tilt.is-live .si-rose { animation: none; }
.si-tilt.is-live .si-way { right: auto; bottom: auto; padding: 4px; transform: translate(-50%, -50%); transition: border-color .25s ease, background-color .25s ease, color .25s ease; }
.si-tilt.is-live .si-way-text { display: none; }
.si-live {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; min-height: 44px; padding: 8px 16px 8px 10px;
  border-radius: 999px; border: 1px solid var(--wave-mark); background: #ffffff;
  font: 600 13px/1.2 var(--font-ui); color: var(--wave-ink); cursor: pointer;
}
.si-live svg { width: 22px; height: 22px; fill: none; stroke: var(--wave-mark); stroke-width: 1.4; }
.si-live svg path { fill: var(--wave-mark); stroke: none; }
.si-live:focus-visible { outline: 2px solid #0b1730; outline-offset: 3px; }
.si-live:disabled { cursor: default; border-color: rgba(11, 23, 48, .2); background: transparent; color: var(--wave-ink-soft); }
.si-live[hidden] { display: none; }

/* The heading, and what lies that way, each on its own white glass tab so
   neither leans on a band's colour. The second is there only while the
   needle points at a waypoint; its line is kept so nothing under it moves. */
.si-caption { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 58px; max-width: 100%; text-align: center; }
.si-heading, .si-says {
  padding: 8px 16px; border-radius: 999px; border: 1px solid #ffffff; background: var(--glass);
  box-shadow: 0 8px 20px -12px rgba(4, 85, 159, .65);
}
.si-heading { font: 500 12px/1.3 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--wave-ink-soft); }
.si-heading strong { font: 500 13px/1 var(--font-num); letter-spacing: .1em; color: var(--wave-blue); }
.si-says { min-height: calc(1.4em + 18px); font: 400 14px/1.4 var(--font-ui); color: var(--wave-ink); }
.si-says:empty { border-color: transparent; background: transparent; box-shadow: none; }

/* ------------------------------------------------------------------ foot */
/* On the wave, under the compass, on a glass tab of its own. */
.si-foot {
  position: absolute; z-index: 2; left: 72.5%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; justify-content: center; align-items: center; gap: 10px; white-space: nowrap;
  padding: 8px 14px; border-radius: 999px; border: 1px solid #ffffff; background: var(--glass);
  font: 500 12px/1 var(--font-num); color: var(--wave-ink);
}
.si-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--wave-ink-soft); }

/* ------------------------------------------------------------------ narrow */
/* The wave and compass on top, the navy panel below, the foot line at the
   bottom of the panel in the panel's own inks. The order is main's (the
   compass came first on a phone before this look too); the room around the
   compass is kept tight so "Sign in with Microsoft" stands where it stood on
   main or higher: on a 390 x 844 phone its top is at or above 661px, and on a
   375 x 667 phone the whole button is on the first screen (review, 24
   November 2026: the first build of this look had pushed it to 763px). */
@media (max-width: 900px) {
  .si-main { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .si-compass { order: -1; padding: 38px 16px 14px; }
  .si-copy { padding: 24px 20px 20px; justify-content: flex-start; }
  .si-tilt { max-width: 230px; }
  .si-caption { margin-top: 42px; }
  .si-eyebrow { margin-bottom: 14px; }
  .si-lede { margin-top: 12px; }
  /* The waypoint pills say N, E, S and W beside the dial on a phone, so the
     face's own letters would print each point twice: the face keeps its
     ticks and degrees, the pills carry the letters. */
  .si-card { display: none; }
  .si-way { font-size: 11px; padding: 4px 10px 4px 4px; }
  .si-way b { width: 18px; height: 18px; font-size: 10px; }
  .si-way-text { display: none; }
  .si-way { padding: 4px; }
  .si-way-e { transform: translate(30%, -50%); }
  .si-way-w { transform: translate(-30%, -50%); }
  .si-lede { font-size: 16px; }
  .si-actions { margin-top: 20px; width: 100%; }
  .si-cta { width: 100%; }
  .si-orb-a { width: 300px; height: 300px; }
  .si-foot {
    position: relative; left: auto; bottom: auto; transform: none; white-space: normal; flex-wrap: wrap;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; background: var(--navy);
    color: var(--on-ink-muted);
  }
  .si-dot { background: var(--on-ink-muted); }
}
/* A phone: a smaller dial, and smaller again on a short screen, so the
   button is on the first screen. */
@media (max-width: 600px) {
  .si-tilt { max-width: 200px; }
}
@media (max-width: 900px) and (max-height: 700px) {
  .si-tilt { max-width: 150px; }
}
/* A tablet held upright has the room for a larger dial. */
@media (min-width: 600px) and (max-width: 900px) {
  .si-tilt { max-width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  .si-orb, .si-grid, .si-rose, .si-tilt, .si-reveal, .si-pulse.is-on { animation: none; }
  .si-reveal { filter: none; transform: none; }
  .si-tilt { transition: none; }
}

/* The Teams sign-in window (decision 0567): one column, centred. */
/* It has no wave: the page's own navy, the words in the navy panel's inks. */
.si-window { grid-template-columns: minmax(0, 1fr); min-height: 100vh; align-content: center; justify-items: center; text-align: center; padding: 32px 24px; }
