/* Trignaly landing — brand foundations
   Inkwell #0B1624 · Deep Slate #17283A · Research Paper #F7F7F3 · Fog #DCE2E8
   Accents (sparingly): Deep Teal #087B6D · Signal Teal #36BFA3 · Evidence Blue #3154C4
   ~80% foundations / 15% surfaces / 5% signal
*/

:root {
  --inkwell: #0b1624;
  --deep-slate: #17283a;
  --research-paper: #f7f7f3;
  --fog: #dce2e8;
  --deep-teal: #087b6d;
  --signal-teal: #36bfa3;
  --evidence-blue: #3154c4;

  --text: var(--inkwell);
  --text-muted: #3d4f63;
  --surface: #ffffff;
  --surface-alt: var(--research-paper);
  --border: var(--fog);
  --accent: var(--deep-teal);
  --accent-hover: #066357;
  --focus: var(--evidence-blue);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --measure: 38rem;
  --measure-wide: 56rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 5.5rem;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow-soft: 0 1px 2px rgba(11, 22, 36, 0.04), 0 8px 24px rgba(11, 22, 36, 0.04);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface-alt);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -3rem;
  z-index: 100;
  padding: var(--space-xs) var(--space-sm);
  background: var(--inkwell);
  color: var(--research-paper);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.875rem;
}

.skip-link:focus {
  top: var(--space-sm);
}

.wrap {
  width: min(100% - 2.5rem, var(--measure-wide));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--research-paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  gap: var(--space-md);
}

.wordmark {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--inkwell);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--inkwell);
}

.nav {
  display: flex;
  gap: var(--space-lg);
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--inkwell);
}

/* —— Typography helpers —— */
.eyebrow {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--deep-teal);
}

.provenance {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--inkwell);
}

h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  max-width: 18ch;
}

h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  max-width: 28ch;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.hero-lead,
.section-lead {
  max-width: var(--measure);
  color: var(--text-muted);
}

.hero-lead {
  margin: var(--space-md) 0 0;
  font-size: 1.125rem;
  line-height: 1.55;
}

.hero-support {
  margin: var(--space-sm) 0 0;
  max-width: var(--measure);
  color: var(--text-muted);
  font-size: 1rem;
}

.section-lead {
  margin: var(--space-sm) 0 0;
  font-size: 1.05rem;
}

.section-head {
  margin-bottom: var(--space-xl);
}

/* —— Hero —— */
.hero {
  padding: var(--space-2xl) 0 var(--space-xl);
  background:
    linear-gradient(180deg, var(--research-paper) 0%, #eef1f4 100%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: var(--measure-wide);
}

.hero-actions {
  margin-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
}

.audience-cue {
  margin: 0;
  max-width: 28ch;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.signal-trace {
  margin: var(--space-xl) 0 0;
  padding: var(--space-md) 0 0;
  border-top: 1px solid var(--border);
  max-width: 40rem;
}

.trace-line {
  stroke: color-mix(in srgb, var(--deep-teal) 55%, var(--fog));
}

.trace-dot {
  fill: var(--signal-teal);
  opacity: 0.7;
}

.signal-trace figcaption {
  margin-top: var(--space-sm);
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.975rem;
  font-weight: 550;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--deep-teal);
  color: #f5fbfa;
  border-color: var(--deep-teal);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #f5fbfa;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* —— Research chain —— */
.chain {
  padding: var(--space-2xl) 0;
  background: var(--surface);
}

.chain-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 720px) {
  .chain-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .chain-steps {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
  }
}

.step {
  padding: var(--space-md);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.step-index {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--deep-teal);
}

.step h3 {
  margin-bottom: var(--space-xs);
}

.step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.chain-note {
  margin: var(--space-xl) 0 0;
  max-width: var(--measure);
  padding: var(--space-md);
  border-left: 3px solid var(--deep-teal);
  background: color-mix(in srgb, var(--research-paper) 80%, white);
  font-size: 0.975rem;
  color: var(--text-muted);
}

/* —— Waitlist —— */
.waitlist {
  padding: var(--space-2xl) 0;
  background: var(--deep-slate);
  color: var(--fog);
}

.waitlist .eyebrow {
  color: var(--signal-teal);
}

.waitlist h2,
.waitlist h3 {
  color: var(--research-paper);
}

.waitlist .section-lead {
  color: color-mix(in srgb, var(--fog) 85%, white);
}

.waitlist-inner {
  max-width: 28rem;
}

.waitlist-form {
  display: grid;
  gap: var(--space-md);
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--research-paper);
}

.optional {
  font-weight: 400;
  color: color-mix(in srgb, var(--fog) 70%, transparent);
}

.field input,
.field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--fog) 35%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--inkwell) 55%, var(--deep-slate));
  color: var(--research-paper);
  font-family: inherit;
  font-size: 1rem;
}

.field input::placeholder {
  color: color-mix(in srgb, var(--fog) 55%, transparent);
}

.field input:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--signal-teal);
  outline-offset: 2px;
  border-color: var(--signal-teal);
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23DCE2E8' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

.field select option {
  background: var(--deep-slate);
  color: var(--research-paper);
}

.field-hint {
  margin: 0;
  font-size: 0.8125rem;
  color: color-mix(in srgb, var(--fog) 65%, transparent);
}

.field-error {
  margin: 0;
  font-size: 0.8125rem;
  color: #f0b4a8;
}

.field.is-invalid input {
  border-color: #e08a7a;
}

.waitlist .btn-primary {
  justify-self: start;
  margin-top: var(--space-xs);
}

.waitlist-success {
  padding: var(--space-lg);
  border: 1px solid color-mix(in srgb, var(--signal-teal) 40%, transparent);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--inkwell) 40%, var(--deep-slate));
}

.waitlist-success h3 {
  margin-bottom: var(--space-xs);
}

.waitlist-success p {
  margin: 0 0 var(--space-sm);
  color: color-mix(in srgb, var(--fog) 90%, white);
}

.waitlist-success .provenance {
  margin: 0;
  color: var(--signal-teal);
}

/* —— Footer —— */
.site-footer {
  padding: var(--space-xl) 0 var(--space-lg);
  background: var(--inkwell);
  color: color-mix(in srgb, var(--fog) 75%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--deep-slate) 80%, black);
}

.footer-brand {
  margin: 0 0 var(--space-sm);
  font-weight: 600;
  color: var(--research-paper);
  letter-spacing: -0.02em;
}

.footer-disclaimer {
  margin: 0 0 var(--space-md);
  max-width: 42rem;
  font-size: 0.875rem;
  line-height: 1.55;
}

.footer-meta {
  margin: 0;
}

/* Honeypot — visually hidden, still in DOM for bots */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.privacy-line {
  margin-top: 0.25rem;
}
