/* ============================================================================
   NobuFX · landing — page styles
   ----------------------------------------------------------------------------
   The page is the `Main` artboard of the design project: header, hero, live
   signals, instruments, principles, transparency, final call, footer. Every
   colour, radius and shadow comes from tokens.css; nothing is hard-coded here,
   which is what lets one stylesheet serve both themes.

   The artboard is drawn at 1440. Everything below 1160 is this file's own
   reading of it: columns collapse, the header folds into a menu, type scales.
   ============================================================================ */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* The header is sticky: an anchor would otherwise land under it. */
  scroll-padding-top: var(--nfx-header-height);
}

body {
  margin: 0;
  background: var(--nfx-bg);
  color: var(--nfx-text);
  font: 400 15px/22px var(--nfx-font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, dl, dd { margin: 0; }

a {
  color: var(--nfx-accent-text);
  text-decoration: none;
}
a:hover { color: var(--nfx-accent-text-hover); }

/* The one focus ring of the product — solid, never dashed. */
:focus-visible {
  outline: 2px solid var(--nfx-focus-ring);
  outline-offset: 2px;
}

svg { display: block; }

.container {
  width: 100%;
  max-width: var(--nfx-container);
  margin: 0 auto;
  padding: 0 var(--nfx-gutter);
}

.skip-link {
  position: absolute;
  left: var(--nfx-space-4);
  top: var(--nfx-space-4);
  z-index: 20;
  padding: var(--nfx-space-3) var(--nfx-space-4);
  border-radius: var(--nfx-radius-md);
  background: var(--nfx-accent);
  color: var(--nfx-on-accent);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:hover { color: var(--nfx-on-accent); }
.skip-link:focus { transform: none; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-block;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--nfx-radius-md);
  font: 600 15px/22px var(--nfx-font-sans);
  text-align: center;
  cursor: pointer;
}
.btn--primary {
  background: var(--nfx-accent);
  color: var(--nfx-on-accent);
}
.btn--primary:hover {
  background: var(--nfx-accent-hover);
  color: var(--nfx-on-accent);
}
.btn--secondary {
  border-color: var(--nfx-border-strong);
  background: transparent;
  color: var(--nfx-text);
}
.btn--secondary:hover {
  background: var(--nfx-surface-raised);
  color: var(--nfx-text);
}

.icon-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: var(--nfx-radius-md);
  background: transparent;
  color: var(--nfx-text);
  font: 600 13px/18px var(--nfx-font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--nfx-surface-raised);
  color: var(--nfx-text);
}

/* ------------------------------------------------------------------- header */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: var(--nfx-space-5);
  height: var(--nfx-header-height);
  padding: 0 var(--nfx-gutter);
  border-bottom: 1px solid var(--nfx-border);
  background: var(--nfx-bg);
}

/* On a wide screen the bar and the menu are not boxes of their own: their
   children line up in the header as one row, exactly as the artboard draws it.
   Below the breakpoint the same markup becomes a bar and a folding menu. */
.header__bar,
.header__menu { display: contents; }

.logo {
  display: flex;
  flex: none;
  align-items: center;
  height: 44px;
  color: var(--nfx-accent-text);
  font: 800 22px/1 var(--nfx-font-display);
  letter-spacing: -0.01em;
}
.logo:hover { color: var(--nfx-accent-text); }

.nav {
  display: flex;
  align-items: center;
  gap: var(--nfx-space-6);
  margin-left: var(--nfx-space-5);
}
.nav a { color: var(--nfx-text-secondary); }
.nav a:hover { color: var(--nfx-text); }

.header__spacer { flex-grow: 1; }

.header__auth {
  display: flex;
  align-items: center;
  gap: var(--nfx-space-4);
}
.header__login { color: var(--nfx-text); }
.header__login:hover { color: var(--nfx-accent-text); }

.header__divider {
  flex: none;
  width: 1px;
  height: 24px;
  background: var(--nfx-border);
}

.header__tools {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--nfx-space-2);
}

