/* Figillance (the mobile app): the home page section (index.html, .fgl-home)
   and its own page (figillance.html). Everything is scoped to .fgl-*.

   Screenshots: each phone shows a hand-built mock (.fgl-mock) until a real
   screenshot exists. To swap one in, replace the .fgl-mock div inside
   .fgl-screen with <img class="fgl-shot" src="images/figillance/<name>.png"
   alt="...">. The screen is 9:19.5, so a phone screenshot fills it as is. */

.fgl-home,
.fgl-page {
  --fgl-green-950: #0c2411;
  --fgl-green-900: #14391a;
  --fgl-green-700: #17612a;
  --fgl-lime: #8bc34a;
  --fgl-orange: #ff9800;
  --fgl-text-on-dark: #eef4ee;
  --fgl-muted-on-dark: #a9b8aa;
  --fgl-ink: #171717;
  --fgl-ink-soft: #575757;
  --fgl-line: #e4e7e4;
  --fgl-critical: #e5484d;
  --fgl-high: #f08a4b;
  --fgl-medium: #f2b33d;
  --fgl-low: #4f9dde;
  --fgl-app-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "DM Sans", sans-serif;
}

/* ---------- Home page section ---------- */

.fgl-home {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 85% 30%, rgba(139, 195, 74, .16), transparent 70%),
    linear-gradient(160deg, var(--fgl-green-900), var(--fgl-green-950));
  color: var(--fgl-text-on-dark);
}

.fgl-home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 64px;
  align-items: center;
}

.fgl-wordmark {
  display: block;
  width: 180px;
  height: auto;
  margin-bottom: 20px;
}

.fgl-eyebrow {
  color: var(--fgl-lime);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.fgl-heading {
  margin: 0 0 18px;
  color: #fff;
}

.fgl-lede {
  max-width: 540px;
  margin: 0 0 32px;
  color: var(--fgl-muted-on-dark);
  font-size: 18px;
  line-height: 1.6;
}

.fgl-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
  margin: 0 0 36px;
  padding: 0;
  list-style: none;
}

.fgl-point {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.fgl-point-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(139, 195, 74, .14);
  color: var(--fgl-lime);
}

.fgl-point-icon svg {
  width: 20px;
  height: 20px;
}

.fgl-point-title {
  margin: 0 0 4px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.fgl-point-text {
  margin: 0;
  color: var(--fgl-muted-on-dark);
  font-size: 14px;
  line-height: 1.55;
}

.fgl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* "Coming soon" store badges. Our own pills, not Apple's or Google's badge
   artwork, which may only be used once the app is actually listed. */
.fgl-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fgl-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px;
  color: #fff;
  line-height: 1.15;
}

.fgl-badge svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.fgl-badge-small {
  display: block;
  color: var(--fgl-muted-on-dark);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.fgl-badge-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.fgl-home-visual {
  display: flex;
  justify-content: center;
}

/* ---------- Phone frame ---------- */

.fgl-phone {
  position: relative;
  width: 300px;
  max-width: 100%;
  padding: 11px;
  border-radius: 46px;
  background: #0b0d0b;
  box-shadow:
    0 0 0 2px #2b302b,
    0 40px 80px -30px rgba(0, 0, 0, .65),
    0 18px 36px -18px rgba(0, 0, 0, .5);
}

.fgl-phone::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 50%;
  z-index: 3;
  width: 84px;
  height: 22px;
  border-radius: 12px;
  background: #0b0d0b;
  transform: translateX(-50%);
}

.fgl-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  border-radius: 36px;
  background: #f4f6f4;
}

.fgl-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- App mock (placeholder until screenshots arrive) ---------- */

.fgl-mock {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--fgl-ink);
  font-family: var(--fgl-app-font);
  font-size: 12px;
  line-height: 1.35;
  user-select: none;
}

.fgl-mock.is-dark {
  background: #0f1410;
  color: #eef2ee;
}

.fgl-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 0;
  height: 44px;
  font-size: 12px;
  font-weight: 600;
}

.fgl-status-icons {
  display: flex;
  gap: 4px;
  align-items: center;
}

.fgl-status-icons i {
  display: block;
  width: 14px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
  opacity: .85;
}

.fgl-status-icons i:first-child {
  width: 10px;
}

