/* Lith.ai — site styles */
:root {
  --ink: #0d0d0d;
  --ink-2: #3d3d3d;
  --muted: #6e6e73;
  --line: #e6e4df;
  --paper: #ffffff;
  --sand: #f6f5f1;
  --sand-2: #eeece6;
  --accent: #39594d;       /* deep green, used sparingly */
  --accent-soft: #e3ebe6;
  --bar-ref: #c9c7c0;
  --bar-nano: #6f7d76;
  --radius: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.015em; }

.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-2); font-weight: 400; }
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.text-muted-2 { color: var(--muted) !important; }

/* ---------- buttons ---------- */
.btn { font-weight: 600; border-radius: 999px; padding: .7rem 1.4rem; font-size: .95rem; }
.btn-ink { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.btn-ink:hover, .btn-ink:focus { background: #2b2b2b; color: #fff; border-color: #2b2b2b; }
.btn-line { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-light-ink { background: #fff; color: var(--ink); border: 1px solid #fff; }
.btn-light-ink:hover { background: var(--sand-2); color: var(--ink); }
.btn-sm-pill { padding: .5rem 1.1rem; font-size: .88rem; }
.arrow-link { font-weight: 600; text-decoration: none; }
.arrow-link::after { content: " \2192"; transition: margin .2s; }
.arrow-link:hover::after { margin-left: 4px; }

/* ---------- navigation ---------- */
.site-nav {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: .8rem 0;
}
.site-nav .navbar-brand { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; color: var(--ink); }
.site-nav .nav-link { color: var(--ink-2); font-weight: 500; font-size: .95rem; padding: .5rem .9rem !important; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--ink); }
.site-nav .navbar-toggler { border: 0; padding: .25rem; box-shadow: none !important; }
.site-nav .dropdown-toggle::after { border: 0; content: "\203A"; transform: rotate(90deg); vertical-align: 0; margin-left: .4rem; font-size: 1.1em; line-height: 1; }

.flyout {
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.08);
  padding: 1rem;
  min-width: 340px;
  margin-top: .6rem !important;
}
.flyout .flyout-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: .25rem .75rem .5rem; }
.flyout .dropdown-item { border-radius: 10px; padding: .7rem .75rem; white-space: normal; }
.flyout .dropdown-item:hover { background: var(--sand); }
.flyout .dropdown-item strong { display: block; font-weight: 600; color: var(--ink); font-size: .95rem; }
.flyout .dropdown-item span { display: block; color: var(--muted); font-size: .83rem; line-height: 1.4; }
.flyout .paper-card { background: var(--sand); border-radius: 12px; padding: 1rem; margin-top: .25rem; }
.flyout .paper-card .tag { font-size: .72rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }

/* Desktop: open flyouts on hover; the ::before bridge keeps them open while the pointer crosses the gap */
@media (min-width: 992px) {
  .site-nav .dropdown:hover > .dropdown-menu { display: block; }
  .site-nav .dropdown-menu { top: 100%; left: 0; }
  .flyout::before { content: ""; position: absolute; left: 0; right: 0; top: -1rem; height: 1rem; }
}

@media (max-width: 991.98px) {
  .site-nav .navbar-collapse { padding: 1rem 0 .5rem; }
  .flyout { box-shadow: none; border: 0; padding: 0 0 .5rem .5rem; min-width: 0; margin-top: 0 !important; }
  .nav-cta { margin-top: .75rem; }
}

/* ---------- sections ---------- */
.section { padding: 6rem 0; }
.section-sm { padding: 4rem 0; }
.bg-sand { background: var(--sand); }
.bg-ink { background: var(--ink); color: #fff; }
.bg-ink .lead, .bg-ink .text-muted-2 { color: #b5b5b5 !important; }
.bg-ink .eyebrow { color: #9a9a9a; }

.hero { padding: 6.5rem 0 5rem; position: relative; overflow: hidden; }
.hero h1 { max-width: 15ch; }
.hero .lead { max-width: 40rem; margin-top: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }

.hero-graphic { width: 100%; height: auto; display: block; }
.hero-graphic .ln { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .85; }
.hero-graphic .ln-soft { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .18; }
.hero-graphic .dot { fill: var(--ink); }
.hero-graphic .dot-accent { fill: var(--accent); }
.hero-graphic .draw { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 2.4s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- cards ---------- */
.card-lith {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  height: 100%;
  transition: transform .2s, box-shadow .2s;
}
.card-lith.sand { background: var(--sand); border-color: transparent; }
a.card-lith { display: block; text-decoration: none; color: inherit; }
a.card-lith:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,.06); color: inherit; }
.card-lith h3 { margin-bottom: .75rem; }
.card-lith p { color: var(--ink-2); margin-bottom: 0; font-size: .98rem; }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--sand-2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.4rem;
}
.card-lith.sand .card-icon { background: #fff; }
.card-icon svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.pill {
  display: inline-block; font-size: .78rem; font-weight: 600;
  padding: .3rem .75rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.pill.dark { background: var(--ink); color: #fff; }
.pill.soft { background: var(--sand-2); color: var(--ink-2); }

/* product feature block */
.feature-panel {
  background: var(--ink); color: #fff; border-radius: 28px;
  padding: clamp(2rem, 5vw, 4rem); overflow: hidden; position: relative;
}
.feature-panel .lead { color: #c4c4c4; }
.feature-panel .stat-num { font-size: clamp(2.2rem, 4.5vw, 3.2rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.feature-panel .stat-label { color: #a8a8a8; font-size: .9rem; margin-top: .4rem; }

/* stats strip */
.stat-num { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.stat-label { color: var(--muted); font-size: .92rem; margin-top: .5rem; }
.stat-cell { border-top: 1px solid var(--ink); padding-top: 1.25rem; }
.bg-ink .stat-cell { border-color: #444; }

/* numbered steps */
.step { border-top: 1px solid var(--line); padding: 1.75rem 0; }
.step-num { font-size: .85rem; font-weight: 600; color: var(--muted); }
.step h3 { margin: .35rem 0 .5rem; }
.step p { color: var(--ink-2); margin: 0; }

/* check list */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 1.9rem; margin-bottom: .85rem; color: var(--ink-2); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .4rem; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat;
}
.bg-ink .check-list li { color: #d0d0d0; }
.bg-ink .check-list li::before { background-color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' stroke='black' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* code-ish state/question demo */
.io-box {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  font-size: .88rem; overflow: hidden;
}
.io-box .io-head { padding: .7rem 1.1rem; border-bottom: 1px solid var(--line); font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--sand); }
.io-box .io-body { padding: 1.1rem; color: var(--ink-2); }
.io-q { font-weight: 600; color: var(--ink); margin-bottom: .6rem; }
.prob-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .45rem; }
.prob-row .opt { flex: 0 0 42%; font-size: .85rem; }
.prob-row .track { flex: 1; height: 8px; background: var(--sand-2); border-radius: 99px; overflow: hidden; }
.prob-row .fill { height: 100%; background: var(--ink); border-radius: 99px; }
.prob-row .pv { flex: 0 0 3rem; text-align: right; font-variant-numeric: tabular-nums; font-size: .82rem; font-weight: 600; }

/* live request feed (host.html hero) */
.feed-box { background: var(--sand); border-radius: var(--radius); padding: 1.25rem; }
.feed-head { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.feed-head .live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2f9e6a; margin-right: .45rem; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
#req-feed { min-height: 22rem; }
.req { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; margin-bottom: .7rem; opacity: 0; transform: translateY(-10px); transition: opacity .4s, transform .4s; }
.req.show { opacity: 1; transform: none; }
.req-text { font-size: .9rem; color: var(--ink); line-height: 1.45; }
.req-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .65rem; min-height: 1.6rem; }
.req-status { font-size: .8rem; color: var(--muted); }
.req-label { font-size: .75rem; font-weight: 600; padding: .22rem .6rem; border-radius: 999px; background: var(--sand-2); color: var(--ink-2); animation: pop .25s ease; }
.req-label.k0 { background: var(--ink); color: #fff; }
.req-label.k1 { background: var(--accent-soft); color: var(--accent); }
.req-ms { margin-left: auto; font-size: .75rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }

/* ---------- bar charts ---------- */
.chart-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.25rem); height: 100%; }
.chart-card h3 { margin-bottom: .35rem; }
.chart-card .chart-sub { color: var(--muted); font-size: .9rem; margin-bottom: 1.75rem; }
.bar-row { display: grid; grid-template-columns: 9.5rem 1fr 3.6rem; align-items: center; gap: .9rem; margin-bottom: .8rem; }
.bar-name { font-size: .9rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 26px; background: var(--sand); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; min-width: 4px; background: var(--bar-ref); border-radius: 6px; transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.bar-val { font-variant-numeric: tabular-nums; font-weight: 600; font-size: .92rem; text-align: right; }
.bar-row.is-host .bar-name { color: var(--ink); font-weight: 700; }
.bar-row.is-host .bar-fill { background: var(--ink); }
.bar-row.is-nano .bar-name { color: var(--ink); font-weight: 600; }
.bar-row.is-nano .bar-fill { background: var(--bar-nano); }
.chart-note { font-size: .82rem; color: var(--muted); margin-top: 1.25rem; margin-bottom: 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: .85rem; color: var(--ink-2); margin-bottom: 1.5rem; }
.chart-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .45rem; background: var(--c); }

@media (max-width: 575.98px) {
  .bar-row { grid-template-columns: 7.2rem 1fr 3.2rem; gap: .6rem; }
  .bar-name { font-size: .8rem; }
  .bar-track { height: 22px; }
}

/* spec list */
.spec-list { margin: 0; }
.spec-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.spec-list dt { font-weight: 400; color: var(--muted); }
.spec-list dd { margin: 0; text-align: right; font-weight: 500; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #fff; border-radius: 28px; padding: clamp(2.5rem, 6vw, 5rem); text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { max-width: 20ch; margin: 0 auto 1rem; }
.cta-band p { color: #bdbdbd; max-width: 38rem; margin: 0 auto 2rem; }
.cta-band .rings { position: absolute; inset: 0; pointer-events: none; opacity: .14; }

/* ---------- forms ---------- */
.form-lith .form-label { font-weight: 600; font-size: .88rem; margin-bottom: .35rem; }
.form-lith .form-control, .form-lith .form-select {
  border-radius: 12px; border: 1px solid var(--line); padding: .75rem 1rem; font-size: .98rem; background: #fff;
}
.form-lith .form-control:focus, .form-lith .form-select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.hp-field { position: absolute; left: -9999px; }

/* ---------- legal pages ---------- */
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: .5rem; }
.legal h2 { font-size: 1.5rem; margin: 2.75rem 0 1rem; }
.legal h3 { font-size: 1.1rem; margin: 1.75rem 0 .6rem; }
.legal p, .legal li { color: var(--ink-2); font-size: 1rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: .5rem; }
.legal .updated { color: var(--muted); font-size: .92rem; margin-bottom: 2.5rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #a3a3a3; padding: 4.5rem 0 2.5rem; font-size: .93rem; }
.site-footer .brand { color: #fff; font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; text-decoration: none; }
.site-footer h4 { color: #fff; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1.1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .6rem; }
.site-footer a { color: #a3a3a3; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .footer-bottom { border-top: 1px solid #2a2a2a; margin-top: 3.5rem; padding-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.site-footer .footer-bottom nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-graphic .draw { animation: none; stroke-dashoffset: 0; }
  .bar-fill { transition: none; }
}
