/* ==========================================================================
   Nexus — Forex landing (standalone layout, not crypto/stocks template)
   ========================================================================== */

.forex-landing {
  --fx-surface: var(--cr-bg-alt);
  --fx-ink: var(--cr-ink);
  --fx-muted: var(--cr-muted);
  --fx-border: var(--cr-line);
  --fx-radius: var(--nx-radius-lg);
  --fx-ease: cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--nx-white);
  color: var(--fx-ink);
}

/* Shared typography (matches crypto / stocks cr-* scale) */
.forex-landing .fx-section-head h2,
.forex-landing .fx-workspace__copy h2,
.forex-landing .fx-risk__copy h2 {
  font-size: var(--cr-section-title-size);
  font-weight: var(--cr-section-title-weight);
  letter-spacing: var(--cr-section-title-spacing);
  line-height: var(--cr-section-title-line);
  margin: 0 0 var(--cr-section-title-gap);
  color: var(--cr-ink);
}

.forex-landing .fx-section-head p,
.forex-landing .fx-workspace__copy > p {
  font-size: var(--cr-lead-size);
  line-height: 1.72;
  color: var(--cr-muted);
  margin: 0 0 28px;
}

.forex-landing .fx-risk__copy h2 {
  color: #f8fafc;
}

.forex-landing .fx-risk__copy > p {
  font-size: var(--cr-lead-size);
  line-height: 1.72;
  color: rgba(248, 250, 252, 0.74);
  margin: 0 0 28px;
  max-width: 32rem;
}

.forex-landing .fx-light-checks li {
  color: var(--cr-ink);
}

/* ---- Hero (spacing aligned with cr-hero) ---- */
.fx-hero {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: #030c15;
}

.fx-hero .cr-hero__top {
  position: relative;
}

.fx-hero .cr-hero__grid {
  position: relative;
  align-items: start;
}

.fx-hero .cr-hero__content {
  align-items: flex-start;
  background-color: #030c15;
}

.fx-hero .cr-hero__top .breadcrumb a {
  color: rgba(255, 255, 255, 0.82);
}

.fx-hero .cr-hero__top .breadcrumb a:hover {
  color: var(--nx-orange);
}

.fx-hero .cr-hero__top .breadcrumb span:not(.breadcrumb-sep) {
  color: rgba(255, 255, 255, 0.72);
}

.fx-hero .cr-hero__top .breadcrumb-sep {
  color: rgba(255, 255, 255, 0.38);
}

.fx-hero__visual {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px max(45px, calc((100vw - var(--nx-container)) / 2 + 45px)) 64px 24px;
  background: transparent;
  position: relative;
  min-height: 100%;
  align-self: stretch;
}

.fx-hero__image {
  display: block;
  width: 100%;
  max-width: min(100%, 520px);
  height: auto;
  max-height: min(560px, 72vh);
  object-fit: contain;
  object-position: center;
}

/* FX pair badges in markets feed */
.forex-landing .cr-market-pill__icon--fx {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  object-fit: unset;
}

.forex-landing .fx-pill-flags {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.forex-landing .fx-pill-flag {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.16);
  flex-shrink: 0;
  background: #f1f5f9;
}

.forex-landing .fx-pill-flag--base {
  margin-right: -8px;
  position: relative;
  z-index: 2;
}

.forex-landing .fx-pill-flag--quote {
  position: relative;
  z-index: 1;
}

@media (max-width: 640px) {
  .forex-landing .fx-pill-flag {
    width: 21px;
    height: 21px;
    border-width: 1.5px;
  }

  .forex-landing .fx-pill-flag--base {
    margin-right: -7px;
  }
}

/* ---- Section primitives ---- */
.fx-section {
  padding: 70px 0;
}

.fx-section--muted {
  background: var(--cr-bg-alt);
}

.fx-section--dark {
  background: linear-gradient(165deg, var(--nx-navy-dark) 0%, #0a3d6e 100%);
  color: #f8fafc;
}

.fx-section-head {
  max-width: 34rem;
  margin-bottom: clamp(40px, 5vw, 48px);
}

.fx-section-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: 40rem;
  margin-bottom: 48px;
}

