/* =====================================================================
   Phase 1 design enhancements  (DRAFT — loaded AFTER site.css)
   Safe to revert: delete this file + its <link> tags + the reveal script.
   Additive only; does not modify existing site.css rules.
   Primary accent: teal (--accent). Blue/gold demoted to specific roles.
   ===================================================================== */

:root {
  /* monospaced/tabular face for all numeric + data display */
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* accent system (teal primary) — additive, does not remove --accent */
  --accent-strong: #1fb8a0;
  --accent-weak: rgba(44, 212, 185, 0.14);

  /* secondary roles, used with intent */
  --info: #2f7af8;        /* CTA emphasis / data-neutral highlight */
  --highlight: #efc97e;   /* rare "value" moments only */

  /* semantic data colors for the app modules */
  --pos: #46d39a;         /* gains / bid */
  --neg: #f4769b;         /* losses / ask */
}

/* ---------------------------------------------------------------------
   1. Numbers are the brand: tabular monospaced figures
   --------------------------------------------------------------------- */
.num,
.cp-value,
.price,
.greek,
td.numeric {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ---------------------------------------------------------------------
   2. Visible keyboard focus (accessibility)
   --------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------------------------------------------------------------
   3. Subtle depth: hover lift on cards
   --------------------------------------------------------------------- */
.card,
.pillar-card,
.what-card,
.cp-metric {
  transition: transform 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.card:hover,
.pillar-card:hover,
.what-card:hover,
.cp-metric:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(7, 18, 36, 0.55);
}

/* ---------------------------------------------------------------------
   4. Scroll reveal (only active when JS adds .reveal-enabled to <html>,
      so no-JS users always see content; disabled for reduced motion)
   --------------------------------------------------------------------- */
.reveal-enabled .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal-enabled .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .pillar-card,
  .what-card,
  .cp-metric,
  .reveal-enabled .reveal {
    transition: none;
  }
  .reveal-enabled .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------------
   5. Phase 3 — login split screen
   Base = mobile (single column, aside hidden, compact brand in form).
   Desktop (>=861px) = two-column with brand/value panel on the left.
   --------------------------------------------------------------------- */
.login-shell--split {
  width: min(560px, 92vw);
}
.login-aside {
  display: none; /* desktop-only; shown in the media query below */
}
.login-brand--compact {
  display: inline-flex;
}
.login-back {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--fs-small);
}
.login-back:hover {
  color: var(--text);
}
@media (min-width: 861px) {
  .login-shell--split {
    width: min(960px, 94vw);
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(17, 38, 68, 0.95), rgba(11, 28, 50, 0.95));
  }
  .login-aside {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    background:
      radial-gradient(130% 80% at 50% -10%, rgba(44, 212, 185, 0.16), transparent 55%),
      radial-gradient(90% 70% at 50% 115%, rgba(47, 122, 248, 0.13), transparent 60%),
      linear-gradient(180deg, rgba(13, 28, 49, 0.6), rgba(9, 23, 43, 0.6));
  }
  /* faded dot grid, masked so it dissolves toward the edges */
  .login-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(158, 180, 215, 0.13) 1px, transparent 1.6px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(115% 100% at 50% 45%, #000 32%, transparent 75%);
    mask-image: radial-gradient(115% 100% at 50% 45%, #000 32%, transparent 75%);
    pointer-events: none;
  }
  /* centered brand lockup: mark stacked above the wordmark, sitting above grid */
  .login-aside .login-brand {
    position: relative;
    z-index: 1;
    flex-direction: column;
    gap: 0.8rem;
    transform: scale(1.45);
    transform-origin: center;
  }
  .login-aside .login-brand .brand-text {
    letter-spacing: 0.06em;
  }
  .login-shell--split .login-panel {
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .login-shell--split .login-brand--compact {
    display: none; /* the aside already shows the brand on desktop */
  }
}

/* ---------------------------------------------------------------------
   8. Phase 3 — control-panel overview status tiles
   --------------------------------------------------------------------- */
.cp-overview-hint {
  color: var(--muted);
  font-size: var(--fs-small);
  margin: 0 0 1rem;
}
.cp-metric--link {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
}
.cp-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  letter-spacing: 0.02em;
  color: var(--muted);
}
.cp-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
}
.cp-status[data-status="live"] .cp-status-dot {
  background: var(--pos);
  box-shadow: 0 0 0 3px rgba(70, 211, 154, 0.18);
}
.cp-status[data-status="live"] .cp-status-text {
  color: var(--pos);
}
.cp-status[data-status="down"] .cp-status-dot {
  background: var(--neg);
  box-shadow: 0 0 0 3px rgba(244, 118, 155, 0.16);
}
.cp-status[data-status="down"] .cp-status-text {
  color: var(--neg);
}
.cp-status[data-status="unconfigured"] .cp-status-dot {
  background: var(--muted);
}
.cp-status[data-status="checking"] .cp-status-dot {
  background: var(--highlight);
  animation: cp-status-pulse 1.2s ease-in-out infinite;
}
@keyframes cp-status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .cp-status[data-status="checking"] .cp-status-dot {
    animation: none;
  }
}

/* ---------------------------------------------------------------------
   9. Careers page — open-role cards
   --------------------------------------------------------------------- */
.careers-count {
  margin: 1.6rem 0 0;
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.roles-list {
  display: grid;
  gap: 1.2rem;
  margin-top: 1rem;
}
.role-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(17, 38, 68, 0.95), rgba(11, 28, 50, 0.95));
  padding: clamp(1.4rem, 3vw, 2rem);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.role-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(7, 18, 36, 0.55);
}
.role-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.role-card__title {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
}
.role-card__tag {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  white-space: nowrap;
}
.role-card__meta {
  margin: 0.45rem 0 0;
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  letter-spacing: 0.02em;
  color: var(--muted);
}
.role-card__summary {
  color: var(--muted);
  margin: 1rem 0 1.4rem;
  max-width: 72ch;
}
.role-card__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
}
.role-card__col h3 {
  margin: 0 0 0.7rem;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}
.role-card__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.role-card__col li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--muted);
  font-size: var(--fs-small);
}
.role-card__col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.role-card__actions {
  margin-top: 1.5rem;
}
.careers-empty-note {
  margin-top: 2rem;
  color: var(--muted);
  font-size: var(--fs-small);
}
@media (max-width: 680px) {
  .role-card__cols {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
}

/* ---------------------------------------------------------------------
   10. Home enrichment — What We Do bullets, Market Impact items
   --------------------------------------------------------------------- */
.what-points {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0.9rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.45rem;
}
.what-points li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: var(--fs-small);
}
.what-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.impact-item {
  padding: 0.7rem 0.8rem;
}
/* Desktop: the text panel (tight, natural-gap items) drives the row height, and
   the image fills the left column to match it — no empty space, no spread items.
   The image is absolutely positioned so it can't inflate the row past the panel.
   Mobile (<=900px) keeps the stacked layout and the static image height. */
@media (min-width: 901px) {
  .impact-layout {
    align-items: stretch;
  }
  .impact-hero {
    align-self: stretch;
    position: relative;
    min-height: 238px;
  }
  .impact-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
.impact-item__title {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: var(--fs-label);
  letter-spacing: 0.01em;
}
.impact-item__desc {
  display: block;
  margin-top: 0.22rem;
  color: var(--muted);
  font-weight: 400;
  font-size: var(--fs-caption);
  line-height: 1.5;
}
