/* Lastro — landing page
   Palette: warm ivory paper, near-black ink, one clay accent. Editorial/legal register. */

:root {
  --ink:          #191817;
  --ink-soft:     #403c35;
  --ink-muted:    #655f52;
  --paper:        #faf9f5;
  --paper-alt:    #f0eee6;
  --surface:      #ffffff;
  --rule:         #e6e1d4;
  --rule-strong:  #cfc8b6;
  --clay:         #b04e22;
  --clay-deep:    #8f3a14;
  --clay-soft:    #cc6b45;
  --clay-tint:    #f6e7de;
  --on-clay:      #fffdf9;
  --green:        #2f6f4f;

  --font-display: "Newsreader", ui-serif, Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap:  1120px;
  --pad:   24px;
  --radius: 4px;

  color-scheme: light;
}

/* ---------- base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.75rem, 7.4vw, 4.75rem); line-height: 1.04; letter-spacing: -0.028em; }
h2 { font-size: clamp(1.875rem, 3.8vw, 2.75rem); letter-spacing: -0.02em; }
h3 { font-size: 1.125rem; font-family: var(--font-body); font-weight: 600; line-height: 1.35; letter-spacing: -0.008em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--clay); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

b, strong { font-weight: 600; }

code { font-family: var(--font-mono); font-size: 0.875em; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--pad);
}
.sep { color: var(--rule-strong); margin: 0 0.45em; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 245, 0.9);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.brand-mark { width: 24px; height: 24px; color: var(--clay); flex: none; }
.brand-name { line-height: 1; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.9375rem;
}
.header-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}
.header-nav a:hover { color: var(--ink); border-bottom-color: var(--clay); }

@media (max-width: 720px) {
  .header-nav a { display: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: clamp(64px, 10vw, 124px) 0 clamp(56px, 8vw, 92px);
  overflow: hidden;
}

/* plumb-line motif: a single anchored vertical rule, only where it has room */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% + min(38vw, 470px));
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, rgba(176, 78, 34, 0) 0%, rgba(176, 78, 34, 0.42) 60%, rgba(176, 78, 34, 0.04) 100%);
  pointer-events: none;
}
@media (max-width: 900px) {
  .hero::before { display: none; }
}

.hero-inner { position: relative; max-width: 900px; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 1em;
}

.hero h1 { color: var(--ink); margin-bottom: 0.34em; }

.lede {
  font-size: clamp(1.0625rem, 2.2vw, 1.375rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 1.5em;
}
.lede strong { color: var(--ink); font-weight: 600; }

.badge-row { margin-bottom: 1.75em; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(176, 78, 34, 0.3);
  background: var(--clay-tint);
  color: var(--clay-deep);
  border-radius: 999px;
  padding: 6px 15px 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
}
.badge-icon { width: 18px; height: 18px; flex: none; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 2.75em;
}

.hero-facts {
  list-style: none;
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.hero-facts span {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  border-radius: var(--radius);
  padding: 12px 22px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--on-clay);
}
.btn-primary:hover { background: var(--clay-deep); border-color: var(--clay-deep); color: var(--on-clay); }

.btn-ghost {
  border-color: var(--rule-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: rgba(25, 24, 23, 0.04); }

/* ---------- sections ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--paper-alt); border-block: 1px solid var(--rule); }

.section-lede {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: 64ch;
  margin-bottom: 2.25em;
}

.note {
  margin-top: 2rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-muted);
  border-left: 3px solid var(--rule-strong);
  padding-left: 16px;
  max-width: 72ch;
}
.note b { color: var(--ink); }
.note-warning { border-left-color: var(--clay-soft); }

/* ---------- steps ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.step {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
}

.step-number {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--clay-deep);
  background: var(--clay-tint);
  border: 1px solid rgba(176, 78, 34, 0.22);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 18px;
}

.step h3 { margin-bottom: 0.4em; }
.step > p:not(.step-number) { color: var(--ink-soft); font-size: 0.9375rem; }

/* stylized (non-screenshot) UI illustrations */
.mock {
  position: relative;
  margin-top: auto;   /* aligns the illustrations across cards of unequal text */
  padding: 34px 14px 14px;
  background: #fbfaf6;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}
.mock-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 22px;
  background: var(--paper-alt);
  border-bottom: 1px solid var(--rule);
  border-radius: var(--radius) var(--radius) 0 0;
}
.mock-bar::before {
  content: "";
  position: absolute;
  top: 8px; left: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rule-strong);
  box-shadow: 11px 0 0 var(--rule-strong), 22px 0 0 var(--rule-strong);
}

.mock-list { list-style: none; margin: 0; padding: 0; }
.mock-list li {
  padding: 7px 10px;
  border-radius: 3px;
  color: var(--ink-muted);
}
.mock-list li.is-active {
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
}

.mock-label {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 4px 0 6px;
}
.mock-input {
  background: var(--surface);
  border: 1px solid var(--clay);
  border-radius: 3px;
  padding: 9px 10px;
  margin: 0 0 12px;
  word-break: break-all;
  line-height: 1.4;
}
.mock-input code { color: var(--ink); }
.mock-buttons { display: flex; justify-content: flex-end; gap: 8px; margin: 0; }
.mock-btn, .mock-btn-ghost {
  border-radius: 3px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 500;
}
.mock-btn { background: var(--ink); color: var(--paper); }
.mock-btn-ghost { border: 1px solid var(--rule-strong); color: var(--ink-muted); }

.mock-connected {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink);
  margin: 6px 0 10px;
}
.mock-connected .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}
.mock-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.mock-tools code {
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 3px 8px;
  color: var(--ink-soft);
}

