/* ==========================================================================
   Sign In — final handoff (final_signin.dc.html, 2026-10-30)
   A video welcome tile over the sign-in tile, beside a column of two tiles
   (help, free trial). Stacked at 1024px and below: welcome, form, tiles.
   Also dresses reset-password.php, which reuses the card (.si-main, .si-grid).
   ========================================================================== */

/* ---------------------------------------------------------------- Grid --- */

.si-bento {
  display: grid;
  gap: var(--ffb-bento-gap);
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "hero"
    "form"
    "tiles";
}

@media (min-width: 1025px) {
  .si-bento {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-areas:
      "hero tiles"
      "form tiles";
  }
}

/* ------------------------------------------------------------- Welcome --- */

/* The shared video hero (css/video-hero.css), at the design's shorter size. */
.si-hero {
  grid-area: hero;
  min-height: clamp(170px, 22vh, 240px);
  padding: clamp(20px, 2.4vw, 32px);
}

.si-hero .ffb-vhero__video {
  object-position: center 15%;
}

.si-hero__title {
  max-width: 640px;
  font-size: clamp(24px, min(2.2vw, 4vh), 32px);
  line-height: 1.08;
}

/* ------------------------------------------------------- Help + trial --- */

/* One column beside the form on desktop and on a phone; two side by side in
   between, under the form. 1fr rows keep the two tiles the same height. */
.si-tiles {
  grid-area: tiles;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: 1fr;
  gap: var(--ffb-bento-gap);
}

@media (min-width: 641px) and (max-width: 1024px) {
  .si-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.si-tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2vw, 28px);
  border-radius: var(--ffb-r-bento);
}

.si-tile--help {
  --ffb-focus: var(--ffb-focus-on-dark);
  background: var(--ffb-signin-tile);
}

.si-tile--trial {
  border: 1px solid var(--ffb-surface-mint-border);
  background: var(--ffb-surface-mint);
}

/* Bottom right, fading in from the top so the copy above stays clean. */
.si-pattern {
  right: -14%;
  bottom: -18%;
  width: 72%;
  height: auto;
  aspect-ratio: 1;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
}

.si-pattern--help {
  --pat-line: #ffffff;
  --pat-line-a: 0.22;
  opacity: 0.8;
}

.si-pattern--trial {
  --pat-line-a: 0.14;
}

.si-tile__title {
  margin-bottom: 30px;
  font-size: 22px;
}

.si-tile__lead {
  margin-bottom: 30px;
  font-size: var(--ffb-body-size);
  line-height: 1.55;
}

.si-tile--help .si-tile__title {
  color: #ffffff;
}

.si-tile--help .si-tile__lead {
  color: var(--ffb-on-dark-lead);
}

.si-tile--trial .si-tile__title,
.si-tile--trial .si-tile__lead {
  color: var(--ffb-green-ink);
}

.si-tile__mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: -6px;
  font-family: var(--ffb-poppins);
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
  overflow-wrap: anywhere;
}

.si-tile__mail:hover {
  color: var(--ffb-green-hover);
}

.si-tile__cta {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--ffb-r-pill);
  background: var(--ffb-navy-deep);
  font-family: var(--ffb-poppins);
  font-weight: 600;
  font-size: 15px;
  color: #ffffff;
  transition: background var(--ffb-t-ui) ease;
}

.si-tile__cta:hover {
  background: var(--ffb-blue);
  color: #ffffff;
}

.si-tile__mail svg,
.si-tile__cta svg {
  flex: none;
  width: 18px;
  height: 18px;
}

/* ------------------------------------------------- Reset-password page --- */

/* Narrower than the site container this element also carries: .ffb-container
   caps at 1440. Overrides rather than replaces .ffb-container, so the gutter
   and the auto margins still come from there. */
.si-main {
  max-width: var(--ffb-container-narrow);
  padding-block: clamp(28px, 3.5vw, 52px) clamp(32px, 4vw, 56px);
}

/* .ffb-container drops its side padding at 1440 on the assumption the content
   is the full 1440 wide. This one is not, so it keeps its gutter — without
   this the layout jumps 48px wider the moment the viewport crosses 1440. */
@media (min-width: 1440px) {
  .si-main {
    padding-inline: var(--ffb-gutter);
  }
}

/* One column, one card, centred. */
.si-grid {
  display: grid;
}

.si-grid--single {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
}

@media (max-width: 1024px) {
  .si-grid--single {
    justify-content: stretch;
  }
}

/* ------------------------------------------------------------- The card --- */

/* One grid cell for every view, plus a row underneath for the notice. Both
   forms occupy row 1 column 1 together, so the card is always as tall as the
   taller of the two and swapping between them cannot make it jump. A flat
   bento tile, as the design; reset-password.php wears the same. */
.si-card {
  display: grid;
  grid-template-rows: auto auto;
  align-items: start;
  align-content: center;
  padding: clamp(24px, 2.6vw, 40px);
  border: 1px solid var(--ffb-hairline);
  border-radius: var(--ffb-r-bento);
  background: #ffffff;
}