.forex-landing .fx-sessions__header-copy h2 {
  font-size: var(--cr-section-title-size);
  font-weight: var(--cr-section-title-weight);
  letter-spacing: var(--cr-section-title-spacing);
  line-height: var(--cr-section-title-line);
  margin: 0 0 var(--cr-section-title-gap);
  color: var(--cr-ink);
}

.forex-landing .fx-sessions__header-copy > p {
  font-size: var(--cr-lead-size);
  line-height: 1.72;
  color: var(--cr-muted);
  margin: 0;
  max-width: 36rem;
}

/* ---- Sessions ---- */
.fx-sessions {
  background: var(--nx-white);
}

.fx-sessions__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: clamp(28px, 5vw, 56px);
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 48px);
}

.fx-sessions__highlight {
  padding: 22px 24px;
  border-radius: var(--fx-radius);
  background: linear-gradient(160deg, #030c15 0%, #0c2a4a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--nx-shadow);
}

.fx-sessions__highlight-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.58);
}

.fx-sessions__highlight-value {
  display: block;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
}

.fx-sessions__highlight-meta {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(248, 250, 252, 0.68);
}

.fx-sessions__board {
  border-radius: calc(var(--fx-radius) + 2px);
  border: 1px solid var(--fx-border);
  background: var(--nx-white);
  box-shadow: var(--nx-shadow-lg);
  overflow: hidden;
}

.fx-sessions__viz {
  --fx-viz-label: 148px;
  padding: clamp(24px, 3vw, 32px) clamp(20px, 3vw, 32px) 20px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--fx-border);
}

.fx-sessions__viz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.fx-sessions__viz-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cr-muted);
}

.fx-sessions__viz-unit {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--nx-navy);
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--nx-white);
  border: 1px solid var(--fx-border);
}

.fx-sessions__viz-body {
  position: relative;
  display: grid;
  gap: 16px;
  padding-bottom: 8px;
}

.fx-sessions__viz-grid {
  position: absolute;
  inset: 0 0 8px var(--fx-viz-label);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.fx-sessions__viz-grid span {
  width: 1px;
  background: rgba(15, 23, 42, 0.08);
}

.fx-sessions__viz-overlap {
  position: absolute;
  top: 0;
  bottom: 8px;
  left: calc(var(--fx-viz-label) + ((12 / 24) * (100% - var(--fx-viz-label))));
  width: calc((4 / 24) * (100% - var(--fx-viz-label)));
  background: rgba(239, 146, 39, 0.08);
  border-left: 1px solid rgba(239, 146, 39, 0.22);
  border-right: 1px solid rgba(239, 146, 39, 0.22);
  pointer-events: none;
}

.fx-sessions__viz-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--fx-viz-label) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.fx-sessions__viz-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--cr-ink);
  line-height: 1.3;
}

.fx-sessions__viz-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
}

.fx-sessions__viz-segment {
  --fx-start: 0;
  --fx-end: 0;
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--fx-start) / 24 * 100%);
  width: calc((var(--fx-end) - var(--fx-start)) / 24 * 100%);
  border-radius: inherit;
}

.fx-sessions__viz-segment--asia {
  background: linear-gradient(90deg, #0c4a6e 0%, #0369a1 100%);
}

.fx-sessions__viz-segment--london {
  background: linear-gradient(90deg, #9a3412 0%, var(--cr-accent) 100%);
}

.fx-sessions__viz-segment--ny {
  background: linear-gradient(90deg, #1e3a5f 0%, var(--nx-navy) 100%);
}

.fx-sessions__viz-axis {
  display: grid;
  grid-template-columns: var(--fx-viz-label) minmax(0, 1fr);
  gap: 16px;
  margin-top: 10px;
}

.fx-sessions__viz-axis-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--cr-muted);
}

.fx-sessions__table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.fx-sessions__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

.fx-sessions__table-caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.fx-sessions__table thead th {
  padding: 14px 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: left;
  color: var(--cr-muted);
  background: var(--cr-bg-alt);
  border-bottom: 1px solid var(--fx-border);
}

.fx-sessions__table tbody th,
.fx-sessions__table tbody td {
  padding: 18px 20px;
  vertical-align: middle;
  border-bottom: 1px solid var(--fx-border);
}

.fx-sessions__table tbody tr:last-child th,
.fx-sessions__table tbody tr:last-child td {
  border-bottom: 0;
}

.fx-sessions__table tbody td {
  color: var(--cr-muted);
}

.fx-sessions__table tbody td:nth-child(2),
.fx-sessions__table tbody td:last-child {
  font-variant-numeric: tabular-nums;
}

.fx-sessions__table tbody td:last-child {
  font-weight: 600;
  color: var(--cr-ink);
}

.fx-sessions__table tbody time {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--nx-navy);
}

