/* ==========================================================================
   Revenue Growth Platform — Public site
   Design concept: "Ledger & Signal" — the visual language of a financial
   statement / instrument panel, because the product itself turns a website
   into a measurable revenue system. Editorial, left-aligned, hairline rules
   instead of cards and shadows. One accent color, spent deliberately.
   ========================================================================== */
 
:root {
  --ink: #12181A;
  --ink-soft: #55625C;
  --paper: #EEF1EA;
  --paper-deep: #E3E8DE;
  --rule: #CBD3C6;
  --brass: #B8873A;
  --brass-deep: #96702E;
  --moss: #3C5844;
  --white: #FBFCFA;
 
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
 
  --measure: 42rem;
}
 
* { box-sizing: border-box; }
 
html { scroll-behavior: smooth; }
 
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
 
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
 
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
 
.site-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
 
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
 
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
 
p { margin: 0 0 1.1em; max-width: var(--measure); }
p.wide { max-width: none; }
 
.text-soft { color: var(--ink-soft); }
 
/* ---------- Buttons & links ---------- */
 
.btn-signal, .btn-outline, .btn-plain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-signal { background: var(--brass); color: var(--white); }
.btn-signal:hover { background: var(--brass-deep); text-decoration: none; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.btn-plain { padding: 0; border-radius: 0; text-decoration: underline; text-underline-offset: 3px; }
 
/* ---------- Header ---------- */
 
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 30;
}
 
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
 
.site-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 1px solid var(--ink); border-radius: 50%;
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
}
 
.site-nav { display: flex; align-items: center; gap: 28px; font-size: 0.95rem; }
.site-nav a:not(.btn-signal) { padding-bottom: 4px; border-bottom: 1px solid transparent; }
.site-nav a.active, .site-nav a:not(.btn-signal):hover { border-bottom-color: var(--ink); text-decoration: none; }
 
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); }
 
/* ---------- Alerts ---------- */
 
