:root {
  --ink: #0f1720;
  --panel: #16212c;
  --panel-alt: #1c2a38;
  --rule: #2a3744;
  --paper: #ede6d6;
  --paper-dim: #93a2ac;
  --brass: #c9a227;
  --brass-dim: #8a701c;
  --teal: #3fa796;
  --violet: #8a7fd6;
  --brick: #c1554d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Lora', serif; margin: 0; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; }
img, svg { max-width: 100%; display: block; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

/* ---------- Nav ---------- */
header.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 23, 32, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; max-width: 1080px; margin: 0 auto; }
.wordmark { font-family: 'Lora', serif; font-weight: 600; font-size: 18px; letter-spacing: 0.01em; color: var(--paper); text-decoration: none; }
.wordmark span { color: var(--brass); }
.nav-links { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 13.5px; color: var(--paper-dim); text-decoration: none; }
.nav-links a:hover { color: var(--paper); }
.nav-links a.is-active { color: var(--paper); }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); border-radius: 6px; color: var(--paper); padding: 7px 9px; }

/* ---------- Hero (home) ---------- */
.hero { padding: 84px 0 56px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 600; letter-spacing: -0.01em; max-width: 15ch; }
.hero-sub { margin-top: 20px; font-size: 16px; color: var(--paper-dim); max-width: 46ch; }
.hero-sub b { color: var(--paper); font-weight: 600; }
.hero-ctas { display: flex; align-items: center; gap: 20px; margin-top: 30px; flex-wrap: wrap; }
.btn-primary { background: var(--brass); color: var(--ink); font-weight: 600; font-size: 14px; padding: 12px 20px; border-radius: 8px; text-decoration: none; border: none; cursor: pointer; display: inline-block; }
.btn-primary:hover { background: #ddb63a; }
.btn-ghost { color: var(--paper); font-size: 14px; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.btn-ghost:hover { border-color: var(--paper-dim); }

/* Ink-stamp cluster (home hero) */
.stamp-field { position: relative; height: 260px; }
.stamp {
  position: absolute; border: 2px solid; border-radius: 10px; padding: 16px 18px;
  background: var(--panel); width: 190px;
  opacity: 0; transform: translateY(14px) rotate(var(--rot));
  animation: stamp-in 0.55s ease forwards;
}
.stamp__product { font-family: 'Lora', serif; font-weight: 600; font-size: 16px; }
.stamp__status { display: block; margin-top: 8px; font-size: 11.5px; font-weight: 500; }
.stamp--flow { --rot: -4deg; border-color: var(--brass); top: 0; left: 4%; animation-delay: 0.05s; }
.stamp--flow .stamp__status { color: var(--brass); }
.stamp--task { --rot: 3deg; border-color: var(--teal); border-style: dashed; top: 78px; left: 34%; animation-delay: 0.22s; }
.stamp--task .stamp__status { color: var(--teal); }
.stamp--repo { --rot: -2deg; border-color: var(--violet); top: 168px; left: 10%; animation-delay: 0.4s; }
.stamp--repo .stamp__status { color: var(--violet); }

@keyframes stamp-in { to { opacity: 1; transform: translateY(0) rotate(var(--rot)); } }

/* ---------- Home: condensed product summary cards ---------- */
.summary-band { padding: 8px 0 72px; }
.summary-band .kicker { font-size: 13px; color: var(--paper-dim); margin-bottom: 10px; }
.summary-band h2 { font-size: clamp(22px, 2.6vw, 28px); max-width: 20ch; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.summary-card { border: 1px solid var(--rule); border-radius: 12px; padding: 22px; background: var(--panel); display: flex; flex-direction: column; }
.summary-card .product-badge { align-self: flex-start; }
.summary-card h3 { font-size: 18px; margin-top: 14px; }
.summary-card p { margin-top: 10px; font-size: 14px; color: var(--paper-dim); flex-grow: 1; }
.summary-card .learn-more { margin-top: 18px; font-size: 13.5px; font-weight: 600; text-decoration: none; }
.summary-card .learn-more:hover { text-decoration: underline; }

/* ---------- Product badge (shared colour system) ---------- */
.product-badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; }
.flow-c .product-badge, .flow-c .learn-more { background: rgba(201,162,39,0.14); color: var(--brass); }
.flow-c .learn-more { background: none; padding: 0; }
.repo-c .product-badge, .repo-c .learn-more { background: rgba(138,127,214,0.14); color: var(--violet); }
.repo-c .learn-more { background: none; padding: 0; }
.task-c .product-badge, .task-c .learn-more { background: rgba(63,167,150,0.14); color: var(--teal); }
.task-c .learn-more { background: none; padding: 0; }

/* ---------- Product/section styling used across pages ---------- */
.product { padding: 72px 0; border-top: 1px solid var(--rule); }
.product-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.product-inner.reverse .product-copy { order: 2; }
.product-inner.reverse .product-visual { order: 1; }
.product h2 { font-size: clamp(24px, 3vw, 32px); max-width: 16ch; }
.product-copy p.lede { margin-top: 16px; color: var(--paper-dim); font-size: 15.5px; max-width: 46ch; }
.feature-list { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 46ch; }
.feature-list li { display: flex; gap: 10px; font-size: 14px; color: var(--paper); }
.feature-list li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; margin-top: 8px; flex-shrink: 0; background: var(--dot, var(--brass)); }
.product-cta { display: inline-block; margin-top: 28px; font-size: 14px; font-weight: 600; text-decoration: none; padding: 11px 18px; border-radius: 8px; }

.flow .product-badge, .flow-c .product-badge { background: rgba(201,162,39,0.14); color: var(--brass); }
.flow .feature-list li::before { --dot: var(--brass); }
.flow .product-cta { background: var(--brass); color: var(--ink); }
.flow .product-cta:hover { background: #ddb63a; }

.task .product-badge, .task-c .product-badge { background: rgba(63,167,150,0.14); color: var(--teal); }
.task .feature-list li::before { --dot: var(--teal); }
.task .product-cta { background: var(--teal); color: var(--ink); }
.task .product-cta:hover { background: #52c4b1; }

.repo .product-badge, .repo-c .product-badge { background: rgba(138,127,214,0.14); color: var(--violet); }

.badge-flow { background: rgba(201,162,39,0.14); color: var(--brass); }
.badge-repo { background: rgba(138,127,214,0.14); color: var(--violet); }
.badge-task { background: rgba(63,167,150,0.14); color: var(--teal); }
.repo .feature-list li::before { --dot: var(--violet); }
.repo .product-cta { background: var(--violet); color: var(--ink); }
.repo .product-cta:hover { background: #a29aea; }

/* Flow mock: ledger table */
.mock-card { background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 18px; }
.mock-table { width: 100%; border-collapse: collapse; }
.mock-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--paper-dim); font-weight: 500; padding: 0 8px 8px; border-bottom: 1px solid var(--rule); }
.mock-table td { padding: 9px 8px; font-size: 12.5px; border-bottom: 1px solid var(--rule); }
.mock-table tr:last-child td { border-bottom: none; }
.mock-table .num { text-align: right; }
.mock-pill { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.mock-pill--ok { background: rgba(63,167,150,0.16); color: var(--teal); }
.mock-pill--warn { background: rgba(201,162,39,0.16); color: var(--brass); }
.mock-pill--bad { background: rgba(193,85,77,0.16); color: var(--brick); }

/* Task Plan mock: kanban */
.mock-kanban { display: flex; gap: 10px; }
.mock-col { flex: 1; background: var(--panel-alt); border: 1px solid var(--rule); border-radius: 9px; padding: 10px; min-width: 0; }
.mock-col__title { font-size: 11px; font-weight: 600; color: var(--paper-dim); margin-bottom: 8px; display: flex; justify-content: space-between; }
.mock-card-item { background: var(--panel); border: 1px solid var(--rule); border-radius: 7px; padding: 8px; font-size: 11px; margin-bottom: 7px; }
.mock-card-item:last-child { margin-bottom: 0; }
.mock-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.mock-avatar { width: 16px; height: 16px; border-radius: 50%; background: var(--teal); color: var(--ink); font-size: 8px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; float: right; }

/* Report mock: spreadsheet grid */
.mock-grid { display: grid; grid-template-columns: 28px repeat(3, 1fr); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.mock-grid > div { padding: 8px; font-size: 11px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.mock-grid > div:nth-child(4n) { border-right: none; }
.mock-grid .gh { background: var(--panel-alt); color: var(--paper-dim); font-size: 10px; text-align: center; }
.mock-grid .rh { background: var(--panel-alt); color: var(--paper-dim); font-size: 10px; text-align: center; }
.mock-grid .formula { color: var(--violet); font-family: 'IBM Plex Mono', monospace; font-size: 10px; }

.status-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--paper-dim); margin-top: 18px; }
.status-tag .mock-dot { width: 6px; height: 6px; }

/* ---------- Detail-page header ---------- */
.page-hero { padding: 56px 0 8px; }
.page-hero .back-link { font-size: 13px; color: var(--paper-dim); text-decoration: none; }
.page-hero .back-link:hover { color: var(--paper); }
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); margin-top: 18px; max-width: 18ch; }
.page-hero .lede { margin-top: 16px; font-size: 16px; color: var(--paper-dim); max-width: 52ch; }
.page-hero .hero-ctas { margin-top: 26px; }

/* ---------- Full-width detail sections ---------- */
.detail-section { padding: 56px 0; border-top: 1px solid var(--rule); }
.detail-section.tinted { background: var(--panel); }
.detail-section h2 { font-size: clamp(20px, 2.6vw, 26px); max-width: 24ch; }
.detail-section .section-kicker { font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--paper-dim); margin-bottom: 10px; }
.detail-section .section-lede { margin-top: 14px; font-size: 15px; color: var(--paper-dim); max-width: 60ch; }