.si-bento .si-card {
  grid-area: form;
}

.si-view {
  grid-area: 1 / 1;
}

/* The inactive view keeps its space but takes no clicks and no tab stops —
   visibility:hidden, unlike opacity, removes it from the focus order too. */
.si-card[data-ffb-view="signin"] .si-view--forgot,
.si-card[data-ffb-view="forgot"] .si-view--signin {
  visibility: hidden;
  pointer-events: none;
}

.si-card__title {
  margin-bottom: 24px;
  font-size: clamp(26px, 2vw, 30px);
  line-height: 1.15;
}

.si-card__lead {
  margin-bottom: 28px;
  font-size: var(--ffb-body-size);
  line-height: 1.5;
  color: var(--ffb-text-muted);
}

.si-card__actions {
  margin-top: 20px;
  text-align: center;
}

/* --------------------------------------------------------------- Fields --- */

.si-field {
  margin-bottom: 18px;
}

.si-field__label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--ffb-body);
  font-weight: 500;
  font-size: var(--ffb-eyebrow);
  letter-spacing: var(--ffb-track-label);
  text-transform: uppercase;
  color: var(--ffb-text-muted-alt);
}

.si-field__hint {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ffb-text-muted-soft);
}

.si-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--ffb-field-border);
  border-radius: var(--ffb-r-input-lg);
  background: #ffffff;
  font-family: var(--ffb-body);
  font-size: 17px;
  color: var(--ffb-text);
  transition: border-color var(--ffb-t-fast) ease, box-shadow var(--ffb-t-fast) ease;
}

.si-input::placeholder {
  color: var(--ffb-text-muted-soft);
}

.si-input:focus {
  border-color: var(--ffb-green);
  box-shadow: var(--ffb-focus-ring);
  outline: none;
}

/* -------- Password + reveal toggle -------- */

.si-password {
  position: relative;
  display: flex;
  align-items: center;
}

/* Room for the toggle, so a long password never runs under it. The padding is
   there whether or not the button is (it is hidden without JavaScript), which
   costs nothing and keeps the two fields the same shape. */
.si-password__input {
  padding-right: 100px;
}

.si-password__toggle {
  position: absolute;
  right: 10px;
  padding: 8px 10px;
  border: none;
  border-radius: var(--ffb-r-input);
  background: transparent;
  font-family: var(--ffb-body);
  font-weight: 600;
  font-size: var(--ffb-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ffb-blue);
}

.si-password__toggle:hover {
  color: var(--ffb-link-hover);
}

/* -------- Remember me / forgot row -------- */

.si-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.si-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--ffb-body-size);
  color: var(--ffb-text-body-alt);
  cursor: pointer;
}

.si-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--ffb-green);
  cursor: pointer;
}

.si-link {
  font-family: var(--ffb-poppins);
  font-weight: 600;
  font-size: 14px;
}

.si-link--lg {
  font-size: var(--ffb-body-size);
}

/* --------------------------------------------------------------- Submit --- */

.si-submit {
  width: 100%;
  padding: 16px 24px;
}

.si-submit:disabled {
  background: var(--ffb-input-border);
  box-shadow: none;
  color: var(--ffb-text-muted);
  cursor: not-allowed;
}

/* --------------------------------------------------------------- Notice --- */

/* Its own row under the card's forms, so it pushes nothing sideways and the
   two views keep sharing one cell. */
.si-notice {
  grid-area: 2 / 1;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: var(--ffb-r-tile);
  font-size: var(--ffb-body-size);
  line-height: 1.5;
}

/* On reset-password.php the notice sits inside the form rather than in the
   card's second row — there is only one view, and it reads better above the
   fields it is complaining about. */
.si-notice--top {
  grid-area: auto;
  margin-top: 0;
  margin-bottom: 22px;
}

.si-notice i,
.si-notice svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

/* Mint, per the design. Used for "we sent it" and for the neutral session
   notices — nothing has gone wrong, the visitor is just being told where they
   are. */
.si-notice--info,
.si-notice--success {
  background: var(--ffb-surface-mint);
  color: var(--ffb-text-body-deep);
}

.si-notice--info i,
.si-notice--success i,
.si-notice--info svg,
.si-notice--success svg {
  color: var(--ffb-blue);
}

/* Failures get their own colour rather than the mint. A wrong password shown
   on a success-coloured strip reads as though it worked. Matches the contact
   form's .ct-alert so the two pages fail the same way. */
.si-notice--error {
  border: 1.5px solid #e6c0c0;
  background: #fdf3f3;
  color: #8a2f2f;
}

.si-notice--error i,
.si-notice--error svg {
  color: #8a2f2f;
}

/* A link after the message (the SSO portal); on its own line so the sentence
   is not broken. */
.si-notice__link {
  display: block;
  margin-top: 4px;
  color: var(--ffb-blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
