/* ==========================================================================
   FigmentOne sign-in screens (login / sign-up / forgot / reset)
   Used only by application/views/figment_auth/*.php
   ========================================================================== */

:root {
  --fg-blue:       #2C6BED;
  --fg-blue-dark:  #1E52C4;
  --fg-blue-soft:  #EBF1FE;
  --fg-ink:        #101828;
  --fg-ink-2:      #344054;
  --fg-muted:      #667085;
  --fg-line:       #D0D5DD;
  --fg-line-soft:  #EAECF0;
  --fg-danger:     #D92D20;
  --fg-ok:         #067647;
  --fg-radius:     8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #fff;
  color: var(--fg-ink);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--fg-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Page frame: the photograph on the left, the form on the right.
   The 63/37 split is what the design uses; below 1024px the photograph steps
   aside entirely and the form takes the whole screen.
   -------------------------------------------------------------------------- */
.fg-page {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------------------------------- hero --------------------------------- */
.fg-hero {
  position: relative;
  flex: 0 0 63%;
  max-width: 63%;
  overflow: hidden;
  /* Shown until assets/figment/login-bg.(webp|jpg|png) exists; once it does,
     the photograph is painted over this by .fg-hero-photo. */
  background: radial-gradient(120% 90% at 78% 78%, #17457F 0%, rgba(23,69,127,0) 60%),
              linear-gradient(140deg, #04122C 0%, #0A2350 46%, #10366E 100%);
  color: #fff;
}
.fg-hero-photo {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}
/* Holds the white type on the left readable whatever photograph is dropped in,
   while letting the right-hand side of the picture come through untouched. */
.fg-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(4,14,35,.82) 0%, rgba(4,14,35,.55) 34%, rgba(4,14,35,.12) 66%, rgba(4,14,35,0) 100%);
}
.fg-hero-inner {
  position: relative;
  height: 100%;
  padding: 40px 48px 44px;
  display: flex;
  flex-direction: column;
}

/* The logo, on a white card. Moonlogo.png is dark artwork on an opaque white
   background, so it needs a light surface under it to read at all - the card
   makes that look deliberate rather than like a stray white rectangle. Swap in
   a transparent, light-coloured logo and this can become a bare <img>. */
.fg-logo-card {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 11px 17px;
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
  text-decoration: none;
}
.fg-logo-card:hover { text-decoration: none; }
/* Small enough to sit quietly in the corner, still tall enough for the tagline
   set into the artwork to be legible. */
.fg-logo-card img { height: 44px; width: auto; }

/* Everything below sits in the left column of the photograph - the dark, empty
   part - so it never lands on the subject and survives the sideways crop. */
/* One line, always. The size shrinks with the window rather than the words
   wrapping - at the narrowest the hero is shown at (1024px) this still fits
   the column with room to spare. */
.fg-hero-title {
  margin: 30px 0 0;
  font-size: clamp(19px, 2.05vw, 34px);
  line-height: 1.24;
  font-weight: 700;
  letter-spacing: -.4px;
  white-space: nowrap;
}
.fg-hero-sub {
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(255,255,255,.82);
  max-width: 34ch;
}

/* Carousel dots - three slides, the first one current. */
.fg-dots { display: flex; gap: 7px; align-items: center; margin: 22px 0 0; }
.fg-dots span { width: 7px; height: 7px; border-radius: 99px; background: rgba(255,255,255,.42); }
.fg-dots span.on { width: 30px; background: #fff; }

/* The stats card - one row per figure. Three columns at this width left the
   labels and their deltas fighting over about 90px each. */
.fg-glance {
  margin: 30px 0 0;
  align-self: flex-start;
  width: 340px;
  max-width: 100%;
  background: #fff;
  color: var(--fg-ink);
  border-radius: 15px;
  padding: 15px 15px 11px;
  box-shadow: 0 20px 44px rgba(0,0,0,.34);
  /* transform is driven by the looping animation below, so hover lifts the
     card with light instead of with movement - the two would fight. */
  transition: box-shadow .3s ease;
}
.fg-glance:hover { box-shadow: 0 30px 62px rgba(0,0,0,.46); }

.fg-glance-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding-bottom: 11px; margin-bottom: 4px;
  border-bottom: 1px solid var(--fg-line-soft);
}
.fg-glance-head h3 { margin: 0; font-size: 13.5px; font-weight: 700; color: #1D2939; }
.fg-glance-when { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; color: #98A2B3; white-space: nowrap; }
.fg-glance-when i { width: 6px; height: 6px; border-radius: 99px; background: #12B76A; }

/* icon | label | number | change - the number and the change stay hard right,
   so the three rows line up as a column of figures. */
.fg-stat {
  display: grid;
  grid-template-columns: 26px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  margin: 0 -8px;
  border-radius: 9px;
  transition: background .2s ease;
}
.fg-stat:hover { background: #F9FAFB; }
.fg-stat-ico { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.fg-stat-lab { font-size: 12.5px; color: #475467; }
.fg-stat-num { font-size: 17px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.fg-stat-delta { font-size: 10.5px; font-weight: 700; min-width: 44px; text-align: right; }

.fg-stat.green .fg-stat-ico { background: #D1FADF; color: #067647; }
.fg-stat.green .fg-stat-num, .fg-stat.green .fg-stat-delta { color: #067647; }
.fg-stat.amber .fg-stat-ico { background: #FEF0C7; color: #B54708; }
.fg-stat.amber .fg-stat-num, .fg-stat.amber .fg-stat-delta { color: #B54708; }
.fg-stat.blue  .fg-stat-ico { background: #D1E0FF; color: #1849A9; }
.fg-stat.blue  .fg-stat-num, .fg-stat.blue  .fg-stat-delta { color: #1849A9; }

/* --------------------------------------------------------------------------
   The figures card orbits.

   Only this one card moves; the logo, the headline, the sub-line and the dots
   stay put. Over one 20s loop it arrives from each of the four sides in turn -
   left, top, right, bottom - rests for about four seconds each time, then
   leaves the opposite way. It never stops.

   The card is invisible at every hand-over, so the jump from where it left to
   where it next comes in is never seen. 100% matches 0% exactly, which is what
   makes the loop seamless.

   The whole card travels as one piece - the three rows inside it are not
   animated separately.
   -------------------------------------------------------------------------- */
@keyframes fg-glance-orbit {
  /* in from the left */
  0%   { opacity: 0; transform: translate(-70px, 0); animation-timing-function: cubic-bezier(.22,.61,.36,1); }
  3%   { opacity: 1; transform: translate(0, 0); }
  20%  { opacity: 1; transform: translate(0, 0); animation-timing-function: cubic-bezier(.55,.06,.68,.19); }
  24%  { opacity: 0; transform: translate(70px, 0); }

  /* in from above */
  25%  { opacity: 0; transform: translate(0, -70px); animation-timing-function: cubic-bezier(.22,.61,.36,1); }
  28%  { opacity: 1; transform: translate(0, 0); }
  45%  { opacity: 1; transform: translate(0, 0); animation-timing-function: cubic-bezier(.55,.06,.68,.19); }
  49%  { opacity: 0; transform: translate(0, 70px); }

  /* in from the right */
  50%  { opacity: 0; transform: translate(70px, 0); animation-timing-function: cubic-bezier(.22,.61,.36,1); }
  53%  { opacity: 1; transform: translate(0, 0); }
  70%  { opacity: 1; transform: translate(0, 0); animation-timing-function: cubic-bezier(.55,.06,.68,.19); }
  74%  { opacity: 0; transform: translate(-70px, 0); }

  /* in from below */
  75%  { opacity: 0; transform: translate(0, 70px); animation-timing-function: cubic-bezier(.22,.61,.36,1); }
  78%  { opacity: 1; transform: translate(0, 0); }
  95%  { opacity: 1; transform: translate(0, 0); animation-timing-function: cubic-bezier(.55,.06,.68,.19); }
  99%  { opacity: 0; transform: translate(0, -70px); }

  /* back to exactly where 0% starts */
  100% { opacity: 0; transform: translate(-70px, 0); }
}

.fg-glance {
  animation: fg-glance-orbit 20s linear infinite;
}

/* Someone who has asked their machine for less movement gets the card still. */
@media (prefers-reduced-motion: reduce) {
  .fg-glance { animation: none; }
  .fg-glance, .fg-stat { transition: none; }
}

/* ---------------------------------- panel -------------------------------- */
.fg-panel {
  flex: 1 1 37%;
  display: flex;
  flex-direction: column;
  padding: 28px 34px 18px;
  overflow-y: auto;
}
.fg-panel-inner { width: 100%; margin: auto; }
.fg-copy { text-align: center; font-size: 11.5px; color: #98A2B3; padding-top: 22px; }

.fg-h1 { margin: 0; font-size: 27px; font-weight: 700; letter-spacing: -.5px; color: var(--fg-ink); }
.fg-lead { margin: 7px 0 22px; font-size: 14px; color: var(--fg-muted); }

/* ---------------------------------- fields ------------------------------- */
.fg-field { margin-bottom: 14px; }
.fg-label { display: block; font-size: 13px; font-weight: 500; color: var(--fg-ink-2); margin-bottom: 6px; }
.fg-label .req { color: var(--fg-danger); }

.fg-wrap { position: relative; display: block; }
.fg-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--fg-line);
  border-radius: var(--fg-radius);
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  color: var(--fg-ink);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.fg-input::placeholder { color: #98A2B3; }
.fg-input:focus { border-color: var(--fg-blue); box-shadow: 0 0 0 3px rgba(44,107,237,.14); }
.fg-input.has-ico { padding-left: 42px; }
.fg-input.has-eye { padding-right: 42px; }
select.fg-input { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='18 15 12 21 6 15'/%3E%3Cpolyline points='6 9 12 3 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }

.fg-ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: #98A2B3; display: flex; pointer-events: none;
}
.fg-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; background: none; cursor: pointer;
  color: #98A2B3; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; padding: 0;
}
.fg-eye:hover { color: var(--fg-ink-2); background: #F2F4F7; }

/* A field the server or the browser turned down. */
.fg-field.bad .fg-input { border-color: var(--fg-danger); }
.fg-field.bad .fg-input:focus { box-shadow: 0 0 0 3px rgba(217,45,32,.13); }
.fg-err { display: none; margin: 6px 0 0; font-size: 12px; color: var(--fg-danger); line-height: 1.45; }
.fg-field.bad .fg-err { display: block; }
.fg-hint { margin: 6px 0 0; font-size: 12px; color: var(--fg-muted); line-height: 1.45; }
.fg-hint.ok { color: var(--fg-ok); }

/* Password strength bar. */
.fg-meter { display: flex; gap: 4px; margin-top: 8px; }
.fg-meter i { flex: 1; height: 4px; border-radius: 99px; background: var(--fg-line-soft); transition: background .2s; }
.fg-meter-txt { font-size: 11.5px; color: var(--fg-muted); margin-top: 5px; }

/* Two fields to a row, and the company type/name pair. */
.fg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.fg-split { display: grid; grid-template-columns: 145px 1fr; gap: 12px; }

/* ---------------------------------- buttons ------------------------------ */
.fg-btn {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: var(--fg-radius);
  background: var(--fg-blue);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: background .15s;
}
.fg-btn:hover { background: var(--fg-blue-dark); }
.fg-btn[disabled] { opacity: .62; cursor: not-allowed; }
.fg-btn.ghost {
  background: #fff; color: var(--fg-ink-2); border: 1px solid var(--fg-line); font-weight: 500; font-size: 14.5px;
}
.fg-btn.ghost:hover { background: #F9FAFB; }
.fg-spin {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
  animation: fg-spin .7s linear infinite;
}
.fg-btn.ghost .fg-spin { border-color: rgba(0,0,0,.15); border-top-color: var(--fg-ink-2); }
@keyframes fg-spin { to { transform: rotate(360deg); } }

.fg-center { text-align: center; }
.fg-link-row { text-align: center; margin: 15px 0 0; font-size: 14px; color: var(--fg-muted); }
.fg-link-row a { font-weight: 600; }
.fg-forgot { display: block; text-align: center; margin: 15px 0 0; font-size: 14px; font-weight: 600; }

/* "Or" between the password form and Google. */
.fg-or { display: flex; align-items: center; gap: 14px; margin: 16px 0; color: var(--fg-muted); font-size: 13px; }
.fg-or::before, .fg-or::after { content: ""; flex: 1; height: 1px; background: var(--fg-line-soft); }

/* ---------------------------------- alerts ------------------------------- */
.fg-alert {
  border-radius: var(--fg-radius);
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.fg-alert.error { background: #FEF3F2; border-color: #FDA29B; color: #B42318; }
.fg-alert.ok    { background: #ECFDF3; border-color: #A6F4C5; color: #067647; }
.fg-alert.info  { background: var(--fg-blue-soft); border-color: #B2CCFF; color: #1849A9; }
.fg-alert[hidden] { display: none; }

/* A field nothing on screen shows, for the benefit of form-filling robots. */
.fg-pot { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------------------------------- small screens ------------------------ */
@media (max-width: 1180px) {
  .fg-hero-inner { padding: 34px 36px; }
}
@media (max-width: 1023px) {
  .fg-hero { display: none; }
  .fg-panel { flex: 1 1 100%; padding: 30px 22px 16px; }
}
@media (max-width: 560px) {
  .fg-grid { grid-template-columns: 1fr; }
  .fg-split { grid-template-columns: 1fr; }
  .fg-h1 { font-size: 24px; }
  .fg-panel { padding: 24px 16px 14px; }
}
/* --------------------------------------------------------------------------
   Short windows. A 1366x768 or 1280x720 laptop is the common office screen and
   the sign-up form is the tallest thing here, so everything tightens a little
   rather than the page growing a scrollbar.
   -------------------------------------------------------------------------- */
@media (max-height: 820px) {
  .fg-panel { padding: 20px 34px 12px; }
  .fg-h1 { font-size: 24px; }
  .fg-lead { margin: 6px 0 15px; font-size: 13.5px; }
  .fg-field { margin-bottom: 10px; }
  .fg-label { margin-bottom: 5px; }
  .fg-input { height: 42px; }
  .fg-btn { height: 44px; }
  .fg-or { margin: 12px 0; }
  .fg-link-row, .fg-forgot { margin-top: 12px; }
  .fg-meter-txt { font-size: 10.5px; line-height: 1.35; }
  .fg-copy { padding-top: 14px; }

  /* The hero column loses its roomiest pieces first - the picture and the
     logo are what matter, and .fg-hero clips rather than scrolls. */
  .fg-hero-inner { padding: 30px 40px 32px; }
  .fg-hero-title { margin-top: 22px; }
  .fg-hero-sub { margin-top: 10px; }
  .fg-dots { margin-top: 16px; }
  .fg-glance { margin-top: 20px; }
}
/* The card gets smaller before it gets hidden.
   A 768px-tall screen leaves only about 630-680px of viewport once the browser
   has taken its toolbars, and that varies with how many bars are switched on -
   which is why a threshold anywhere near 700px makes the card appear in one
   browser and vanish in the next. It only steps aside when the window really
   has no room. */
@media (max-height: 660px) {
  .fg-glance { padding: 12px 12px 9px; margin-top: 16px; }
  .fg-glance-head { padding-bottom: 8px; margin-bottom: 2px; }
  .fg-glance-when { display: none; }
  .fg-stat { padding: 6px 8px; }
  .fg-stat-ico { width: 22px; height: 22px; border-radius: 7px; }
  .fg-stat-num { font-size: 15px; }
  .fg-hero-inner { padding: 22px 40px 24px; }
  .fg-logo-card img { height: 38px; }
}
@media (max-height: 540px) {
  .fg-hero-sub, .fg-dots { display: none; }
}
@media (max-height: 460px) {
  .fg-glance { display: none; }
}