.theme {
  display: flex;
  flex: none;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--nfx-border);
  border-radius: var(--nfx-radius-full);
  background: var(--nfx-surface);
}
.theme__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: var(--nfx-radius-full);
  background: transparent;
  color: var(--nfx-text-secondary);
  cursor: pointer;
}
.theme__btn:hover { color: var(--nfx-text); }
.theme__btn[aria-pressed="true"] {
  background: var(--nfx-surface-raised);
  color: var(--nfx-text);
}
/* The switch does nothing without the script — it is not offered without it. */
html:not(.js) .theme { display: none; }

.burger { display: none; }
.burger__close { display: none; }
.burger[aria-expanded="true"] .burger__open { display: none; }
.burger[aria-expanded="true"] .burger__close { display: block; }

/* --------------------------------------------------------- shared typography */
.eyebrow {
  color: var(--nfx-accent-text);
  font: 600 12px/16px var(--nfx-font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lead {
  color: var(--nfx-text-secondary);
  font-size: 17px;
  line-height: 26px;
}

.section { padding: var(--nfx-section) 0; }
.section--surface {
  border-top: 1px solid var(--nfx-border);
  border-bottom: 1px solid var(--nfx-border);
  background: var(--nfx-surface);
}

.section__head {
  max-width: 640px;
  margin: 0 auto var(--nfx-space-8);
  text-align: center;
}
.section__head .eyebrow { margin-bottom: var(--nfx-space-4); }
.section__title {
  font: 600 32px/1.25 var(--nfx-font-sans);
  font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2rem);
}
.section__note {
  margin-top: var(--nfx-space-4);
  color: var(--nfx-text-secondary);
}

.card {
  border: 1px solid var(--nfx-border);
  border-radius: var(--nfx-radius-md);
  background: var(--nfx-surface);
  box-shadow: var(--nfx-shadow-card);
}

.grid {
  display: grid;
  gap: var(--nfx-space-5);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* --------------------------------------------------------------------- hero */
.hero { padding: var(--nfx-section) 0 112px; }
.hero__inner {
  display: flex;
  align-items: center;
  gap: var(--nfx-space-8);
}
.hero__copy,
.hero__visual {
  flex: 1 1 0;
  min-width: 0;
}
.hero__copy .eyebrow { margin-bottom: 20px; }
.hero__title {
  margin-bottom: var(--nfx-space-5);
  font: 800 60px/1.08 var(--nfx-font-display);
  font-size: clamp(2rem, 1.1rem + 4.2vw, 3.75rem);
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}
.hero__copy .lead {
  max-width: 480px;
  margin-bottom: 40px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nfx-space-4);
}
.hero__visual {
  display: flex;
  justify-content: center;
}

/* The stage: three rings and four traders around a warm centre. Drawn in
   percentages of a 420 px square, so it shrinks with the column. */
.stage {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
}
.stage__glow,
.stage__ring {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: var(--nfx-radius-full);
}
.stage__glow {
  background: radial-gradient(circle at 50% 50%,
    rgba(255, 122, 61, 0.22) 0%,
    rgba(255, 122, 61, 0.05) 45%,
    rgba(255, 122, 61, 0) 70%);
}
.stage__ring { border: 1px solid; }
.stage__ring--1 { width: 28.57%; height: 28.57%; border-color: rgba(255, 122, 61, 0.35); }
.stage__ring--2 { width: 52.38%; height: 52.38%; border-color: rgba(255, 122, 61, 0.22); }
.stage__ring--3 { width: 76.19%; height: 76.19%; border-color: rgba(255, 122, 61, 0.12); }

.stage__dot {
  position: absolute;
  border-radius: var(--nfx-radius-full);
  background: var(--heat);
  animation: nfx-pulse var(--heat-period) ease-in-out infinite;
}
.stage__dot--1 { top: 14.29%; left: 21.43%; width: 8px;  height: 8px; }
.stage__dot--2 { top: 71.43%; left: 76.19%; width: 10px; height: 10px; }
.stage__dot--3 { top: 35.71%; left: 71.43%; width: 12px; height: 12px; box-shadow: var(--nfx-shadow-glow-hot); }
.stage__dot--4 { top: 78.57%; left: 30.95%; width: 7px;  height: 7px; }
/* The second calm trader breathes a little slower than the scale's own period. */
.stage__dot.stage__dot--4 { --heat-period: 3s; }

/* ------------------------------------------------------- the crowd heat scale */
/* Three channels at once, as the design system asks: colour, pulse frequency
   and — for `hot` on the dark stage — a glow. */
.heat--calm   { --heat: var(--nfx-calm);   --heat-period: 2.6s; }
.heat--active { --heat: var(--nfx-active); --heat-period: 1.4s; }
.heat--hot    { --heat: var(--nfx-hot);    --heat-period: 0.8s; }

@keyframes nfx-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.7); opacity: 0.3; }
}

