/* ==========================================================================
   signin.css — /login, /login/chaser, /login/vendor.

   Two halves. The street (left): the map texture, a yellow street-sign block
   carrying the headline and the live numbers, and a working find card that
   explains the product by letting a person press its buttons. The desk
   (right): the form, on the dark ground.

   Rules kept from Content/css/README.md: tokens only for colour, type and
   spacing; yellow is identity (the sign, the clock), pink is action (the
   buttons, the links); the TTL gradient appears only inside the find card;
   the pulsing dot marks the one pin that is "live right now". The exceptions
   are geometry: the split measure, the breakpoints, the pin size, and the
   sign's rotation.

   Load order: foodchaser-tokens.css -> foodchaser.css -> common.css -> this.
   ========================================================================== */

body {
  background: var(--fc-bg);
  color: var(--fc-on);
  font-family: var(--fc-font-body);
}

.si {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  min-height: 100vh;
  background: var(--fc-bg);
  color: var(--fc-on);
  font-size: var(--fc-text-body);
  line-height: var(--fc-lh-normal);
}

/* --------------------------------------------------------------------------
   1. The street
   -------------------------------------------------------------------------- */

.si .si-street {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--fc-space-7);
  padding: var(--fc-space-8) var(--fc-space-8) var(--fc-space-6);
  overflow: hidden;
  isolation: isolate;
  border-right: var(--fc-border) solid var(--fc-outline);
}

/* The grid is the page ground: blocks and avenues from map-texture.svg. */
.si .si-street::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url('../../images/brand/map-texture.svg');
  background-size: 480px 480px;
  opacity: 0.9;
}

/* Fade the grid into the ground at the bottom so the footer line sits on
   plain dark, and toward the desk so the two halves meet softly. */
.si .si-street::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, transparent 55%, var(--fc-bg) 100%),
    linear-gradient(90deg, transparent 70%, rgba(18, 18, 18, 0.7) 100%);
  pointer-events: none;
}

/* The street sign: yellow, ink type, set a hair off square like something
   bolted to a post. The headline is the whole identity of the page. */
.si .si-sign {
  position: relative;
  align-self: flex-start;
  max-width: 44rem;
  padding: var(--fc-space-7) var(--fc-space-8) var(--fc-space-7) var(--fc-space-7);
  background: var(--fc-yellow);
  color: var(--fc-on-yellow);
  border-radius: var(--fc-radius-panel);
  transform: rotate(-1.2deg);
  transform-origin: 0 100%;
  box-shadow: var(--fc-shadow-phone);
}

.si .si-lockup {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--fc-space-1);
  margin-bottom: var(--fc-space-6);
  border-radius: var(--fc-radius-chip);
}

.si .si-lockup img {
  display: block;
  height: var(--fc-space-6);
  width: auto;
}

.si .si-tm {
  font-family: var(--fc-font-display);
  font-size: var(--fc-text-micro);
  font-weight: 700;
  line-height: 1;
  color: var(--fc-on-yellow);
}

.si .si-headline {
  margin: 0;
  font-family: var(--fc-font-display);
  font-size: clamp(44px, 4.7vw, 72px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: var(--fc-track-display);
  color: var(--fc-on-yellow);
  text-wrap: balance;
}

.si .si-headline span { display: block; white-space: nowrap; }

.si .si-now {
  margin: var(--fc-space-5) 0 0;
  max-width: 28rem;
  font-size: var(--fc-text-body);
  line-height: 1.5;
  color: var(--fc-on-yellow);
}

.si .si-now b {
  font-family: var(--fc-font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.si .si-now > span + span { margin-left: var(--fc-space-1); }

/* The live dot, in ink on the yellow sign: the one looping animation, on
   the one thing that is genuinely live. */
.si .si-live {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: var(--fc-space-2);
  border-radius: 50%;
  background: var(--fc-pink-deep);
  vertical-align: 1px;
  animation: fcPulse var(--fc-dur-pulse) infinite;
}

.si .si-sign a:focus-visible {
  outline: 2px solid var(--fc-on-yellow);
  outline-offset: 3px;
}

/* Pins on the grid. Six quiet ones and one that is live. */
.si .si-map {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.si .si-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--fc-overlay);
  border: 2px solid var(--fc-outline-hover);
  animation: siDrop 520ms var(--fc-ease) both;
  animation-delay: calc(var(--d) * 70ms + 240ms);
}

.si .si-pin.is-live {
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  background: var(--fc-pink);
  border-color: var(--fc-pink-soft);
}

.si .si-pin.is-live::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--fc-yellow);
  box-shadow: 0 0 0 0 rgba(232, 23, 123, 0.7);
  animation: fcPulse var(--fc-dur-pulse) infinite 1.4s;
}

