/* MacroAnalyst landing — sharp, instrumental, restrained.
   Aligned to the app's design tokens (Geist + JetBrains Mono, agent-orange accent). */

:root {
  /* ─── Surface (warm-tinted off-white, slightly cooler than paper) ─── */
  --bg:           #fafaf7;
  --bg-elev:      #ffffff;
  --bg-soft:      #f3f2ed;
  --bg-hatch:     #f6f5f0;

  /* ─── Ink ─── */
  --ink:          #1a1a1a;
  --ink-2:        #3a3a38;
  --ink-3:        #6e6d68;
  --ink-4:        #9a9893;
  --ink-5:        #c9c6bf;

  /* ─── Lines ─── */
  --line:         #e7e4dc;
  --line-2:       #d8d5cb;
  --line-strong:  #1a1a1a;

  /* ─── Accent (matches the agent orange the app uses) ─── */
  --accent:       #ea580c;
  --accent-deep:  #c2410c;
  --accent-soft:  rgba(234, 88, 12, 0.10);

  /* ─── Type ─── */
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* ─── Geometry ─── */
  --radius:       4px;
  --radius-lg:    6px;
  --maxw:         78rem;       /* wider container — denser feel */
  --gutter:       clamp(1rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
hr.rule {
  width: calc(100% - 2 * var(--gutter));
  max-width: var(--maxw);
  margin: 0 auto;
  border: 0;
  border-top: 1px solid var(--line);
}

/* ────────────────────── Mono / utility ────────────────────── */
.mono {
  font-family: var(--mono);
  font-feature-settings: "ss01", "ss02", "zero";
  font-size: 0.78em;
  letter-spacing: 0.01em;
}
.dim { color: var(--ink-3); }

.dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
}
.dot--accent {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ────────────────────── Nav ────────────────────── */
.nav {
  position: sticky;
  top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.012em;
  font-size: 15px;
}
.nav__mark {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--accent);
}
.nav__tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  margin-left: 2px;
}
.nav__links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  margin-right: 1rem;
}
.nav__links a {
  font-size: 13.5px;
  color: var(--ink-2);
  font-weight: 500;
}
.nav__links a:hover { color: var(--ink); }

/* ────────────────────── Buttons ────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius);
  font: 600 13.5px/1 var(--sans);
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 80ms ease;
}
.btn:active { transform: translateY(1px); }

.btn--solid {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn--solid:hover { background: #000; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn--ghost:hover {
  background: var(--bg-soft);
  border-color: var(--ink-4);
}

.btn--lg { height: 42px; padding: 0 18px; font-size: 14px; }
.btn--xl { height: 50px; padding: 0 22px; font-size: 15px; }

.btn__kbd {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  margin-left: 2px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--bg) 18%, transparent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 10px;
}

/* ────────────────────── Type system ────────────────────── */
.display {
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.94;
  margin: 0;
  color: var(--ink);
}
.display__low {
  color: var(--ink-3);
  font-weight: 500;
}
.h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.85rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.02;
  margin: 0;
}
.h2__low { color: var(--ink-3); font-weight: 500; }

.lede {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--ink-2);
  max-width: 38rem;
  line-height: 1.55;
  margin: 1.2rem 0 1.6rem;
}
.lede--compact { margin-top: 0.75rem; max-width: 32rem; }

.eyebrow {
  display: inline-block;
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 1rem;
}

/* ────────────────────── Hero ────────────────────── */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.hero__band {
  display: flex;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.meta-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
  font-size: 12.5px;
  color: var(--ink-2);
}
.meta-row__label { font-weight: 500; }
.meta-row__sep { color: var(--ink-4); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.hero__split {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.hero__copy { min-width: 0; }
.hero__copy .lede { max-width: 34rem; }

.hero__actions {
  display: flex;
  gap: 10px;
  margin-top: 0.5rem;
}
.hero__actions--center {
  justify-content: center;
}

.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.hero__facts--wide {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}
.hero__facts > div {
  padding: 1rem 1rem 0 0;
  border-right: 1px solid var(--line);
}
.hero__facts > div:last-child { border-right: 0; padding-right: 0; }
.hero__facts dt {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.4rem;
}
.hero__facts dd {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Hero product shot: cropped browser frame beside headline */
.hero__chart {
  max-width: none;
  margin: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.02),
    0 28px 80px -36px rgba(20, 20, 18, 0.28),
    0 10px 28px -16px rgba(20, 20, 18, 0.14);
}
.chart__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 14px 20px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.chart__id { display: inline-flex; align-items: baseline; gap: 12px; min-width: 0; }
.chart__ticker {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.chart__title {
  font-size: 13.5px;
  color: var(--ink-2);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart__source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
}
.hero__shot-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  transform: none;
  background: var(--bg-elev);
}

/* Legacy frame (kept in case used elsewhere) */
.hero__shot {
  margin: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.02),
    0 24px 60px -28px rgba(20, 20, 18, 0.22),
    0 8px 24px -12px rgba(20, 20, 18, 0.12);
}
.shot__chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.shot__dots { display: inline-flex; gap: 6px; }
.shot__dots span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ink-5);
}
.shot__url {
  flex: 1;
  font-size: 11.5px;
  color: var(--ink-3);
  text-align: center;
  letter-spacing: 0.02em;
}
.shot__badge {
  font-size: 10px;
  color: var(--accent);
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hero__shot img {
  width: 100%;
  display: block;
}
.hero__shot figcaption {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
  background: var(--bg-elev);
}

/* ────────────────────── Prompt strip ────────────────────── */
.strip {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
  margin: 0;
}
.strip__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
}
.strip__label {
  font-size: 11px;
  color: var(--ink-4);
}
.strip__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.strip__list li {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.strip__num { color: var(--accent); font-weight: 500; }

/* ────────────────────── Sections (shared) ────────────────────── */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 7vw, 6.5rem) var(--gutter);
}
.section__head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  max-width: 42rem;
}