.fgl-appbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 10px;
}

.fgl-appbar-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.fgl-appbar-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.fgl-chips {
  display: flex;
  gap: 6px;
  padding: 0 16px 10px;
}

.fgl-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: #e6ebe6;
  color: var(--fgl-ink-soft);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.fgl-chip.is-on {
  background: var(--fgl-green-700);
  color: #fff;
}

.fgl-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 0 12px 10px;
  overflow: hidden;
}

.fgl-card {
  position: relative;
  padding: 10px 12px 10px 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.fgl-card::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 6px;
  width: 3px;
  border-radius: 3px;
  background: var(--sev, var(--fgl-low));
}

.fgl-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.fgl-card-title {
  font-weight: 700;
  font-size: 13px;
}

.fgl-card-time {
  color: #8a918a;
  font-size: 11px;
  white-space: nowrap;
}

.fgl-card-meta {
  color: #6b736b;
  font-size: 11px;
}

.fgl-sev {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--sev) 14%, transparent);
  color: var(--sev);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sev-critical { --sev: var(--fgl-critical); }
.sev-high { --sev: var(--fgl-high); }
.sev-medium { --sev: #c98a10; }
.sev-low { --sev: var(--fgl-low); }

.fgl-tabbar {
  display: flex;
  justify-content: space-around;
  margin-top: auto;
  padding: 10px 8px 22px;
  border-top: 1px solid var(--fgl-line);
  background: #fff;
  color: #8a918a;
  font-size: 10px;
  font-weight: 600;
}

.is-dark .fgl-tabbar {
  border-top-color: #222a23;
  background: #141a15;
}

.fgl-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.fgl-tab::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: currentColor;
  opacity: .35;
}

.fgl-tab.is-on {
  color: var(--fgl-green-700);
}

.is-dark .fgl-tab.is-on {
  color: var(--fgl-lime);
}

.fgl-tab.is-on::before {
  opacity: 1;
}

/* Incident detail */
.fgl-clip {
  position: relative;
  height: 33%;
  margin: 0 12px 12px;
  overflow: hidden;
  border-radius: 14px;
  background: #222 center / cover no-repeat;
}

.fgl-clip-box {
  position: absolute;
  top: 26%;
  left: 38%;
  width: 26%;
  height: 56%;
  border: 2px solid var(--fgl-critical);
  border-radius: 3px;
}

.fgl-clip-box span {
  position: absolute;
  top: -18px;
  left: -2px;
  padding: 1px 5px;
  background: var(--fgl-critical);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.fgl-clip-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
}

.fgl-clip-play::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 10px;
  border-left: 8px solid #fff;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.fgl-detail {
  padding: 0 16px;
}

.fgl-detail-title {
  margin-bottom: 2px;
  font-size: 17px;
  font-weight: 700;
}

.fgl-timeline {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.fgl-timeline li {
  position: relative;
  padding: 0 0 10px 16px;
  color: #4f564f;
  font-size: 11px;
}

.fgl-timeline li::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fgl-green-700);
}

.fgl-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px 16px 12px;
}

.fgl-btn {
  padding: 9px 0;
  border-radius: 10px;
  background: var(--fgl-green-700);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.fgl-btn.is-outline {
  border: 1.5px solid var(--fgl-green-700);
  background: transparent;
  color: var(--fgl-green-700);
}

/* Camera grid */
.fgl-cams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 12px;
}

.fgl-cam {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: #222 center / cover no-repeat;
}

.fgl-cam::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .65));
}

.fgl-cam-name {
  position: absolute;
  bottom: 5px;
  left: 7px;
  z-index: 1;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}

.fgl-cam-live {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--fgl-critical);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .05em;
}

/* Inbox */
.fgl-msg {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
}

.fgl-msg-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e3efe0;
  color: var(--fgl-green-700);
  font-size: 12px;
  font-weight: 700;
}

.fgl-msg-body {
  min-width: 0;
  flex: 1;
}

