/* Chassy CMS — marketing site (separately deployed, not part of the product) */

:root {
  --paper: #F7F8FA;
  --paper-raised: #FFFFFF;
  --ink: #12161C;
  --ink-soft: #4A5568;
  --muted: #6B7280;
  --line: #DDE1E7;
  --line-strong: #C3C9D1;
  --accent: #1D5D9B;
  --accent-deep: #123F6B;
  --accent-soft: #EAF2FA;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0B0F14;
    --paper-raised: #141A21;
    --ink: #E7EAEE;
    --ink-soft: #AEB6C2;
    --muted: #7C8695;
    --line: #232B35;
    --line-strong: #313B48;
    --accent: #4C9FE0;
    --accent-deep: #7FBCEC;
    --accent-soft: #142433;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; color: var(--ink-soft); }
code {
  font-family: var(--mono);
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.88em;
}
::selection { background: var(--accent-soft); color: var(--accent-deep); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.02rem; color: var(--ink); text-decoration: none; }
.brand-mark rect { fill: var(--accent); }
.brand-mark { width: 21px; height: 21px; }
.brand-tag { color: var(--muted); font-weight: 500; font-family: var(--mono); font-size: 0.83rem; margin-left: -0.2rem; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a { color: var(--ink-soft); text-decoration: none; font-size: 0.94rem; font-weight: 500; }
.nav-links a:hover { color: var(--accent); }
.nav-github {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: #fff !important;
  background: var(--accent);
  padding: 0.5rem 0.9rem;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-github:hover { background: var(--accent-deep) !important; }
.nav-github-arrow { transition: transform .15s ease; }
.nav-github:hover .nav-github-arrow { transform: translateX(2px); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; cursor: pointer; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 1px; }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .nav-links.is-open { max-height: 320px; }
  .nav-links a { width: 100%; padding: 0.9rem clamp(1.25rem, 4vw, 2.5rem); border-top: 1px solid var(--line); }
  .nav-github { border-radius: 0; justify-content: center; }
}

/* ---------- section scaffolding ---------- */
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-eyebrow { display: block; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.6rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); font-weight: 700; }
.section-sub { margin-top: 0.65rem; color: var(--muted); max-width: 56ch; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line); }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 65% 60% at 28% 15%, black, transparent 72%);
          mask-image: radial-gradient(ellipse 65% 60% at 28% 15%, black, transparent 72%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.eyebrow { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.02em; color: var(--accent); margin-bottom: 1.25rem; }
.hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.5rem); }
.hero-sub { font-size: clamp(1.02rem, 1.6vw, 1.15rem); margin-top: 1.1rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.85rem; }

.hero-diagram { display: flex; flex-direction: column; }
.diagram-node {
  position: relative;
  display: flex; align-items: center; gap: 0.9rem;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  padding: 1.1rem 1.3rem;
}
.diagram-node svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.diagram-node strong { display: block; font-size: 0.96rem; }
.diagram-node > span:not(.node-tag) { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; }
.node-tag { position: absolute; top: 0.55rem; right: 0.7rem; font-family: var(--mono); font-size: 0.65rem; color: var(--muted); letter-spacing: 0.05em; }
.diagram-node-output { border-color: var(--accent); background: var(--accent-soft); }
.diagram-node-output svg { color: var(--accent-deep); }
.diagram-flow { display: flex; justify-content: center; height: 20px; }
.diagram-flow span {
  display: block; width: 2px; height: 100%;
  background: repeating-linear-gradient(180deg, var(--accent) 0 4px, transparent 4px 10px);
  background-size: 2px 20px;
  animation: flow 0.9s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .diagram-flow span { animation: none; } }
@keyframes flow { to { background-position: 0 20px; } }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { text-align: left; }
}

/* ---------- 404 ---------- */
.not-found { position: relative; overflow: hidden; padding: clamp(5rem, 14vw, 9rem) 0; border-bottom: 1px solid var(--line); min-height: calc(100vh - 65px); display: flex; align-items: center; }
.not-found-inner { position: relative; z-index: 1; max-width: 46ch; }
.not-found h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-top: 0.4rem; }