@keyframes siDrop {
  from { opacity: 0; translate: 0 -18px; }
  to   { opacity: 1; translate: 0 0; }
}

/* The demo find, parked near the live pin. */
.si .si-demo {
  position: relative;
  margin-top: auto;
  margin-left: clamp(0px, 16%, 180px);
  width: min(360px, 100%);
  animation: siRise 620ms var(--fc-ease) both 620ms;
}

.si .si-demo-cap {
  margin: 0 0 var(--fc-space-3);
  font-size: var(--fc-text-caption);
  font-weight: 600;
  color: var(--fc-on);
}

.si .si-find {
  padding: var(--fc-space-4);
  box-shadow: var(--fc-shadow-phone);
  transition: opacity var(--fc-dur-state) var(--fc-ease);
}

.si .si-find.is-gone .fc-find-name { color: var(--fc-subtle); text-decoration: line-through; }

.si .si-find .fc-find-name { font-size: var(--fc-text-heading); }
.si .si-find .fc-find-meta { font-size: var(--fc-text-caption); }

.si .si-find-clock {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--fc-space-3);
  margin-top: var(--fc-space-4);
}

.si .si-find-clock .fc-clock { font-size: var(--fc-text-caption); }

.si .si-find-count {
  font-size: var(--fc-text-micro);
  color: var(--fc-subtle);
  font-variant-numeric: tabular-nums;
}

.si .si-find .fc-ttl > span { transition: width 600ms var(--fc-ease); }

.si .si-find .fc-btn-pair { margin-top: var(--fc-space-4); }

.si .si-demo-said {
  min-height: 3em;
  margin: var(--fc-space-3) 0 0;
  font-size: var(--fc-text-caption);
  line-height: 1.5;
  color: var(--fc-muted);
}

@keyframes siRise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.si .si-powered {
  align-self: flex-start;
  font-size: var(--fc-text-micro);
  font-weight: 600;
  color: var(--fc-subtle);
  text-decoration: none;
  border-radius: var(--fc-radius-chip);
}

.si .si-powered:hover,
.si .si-powered:focus { color: var(--fc-on); text-decoration: underline; }

/* --------------------------------------------------------------------------
   2. The desk
   -------------------------------------------------------------------------- */

.si .si-desk {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--fc-space-8) var(--fc-space-7);
}

.si .si-card {
  width: 100%;
  max-width: 420px;
  display: grid;
  gap: var(--fc-space-6);
  animation: siFade 420ms var(--fc-ease) both 120ms;
}

@keyframes siFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.si .si-panel {
  display: grid;
  gap: var(--fc-space-5);
}

.si .si-head {
  display: grid;
  gap: var(--fc-space-2);
}

.si .si-title {
  margin: 0;
  font-family: var(--fc-font-display);
  font-size: var(--fc-text-display);
  font-weight: 700;
  line-height: var(--fc-lh-snug);
  letter-spacing: -0.6px;
  color: var(--fc-on);
}

.si .si-sub {
  margin: 0;
  color: var(--fc-muted);
}

.si .si-sub b { color: var(--fc-on); font-weight: 600; }

.si .si-form { display: grid; gap: var(--fc-space-4); }
.si .si-form .fc-field { margin: 0; }

.si .si-labelrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--fc-space-3);
}

.si .si-labelrow .fc-label { margin-bottom: var(--fc-space-2); }

.si .si-forgot { font-size: var(--fc-text-caption); font-weight: 600; }

.si .si-pw { position: relative; }
.si .si-pw .fc-input { padding-right: calc(var(--fc-touch-target) + var(--fc-space-2)); }

.si .si-eye {
  position: absolute;
  top: 50%;
  right: var(--fc-space-1);
  width: var(--fc-touch-target);
  height: var(--fc-touch-target);
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--fc-radius-control);
  background: transparent;
  color: var(--fc-subtle);
  cursor: pointer;
}

.si .si-eye:hover { color: var(--fc-on); }
.si .si-eye:focus-visible { outline: 2px solid var(--fc-pink-soft); outline-offset: -2px; }

.si .si-caps {
  margin: var(--fc-space-2) 0 0;
  font-size: var(--fc-text-caption);
  color: var(--fc-warning);
}

.si .si-remember { font-size: var(--fc-text-caption); align-items: center; }
.si .si-remember .box { margin-top: 0; }

.si .si-error:focus { outline: none; }
.si .si-error b { display: inline; margin: 0; }

.si .si-submit[disabled] { opacity: 1; cursor: progress; }

