/* ==========================================================================
   News Optix — Coming Soon page
   Page-specific layout only. Tokens, reset, focus, shared components and the
   nxPulse animation live in theme.css. Colors are rebased onto the shared
   --nx-* tokens so this page and the homepage share one visual language.
   ========================================================================== */

body.nx-coming-soon {
  overflow: hidden;
}

.page {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--nx-surface) 0%, var(--nx-bg) 42%, #060D16 100%);
  isolation: isolate;
}

/* ---------- Ambient background layers ---------- */
.bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-grid {
  background-image:
    linear-gradient(to right, rgba(63, 169, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(63, 169, 255, 0.07) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 38%, #000 0%, rgba(0, 0, 0, 0.5) 48%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 62% at 50% 38%, #000 0%, rgba(0, 0, 0, 0.5) 48%, transparent 78%);
}

.bg-glow {
  width: min(900px, 100vw);
  height: min(620px, 70vh);
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(15, 95, 174, 0.32) 0%, rgba(15, 95, 174, 0.1) 40%, transparent 76%);
  filter: blur(8px);
  opacity: 0.7;
  animation: glowPulse 9s ease-in-out infinite;
}

.bg-chart {
  inset: auto 0 0;
  height: 46%;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to top, #000 18%, rgba(0, 0, 0, 0.75) 60%, transparent 100%);
  mask-image: linear-gradient(to top, #000 18%, rgba(0, 0, 0, 0.75) 60%, transparent 100%);
}

.bg-vignette {
  background: radial-gradient(ellipse 90% 80% at 50% 42%, transparent 55%, rgba(5, 7, 10, 0.75) 100%);
}

/* ---------- Main content ---------- */
.cs-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 24px 24px;
}

.logo-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.logo-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.logo-wrap::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 110px;
  background: radial-gradient(ellipse at center, rgba(63, 169, 255, 0.22), transparent 70%);
  filter: blur(6px);
}

.logo-icon {
  position: relative;
  height: 78px;
  width: auto;
  filter: drop-shadow(0 6px 22px rgba(15, 95, 174, 0.35));
}

.cs-wordmark {
  margin: 0;
  font-size: 27px;
  line-height: 1;
}

/* Coming-soon status badge (mono uppercase pill with pulsing dot). */
.cs-badge {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(63, 169, 255, 0.28);
  background: rgba(63, 169, 255, 0.07);
  color: #9FCBF2;
  font-family: var(--nx-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
}

/* The badge dot uses the accent blue rather than the market-signal green. */
.cs-badge .nx-live-dot {
  background: var(--nx-accent);
  box-shadow: 0 0 10px rgba(63, 169, 255, 0.9);
}

.cs-title {
  margin: 26px 0 0;
  max-width: 16ch;
  font-family: var(--nx-disp);
  font-size: clamp(34px, 6.4vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.cs-subhead {
  margin: 22px 0 0;
  max-width: 60ch;
  color: var(--nx-muted);
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.6;
  text-wrap: pretty;
}

/* ---------- Early-access capture ---------- */
.capture {
  margin-top: 38px;
  width: 100%;
  max-width: 520px;
}

.capture form {
  display: flex;
  gap: 10px;
}

.capture input,
.capture button {
  height: 52px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 15px;
}

.capture input {
  flex: 1 1 auto;
  padding: 0 18px;
  color: var(--nx-text);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--nx-body);
  transition: border-color var(--nx-dur-base) var(--nx-ease),
    box-shadow var(--nx-dur-base) var(--nx-ease),
    background var(--nx-dur-base) var(--nx-ease);
}

.capture input::placeholder {
  color: var(--nx-muted);
}

.capture input:focus {
  outline: none;
  border-color: rgba(63, 169, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(63, 169, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.capture button {
  padding: 0 22px;
  color: var(--nx-text);
  font-weight: 600;
  font-family: var(--nx-body);
  border-color: rgba(63, 169, 255, 0.4);
  background: linear-gradient(180deg, #1672c4 0%, #0f5fae 100%);
  box-shadow: 0 6px 18px -6px rgba(15, 95, 174, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: background var(--nx-dur-base) var(--nx-ease);
  white-space: nowrap;
}

.capture button .arrow {
  display: inline-block;
  margin-left: 8px;
  transition: transform var(--nx-dur-base) var(--nx-ease);
}

.capture button:hover {
  background: linear-gradient(180deg, #1a7ed6 0%, #1672c4 100%);
}

.capture button:hover .arrow {
  transform: translateX(3px);
}

.fine-print {
  margin: 16px 0 0;
  color: var(--nx-faint);
  font-size: 13px;
}

/* Success state — revealed after a valid submission. */
.success {
  display: none;
  padding: 24px;
  border-radius: 14px;
  border: 1px solid rgba(63, 169, 255, 0.25);
  background: rgba(63, 169, 255, 0.06);
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.success.active {
  display: flex;
}

.success-check {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(63, 169, 255, 0.16);
  color: var(--nx-accent);
  font-weight: 600;
}

.success-title {
  margin: 0;
  font-family: var(--nx-disp);
  font-size: 18px;
  font-weight: 700;
}

.success-copy {
  margin: 0;
  color: var(--nx-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- Footer ---------- */
.cs-footer {
  position: relative;
  z-index: 1;
  padding: 28px 24px 34px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--nx-faint);
  font-size: 13px;
}

.footer-brand {
  color: var(--nx-footer-brand);
  font-weight: 500;
}

.cs-footer .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #3a4450;
}

.cs-footer a {
  text-underline-offset: 3px;
}

.cs-footer a:hover {
  text-decoration: underline;
}

/* Animated equity line in the ambient chart — draws on left-to-right on load. */
.chart-line {
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
  animation: drawLine 2.6s cubic-bezier(0.2, 0, 0.1, 1) 0.2s forwards;
}

/* Reduced motion: theme.css disables the animation, which would otherwise
   leave the line stuck at dashoffset 1600 (invisible). Show it fully drawn
   instead — reduced motion must never hide content. */
@media (prefers-reduced-motion: reduce) {
  .chart-line {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  .capture form {
    flex-direction: column;
  }

  .capture input,
  .capture button {
    width: 100%;
  }
}

/* ---------- Page-scoped keyframes ---------- */
@keyframes glowPulse {
  0%, 100% {
    opacity: 0.55;
    transform: translateX(-50%) scale(0.98);
  }
  50% {
    opacity: 0.85;
    transform: translateX(-50%) scale(1.02);
  }
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

/* Save failure on the early-access form. role=alert, so it is announced; styled
   as a quiet correction rather than an alarm — the visitor did nothing wrong. */
.capture-error {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: #F2B8B5;
}
