/* Convergence Capital — Trading Terminal
   Deep slate surfaces, a faint grid, one slow price-path line, and a single
   electric-blue moment on the form. Restraint reads as confidence. */

:root {
  --bg:        #0B1220;   /* slate-950 base */
  --bg-2:      #0f172a;   /* slate-900 */
  --bg-3:      #1e293b;   /* slate-800 */
  --surface:   #0e1730;   /* input field */
  --surface-2: #101a34;   /* input field, hover */

  --heading:   #e2e8f0;   /* near-white */
  --body:      #94a3b8;   /* slate-400 — AA on --bg */
  --muted:     #7c8aa0;   /* dimmed, still >= 4.5:1 on --bg */

  --accent:     #3b82f6;  /* electric blue — button + focus ring only */
  --accent-hi:  #60a5fa;  /* hover lift */
  --accent-ink: #08101f;  /* text on the blue button (AA ~4.9:1) */
  --green:      #22c55e;  /* status dot only */

  --hairline: rgba(148, 163, 184, 0.12);
  --grid:     rgba(148, 163, 184, 0.045);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --radius: 10px;
  --maxw: 1180px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

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

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Base page glow: a soft slate lift toward the top, quiet toward the edges. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(30, 41, 59, 0.55) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  pointer-events: none;
}

/* Accessibility helpers ---------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Honeypot: off-screen, reachable to bots that ignore visual layout — but
   NOT display:none (per brief) and hidden from assistive tech. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Top bar ------------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--hairline);
  background: rgba(11, 18, 32, 0.72);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
}

.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--heading);
  border-radius: 6px;
}

.brand-glyph {
  width: 26px;
  height: 20px;
  color: var(--accent);
  flex: none;
}

.brand-word {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--heading);
}

.brand-sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.34em;
  color: var(--muted);
  padding-left: 0.1rem;
}

.access-link {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--body);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.access-link:hover {
  color: var(--heading);
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(148, 163, 184, 0.06);
}

/* Hero --------------------------------------------------------------------- */

main {
  flex: 1 1 auto;
  display: flex;
}

.hero {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: clamp(3rem, 10vh, 7rem) var(--pad);
  min-height: calc(100vh - 220px);
}

.hero-bg { position: absolute; inset: 0; }

/* Faint engineering grid, quieted toward the edges. */
.hero-grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 90% 78% at 50% 46%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 78% at 50% 46%, #000 40%, transparent 100%);
}

/* The signature: one slow price-path line (built + animated in app.js). */
.price-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}

.price-line path {
  fill: none;
  stroke: rgba(59, 130, 246, 0.16);
  stroke-width: 1.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* Lift the text off the line without hiding it. */
.hero-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 62% 58% at 50% 50%,
    rgba(11, 18, 32, 0.7) 0%,
    rgba(11, 18, 32, 0.28) 52%,
    transparent 82%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 680px;
  text-align: center;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.4rem;
}

.headline {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--heading);
  text-wrap: balance;
}

/* The "out" in "Without" is drawn as candlesticks — bullish green (#22c55e)
   turning to bearish red (#ef4444) — sitting inline in place of the word. The
   visually-hidden "out" text before it keeps the accessible name and SEO reading
   "Without the trader." */
.out-candles {
  height: 0.68em;
  width: auto;
  vertical-align: -0.05em;
}

.subline {
  margin: 1.4rem auto 0;
  max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  color: var(--body);
  text-wrap: pretty;
}

/* The four coy non-answers, strung together as a quiet system readout. Mono +
   letter-spacing echoes the eyebrow; generous leading spaces the phrases out. */
.subclose {
  margin: 1.9rem auto 0;
  max-width: 44rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  line-height: 2.2;
  color: var(--muted);
}

/* Form --------------------------------------------------------------------- */

.signup {
  margin: 2.4rem auto 0;
  max-width: 460px;
}

.field {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}

.email-input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  color: var(--heading);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

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

.email-input:hover { background: var(--surface-2); }

.email-input:focus {
  outline: none;
  background: var(--surface-2);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

.email-input[aria-invalid="true"] {
  border-color: rgba(148, 163, 184, 0.5);
}

.submit-btn {
  flex: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.85rem 1.4rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.05s ease, box-shadow 0.18s ease;
}

.submit-btn:hover {
  background: var(--accent-hi);
  border-color: var(--accent-hi);
}

.submit-btn:active { transform: translateY(1px); }

.submit-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.form-note {
  min-height: 1.2rem;
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: left;
}

.form-note.is-error { color: #cbd5e1; }

/* Success state ------------------------------------------------------------ */

.signup-success {
  margin: 2.4rem auto 0;
  max-width: 460px;
  text-align: center;
}

.success-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--heading);
  outline: none;
}

.success-title::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--green);
  vertical-align: middle;
}

.success-body { margin: 0.5rem 0 0; color: var(--body); }

/* Footer ------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 1.4rem var(--pad);
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
}

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  flex: none;
}

.status-text {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--body);
}

.foot-legal {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Motion ------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .eyebrow,
  .headline,
  .subline,
  .subclose,
  .signup {
    opacity: 0;
    animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .eyebrow  { animation-delay: 0.05s; }
  .headline { animation-delay: 0.15s; }
  .subline  { animation-delay: 0.30s; }
  .subclose { animation-delay: 0.40s; }
  .signup   { animation-delay: 0.52s; }

  .dot { animation: breathe 2.6s ease-in-out infinite; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); opacity: 0.85; }
  50%      { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);   opacity: 1; }
}

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

@media (max-width: 560px) {
  .field { flex-direction: column; }
  .submit-btn { width: 100%; }
  .brand-sub { display: none; }
  .hero { min-height: calc(100vh - 200px); }
  .form-note { text-align: center; }
}

/* Very wide screens: keep the composition centered, never stretched. */
@media (min-width: 2200px) {
  body { font-size: 18px; }
  .hero-inner { max-width: 760px; }
}
