/* Alex AI Signals -- the public homepage. Plain CSS: no script, no font or image from anywhere else.
   A cool instrument-panel page: the thesis beside one drawn chart (an idea followed on paper against the no-AI rule,
   then the first real trade); everything after it is quiet, left-aligned type. Phone first; wider screens add columns.
   Motion: one draw-in of the idea's line, and the steps' line filled by scroll where the browser supports it; both
   off under prefers-reduced-motion. */

:root {
  --paper: #f1f4f6;       /* the page */
  --panel: #e6ecf0;       /* the chart's and the steps' ground */
  --ink: #15222d;         /* text */
  --muted: #566775;       /* secondary text */
  --hair: #c9d3da;        /* rules and grid */
  --signal: #1d6a86;      /* the AI idea's line, links, the button */
  --on-signal: #f1f4f6;   /* text on the button */
  --rule: #9c6f33;        /* the no-AI yardstick */
  --band: rgba(29, 106, 134, 0.08);
  --display: "Charter", "Iowan Old Style", "Sitka Text", "Cambria", Georgia, serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.2rem;
  --step-4: clamp(2.4rem, 6vw, 3.9rem);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1820;
    --panel: #15212b;
    --ink: #e3eaef;
    --muted: #93a3b0;
    --hair: #263542;
    --signal: #62b4d1;
    --on-signal: #0f1820;
    --rule: #d1a15e;
    --band: rgba(98, 180, 209, 0.1);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--body);
}

a { color: var(--signal); text-underline-offset: 0.2em; }
a:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; }

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
}

.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 20; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* the header */
.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
}
.bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.8rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--step-1);
}
.mark { width: 1.75rem; height: 1.75rem; }
.mark rect { fill: none; stroke: var(--ink); stroke-width: 2; }
.mark path { fill: none; stroke: var(--signal); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bar nav { display: flex; align-items: center; gap: 1.25rem; }
.bar nav a:not(.button) { display: none; color: var(--muted); text-decoration: none; }
.bar nav a:not(.button):hover { color: var(--ink); }

.button {
  display: inline-block;
  background: var(--signal);
  color: var(--on-signal);
  text-decoration: none;
  padding: 0.65rem 1.25rem;
  border-radius: 999rem;
  font-weight: 600;
}
.button.small { padding: 0.4rem 0.95rem; font-size: 0.95rem; }
.button:hover { filter: brightness(1.08); }

/* the hero: the thesis beside the chart */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  padding-block: 2.5rem 2rem;
}
.hero h1 {
  font-size: var(--step-2);
  color: var(--muted);
  font-weight: 600;
}
.claim {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--step-4);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-top: 0.4rem;
  text-wrap: balance;
}
.promise { font-size: var(--step-1); color: var(--muted); margin-top: 1.25rem; max-width: 36ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 2rem; }
.note { margin-top: 1.25rem; font-size: 0.92rem; color: var(--muted); }

.chart { margin: 0; background: var(--panel); border-radius: 1.1rem; padding: 1.25rem 1.25rem 0.9rem; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid line { stroke: var(--hair); stroke-width: 1; }
.chart .band { fill: var(--band); }
.chart .band-edge { stroke: var(--signal); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0.7; }
.chart .idea { fill: none; stroke: var(--signal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .yard {
  fill: none; stroke: var(--rule); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 7 6;
}
.chart .dot { fill: var(--signal); stroke: var(--panel); stroke-width: 3; }
.chart text { fill: var(--muted); font: 500 12px var(--body); }
.chart text.strong { fill: var(--ink); font-weight: 600; }
.chart figcaption {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 0.6rem; font-size: 0.9rem; color: var(--muted);
}
.key { display: inline-flex; align-items: center; gap: 0.45rem; }
.key i { display: inline-block; width: 1.4rem; height: 0; border-top: 3px solid var(--signal); }
.key i.yard { border-top: 2.25px dashed var(--rule); }

/* the one orchestrated moment: the idea's line draws itself, then the trade dot lands */
@media (prefers-reduced-motion: no-preference) {
  .chart .idea { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.2s 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
  .chart .dot, .chart .trade-label { opacity: 0; animation: land 0.5s 2.4s ease-out forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes land { to { opacity: 1; } }

/* what it does: four quiet columns, no cards */
.features .wrap { padding-block: 1rem 3.5rem; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 2rem; }
.features .grid { border-top: 1px solid var(--hair); padding-top: 2rem; }
.features h3 { font-size: var(--step-1); margin-bottom: 0.5rem; }
.features p { color: var(--muted); font-size: 0.97rem; }

/* how it works: a true sequence, numbered and joined by a line */
.how { background: var(--panel); }
.how .wrap { padding-block: 3.5rem; }
.how h2, .measurement h2, .not h2 { font-size: var(--step-3); }
.lead { color: var(--muted); margin-top: 0.75rem; max-width: 52ch; font-size: var(--step-1); }
.steps {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  counter-reset: step;
  position: relative;
}
.steps li { counter-increment: step; position: relative; min-width: 0; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--signal);
  color: var(--signal);
  font: 700 1rem var(--body);
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
}
.steps h3 { font-size: var(--step-2); margin-bottom: 0.5rem; }
.steps p { color: var(--muted); font-size: 0.97rem; }

/* measurement: the label every result carries, drawn as a specimen tag */
.split { display: grid; grid-template-columns: 1fr; gap: 2.5rem; padding-block: 3.5rem; align-items: start; }
.prose { display: grid; gap: 1rem; margin-top: 1.5rem; max-width: 60ch; }
.tag { border: 1.5px solid var(--ink); border-radius: 0.9rem; padding: 1.5rem 1.6rem; background: var(--paper); position: relative; }
.tag::before {
  content: ""; position: absolute; top: 1.4rem; right: 1.4rem; width: 0.9rem; height: 0.9rem; border-radius: 50%;
  border: 1.5px solid var(--ink);
}
.tag h3 { font-size: var(--step-1); margin-bottom: 0.25rem; padding-right: 2rem; }
.tag .sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.1rem; }
.tag dl { margin: 0; }
.tag .row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding-block: 0.6rem;
  border-top: 1px dashed var(--hair); font-size: 0.95rem;
}
.tag dt { color: var(--muted); }
.tag dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.tag dd.wait { color: var(--rule); }

/* what it is not */
.not { border-top: 1px solid var(--hair); }
.not .wrap { padding-block: 3.5rem; }
.plain { margin-top: 1.5rem; }
.plain li { color: var(--muted); }
.plain strong { display: block; color: var(--ink); font-family: var(--display); font-size: var(--step-1); margin-bottom: 0.35rem; }

.foot { border-top: 1px solid var(--hair); }
.foot-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 2rem 3rem;
  color: var(--muted); font-size: 0.9rem;
}
.foot-inner p { max-width: 62ch; }

/* wider screens add columns */
@media (min-width: 40rem) {
  .bar nav a:not(.button) { display: inline; }
  .grid.four, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 60rem) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 3.5rem; padding-block: 4.5rem 3.5rem; }
  .grid.four, .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; padding-block: 4.5rem; }
  .how .wrap { padding-block: 4.5rem; }
  .steps::before, .steps::after {
    content: ""; position: absolute; left: 0; right: 0; top: 1.15rem; height: 2px;
  }
  .steps::before { background: var(--hair); }
  .steps::after { background: var(--signal); transform-origin: left; }
}

@supports (animation-timeline: view()) {
  @media (min-width: 60rem) and (prefers-reduced-motion: no-preference) {
    .steps::after { transform: scaleX(0); animation: fill linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }
  }
}
@keyframes fill { to { transform: scaleX(1); } }