/* ---------- problem / split panel ---------- */
.problem { padding: clamp(3rem, 5vw, 4rem) 0; }
.split-panel { display: grid; grid-template-columns: 1fr auto 1fr; border: 1px solid var(--line); background: var(--paper-raised); }
.split-col { padding: 2rem clamp(1.5rem, 4vw, 2.5rem); }
.split-divider { width: 1px; background: var(--line); }
.split-col-with { background: var(--accent-soft); }
.split-label { display: block; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.2rem; }
.split-col-with .split-label { color: var(--accent-deep); }
.split-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.split-list li { display: flex; gap: 0.65rem; align-items: flex-start; color: var(--ink-soft); font-size: 0.97rem; }
.mark { flex-shrink: 0; width: 1.05rem; text-align: center; font-family: var(--mono); font-size: 0.85rem; margin-top: 0.15rem; }
.mark-x { color: var(--muted); }
.mark-check { color: var(--accent); font-weight: 700; }

@media (max-width: 760px) {
  .split-panel { grid-template-columns: 1fr; }
  .split-divider { width: 100%; height: 1px; }
}

/* ---------- how it works ---------- */
.how { padding: clamp(3.5rem, 6vw, 5.5rem) 0; border-top: 1px solid var(--line); }

.how-terminal { margin-bottom: 2rem; border: 1px solid #232B35; background: #0B0F14; }
.terminal-bar { display: flex; align-items: center; gap: 6px; padding: 0.65rem 0.9rem; background: #151B23; }
.terminal-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: #3A4553; }
.terminal-title { margin-left: 0.5rem; font-family: var(--mono); font-size: 0.76rem; color: #6B7280; }
.terminal-body { margin: 0; padding: 1.1rem 1.25rem 1.35rem; font-family: var(--mono); font-size: 0.86rem; line-height: 1.7; color: #D7DEE6; overflow-x: auto; }
.terminal-body code { display: block; background: none; padding: 0; border-radius: 0; color: inherit; font-size: inherit; }
.t-prompt { color: #6B7280; }
.t-cmd { color: #58A6FF; }
.t-sub { color: #E6EDF3; }
.t-flag { color: #D2A8FF; }
.t-arg { color: #7EE787; }

.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.how-col { border: 1px solid var(--line); background: var(--paper-raised); padding: 1.75rem; }
.how-label { display: block; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.1rem; }
.how-steps { margin: 0; padding-left: 1.2rem; color: var(--ink-soft); }
.how-steps li { margin-bottom: 0.65rem; }
.how-steps li:last-child { margin-bottom: 0; }

@media (max-width: 720px) { .how-grid { grid-template-columns: 1fr; } }

/* ---------- features ---------- */
.features { padding: clamp(3.5rem, 6vw, 5.5rem) 0; border-top: 1px solid var(--line); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.feature-card { background: var(--paper-raised); padding: 1.75rem; }
.feature-icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  margin-bottom: 1rem;
}
.feature-icon svg { width: 18px; height: 18px; }
.feature-card h3 { font-size: 1.02rem; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.94rem; }

@media (max-width: 960px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- showcase (screenshots) ---------- */
.showcase { padding: clamp(3.5rem, 6vw, 5.5rem) 0; border-top: 1px solid var(--line); }
.showcase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.browser-frame { margin: 0; border: 1px solid var(--line); background: var(--paper-raised); }
.browser-bar { display: flex; align-items: center; gap: 5px; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); background: var(--paper); }
.browser-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex-shrink: 0; }
.browser-url {
  margin-left: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: 0.15rem 0.55rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.browser-frame img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--line); cursor: zoom-in; }
.browser-frame figcaption { padding: 1rem 1.25rem 1.15rem; display: flex; flex-direction: column; gap: 0.2rem; }
.browser-frame figcaption strong { font-size: 0.95rem; }
.browser-frame figcaption span { font-size: 0.86rem; color: var(--muted); }

@media (max-width: 960px) { .showcase-grid { grid-template-columns: 1fr; } }

/* ---------- screenshot lightbox ---------- */
body.lightbox-lock { overflow: hidden; }
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  background: rgba(10, 12, 16, 0.9);
  cursor: zoom-out;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
}
.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- compare table ---------- */
.compare { padding: clamp(3.5rem, 6vw, 5.5rem) 0; border-top: 1px solid var(--line); }
.table-scroll { margin-top: 0; overflow-x: auto; border: 1px solid var(--line); background: var(--paper-raised); }
table { border-collapse: collapse; table-layout: fixed; width: 100%; min-width: 760px; font-size: 0.92rem; }
th:nth-child(1), td:nth-child(1) { width: 24%; }
th:nth-child(2), td:nth-child(2) { width: 15%; }
th:nth-child(3), td:nth-child(3), th:nth-child(4), td:nth-child(4), th:nth-child(5), td:nth-child(5) { width: 20.34%; }
th, td { text-align: left; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: top; }
th:last-child, td:last-child { border-right: none; }
th:nth-child(2), td:nth-child(2) { border-right: 2px solid var(--accent); }
thead th { color: var(--muted); font-family: var(--mono); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.5; border-bottom: 2px solid var(--line-strong); }
.th-sub { display: block; font-family: var(--sans); font-size: 0.72rem; text-transform: none; font-weight: 500; color: var(--muted); margin-top: 0.3rem; letter-spacing: 0; }
tbody th { font-weight: 600; color: var(--ink); font-size: 0.9rem; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: none; }
td.win { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
td.miss { color: var(--muted); }
td.partial { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink-soft); }
th.col-highlight { color: var(--accent-deep); position: relative; }
th.col-highlight::after { content: ""; position: absolute; left: 1.1rem; right: 1.1rem; bottom: 0.5rem; height: 2px; background: var(--accent); }

/* ---------- trust strip ---------- */
.trust { padding: clamp(2rem, 4vw, 3rem) 0; border-top: 1px solid var(--line); }
.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.trust-item { background: var(--paper-raised); display: flex; flex-direction: column; gap: 0.3rem; padding: 1.25rem 1.5rem; }
.trust-item strong { font-family: var(--mono); font-size: 0.88rem; }
.trust-item span { color: var(--muted); font-size: 0.86rem; }

@media (max-width: 820px) { .trust-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .trust-strip { grid-template-columns: 1fr; } }

/* ---------- pricing ---------- */
.pricing { padding: clamp(3.5rem, 6vw, 5.5rem) 0; border-top: 1px solid var(--line); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch; }
.price-card {
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.price-card h3 { font-size: 1.02rem; }
.price-card .price { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; color: var(--ink); margin: 0.5rem 0; }
.price-desc { font-size: 0.94rem; flex-grow: 1; }
.price-card .btn { margin-top: 0.25rem; align-self: flex-start; }
.price-card-highlight { border-color: var(--accent); border-top-width: 2px; }
.price-flag {
  position: absolute; top: -0.65rem; left: 1.75rem;
  background: var(--accent); color: #fff;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.22rem 0.55rem;
}

@media (max-width: 960px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */
.faq { padding: clamp(3.5rem, 6vw, 5.5rem) 0; border-top: 1px solid var(--line); }
.faq-list { max-width: 760px; }
.faq-item { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.faq-item:first-child { padding-top: 0; }
.faq-item dt { font-weight: 700; font-size: 1rem; }
.faq-item dd { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.94rem; }

/* ---------- final cta (fixed dark, independent of page theme) ---------- */
.final-cta { position: relative; overflow: hidden; padding: clamp(4rem, 7vw, 6rem) 0; background: #0B0F14; border-top: 1px solid #1B222B; }
.final-cta .hero-grid-bg {
  background-image:
    linear-gradient(#1B222B 1px, transparent 1px),
    linear-gradient(90deg, #1B222B 1px, transparent 1px);
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 80% 30%, black, transparent 72%);
          mask-image: radial-gradient(ellipse 60% 80% at 80% 30%, black, transparent 72%);
}
.final-cta .wrap { position: relative; z-index: 1; }
.final-cta h2 { color: #F3F5F7; font-size: clamp(1.6rem, 3.5vw, 2.3rem); max-width: 640px; }
.final-cta .hero-actions { margin-top: 1.75rem; }
.final-cta .btn-secondary { background: transparent; color: #F3F5F7; border-color: #2E3846; }
.final-cta .btn-secondary:hover { border-color: #F3F5F7; color: #F3F5F7; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.5rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1.5rem; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; font-family: var(--mono); font-size: 0.84rem; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-fine { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.footer-fine p { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