/* ---------- example / chat ---------- */

.chat {
  display: grid;
  gap: 16px;
  max-width: 860px;
}

.bubble {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px 24px;
  background: var(--surface);
}

.bubble-who {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 0.75em;
}

.bubble-user {
  background: var(--paper-alt);
  border-color: var(--rule-strong);
  color: var(--ink-soft);
}
.bubble-user .bubble-who { color: var(--clay); }
.bubble-user .bubble-text {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(1.0625rem, 2.2vw, 1.3125rem);
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
}

.bubble-ai { border-left: 3px solid var(--clay); }
.bubble-ai .bubble-text { color: var(--ink-soft); }
.bubble-ai .bubble-text b { color: var(--ink); }

.bubble-conclusion {
  border-top: 1px solid var(--rule);
  padding-top: 0.9em;
  color: var(--ink);
}

/* kept as a non-atomic inline so the marker never wraps away from its sentence */
.cite-ref {
  display: inline;
  padding: 1px 4px;
  margin-left: 3px;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  vertical-align: super;
  color: var(--clay-deep);
  background: var(--clay-tint);
  border: 1px solid rgba(176, 78, 34, 0.22);
  border-radius: 3px;
  text-decoration: none;
}
.cite-ref:hover { background: var(--clay-deep); border-color: var(--clay-deep); color: var(--on-clay); }

.citations {
  list-style: none;
  counter-reset: cite;
  margin: 26px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 16px;
}

.citation {
  counter-increment: cite;
  position: relative;
  padding-left: 34px;
  scroll-margin-top: 90px;
}
.citation::before {
  content: counter(cite);
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 3px;
  background: var(--clay-tint);
  border: 1px solid rgba(176, 78, 34, 0.22);
  color: var(--clay-deep);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.citation:target::before { background: var(--clay-deep); border-color: var(--clay-deep); color: var(--on-clay); }

.citation-title { margin-bottom: 0.35em; font-weight: 500; }
.citation-title a { color: var(--ink); text-decoration-color: var(--clay-soft); }
.citation-title a:hover { color: var(--clay); }

.citation-quote {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
  border-left: 2px solid var(--rule-strong);
  padding-left: 12px;
  margin-bottom: 0.5em;
}

.citation-meta {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin: 0;
}
.citation-meta .source-domain {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1px 6px;
  color: var(--ink-soft);
}
.citation-meta time { white-space: nowrap; }

/* ---------- status table ---------- */

.legend {
  font-size: 0.875rem;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 2rem;
}
.legend-note { flex-basis: 100%; }

.table-hint {
  display: none;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin: 0 0 8px;
}

.pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}
.pill-planned {
  background: var(--paper-alt);
  border: 1px solid var(--rule-strong);
  color: var(--ink-muted);
}
.pill-next {
  background: var(--clay-tint);
  border: 1px solid rgba(176, 78, 34, 0.28);
  color: var(--clay-deep);
}
.section-alt .pill-planned { background: #e7e2d6; }

.table-title {
  margin: 2.5rem 0 0.75rem;
  font-size: 0.8125rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.status-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.9375rem;
  text-align: left;
}
.status-table th, .status-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.status-table thead th {
  background: var(--paper-alt);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
  white-space: nowrap;
}
.status-table tbody tr:last-child th,
.status-table tbody tr:last-child td { border-bottom: none; }
.status-table tbody th {
  font-weight: 500;
  color: var(--ink);
  width: 26%;
}
.status-table tbody td { color: var(--ink-soft); }
.status-table td:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.status-table tbody tr:hover { background: #faf8f2; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--paper-alt);
  border-top: 1px solid var(--rule);
  padding: 36px 0;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}
.footer-inner { display: grid; gap: 10px; }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.125rem;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
}
.footer-brand .brand-mark { width: 20px; height: 20px; color: var(--clay); }

.footer-privacy { margin: 0; }
.footer-privacy b { color: var(--ink); }

.footer-legal { margin: 0; font-size: 0.8125rem; color: var(--ink-muted); }

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  .table-hint { display: block; }
  .legend .sep { display: none; }
  .legend { gap: 6px 10px; }
}

@media (max-width: 480px) {
  :root { --pad: 18px; }
  body { font-size: 16px; }
  .bubble { padding: 18px 16px; }
  .step { padding: 22px 18px; }
  .citation { padding-left: 30px; }
  .citation-meta .sep { display: none; }
  .citation-meta > span, .citation-meta > time { display: inline-block; margin-right: 8px; }
}

@media print {
  .site-header, .hero-actions { display: none; }
  body { background: #fff; color: #000; }
  .hero { background: #fff; }
  .hero::before { display: none; }
  .section-alt, .site-footer { background: #fff; }
}
