/* ============================================================
   RankLens — home page
   Extends site.css. Inherited rule: colour appears only where
   something moved. Everything else is ink on paper.
   All selectors are prefixed .h- so no other page is affected.
   ============================================================ */

:root {
  --ink-deep:  #101a17;
  --mark:      #f3ead0;
  --rule:      #c7cfc9;
  --muted-ink: #5c6c65;   /* --muted fails AA on paper; this passes */
}

/* ------------------------------------------------------------
   Section rhythm
   ------------------------------------------------------------ */

.h-sec { padding: 92px 0; border-top: 1px solid var(--line); }
.h-sec--surface { background: var(--surface); }

.h-head { max-width: 60ch; margin: 0 0 48px; }
.h-head h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.026em;
  font-weight: 600;
  margin: 0 0 13px;
}
.h-head p { margin: 0; font-size: 17.5px; line-height: 1.6; color: var(--ink-2); }

.h-note { font-size: 13.5px; color: var(--muted-ink); margin: 20px 0 0; max-width: 66ch; }

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */

.h-hero { padding: 74px 0 78px; }

.h-hero-top {
  display: grid;
  grid-template-columns: 1.22fr 1fr;
  gap: 24px 60px;
  align-items: end;
  margin-bottom: 50px;
}

.h-hero h1 {
  font-family: var(--display);
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.01;
  letter-spacing: -0.034em;
  font-weight: 600;
  margin: 0;
  max-width: 14ch;
}
.h-hero .h-lede {
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 26px;
  max-width: 44ch;
}

.h-ctas { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.h-pill-lg { padding: 13px 26px; font-size: 15.5px; }

.h-text-link {
  color: var(--ink-2);
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
}
.h-text-link:hover { color: var(--up); border-bottom-color: var(--up); }

.h-trust {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 13.5px;
  color: var(--muted-ink);
}
.h-trust li { position: relative; padding-left: 15px; }
.h-trust li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rule);
}

/* ------------------------------------------------------------
   Artwork frame — shared by every card
   ------------------------------------------------------------ */

.h-art {
  aspect-ratio: 320 / 140;
  background: var(--surface);
  overflow: hidden;
}
.h-art svg, .h-art img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------
   Hero capability panel — what one connection covers
   ------------------------------------------------------------ */

.h-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line-soft), 0 26px 54px -34px rgba(16, 26, 23, .45);
}

.h-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 15px 20px 13px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfb, var(--surface));
}
.h-panel-top strong {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.012em;
}
.h-panel-top span { font-size: 12.5px; color: var(--muted-ink); }

/* the hero screenshot + the four labels under it */
.h-shot { margin: 0; background: var(--paper); }
.h-shot img { display: block; width: 100%; height: auto; }

.h-cap-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}
.h-cap-strip li { background: var(--surface); padding: 14px 18px 15px; }
.h-cap-strip strong {
  display: block;
  font-family: var(--display);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin-bottom: 2px;
}
.h-cap-strip span {
  display: block;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted-ink);
}

/* ------------------------------------------------------------
   Report gallery — the layouts at readable size
   ------------------------------------------------------------ */

.h-shots { display: grid; gap: 34px; }

.h-figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.h-sec--surface .h-figure { background: var(--paper); }
.h-figure img { display: block; width: 100%; height: auto; }

.h-figcap {
  padding: 16px 24px 18px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1.9fr;
  gap: 6px 30px;
  align-items: baseline;
}
.h-figcap h3 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.014em;
  margin: 0;
}
.h-figcap p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }


/* ------------------------------------------------------------
   API strip — where the numbers come from
   ------------------------------------------------------------ */

.h-apis {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 26px 0;
}
.h-apis-in { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; }
.h-apis-in > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 27ch;
  flex: 0 0 auto;
}
.h-apis-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; flex: 1 1 auto; }
.h-apis-list li {
  font-size: 14px;
  color: var(--ink-2);
  padding: 3px 20px;
  border-left: 1px solid var(--line);
}
.h-apis-list li:first-child { border-left: 0; padding-left: 0; }

/* ------------------------------------------------------------
   Services — the four surfaces
   ------------------------------------------------------------ */

.h-svcs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.h-svc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.h-sec--surface .h-svc,
.h-sec--surface .h-svc .h-art { background: var(--paper); }
.h-svc .h-art { border-bottom: 1px solid var(--line); }

.h-svc-body { padding: 26px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.h-svc-body h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.2;
  margin: 0 0 10px;
  max-width: 24ch;
}
.h-svc-body > p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.h-svc-body ul {
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  display: grid;
  gap: 9px;
}
.h-svc-body li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.h-svc-body li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--up);
  opacity: .55;
}

/* ------------------------------------------------------------
   The ledger — where the reporting month goes
   ------------------------------------------------------------ */

.h-ledger-wrap { display: grid; grid-template-columns: 1.9fr 1fr; gap: 48px; align-items: start; }

