/* Market Flyover — base stylesheet.
   Tokens and components match docs/visual-direction.md exactly: strict
   black/off-white/grey, no accent color, Instrument Serif for display,
   Newsreader for everything else, pill buttons, hairline inputs. */

@font-face {
  font-family: "Instrument Serif";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/instrument-serif-400.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/newsreader-400.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/newsreader-500.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/newsreader-600.woff2") format("woff2");
}

:root {
  --bg: #050505;
  --panel: #6e6e6e;
  --panel-hover: #7c7c7c;
  --panel-2: #161616;
  --ink: #edeae4;
  --ink-dim: #a6a29a;
  --line: #3a3a38;
  --line-bright: #c9c5bc;
  --good: #7fae85;
  --bad: #b5745c;
  --radius-pill: 999px;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
.display {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

a {
  color: inherit;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- header ---------- */
header.site {
  padding: 34px 0 18px;
  background: linear-gradient(to bottom, #232323, var(--bg) 140%);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-dim);
}
.logo svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.logo span {
  font-family: "Newsreader", serif;
  font-size: 16px;
}
.site-nav a {
  font-family: "Newsreader", serif;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}

/* ---------- footer ---------- */
footer.site {
  background: var(--panel);
  color: var(--ink);
  padding: 40px 0;
  margin-top: 80px;
}
footer.site .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
footer.site .wordmark {
  font-family: "Instrument Serif", serif;
  font-size: 34px;
}
footer.site nav {
  display: flex;
  gap: 28px;
}
footer.site nav a {
  font-family: "Newsreader", serif;
  font-size: 15px;
  text-decoration: none;
}

/* ---------- form layout: two columns, fields left / pitch right ---------- */
.flyover-shell {
  display: grid;
  grid-template-columns: minmax(0, 480px) 1fr;
  gap: 64px;
  padding: 48px 0 40px;
  align-items: start;
}
.pitch h1 {
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.08;
  margin-bottom: 20px;
  text-wrap: balance;
}
.pitch p {
  font-size: 17px;
  color: var(--ink-dim);
  max-width: 46ch;
  margin: 0 0 14px;
}

.progress {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.progress .bar {
  width: 60px;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.progress .bar span {
  display: block;
  height: 100%;
  width: 50%;
  background: var(--ink-dim);
  transition: width 0.25s ease;
}
.progress[data-step="2"] .bar span {
  width: 100%;
}

.form-error-banner {
  border: 1px solid var(--bad);
  background: color-mix(in srgb, var(--bad) 12%, transparent);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 14.5px;
  margin-bottom: 22px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- fields ---------- */
form.flyover {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
fieldset {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
fieldset[hidden] {
  display: none;
}
.field label,
.group-label {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 9px;
}
.field label .req,
.group-label .req {
  color: var(--ink-dim);
  font-size: 13px;
  margin-left: 2px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line-bright);
  border-radius: 10px;
  padding: 13px 15px;
  color: var(--ink);
  font-family: "Newsreader", serif;
  font-size: 15px;
  appearance: none;
}
.field textarea {
  resize: vertical;
  min-height: 84px;
}
.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23C9C5BC'><path d='M5.5 7.5l4.5 5 4.5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-dim);
  opacity: 0.7;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--bad);
}
.field-error {
  font-size: 12.5px;
  color: var(--bad);
  margin-top: 6px;
  display: none;
}
.field.invalid .field-error {
  display: block;
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.check-pill {
  position: relative;
}
.check-pill input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.check-pill span {
  display: inline-flex;
  align-items: center;
  font-size: 13.5px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  color: var(--ink-dim);
}
.check-pill input:checked + span {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--panel-2);
}
.check-pill input:focus-visible + span {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

.optional-note {
  font-size: 13px;
  color: var(--ink-dim);
}

/* ---------- buttons ---------- */
.btn {
  font-family: "Newsreader", serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--panel);
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease;
}
.btn:hover {
  background: var(--panel-hover);
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line-bright);
}
.btn.ghost:hover {
  background: var(--panel-2);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
}
.skip-link {
  font-size: 13.5px;
  color: var(--ink-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Newsreader", serif;
  padding: 0;
  margin-left: auto;
}

/* ---------- confirmation page ---------- */
.confirm {
  padding: 90px 0 60px;
  max-width: 640px;
}
.confirm .eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--good);
  margin-bottom: 18px;
}
.confirm h1 {
  font-size: clamp(32px, 4vw, 46px);
  margin-bottom: 18px;
}
.confirm p {
  font-size: 17px;
  color: var(--ink-dim);
  max-width: 52ch;
}

@media (max-width: 860px) {
  .flyover-shell {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .pitch {
    order: -1;
  }
}

/* ---------- report page ---------- */
.report-shell {
  padding: 56px 0 40px;
}
.report-header {
  max-width: 760px;
  margin-bottom: 56px;
}
.report-header .eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 18px;
}
.report-header h1 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.1;
  margin-bottom: 16px;
  text-wrap: balance;
}
.report-header p {
  font-size: 17px;
  color: var(--ink-dim);
  max-width: 62ch;
  margin: 0 0 22px;
}

.report-section {
  margin-bottom: 56px;
}
.report-section h2 {
  font-size: 24px;
  margin-bottom: 8px;
}
.report-section .section-note {
  font-size: 14px;
  color: var(--ink-dim);
  max-width: 66ch;
  margin: 0 0 22px;
}

/* stat blocks */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 56px;
}
.stat {
  background: var(--panel-2);
  padding: 24px 22px;
}
.stat .n {
  font-family: "Instrument Serif", serif;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1;
}
.stat .l {
  font-size: 13px;
  color: var(--ink-dim);
  margin-top: 8px;
}

/* industry breakdown chart */
.chart {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.chart-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr 44px;
  align-items: center;
  gap: 12px;
}
.chart-row .name {
  font-size: 14px;
  color: var(--ink-dim);
}
.chart-track {
  height: 10px;
  background: var(--line);
  border-radius: 5px;
  overflow: hidden;
}
.chart-fill {
  height: 100%;
  background: var(--ink);
}
.chart-row:nth-child(2) .chart-fill { background: var(--line-bright); }
.chart-row:nth-child(3) .chart-fill { background: #a6a29a; }
.chart-row:nth-child(4) .chart-fill { background: #7c786f; }
.chart-row:nth-child(5) .chart-fill { background: #524f49; }
.chart-row:nth-child(n+6) .chart-fill { background: #3a3a38; }
.chart-row .pct {
  font-size: 13px;
  color: var(--ink-dim);
  text-align: right;
}

/* buying-signal tags */
.signal-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.signal-row {
  background: var(--panel-2);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.signal-row .company {
  font-size: 14.5px;
}
.signal-row .company .domain {
  color: var(--ink-dim);
  font-size: 13px;
  margin-left: 6px;
}
.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag {
  font-size: 12.5px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-pill);
  padding: 6px 13px;
  color: var(--ink-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.tag.positive {
  color: var(--ink);
}
.tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  flex: none;
}

/* sample contacts */
.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.contact-card {
  background: var(--panel-2);
  padding: 20px 20px;
}
.contact-card .name {
  font-size: 16px;
  margin-bottom: 3px;
}
.contact-card .title {
  font-size: 13.5px;
  color: var(--ink-dim);
  margin-bottom: 10px;
}
.contact-card .email {
  font-size: 13px;
  color: var(--ink);
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 6px;
}
.contact-card .email .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  flex: none;
}
.contact-card .email.unavailable {
  color: var(--ink-dim);
  font-style: italic;
}

/* projection + assumptions caption */
.assumptions-note {
  font-size: 12.5px;
  color: var(--ink-dim);
  margin-top: 10px;
}

/* primary CTA */
.report-cta {
  border-top: 1px solid var(--line);
  padding-top: 32px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.report-cta p {
  font-size: 15px;
  color: var(--ink-dim);
  margin: 0;
}

/* pending / polling state */
.pending-state {
  padding: 90px 0 60px;
  max-width: 620px;
}
.pending-state .pulse-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-dim);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}
.pending-state .pulse-label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.pending-state h1 {
  font-size: clamp(30px, 4vw, 42px);
  margin-bottom: 16px;
}
.pending-state p {
  font-size: 16px;
  color: var(--ink-dim);
  max-width: 54ch;
}

@media (max-width: 640px) {
  .chart-row {
    grid-template-columns: 90px 1fr 36px;
  }
}
