/* jlit · rx marketing site — self-contained, no build step, system fonts only.
   Identity is borrowed from the console itself: the warm jlit family, the
   cool rx family, and the ledger-row vocabulary (tool column · verb chip ·
   artifact chip). Tokens first; both themes are first-class. */

/* Single theme by choice: white paper, dark ink — the printed-page look
   that suits a literature tool; committed regardless of OS setting. */
:root {
  color-scheme: light;

  --paper: hsl(0 0% 100%);
  --panel: hsl(40 25% 97%);
  --ink: hsl(30 15% 13%);
  --ink-2: hsl(30 8% 38%);
  --ink-3: hsl(30 6% 56%);
  --line: hsl(35 12% 88%);

  /* tool families (mirrors ui/app/globals.css, light mode) */
  --jlit: hsl(25 85% 40%);
  --jlit-2: hsl(355 65% 33%);
  --jlit-3: hsl(45 100% 26%);
  --rx: hsl(222 52% 44%);
  --rx-2: hsl(185 90% 25%);
  --rx-3: hsl(142 65% 24%);

  --read: hsl(262 55% 48%);
  --write: hsl(142 60% 30%);

  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

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

.login-error {
  border: 1px solid hsl(355 55% 78%);
  border-radius: 6px;
  background: hsl(355 70% 97%);
  color: hsl(355 65% 30%);
  margin: 0;
  padding: 10px 12px;
}

/* --------------------------------------------------------- machine startup */

.starting-main {
  min-height: calc(100vh - 82px);
  display: grid;
  place-items: center;
  padding: 48px 24px;
}

.starting-card {
  width: min(100%, 540px);
  text-align: center;
}

.starting-card h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 7vw, 54px);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 12px 0 18px;
}

.starting-status {
  color: var(--ink-2);
  min-height: 1.6em;
}

.machine-loader {
  width: 96px;
  height: 96px;
  margin: 0 auto 32px;
  position: relative;
}

.machine-core {
  position: absolute;
  inset: 31px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--jlit), var(--rx));
  box-shadow: 0 0 0 7px var(--paper), 0 0 0 8px var(--line);
  animation: machine-pulse 1.8s ease-in-out infinite;
}

.machine-orbit {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.machine-orbit::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--jlit);
  top: -4px;
  left: calc(50% - 4px);
}

.orbit-one {
  inset: 14px;
  animation: machine-spin 2.4s linear infinite;
}

.orbit-two {
  inset: 2px;
  animation: machine-spin 3.8s linear infinite reverse;
}

.orbit-two::after {
  background: var(--rx);
}

.starting-track {
  height: 2px;
  overflow: hidden;
  background: var(--line);
  margin: 28px auto 24px;
  width: min(100%, 360px);
}

.starting-track span {
  display: block;
  height: 100%;
  width: 38%;
  background: linear-gradient(90deg, var(--jlit), var(--rx));
  animation: machine-track 1.5s ease-in-out infinite;
}

@keyframes machine-spin {
  to { transform: rotate(360deg); }
}

@keyframes machine-pulse {
  50% { transform: scale(0.82); opacity: 0.75; }
}

@keyframes machine-track {
  from { transform: translateX(-110%); }
  to { transform: translateX(370%); }
}

@media (prefers-reduced-motion: reduce) {
  .machine-core,
  .machine-orbit,
  .starting-track span {
    animation-duration: 8s;
  }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.wordmark {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.wordmark .j {
  color: var(--jlit);
}

.wordmark .dot {
  color: var(--ink-3);
}

.wordmark .r {
  color: var(--rx);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13.5px;
}

/* :not(.btn): plain links only — `.site-nav a` would out-specify
   .btn-primary and gray out the Sign in button's text. */
.site-nav a:not(.btn) {
  color: var(--ink-2);
  text-decoration: none;
}

.site-nav a:not(.btn):hover {
  color: var(--ink);
}

.site-nav a.btn {
  text-decoration: none;
}

.btn {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--ink-3);
}

.btn-primary {
  background: var(--jlit);
  border-color: var(--jlit);
  color: hsl(0 0% 100%);
}

.btn-primary:hover {
  filter: brightness(1.08);
  border-color: var(--jlit);
}

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

.hero {
  padding: 84px 0 30px;
}

.hero-kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 18px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 5.2vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  max-width: 17ch;
  text-wrap: balance;
}

.hero h1 .warm {
  color: var(--jlit);
}

.hero h1 .cool {
  color: var(--rx);
}

.hero-sub {
  max-width: 58ch;
  margin: 0 0 30px;
  font-size: 17.5px;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 64px;
}

