/* P2P Intel — p2p.rajdharma.co.in
   Ledger paper, fountain-pen ink, and two audit inks that only ever mean something:
   green = verified by code, red = flagged. */

:root {
  --paper: #eef2ed;
  --sheet: #fbfcf9;
  --ink: #16233f;
  --ink-soft: #4b5872;
  --rule: #c7d6ca;
  --rule-strong: #9fb7a6;
  --green: #1d6b3e;
  --red: #b42318;
  --amber: #8f5600;
  --focus: #2a5bd7;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.62;
  font-optical-sizing: auto;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--sans);
  font-stretch: 78%;
  font-weight: 760;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 4.7vw, 3.9rem); }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.3rem; font-stretch: 88%; font-weight: 700; line-height: 1.2; }

p { margin: 0 0 1em; max-width: 64ch; }
.lede { font-size: clamp(1.15rem, 1.6vw, 1.3rem); color: var(--ink); }
.muted { color: var(--ink-soft); }

.ui, button, input, select, label, .btn, nav, table, .figure {
  font-family: var(--sans);
}
.figure { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font-size: 1rem; font-weight: 640; font-stretch: 92%;
  border-radius: 4px; border: 2px solid var(--ink);
  text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #22325a; border-color: #22325a; text-decoration: none; }
.btn-quiet { background: transparent; color: var(--ink); border-color: transparent; text-decoration: underline; text-underline-offset: 0.25em; }
.btn-quiet:hover { text-decoration-thickness: 2px; }

/* ---------- header ---------- */

.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 72px;
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-name { font-family: var(--sans); font-weight: 800; font-stretch: 80%; font-size: 1.45rem; }
.brand-by { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); }
.site-nav { display: flex; align-items: center; gap: 26px; font-size: 0.95rem; }
.site-nav a:not(.btn) { text-decoration: none; color: var(--ink-soft); }
.site-nav a:not(.btn):hover { color: var(--ink); text-decoration: underline; }
.site-nav .btn { min-height: 40px; padding: 0 16px; font-size: 0.92rem; }
@media (max-width: 920px) { .site-nav a:not(.btn) { display: none; } }
@media (max-width: 480px) { .brand-by { display: none; } }

/* ---------- sections ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--rule); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head h2 { margin-bottom: 18px; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 80px); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- hero ---------- */