.heat-dot {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
}
.heat-dot::before,
.heat-dot::after {
  position: absolute;
  border-radius: var(--nfx-radius-full);
  background: var(--heat);
  content: "";
}
.heat-dot::before {
  inset: 0;
  animation: nfx-pulse var(--heat-period) ease-in-out infinite;
}
.heat-dot::after {
  top: 6px;
  left: 6px;
  width: 10px;
  height: 10px;
}
.heat--hot .heat-dot::after { box-shadow: var(--nfx-shadow-glow-hot); }

/* ------------------------------------------------------------------ signals */
.signal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: var(--nfx-space-6) var(--nfx-space-5);
}
.signal__state {
  display: flex;
  align-items: center;
  gap: var(--nfx-space-3);
}
.signal__label {
  color: var(--heat);
  font: 600 12px/16px var(--nfx-font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.signal__text { font: 500 15px/22px var(--nfx-font-mono); }

/* -------------------------------------------------------------- instruments */
.pair {
  display: flex;
  flex-direction: column;
  gap: var(--nfx-space-5);
  padding: var(--nfx-space-6);
}
.pair__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nfx-space-4);
}
.pair__name { font: 600 18px/26px var(--nfx-font-sans); }
.pair__change {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--nfx-radius-sm);
  color: var(--nfx-on-accent);
  font: 500 13px/18px var(--nfx-font-mono);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.pair__change--up   { background: var(--nfx-buy); }
.pair__change--down { background: var(--nfx-sell); }

.sentiment {
  display: flex;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: var(--nfx-radius-full);
  background: var(--nfx-sell);
}
.sentiment__buy {
  width: var(--buy);
  background: var(--nfx-buy);
}
.pair__note {
  margin-top: var(--nfx-space-3);
  color: var(--nfx-text-secondary);
  font-size: 13px;
  line-height: 18px;
}

/* --------------------------------------------------------------- principles */
.principle {
  display: flex;
  flex-direction: column;
  gap: var(--nfx-space-3);
}
.principle__title { font: 600 18px/26px var(--nfx-font-sans); }
.principle__text {
  color: var(--nfx-text-secondary);
  font-size: 13px;
  line-height: 18px;
}

/* -------------------------------------------------------------------- trust */
.trust__inner {
  display: flex;
  align-items: center;
  gap: var(--nfx-space-8);
}
.trust__copy,
.trust__facts {
  flex: 1 1 0;
  min-width: 0;
}
.trust__copy .eyebrow { margin-bottom: var(--nfx-space-4); }
.trust__title {
  margin-bottom: 20px;
  font: 600 28px/1.3 var(--nfx-font-sans);
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem);
}
.trust__text {
  max-width: 480px;
  color: var(--nfx-text-secondary);
}

.facts {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: var(--nfx-space-6);
}
.facts__row {
  display: flex;
  justify-content: space-between;
  gap: var(--nfx-space-4);
}
.facts__row:not(:last-child) {
  padding-bottom: var(--nfx-space-4);
  border-bottom: 1px solid var(--nfx-border);
}
.facts dt { color: var(--nfx-text-secondary); }
.facts dd {
  font: 500 15px/22px var(--nfx-font-mono);
  text-align: right;
}

/* --------------------------------------------------------------- final call */
.cta {
  border-top: 1px solid var(--nfx-border);
  text-align: center;
}
.cta__inner { max-width: 640px; }
.cta__title {
  margin-bottom: var(--nfx-space-4);
  font: 800 40px/1.15 var(--nfx-font-display);
  font-size: clamp(1.625rem, 1.1rem + 2.4vw, 2.5rem);
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}
.cta .lead { margin-bottom: 40px; }