.site-alert { margin-top: 16px; padding: 12px 16px; border-radius: 3px; font-size: 0.92rem; }
.site-alert-success { background: #E1EBE3; color: var(--moss); border: 1px solid #BFD4C4; }
.site-alert-error { background: #F3DCD8; color: #7A2E22; border: 1px solid #E4B9B0; }
 
/* ---------- Hero ---------- */
 
.hero {
  background: var(--ink);
  color: var(--paper);
  padding: 88px 0 0;
}
 
.hero-inner { max-width: 640px; }
.hero h1 { color: var(--white); }
.hero p.lede { font-size: 1.15rem; color: #C6D0C7; }
.hero-ctas { display: flex; gap: 16px; align-items: center; margin: 28px 0 0; flex-wrap: wrap; }
.hero-ctas .btn-outline { border-color: #7C8A7E; color: var(--paper); }
.hero-ctas .btn-outline:hover { background: var(--paper); color: var(--ink); }
 
/* Ledger strip: a dashboard-style readout of real product metrics */
.ledger-strip {
  margin-top: 64px;
  border-top: 1px solid #2B3532;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.ledger-cell {
  padding: 22px 24px;
  border-right: 1px solid #2B3532;
}
.ledger-cell:last-child { border-right: none; }
.ledger-figure { font-family: var(--font-display); font-size: 2rem; color: var(--brass); display: block; }
.ledger-label { font-size: 0.85rem; color: #9BA89C; display: block; margin-top: 4px; }
 
/* ---------- Generic sections ---------- */
 
.section { padding: 76px 0; }
.section-tight { padding: 48px 0; }
.section-divide { border-top: 1px solid var(--rule); }
.section-dark { background: var(--ink); color: var(--paper); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: #C6D0C7; }
.section-deep { background: var(--paper-deep); }
 
.section-head { max-width: var(--measure); margin-bottom: 44px; }
 
/* ---------- Process steps (a genuine sequence — numbering is earned here) ---------- */
 
.process-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; }
.process-step { border-top: 1px solid var(--rule); padding-top: 18px; position: relative; }
.process-step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--brass);
  display: block;
  margin-bottom: 10px;
}
 
/* ---------- Ledger rows: services / case studies / pricing lines ---------- */
 
.ledger-rows { border-top: 1px solid var(--rule); }
.ledger-row {
  display: grid;
  grid-template-columns: 260px 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}
.ledger-row h3 { margin-bottom: 6px; }
.ledger-row .row-meta { color: var(--ink-soft); font-size: 0.9rem; }
.ledger-row .row-action { align-self: center; white-space: nowrap; }
 
/* ---------- Case study / metric callouts ---------- */
 
.metric-line { font-family: var(--font-display); font-size: 1.4rem; color: var(--moss); }
 
/* ---------- Pricing ---------- */
 
.pricing-table { border-top: 1px solid var(--rule); width: 100%; border-collapse: collapse; }
.pricing-table th, .pricing-table td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.pricing-table thead th { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; }
.pricing-table .price-figure { font-family: var(--font-display); font-size: 1.5rem; color: var(--brass); }
.pricing-table .included { color: var(--moss); }
.pricing-note { max-width: var(--measure); }
 
/* ---------- Blog / case study listing ---------- */
 
.post-list { border-top: 1px solid var(--rule); }
.post-item { padding: 28px 0; border-bottom: 1px solid var(--rule); }
.post-item .post-meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 8px; }
.post-item h3 a:hover { text-decoration: underline; }
 
/* ---------- Forms ---------- */
 
.site-form { max-width: 560px; }
.site-form label { display: block; font-weight: 600; font-size: 0.9rem; margin: 18px 0 6px; }
.site-form input, .site-form select, .site-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  color: var(--ink);
}
.site-form input:focus, .site-form textarea:focus, .site-form select:focus { border-color: var(--brass); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.field-error { display: block; color: #7A2E22; font-size: 0.85rem; margin-top: 4px; }
.honeypot-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
 
/* ---------- Footer ---------- */
 
.site-footer { background: var(--ink); color: #C6D0C7; padding: 60px 0 0; }
.site-footer a { color: #C6D0C7; }
.site-footer .brand-mark { border-color: #6C7A6E; color: var(--paper); }
.site-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 32px; padding-bottom: 40px; }
.footer-col h3 { font-family: var(--font-body); font-size: 0.85rem; color: #9BA89C; font-weight: 600; margin-bottom: 14px; }
.footer-col a { display: block; margin-bottom: 10px; }
.footer-brand-col p { color: #9BA89C; font-size: 0.9rem; }
.footer-signup-form { display: flex; gap: 8px; margin-top: 12px; }
.footer-signup-form input { flex: 1; padding: 10px 12px; border-radius: 3px; border: 1px solid #3A463C; background: #1A2320; color: var(--paper); }
.footer-signup-form button { padding: 10px 16px; border-radius: 3px; border: none; background: var(--brass); color: var(--white); font-weight: 600; cursor: pointer; }
.footer-signup-form button:hover { background: var(--brass-deep); }
.site-footer-bottom { border-top: 1px solid #2B3532; padding: 20px 0; font-size: 0.85rem; }
 
/* ---------- One orchestrated hero reveal ---------- */
 
@media (prefers-reduced-motion: no-preference) {
  .hero-inner > * { opacity: 0; animation: rise 0.6s ease forwards; }
  .hero-inner > *:nth-child(1) { animation-delay: 0.05s; }
  .hero-inner > *:nth-child(2) { animation-delay: 0.15s; }
  .hero-inner > *:nth-child(3) { animation-delay: 0.25s; }
  .ledger-strip { opacity: 0; animation: rise 0.6s ease forwards 0.35s; }
}
 
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
 
/* ---------- Video embeds ---------- */
 
.video-embed-wrap {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 4px;
}
.video-embed-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}
 
/* ---------- Landing page (campaigns) ---------- */
 
.landing-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
 
/* ---------- Chat widget ---------- */
 
.chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 50; font-family: var(--font-body); }
 
.chat-toggle {
  background: var(--brass);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}
.chat-toggle:hover { background: var(--brass-deep); }
 
.chat-panel {
  position: absolute;
  right: 0;
  bottom: 56px;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
  flex-direction: column;
  overflow: hidden;
  /* Closed by default. JS toggles the .open class rather than the
     `hidden` attribute — an attribute and a class have equal CSS
     specificity, so a plain `display: flex` rule here would always have
     won over `[hidden]` and the panel could never actually close. */
  display: none;
}
 
.chat-panel.open {
  display: flex;
}
 
.chat-panel-header {
  background: var(--ink);
  color: var(--paper);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.9rem;
}
.chat-close { background: none; border: none; color: var(--paper); font-size: 1.2rem; cursor: pointer; line-height: 1; }
 
.chat-messages { padding: 14px 16px; height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
 
.chat-bubble { max-width: 85%; padding: 8px 12px; border-radius: 10px; font-size: 0.88rem; line-height: 1.4; }
.chat-bubble-bot { background: var(--paper); align-self: flex-start; }
.chat-bubble-user { background: var(--brass); color: var(--white); align-self: flex-end; }
 
.chat-input-row { display: flex; border-top: 1px solid var(--rule); }
.chat-input-row input { flex: 1; border: none; padding: 12px; font-size: 0.9rem; font-family: var(--font-body); }
.chat-input-row input:focus { outline: none; }
.chat-input-row button { border: none; background: var(--ink); color: var(--paper); padding: 0 16px; font-weight: 600; cursor: pointer; }
.chat-input-row button:hover { background: #060a0b; }
 
@media (max-width: 480px) {
  .chat-panel { width: calc(100vw - 40px); }
}
 
/* ---------- Responsive ---------- */
 
@media (max-width: 860px) {
  .ledger-strip { grid-template-columns: repeat(2, 1fr); }
  .ledger-cell:nth-child(2) { border-right: none; }
  .process-list { grid-template-columns: repeat(2, 1fr); }
  .site-footer-grid { grid-template-columns: 1fr 1fr; }
}
 
@media (max-width: 720px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    gap: 16px;
  }
  .site-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .ledger-row { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: 1fr; }
  .site-footer-grid { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .footer-signup-form { flex-direction: column; }
  .landing-grid { grid-template-columns: 1fr; }
}