.fx-sessions__table-session {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--cr-ink);
}

.fx-sessions__table-session::before {
  content: "";
  width: 3px;
  height: 18px;
  border-radius: 999px;
  flex-shrink: 0;
}

.fx-sessions__table-row--asia .fx-sessions__table-session::before {
  background: #0369a1;
}

.fx-sessions__table-row--london .fx-sessions__table-session::before {
  background: var(--cr-accent);
}

.fx-sessions__table-row--ny .fx-sessions__table-session::before {
  background: var(--nx-navy);
}

.fx-sessions__table-row:hover td,
.fx-sessions__table-row:hover th {
  background: rgba(248, 250, 252, 0.72);
}

/* ---- Workspace ---- */
.fx-workspace__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

.fx-workspace__copy {
  max-width: 34rem;
}

.fx-workspace__copy > p {
  max-width: 30rem;
}

.fx-workspace__copy .cr-security__checks {
  margin-bottom: 28px;
}

.fx-workspace__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fx-workspace__photo {
  display: block;
  width: 100%;
  max-width: min(100%, 560px);
  height: auto;
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
}

/* ---- Risk band ---- */
.fx-risk__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

.fx-risk__media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(280px, 38vw, 460px);
  margin: 0;
  line-height: 0;
}

.fx-risk__media img {
  display: block;
  width: 100%;
  max-width: min(100%, 620px);
  height: auto;
  object-fit: contain;
  object-position: center;
}

.fx-risk__copy {
  max-width: 34rem;
}

.fx-risk__list {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fx-risk__item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 4px;
  align-items: start;
}

.fx-risk__icon {
  grid-row: 1 / 3;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--nx-gold);
  background: rgba(250, 188, 46, 0.12);
  border: 1px solid rgba(250, 188, 46, 0.22);
}

.fx-risk__icon svg {
  width: 20px;
  height: 20px;
}

.fx-risk__item-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: #f8fafc;
}

.fx-risk__item-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(248, 250, 252, 0.74);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .fx-hero__visual {
    min-height: clamp(300px, 48vw, 410px);
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 0 24px 32px;
  }

  .fx-hero__image {
    max-width: min(100%, 420px);
    max-height: min(480px, 58vh);
  }

  .fx-workspace__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .fx-risk__grid {
    display: flex;
    flex-direction: column-reverse;
    gap: 40px;
  }

  .fx-workspace__copy,
  .fx-risk__copy {
    max-width: none;
  }

  .fx-risk__media {
    min-height: clamp(220px, 52vw, 380px);
    max-width: min(100%, 640px);
    margin: 0 auto;
  }
}

@media (max-width: 900px) {
  .fx-sessions__header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .fx-sessions__highlight {
    max-width: 320px;
  }
}

@media (max-width: 640px) {
  .forex-landing .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .fx-sessions__viz {
    --fx-viz-label: 108px;
    padding: 20px 16px 16px;
  }

  .fx-sessions__viz-row,
  .fx-sessions__viz-axis {
    gap: 12px;
  }

  .fx-sessions__viz-label {
    font-size: 13px;
  }

  .fx-sessions__table thead th,
  .fx-sessions__table tbody th,
  .fx-sessions__table tbody td {
    padding: 14px 16px;
    font-size: 14px;
  }
}