.hero { padding: clamp(40px, 5vw, 64px) 0 clamp(64px, 8vw, 104px); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(36px, 5vw, 72px); align-items: center;
}
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero-kicker { font-family: var(--sans); font-weight: 600; font-size: 1rem; color: var(--ink-soft); margin-bottom: 20px; }
.hero h1 { margin-bottom: 26px; }
.hero .lede { margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* The voucher: a synthetic invoice being vouched */
.voucher {
  position: relative;
  background: var(--sheet);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 22px 22px 26px;
  box-shadow: 0 1px 0 var(--rule-strong), 0 18px 40px -28px rgba(22, 35, 63, 0.45);
}
.voucher::before { /* the ledger's red margin line */
  content: ""; position: absolute; top: 50px; bottom: 0; left: 59%;
  border-left: 1px solid rgba(180, 35, 24, 0.35);
}
.voucher-head {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-family: var(--sans); font-size: 0.82rem; color: var(--ink-soft);
  margin-bottom: 10px;
}
.voucher-head b { color: var(--ink); font-weight: 700; }
.v-row {
  display: grid; grid-template-columns: 59% 41%; align-items: center;
  min-height: 40px; padding: 6px 0; border-bottom: 1px solid var(--rule);
}
.v-line { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 0.92rem; padding-right: 10px; }
.v-line .desc { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-line .amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.v-line.total .desc, .v-line.total .amt { font-weight: 800; }
.v-note {
  font-family: var(--serif); font-style: italic; font-size: 0.9rem; line-height: 1.25;
  padding-left: 14px;
}
.v-note.red { color: var(--red); }
.v-note.green { color: var(--green); }
.tick { width: 20px; height: 20px; flex: none; overflow: visible;
  fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tick.green { stroke: var(--green); }
.tick.red { stroke: var(--red); }
.v-line .desc.ring { position: relative; overflow: visible; flex: none; }
.ring svg.loop {
  position: absolute; left: -7px; top: -9px; width: calc(100% + 16px); height: calc(100% + 18px);
  max-width: none; overflow: visible; pointer-events: none;
}
.ring svg.loop path { fill: none; stroke: var(--red); stroke-width: 2; vector-effect: non-scaling-stroke; }
.voucher-foot {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  margin-top: 18px;
}
.exposure { font-family: var(--sans); }
.exposure .figure { font-size: 1.9rem; font-weight: 800; font-stretch: 82%; line-height: 1; display: block; }
.exposure small { font-size: 0.82rem; color: var(--ink-soft); }
.stamp {
  font-family: var(--sans); font-weight: 900; font-stretch: 70%;
  font-size: 1.9rem; letter-spacing: 0.04em; line-height: 1;
  color: var(--red); border: 3px solid var(--red); border-radius: 6px;
  padding: 8px 14px 6px; transform: rotate(-7deg);
  box-shadow: inset 0 0 0 2px var(--sheet), inset 0 0 0 4px rgba(180, 35, 24, 0.55);
  mix-blend-mode: multiply;
}
.stamp small { display: block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.02em; font-stretch: 90%; margin-top: 3px; }
.synthetic-tag { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-soft); margin-top: 12px; }
@media (max-width: 560px) {
  .voucher { padding: 16px 14px 20px; }
  .voucher::before { left: 56%; }
  .v-row { grid-template-columns: 56% 44%; }
  .v-line { font-size: 0.8rem; gap: 6px; }
  .v-note { font-size: 0.8rem; padding-left: 10px; }
  .tick { width: 18px; height: 18px; }
  .stamp { font-size: 1.5rem; }
}

/* the one orchestrated moment: ticks draw, notes appear, stamp lands */
@media (prefers-reduced-motion: no-preference) {
  .js .voucher .tick { stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw 0.5s ease-out forwards; }
  .js .voucher .loop { opacity: 0; animation: appear 0.4s ease-out forwards; }
  .js .voucher .v-note { opacity: 0; animation: appear 0.4s ease-out forwards; }
  .js .voucher .stamp { opacity: 0; transform: rotate(-7deg) scale(1.6); animation: stamp 0.28s cubic-bezier(.2, .9, .3, 1.2) forwards; animation-delay: 3.1s; }
  .js .voucher [data-step="1"], .js .voucher [data-step="1"] path { animation-delay: 0.5s; }
  .js .voucher [data-step="2"], .js .voucher [data-step="2"] path { animation-delay: 0.9s; }
  .js .voucher [data-step="3"], .js .voucher [data-step="3"] path { animation-delay: 1.3s; }
  .js .voucher [data-step="4"], .js .voucher [data-step="4"] path { animation-delay: 1.7s; }
  .js .voucher [data-step="5"], .js .voucher [data-step="5"] path { animation-delay: 2.1s; }
  .js .voucher [data-step="6"], .js .voucher [data-step="6"] path { animation-delay: 2.5s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
@keyframes stamp { to { opacity: 1; transform: rotate(-7deg) scale(1); } }

/* ---------- problem ---------- */

.leaks { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.leaks li {
  display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: start;
  padding: 16px 0; border-bottom: 1px solid var(--rule-strong);
}
.leaks .tick { margin-top: 3px; }
.leaks strong { font-family: var(--sans); font-weight: 650; font-stretch: 92%; display: block; font-size: 1.05rem; }
.leaks span { color: var(--ink-soft); font-size: 1rem; }

/* ---------- how it works (a real sequence) ---------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.steps li { counter-increment: step; padding: 0 24px 0 0; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--rule-strong); }
.steps li::before {
  content: counter(step); display: block;
  font-family: var(--sans); font-weight: 800; font-stretch: 75%; font-size: 2.6rem; line-height: 1; margin-bottom: 14px;
}
.steps h3 { margin-bottom: 8px; }
.steps p { font-size: 1rem; color: var(--ink-soft); }
.decisions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.decision {
  font-family: var(--sans); font-size: 0.82rem; font-weight: 700; padding: 3px 8px; border-radius: 3px;
  border: 1.5px solid currentColor;
}
.d-approve { color: var(--green); }
.d-partial { color: var(--amber); }
.d-hold { color: var(--ink); }
.d-escalate { color: var(--red); }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .steps li + li { padding-left: 0; border-left: 0; }
}

/* ---------- evidence ---------- */

.finding {
  background: var(--sheet); border: 1px solid var(--rule-strong); border-left: 4px solid var(--red);
  padding: 22px 24px; border-radius: 2px;
}
.finding-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: baseline; margin-bottom: 14px; }
.finding-head h3 { font-size: 1.15rem; }
.finding-head .figure { font-weight: 800; font-size: 1.15rem; }
.quote {
  margin: 0 0 10px; padding: 10px 14px; border-left: 2px solid var(--rule-strong);
  font-size: 0.98rem; background: rgba(199, 214, 202, 0.25);
}
.quote cite { display: flex; align-items: center; gap: 8px; font-style: normal; font-family: var(--sans); font-size: 0.82rem; color: var(--ink-soft); margin-top: 4px; }
.verified { color: var(--green); font-weight: 700; }
.unverified { color: var(--amber); font-weight: 700; }
.calc { font-family: var(--sans); font-variant-numeric: tabular-nums; font-size: 0.95rem; margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--rule-strong); }
.principles { list-style: none; padding: 0; margin: 28px 0 0; }
.principles li { padding: 12px 0; border-top: 1px solid var(--rule); }
.principles b { font-family: var(--sans); font-weight: 700; }

/* ---------- SAP ---------- */

.lanes { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule-strong); background: var(--sheet); }
.lane { padding: 24px; }
.lane + .lane { border-left: 1px solid var(--rule-strong); }
.lane h3 { margin-bottom: 12px; }
.lane ul { margin: 0; padding-left: 1.1em; font-size: 1rem; }
.lane li { margin-bottom: 6px; }
.lane-note { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); margin: 14px 0 0; }
@media (max-width: 640px) {
  .lanes { grid-template-columns: 1fr; }
  .lane + .lane { border-left: 0; border-top: 1px solid var(--rule-strong); }
}

/* ---------- offers ---------- */

.offer { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 80px); }
@media (max-width: 860px) { .offer { grid-template-columns: 1fr; } }
.price { font-family: var(--sans); margin: 22px 0 26px; }
.price .figure { font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 800; font-stretch: 78%; line-height: 1; display: block; }
.price small { font-size: 0.95rem; color: var(--ink-soft); }
.terms { font-family: var(--sans); list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.terms li { border: 1px solid var(--rule-strong); border-radius: 3px; padding: 4px 10px; font-size: 0.9rem; background: var(--sheet); }
.spec { border-top: 2px solid var(--ink); }
.spec-row { display: grid; grid-template-columns: 170px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--rule-strong); }
.spec-row dt { font-family: var(--sans); font-weight: 700; font-size: 0.98rem; }
.spec-row dd { margin: 0; font-size: 1rem; }
.spec-row ul { margin: 0; padding-left: 1.1em; }
.spec-row li { margin-bottom: 4px; }
@media (max-width: 560px) { .spec-row { grid-template-columns: 1fr; gap: 6px; } }
.offer-pilot { background: var(--sheet); border: 1px solid var(--rule-strong); padding: clamp(24px, 4vw, 44px); }