/* ------------------------------------------------------------------- footer */
.footer {
  padding: var(--nfx-space-7) 0;
  border-top: 1px solid var(--nfx-border);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--nfx-space-5);
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--nfx-space-4);
}
.footer__logo {
  color: var(--nfx-accent-text);
  font: 800 16px/1 var(--nfx-font-display);
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nfx-space-3) var(--nfx-space-5);
}
.footer__nav a {
  color: var(--nfx-text-secondary);
  font-size: 13px;
  line-height: 18px;
}
.footer__nav a:hover { color: var(--nfx-text); }
.footer__risk,
.footer__copy {
  color: var(--nfx-text-secondary);
  font-size: 12px;
  line-height: 18px;
}
.footer__risk { max-width: 720px; }

/* ----------------------------------------------------------------- 404 page */
.notfound {
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--nfx-header-height));
  min-height: calc(100dvh - var(--nfx-header-height));
  padding: var(--nfx-section) 0;
  text-align: center;
}
.notfound__inner { max-width: 640px; }
.notfound__code {
  margin-bottom: var(--nfx-space-4);
  color: var(--nfx-text-secondary);
  font: 600 32px/38px var(--nfx-font-mono);
  font-variant-numeric: tabular-nums lining-nums;
}
.notfound .lead { margin-bottom: 40px; }
.notfound__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--nfx-space-4);
}

/* =============================================================== responsive */

/* The header no longer fits in one row: it folds into a bar and a menu. */
@media (max-width: 1080px) {
  .header {
    flex-wrap: wrap;
    gap: 0;
    height: auto;
  }
  .header__bar {
    display: flex;
    align-items: center;
    width: 100%;
    height: var(--nfx-header-height);
  }
  .header__menu {
    display: flex;
    flex-direction: column;
    gap: var(--nfx-space-5);
    width: 100%;
    padding: var(--nfx-space-4) 0 var(--nfx-space-5);
    border-top: 1px solid var(--nfx-border);
  }
  .header__spacer,
  .header__divider { display: none; }

  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
  }
  .nav a {
    padding: var(--nfx-space-3) 0;
    color: var(--nfx-text);
    font-size: 17px;
    line-height: 26px;
  }
  .header__auth {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: var(--nfx-space-3);
  }
  .header__login {
    padding: 14px 24px;
    border: 1px solid var(--nfx-border-strong);
    border-radius: var(--nfx-radius-md);
    font-weight: 600;
    text-align: center;
  }

  /* With the script the menu is a panel under the bar, closed until asked for.
     Without it there is nothing to open it — so it stays in the flow, open,
     and the header gives up being sticky rather than cover the page. */
  html:not(.js) .header { position: static; }
  html.js .burger {
    display: inline-flex;
    margin-left: auto;
  }
  html.js .header__menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    max-height: calc(100vh - var(--nfx-header-height));
    max-height: calc(100dvh - var(--nfx-header-height));
    padding-right: var(--nfx-gutter);
    padding-left: var(--nfx-gutter);
    overflow-y: auto;
    border-top: none;
    border-bottom: 1px solid var(--nfx-border);
    background: var(--nfx-bg);
  }
  html.js .header.is-open .header__menu { display: flex; }
}

@media (max-width: 1000px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero { padding-bottom: var(--nfx-section); }
  .hero__inner,
  .trust__inner {
    flex-direction: column;
    align-items: stretch;
    gap: var(--nfx-space-7);
  }
  .hero__copy .lead,
  .trust__text { max-width: 640px; }
  .stage { max-width: 320px; }

  .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .section__head { margin-bottom: var(--nfx-space-7); }
}

@media (max-width: 720px) {
  .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .pair,
  .facts { padding: var(--nfx-space-5); }
}

@media (max-width: 560px) {
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .hero__actions .btn { flex: 1 1 auto; }
  .stage { max-width: 260px; }
  .section__head { margin-bottom: var(--nfx-space-6); }
  .facts__row { flex-direction: column; gap: var(--nfx-space-1); }
  .facts dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage__dot,
  .heat-dot::before { animation: none; }
}