/* Feature groups (What it does) */
.feature-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 32px; }
.feature-group h3 { font-size: 15.5px; font-weight: 600; color: var(--paper); }
.feature-group .feature-list { margin-top: 12px; max-width: none; }

/* Key objects glossary */
.objects-list { margin-top: 28px; display: flex; flex-direction: column; }
.object-row { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 16px 0; border-top: 1px solid var(--rule); }
.object-row:last-child { border-bottom: 1px solid var(--rule); }
.object-row dt { font-family: 'IBM Plex Mono', monospace; font-size: 13.5px; font-weight: 500; color: var(--paper); }
.object-row dd { margin: 0; font-size: 14px; color: var(--paper-dim); }

/* Numbered getting-started steps */
.steps-list { list-style: none; margin: 32px 0 0; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 22px; max-width: 62ch; }
.steps-list li { position: relative; padding-left: 40px; }
.steps-list li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--rule); color: var(--paper-dim);
  font-family: 'IBM Plex Mono', monospace; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.steps-list b { color: var(--paper); font-weight: 600; }
.steps-list p { margin-top: 4px; color: var(--paper-dim); font-size: 14px; }

/* Coming-soon status banner (Task Plan page) */
.status-banner { display: inline-flex; align-items: center; gap: 8px; border: 1px dashed var(--rule); border-radius: 8px; padding: 9px 16px; font-size: 13.5px; color: var(--paper-dim); margin-top: 26px; }