.hero-actions .fine {
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ------------------------------------------------- the ledger hero prop */
/* A real depiction of the console's transcript ledger, built in CSS:
   tool column · verb chip · text · result. Filled chips are verbs,
   outlined chips are artifacts — the product's actual form vocabulary. */

.ledger {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 10px 0 6px;
  font-family: var(--mono);
  font-size: 12.5px;
  overflow-x: auto;
  box-shadow: 0 18px 44px -30px rgb(0 0 0 / 0.45);
}

.ledger-title {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 2px 16px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ledger-title .session {
  color: var(--ink-2);
  text-transform: none;
  letter-spacing: 0;
}

.lrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5.5px 16px;
  white-space: nowrap;
}

.lrow + .lrow {
  border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}

.ltool {
  flex: none;
  width: 34px;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 3px;
  padding: 1.5px 0;
}

.ltool.jlit {
  color: var(--jlit);
  background: color-mix(in srgb, var(--jlit) 12%, transparent);
}

.ltool.rx {
  color: var(--rx);
  background: color-mix(in srgb, var(--rx) 12%, transparent);
}

.ltool.sys {
  color: var(--ink-3);
  background: color-mix(in srgb, var(--ink-3) 12%, transparent);
}

.chip {
  flex: none;
  padding: 1.5px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chip.f-jlit {
  color: var(--paper);
  background: var(--jlit);
}

.chip.f-jlit2 {
  color: var(--paper);
  background: var(--jlit-2);
}

.chip.f-jlit3 {
  color: var(--paper);
  background: var(--jlit-3);
}

.chip.f-rx {
  color: var(--paper);
  background: var(--rx);
}

.chip.f-rx3 {
  color: var(--paper);
  background: var(--rx-3);
}

.chip.t-read {
  color: var(--read);
  background: transparent;
  padding-left: 0;
}

.chip.t-write {
  color: var(--write);
  background: transparent;
  padding-left: 0;
}

.aref {
  flex: none;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
}

.aref.paper {
  color: var(--jlit);
  border: 1px solid color-mix(in srgb, var(--jlit) 45%, transparent);
  background: color-mix(in srgb, var(--jlit) 6%, transparent);
}

.aref.run {
  color: var(--rx);
  border: 1px solid color-mix(in srgb, var(--rx) 45%, transparent);
  background: color-mix(in srgb, var(--rx) 6%, transparent);
}

.aref.finding {
  color: var(--rx-3);
  border: 1px solid color-mix(in srgb, var(--rx-3) 45%, transparent);
  background: color-mix(in srgb, var(--rx-3) 6%, transparent);
}

.ltext {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-2);
}

.ltext b {
  color: var(--ink);
  font-weight: 600;
}

.lresult {
  margin-left: auto;
  flex: none;
  color: var(--ink-3);
  font-size: 11.5px;
}

.lresult .ok {
  color: var(--write);
}

.lresult .metric {
  color: var(--rx);
  font-weight: 700;
}

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

.section {
  padding: 72px 0 8px;
}

.section-kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.section-kicker.warm {
  color: var(--jlit);
}

.section-kicker.cool {
  color: var(--rx);
}

.section-kicker.neutral {
  color: var(--ink-3);
}

.section h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  margin: 0 0 14px;
  max-width: 26ch;
  text-wrap: balance;
}

.section .lede {
  max-width: 62ch;
  color: var(--ink-2);
  margin: 0 0 34px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 20px 22px 18px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 650;
}

.card p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}

.card .mono {
  font-family: var(--mono);
  font-size: 12.5px;
}

.cite-demo {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-2);
}

.cite-chip {
  display: inline-block;
  padding: 0 6px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--jlit);
  border: 1px solid color-mix(in srgb, var(--jlit) 45%, transparent);
  background: color-mix(in srgb, var(--jlit) 7%, transparent);
  white-space: nowrap;
}

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

.site-footer {
  margin-top: 84px;
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  font-size: 13px;
  color: var(--ink-3);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- login */

.login-main {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 34px 34px 28px;
  box-shadow: 0 24px 60px -40px rgb(0 0 0 / 0.5);
}

.login-card .wordmark {
  font-size: 22px;
}

.login-card h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  margin: 16px 0 6px;
}

.login-card .sub {
  margin: 0 0 26px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
}

.field input:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--rx) 55%, transparent);
  outline-offset: 1px;
  border-color: var(--rx);
}

.login-card .btn-primary {
  width: 100%;
  padding: 11px 16px;
  font-size: 14.5px;
  margin-top: 6px;
}

.login-fine {
  margin: 18px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-3);
}

.login-alt {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
}

@media (prefers-reduced-motion: no-preference) {
  .lrow {
    animation: settle 0.5s ease-out backwards;
  }

  .lrow:nth-child(2) { animation-delay: 0.05s; }
  .lrow:nth-child(3) { animation-delay: 0.12s; }
  .lrow:nth-child(4) { animation-delay: 0.19s; }
  .lrow:nth-child(5) { animation-delay: 0.26s; }
  .lrow:nth-child(6) { animation-delay: 0.33s; }
  .lrow:nth-child(7) { animation-delay: 0.4s; }
  .lrow:nth-child(8) { animation-delay: 0.47s; }

  @keyframes settle {
    from {
      opacity: 0;
      transform: translateY(4px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