.si .si-alt {
  margin: 0;
  text-align: center;
  font-size: var(--fc-text-caption);
  color: var(--fc-subtle);
}

.si .si-alt a { color: var(--fc-pink-soft); font-weight: 600; }
.si .si-alt .fc-btn-link { font-size: var(--fc-text-caption); font-weight: 600; }

.si .si-sent {
  display: grid;
  gap: var(--fc-space-3);
}

.si .si-sent > i {
  font-size: var(--fc-text-display);
  color: var(--fc-yellow);
}

/* The claim door. Quiet for chasers; for vendors it takes the pink border,
   because for them it is the likeliest next step. */
.si .si-claim {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--fc-space-4);
  padding: var(--fc-space-4);
  background: var(--fc-raised);
  border: var(--fc-border) solid var(--fc-outline);
  border-radius: var(--fc-radius-tile);
  color: var(--fc-on);
  text-decoration: none;
  transition: border-color var(--fc-dur-state) var(--fc-ease), background var(--fc-dur-state) var(--fc-ease);
}

.si .si-claim:hover,
.si .si-claim:focus { border-color: var(--fc-pink); background: var(--fc-raised-hover); color: var(--fc-on); text-decoration: none; }
.si .si-claim:focus-visible { outline: 2px solid var(--fc-pink-soft); outline-offset: 2px; }
.si .si-claim.loud { border-color: rgba(232, 23, 123, 0.5); }

.si .si-claim-ic {
  width: var(--fc-touch-target);
  height: var(--fc-touch-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--fc-radius-control);
  background: var(--fc-yellow);
  color: var(--fc-on-yellow);
  font-size: var(--fc-text-heading);
}

.si .si-claim-t {
  display: block;
  font-family: var(--fc-font-display);
  font-size: var(--fc-text-body);
  font-weight: 600;
  line-height: var(--fc-lh-snug);
}

.si .si-claim-s {
  display: block;
  margin-top: 2px;
  font-size: var(--fc-text-caption);
  color: var(--fc-muted);
}

.si .si-claim-go { color: var(--fc-subtle); }
.si .si-claim:hover .si-claim-go { color: var(--fc-pink-soft); }

.si .si-apps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--fc-space-3);
}

.si .si-apps a { display: inline-flex; border-radius: var(--fc-radius-chip); }
.si .si-apps a:focus-visible { outline: 2px solid var(--fc-pink-soft); outline-offset: 3px; }
.si .si-apps img { display: block; height: 40px; width: auto; }

.si .si-legal {
  display: flex;
  justify-content: center;
  gap: var(--fc-space-5);
  margin: 0;
  font-size: var(--fc-text-micro);
}

.si .si-legal a { color: var(--fc-subtle); }
.si .si-legal a:hover { color: var(--fc-on); }

/* --------------------------------------------------------------------------
   3. Smaller screens: the sign becomes the header, the demo steps aside.
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .si { grid-template-columns: minmax(0, 1fr) minmax(400px, 1fr); }
  .si .si-street { padding: var(--fc-space-7) var(--fc-space-6) var(--fc-space-5); }
  .si .si-demo { margin-left: 0; }
}

@media (max-width: 900px) {
  .si { grid-template-columns: minmax(0, 1fr); min-height: 0; }

  .si .si-street {
    gap: 0;
    padding: var(--fc-space-5) var(--fc-space-4) var(--fc-space-6);
    border-right: 0;
    border-bottom: var(--fc-border) solid var(--fc-outline);
  }

  .si .si-sign {
    align-self: stretch;
    max-width: none;
    padding: var(--fc-space-5);
    transform: none;
    box-shadow: none;
  }

  .si .si-lockup { margin-bottom: var(--fc-space-4); }
  .si .si-lockup img { height: var(--fc-space-5); }
  .si .si-headline { font-size: clamp(32px, 8.6vw, 48px); }
  .si .si-headline span { white-space: normal; }
  .si .si-now { margin-top: var(--fc-space-3); font-size: var(--fc-text-caption); }

  .si .si-demo,
  .si .si-map,
  .si .si-powered { display: none; }

  .si .si-desk {
    align-items: flex-start;
    padding: var(--fc-space-6) var(--fc-space-4) var(--fc-space-8);
  }

  .si .si-card { max-width: 460px; }
}

@media (max-width: 400px) {
  .si .si-title { font-size: var(--fc-text-title); }
}

@media (prefers-reduced-motion: reduce) {
  .si .si-pin,
  .si .si-demo,
  .si .si-card { animation: none; }
  .si .si-live,
  .si .si-pin.is-live::after { animation: none; }
  .si .si-find .fc-ttl > span { transition: none; }
}