/* CTA band before footer */
.cta-band { padding: 56px 0; border-top: 1px solid var(--rule); text-align: center; }
.cta-band h2 { font-size: clamp(20px, 2.6vw, 26px); }
.cta-band .hero-ctas { justify-content: center; margin-top: 22px; }

/* ---------- Support page ---------- */
.support-hero { padding: 56px 0 40px; }
.support-hero h1 { font-size: clamp(28px, 4vw, 38px); max-width: 18ch; }
.support-hero .lede { margin-top: 16px; font-size: 16px; color: var(--paper-dim); max-width: 54ch; }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
.contact-card { border: 1px solid var(--rule); border-radius: 12px; padding: 22px; background: var(--panel); }
.contact-card h3 { font-size: 16px; margin-top: 12px; }
.contact-card p { margin-top: 8px; font-size: 13.5px; color: var(--paper-dim); }
.contact-card a.product-cta { margin-top: 16px; font-size: 13px; padding: 9px 14px; }

.faq-list { margin-top: 28px; display: flex; flex-direction: column; }
.faq-item { padding: 20px 0; border-top: 1px solid var(--rule); }
.faq-item:last-child { border-bottom: 1px solid var(--rule); }
.faq-item h3 { font-size: 15.5px; font-weight: 600; color: var(--paper); font-family: 'Inter', sans-serif; }
.faq-item p { margin-top: 8px; font-size: 14px; color: var(--paper-dim); max-width: 62ch; }

.general-contact { margin-top: 12px; font-size: 14.5px; color: var(--paper-dim); }
.general-contact a { color: var(--paper); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--rule); }
.general-contact a:hover { border-color: var(--paper-dim); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--rule); padding: 40px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-inner p { font-size: 13px; color: var(--paper-dim); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--paper-dim); text-decoration: none; }
.footer-links a:hover { color: var(--paper); }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .stamp-field { height: 220px; margin-top: 12px; }
  .product-inner, .product-inner.reverse { grid-template-columns: 1fr; }
  .product-inner.reverse .product-copy, .product-inner.reverse .product-visual { order: initial; }
  .product-visual { order: -1; }
  .summary-grid { grid-template-columns: 1fr; }
  .feature-groups { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .object-row { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 700px) {
  .nav-links { position: fixed; top: 61px; left: 0; right: 0; background: var(--panel); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: flex-start; padding: 18px 28px; gap: 16px; display: none; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding: 56px 0 40px; }
}