.h-ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  border-top: 1px solid var(--ink);
}
.h-ledger th {
  text-align: right;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted-ink);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.h-ledger th:first-child { text-align: left; }
.h-ledger td {
  padding: 15px 0;
  text-align: right;
  border-bottom: 1px solid var(--line-soft);
  font-variant-numeric: tabular-nums;
}
.h-ledger td:first-child { text-align: left; }
.h-ledger .h-task { display: block; }
.h-ledger .h-task small {
  display: block;
  font-size: 13.5px;
  color: var(--muted-ink);
  margin-top: 2px;
  max-width: 40ch;
}
.h-ledger .h-was { color: var(--muted-ink); }
.h-ledger .h-cut { color: var(--up); font-weight: 600; }
.h-ledger .h-same { color: var(--muted-ink); font-weight: 400; }

.h-ledger tfoot td {
  border-top: 2px solid var(--ink);
  border-bottom: 0;
  padding-top: 16px;
  font-size: 17px;
  font-weight: 600;
}
.h-ledger tfoot .h-cut { font-size: 20px; }

.h-aside {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--up);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 24px;
}
.h-sec--surface .h-aside { background: var(--paper); }
.h-aside h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}
.h-aside p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.h-aside p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------
   Beyond the hours — three compact gains
   ------------------------------------------------------------ */

.h-gains {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.h-gain { background: var(--surface); padding: 28px 26px 26px; }
.h-sec--surface .h-gain { background: var(--paper); }
.h-gain h3 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.016em;
  line-height: 1.25;
  margin: 0 0 9px;
  max-width: 24ch;
}
.h-gain p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* ------------------------------------------------------------
   Steps — a genuine sequence, so numbering is earned
   ------------------------------------------------------------ */

.h-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; counter-reset: hs; }
.h-step { counter-increment: hs; }
.h-step::before {
  content: counter(hs);
  display: block;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  color: var(--up);
  border-top: 2px solid var(--up);
  padding-top: 11px;
  margin-bottom: 11px;
}
.h-step h3 { margin: 0 0 6px; font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; }
.h-step p { margin: 0; font-size: 14.5px; line-height: 1.58; color: var(--ink-2); }

/* ------------------------------------------------------------
   Templates — a shelf you can browse and buy from
   ------------------------------------------------------------ */

.h-tpls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.h-tpl {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.h-sec--surface .h-tpl,
.h-sec--surface .h-tpl .h-art { background: var(--paper); }
.h-tpl .h-art { border-bottom: 1px solid var(--line); }
.h-tpl:hover { border-color: var(--up); box-shadow: 0 0 0 1px var(--up); }
.h-tpl:hover h3 { color: var(--up); }

.h-tpl-body { padding: 18px 20px 0; flex: 1; }
.h-tpl-src { display: block; font-size: 12.5px; color: var(--muted-ink); margin-bottom: 5px; }
.h-tpl-body h3 {
  font-family: var(--display);
  font-size: 18.5px;
  font-weight: 600;
  letter-spacing: -0.016em;
  line-height: 1.22;
  margin: 0 0 8px;
}
.h-tpl-body p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }

.h-tpl-foot {
  margin-top: 18px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.h-price-tag { font-size: 15.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.h-price-tag small { font-weight: 400; font-size: 13px; color: var(--muted-ink); }
.h-open { font-size: 13.5px; color: var(--muted-ink); }
.h-tpl:hover .h-open { color: var(--up); }

/* build-to-order strip */
.h-custom {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
}
.h-sec--surface .h-custom { background: var(--paper); }
.h-custom h3 {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.018em;
  margin: 0 0 7px;
}
.h-custom p { margin: 0; font-size: 15px; line-height: 1.58; color: var(--ink-2); max-width: 62ch; }

/* ------------------------------------------------------------
   Reads — latest posts
   ------------------------------------------------------------ */

.h-reads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.h-read {
  background: var(--surface);
  padding: 24px 24px 26px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 0 0 0 var(--up);
  transition: box-shadow .13s ease;
}
.h-sec--surface .h-read { background: var(--paper); }
.h-read:hover { box-shadow: inset 3px 0 0 0 var(--up); }
.h-read:hover h3 { color: var(--up); }

.h-read-meta { font-size: 12.5px; color: var(--muted-ink); }
.h-read-meta b { color: var(--ink-2); font-weight: 500; }
.h-read h3 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.24;
  margin: 0;
}
.h-read p { margin: 0; font-size: 14.5px; line-height: 1.58; color: var(--ink-2); }

.h-reads-foot { margin: 24px 0 0; font-size: 15px; }

/* ------------------------------------------------------------
   Stance — the one dark band
   ------------------------------------------------------------ */

.h-stance {
  background: var(--ink-deep);
  color: #d9e2de;
  border-radius: var(--radius-lg);
  padding: 54px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.h-stance h2 {
  font-family: var(--display);
  font-size: clamp(26px, 3.2vw, 35px);
  line-height: 1.12;
  letter-spacing: -0.026em;
  font-weight: 600;
  color: #fff;
  margin: 0 0 14px;
  max-width: 18ch;
}
.h-stance p { color: #a9b8b2; font-size: 15.5px; line-height: 1.62; margin: 0 0 14px; max-width: 50ch; }
.h-stance p:last-child { margin-bottom: 0; }
.h-stance ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.h-stance li { position: relative; padding-left: 24px; font-size: 15px; color: #cbd7d2; line-height: 1.5; }
.h-stance li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--up);
}
.h-stance li b { color: #fff; font-weight: 600; }

/* ------------------------------------------------------------
   FAQ
   ------------------------------------------------------------ */

.h-faq { border-top: 1px solid var(--ink); max-width: 78ch; }
.h-faq details { border-bottom: 1px solid var(--line); }
.h-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 40px 18px 0;
  position: relative;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.h-faq summary::-webkit-details-marker { display: none; }
.h-faq summary:hover { color: var(--up); }
.h-faq summary::after {
  content: "";
  position: absolute;
  right: 6px; top: 50%;
  width: 11px; height: 11px;
  margin-top: -8px;
  border-right: 1.5px solid var(--muted-ink);
  border-bottom: 1.5px solid var(--muted-ink);
  transform: rotate(45deg);
  transition: transform .16s ease;
}
.h-faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.h-faq details[open] summary { color: var(--ink); }
.h-faq .h-answer { padding: 0 0 20px; margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); max-width: 68ch; }

/* ------------------------------------------------------------
   Close — split, left aligned
   ------------------------------------------------------------ */

.h-close { padding: 88px 0; border-top: 1px solid var(--line); }
.h-close-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.h-close h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 14px;
  max-width: 16ch;
}
.h-close p { margin: 0; font-size: 17px; line-height: 1.58; color: var(--ink-2); max-width: 46ch; }

.h-close-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 30px 28px;
}
.h-close-card p { font-size: 14.5px; color: var(--ink-2); margin: 0 0 20px; max-width: none; }
.h-close-card .h-price {
  font-family: var(--display);
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.032em;
  font-weight: 600;
  margin: 0 0 8px;
}
.h-close-card .pill { width: 100%; }
.h-close-card .h-fine { margin: 14px 0 0; font-size: 13px; color: var(--muted-ink); }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 980px) {
  .h-sec { padding: 68px 0; }
  .h-hero-top { grid-template-columns: 1fr; gap: 26px; align-items: start; margin-bottom: 36px; }
  .h-hero h1 { max-width: 17ch; }
  .h-cap-strip { grid-template-columns: 1fr 1fr; }
  .h-svcs { grid-template-columns: 1fr; gap: 20px; }
  .h-tpls { grid-template-columns: 1fr 1fr; }
  .h-ledger-wrap { grid-template-columns: 1fr; gap: 32px; }
  .h-gains { grid-template-columns: 1fr; }
  .h-steps { grid-template-columns: 1fr 1fr; gap: 28px 26px; }
  .h-reads { grid-template-columns: 1fr; }
  .h-stance { grid-template-columns: 1fr; gap: 30px; padding: 40px 34px; }
  .h-close-grid { grid-template-columns: 1fr; gap: 32px; }
  .h-custom { grid-template-columns: 1fr; gap: 20px; }
  .h-custom .pill { justify-self: start; }
  .h-figcap { grid-template-columns: 1fr; gap: 5px; }
  .h-shots { gap: 26px; }
  .h-apis-in { gap: 20px; }
  .h-apis-list li { padding: 3px 14px; }
}

@media (max-width: 640px) {
  .h-sec { padding: 56px 0; }
  .h-hero { padding: 46px 0 44px; }
  .h-close { padding: 56px 0; }
  .h-tpls { grid-template-columns: 1fr; }
  .h-cap-strip { grid-template-columns: 1fr; }
  .h-cap-strip li { padding: 12px 16px 13px; }
  .h-figcap { padding: 14px 16px 16px; }
  .h-steps { grid-template-columns: 1fr; gap: 24px; }
  .h-stance { padding: 30px 22px; border-radius: var(--radius); }
  .h-svc-body { padding: 22px 20px 24px; }
  .h-custom { padding: 24px 20px; }
  .h-ledger { font-size: 14.5px; }
  .h-ledger th:nth-child(3), .h-ledger td:nth-child(3) { display: none; }
  .h-ledger .h-task small { font-size: 13px; }
  .h-ctas { gap: 16px; }
  .h-ctas .pill { width: 100%; }
  .h-gain { padding: 22px 20px; }
  .h-apis-list li { border-left: 0; padding: 3px 0; flex: 0 0 50%; }
}