.fgl-msg-kind {
  color: var(--fgl-green-700);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.fgl-msg-text {
  overflow: hidden;
  color: #4f564f;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.fgl-msg.is-unread .fgl-card-title::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--fgl-orange);
  vertical-align: middle;
}

/* Me / duty settings */
.fgl-group {
  margin: 0 12px 10px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
}

.fgl-group-label {
  padding: 4px 16px 6px;
  color: #8a918a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.fgl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #eef0ee;
  font-size: 12px;
}

.fgl-row:last-child {
  border-bottom: 0;
}

.fgl-row-value {
  color: #8a918a;
}

.fgl-switch {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #d5dad5;
}

.fgl-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.fgl-switch.is-on {
  background: var(--fgl-green-700);
}

.fgl-switch.is-on::after {
  left: 16px;
}

.fgl-duty {
  margin: 0 12px 12px;
  padding: 14px;
  border-radius: 14px;
  background: var(--fgl-green-700);
  color: #fff;
}

.fgl-duty-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
}

.fgl-duty .fgl-switch.is-on {
  background: var(--fgl-lime);
}

.fgl-duty-text {
  margin-top: 4px;
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
}

/* Critical alarm (dark, full screen) */
.fgl-alarm {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 22px 40px;
  background: radial-gradient(70% 45% at 50% 38%, rgba(229, 72, 77, .45), transparent 70%), #140b0b;
  color: #fff;
  text-align: center;
}

.fgl-alarm-ring {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--fgl-critical);
  box-shadow: 0 0 0 12px rgba(229, 72, 77, .25), 0 0 0 26px rgba(229, 72, 77, .12);
}

.fgl-alarm-ring svg {
  width: 38px;
  height: 38px;
}

.fgl-alarm-kicker {
  color: #ffb3b5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.fgl-alarm-title {
  margin: 4px 0 6px;
  font-size: 22px;
  font-weight: 800;
}

.fgl-alarm-meta {
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
}

.fgl-alarm .fgl-buttons {
  width: 100%;
  margin-top: 26px;
  padding: 0;
}

.fgl-alarm .fgl-btn {
  background: #fff;
  color: #140b0b;
}

.fgl-alarm .fgl-btn.is-outline {
  border-color: rgba(255, 255, 255, .6);
  background: transparent;
  color: #fff;
}

/* ---------- The Figillance page ---------- */

.fgl-intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 64px;
  align-items: center;
}

.fgl-page .fgl-lede.is-light {
  color: var(--fgl-ink-soft);
}

.fgl-page .fgl-eyebrow.is-light {
  color: var(--fgl-green-700);
}

.fgl-badges.is-light .fgl-badge {
  border-color: #cfd6cf;
  color: var(--fgl-ink);
}

.fgl-badges.is-light .fgl-badge-small {
  color: var(--fgl-ink-soft);
}

.fgl-features {
  display: flex;
  flex-direction: column;
  gap: 110px;
}

.fgl-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 72px;
  align-items: center;
}

.fgl-feature.is-reversed .fgl-feature-visual {
  order: -1;
}

.fgl-feature-visual {
  display: flex;
  justify-content: center;
}

.fgl-feature-heading {
  margin: 0 0 16px;
}

.fgl-feature-text {
  margin: 0 0 22px;
  color: var(--fgl-ink-soft);
  font-size: 17px;
  line-height: 1.6;
}

.fgl-checks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fgl-checks li {
  position: relative;
  padding-left: 30px;
  color: var(--fgl-ink);
  font-size: 15px;
  line-height: 1.5;
}

.fgl-checks li::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--fgl-green-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.fgl-trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.fgl-trust-card {
  padding: 26px 24px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  background: rgba(255, 255, 255, .04);
}

.fgl-trust-card .fgl-point-icon {
  margin-bottom: 18px;
}

.fgl-trust-card .fgl-point-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.fgl-section-header {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

/* ---------- Responsive ---------- */

@media screen and (max-width: 991px) {
  .fgl-home-layout,
  .fgl-intro-layout,
  .fgl-feature {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .fgl-feature.is-reversed .fgl-feature-visual {
    order: 0;
  }

  .fgl-features {
    gap: 80px;
  }

  .fgl-trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 767px) {
  .fgl-points,
  .fgl-trust {
    grid-template-columns: minmax(0, 1fr);
  }

  .fgl-lede,
  .fgl-feature-text {
    font-size: 16px;
  }

  .fgl-phone {
    width: 272px;
  }
}

/* Fixes found in the browser check */
.fgl-msg .fgl-card-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.fgl-section-header .fgl-lede {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}