/* ---------- demo cases ---------- */

.cases { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.cases th { text-align: left; font-weight: 700; font-size: 0.88rem; color: var(--ink-soft); padding: 0 16px 10px 0; border-bottom: 2px solid var(--ink); }
.cases td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule-strong); vertical-align: top; }
.cases td:first-child { font-weight: 700; white-space: nowrap; }
.cases td.found { font-family: var(--serif); }
.cases .figure { white-space: nowrap; }
.table-scroll { overflow-x: auto; }
@media (max-width: 760px) {
  .cases thead { display: none; }
  .cases, .cases tbody, .cases tr, .cases td { display: block; width: 100%; }
  .cases tr { padding: 14px 0; border-bottom: 1px solid var(--rule-strong); }
  .cases td { border: 0; padding: 3px 0; }
}
.footnote { font-family: var(--sans); font-size: 0.88rem; color: var(--ink-soft); margin-top: 18px; }

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

.faq { border-top: 2px solid var(--ink); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--rule-strong); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-family: var(--sans); font-weight: 650; font-stretch: 92%; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 12px; font-size: 1.6rem; font-weight: 400; line-height: 1.2;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 20px; }

/* ---------- lead form ---------- */

.book { background: var(--ink); color: #eef2ed; border-top: 0; }
.book h2, .book .lede { color: #fff; }
.book .muted { color: #b9c3d6; }
.book a { color: #fff; }
.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label, .field legend { font-size: 0.92rem; font-weight: 600; color: #fff; }
.field .opt { font-weight: 400; color: #b9c3d6; }
.field input, .field select {
  font-size: 1rem; min-height: 48px; padding: 10px 12px; border-radius: 4px;
  border: 1px solid #5a6a8a; background: #fff; color: var(--ink);
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border: 2px solid #ffb4ab; }
.field .error { font-size: 0.86rem; color: #ffb4ab; min-height: 0; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 4px; }
.checks label, .consent label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 0.95rem; color: #eef2ed; }
.checks input, .consent input { width: 18px; height: 18px; min-height: 0; accent-color: #9fd3b0; }
.consent { grid-column: 1 / -1; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.book .btn-primary { background: #fff; color: var(--ink); border-color: #fff; }
.book .btn-primary:hover { background: #dfe7e0; border-color: #dfe7e0; }
.form-status { font-family: var(--sans); font-size: 0.98rem; }
.form-status.ok { color: #9fd3b0; }
.form-status.bad { color: #ffb4ab; }
@media (max-width: 640px) { .lead-form { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */

.site-footer { padding: 48px 0 56px; font-family: var(--sans); font-size: 0.9rem; color: var(--ink-soft); }
.site-footer .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; }
.site-footer p { margin: 0 0 8px; }
.site-footer .brand-name { color: var(--ink); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- legal page ---------- */

.legal { padding: 56px 0 96px; }
.legal h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); margin-bottom: 12px; }
.legal h2 { font-size: 1.5rem; margin: 36px 0 12px; }
.legal ul { max-width: 64ch; }