/* ────────────────────── Workflow — asymmetric grid ────────────────────── */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.step {
  grid-column: span 3;
  background: var(--bg-elev);
  padding: clamp(1.25rem, 2.5vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 220px;
}
/* Row 1: step1 (2) + step2 wide (4) = 6
   Row 2: step3 (4) + step4 audit (2) = 6 */
.steps > .step:nth-child(1) { grid-column: span 2; }
.step--wide  { grid-column: span 4; }
.steps > .step:nth-child(3) { grid-column: span 4; }
.step--audit { grid-column: span 2; }

.step__num {
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.16em;
}
.step__body { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.step h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.step p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  max-width: 30rem;
  line-height: 1.55;
}
.step__chip {
  margin-top: auto;
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg-soft);
  color: var(--ink-3);
  font-size: 11px;
}
.step__codeline {
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-hatch);
  font-size: 12px;
  color: var(--ink-2);
  overflow-x: auto;
  white-space: nowrap;
}
.step__codeline .kw { color: var(--accent-deep); }

/* ────────────────────── Catalog ────────────────────── */
.section--catalog { padding-bottom: 0; }
.catalog__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
}
.catalog__lead .h2 { max-width: 18ch; }

.catalog__panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  overflow: hidden;
}
.catalog__panel-head,
.catalog__rows li {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 10px 16px;
  font-size: 12.5px;
}
.catalog__panel-head {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.catalog__rows { list-style: none; margin: 0; padding: 0; }
.catalog__rows li { border-top: 1px solid var(--line); }
.catalog__rows li:first-child { border-top: 0; }
.catalog__rows .prov {
  color: var(--ink);
  font-weight: 600;
}

/* Ticker — full-bleed, slow scroll */
.ticker {
  margin-top: clamp(2.5rem, 4vw, 4rem);
  border-block: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
  position: relative;
}
.ticker::before, .ticker::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 12%;
  z-index: 2;
  pointer-events: none;
}
.ticker::before { left: 0;  background: linear-gradient(to right, var(--bg), transparent); }
.ticker::after  { right: 0; background: linear-gradient(to left,  var(--bg), transparent); }

.ticker__track {
  display: inline-flex;
  gap: 1.75rem;
  padding: 14px 0;
  white-space: nowrap;
  font-size: 13px;
  color: var(--ink-2);
  animation: ticker 48s linear infinite;
  letter-spacing: 0.04em;
}
.ticker__track span:nth-child(odd) { color: var(--ink); font-weight: 500; }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
}

/* ────────────────────── For desks ────────────────────── */
.desk__split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}

.quote {
  margin: 0;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  position: relative;
}
.quote::before {
  content: "“";
  position: absolute;
  top: 8px; left: 18px;
  font-family: var(--sans);
  font-size: 90px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.25;
  pointer-events: none;
}
.quote__body {
  position: relative;
  margin: 0 0 1.25rem;
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.quote__by {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11.5px;
}

.desk__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
  overflow: hidden;
}
.desk__list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) minmax(0, 2fr);
  align-items: baseline;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-elev);
  font-size: 14px;
  color: var(--ink-2);
}
.desk__list strong {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.012em;
}

/* ────────────────────── CTA ────────────────────── */
.cta {
  padding: clamp(4rem, 7vw, 7rem) var(--gutter);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 100% 0%, var(--accent-soft) 0%, transparent 60%),
    var(--bg);
}
.cta__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.cta__h {
  font-size: clamp(2.25rem, 5.2vw, 4.25rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0 0 2rem;
  max-width: 22ch;
}
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1.25rem;
}
.cta__fine { font-size: 11.5px; }

/* ────────────────────── Footer ────────────────────── */
.foot {
  border-top: 1px solid var(--line);
  padding: 18px var(--gutter);
}
.foot__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 13px;
  color: var(--ink-3);
}
.foot__brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.foot__brand .nav__mark { width: 18px; height: 18px; }
.foot__links { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; }
.foot__links a:hover { color: var(--ink); }

/* ────────────────────── Responsive ────────────────────── */
@media (max-width: 980px) {
  .nav__links { display: none; }
  .hero__split { grid-template-columns: 1fr; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__shot { order: -1; }
  .catalog__grid { grid-template-columns: 1fr; }
  .desk__split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step, .step--wide, .step--audit { grid-column: span 2; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .strip__inner { grid-template-columns: 1fr; gap: 0.6rem; }
  .hero__facts { grid-template-columns: 1fr 1fr; }
  .hero__facts > div:nth-child(2) { border-right: 0; }
  .hero__facts > div:nth-child(3) { grid-column: span 2; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 0.5rem; }
  .cta__h { font-size: clamp(1.9rem, 9vw, 3rem); }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; justify-content: center; }
}

/* Selection */
::selection {
  background: var(--accent);
  color: #fff;
}
