/* Rivenhall v2 — bright product-style service site */
:root {
  --ink: #0e1b2c;
  --text: #435064;
  --muted: #6d7889;
  --paper: #ffffff;
  --tint: #eef3ff;       /* soft blue section wash */
  --line: #e2e7f0;
  --blue: #1f55e6;       /* primary action */
  --blue-dark: #1442c0;
  --sun: #ffc531;        /* solar yellow highlight */
  --sun-soft: #fff4d1;
  --green: #12924a;      /* recovered / qualified */
  --green-soft: #e3f6ea;
  --r-lg: 20px;
  --r-md: 12px;
  --shadow: 0 18px 40px -18px rgba(14, 27, 44, .28);
  --wrap: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem; line-height: 1.6;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { color: var(--ink); margin: 0 0 .55em; line-height: 1.1; letter-spacing: -.025em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; max-width: 64ch; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
section { padding: 88px 0; }
.tint { background: var(--tint); }
.center { text-align: center; }
.center p { margin-left: auto; margin-right: auto; }
.lede { font-size: 1.22rem; }
.small { font-size: .92rem; color: var(--muted); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* highlighter swipe on key phrases */
.mark { -webkit-box-decoration-break: clone; box-decoration-break: clone; background: linear-gradient(transparent 58%, var(--sun) 58%); padding: 0 .08em; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none; letter-spacing: -.03em; }
.wordmark svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--sun); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 1rem; padding: 14px 24px; border-radius: 999px; border: 2px solid transparent; line-height: 1.2; transition: background .15s, transform .15s; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { padding: 10px 18px; font-size: .94rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 88px; background: radial-gradient(900px 480px at 85% 10%, var(--sun-soft), transparent 70%), linear-gradient(#fff, #f6f8ff); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 8px; font-size: .9rem; font-weight: 600; color: var(--ink); margin-bottom: 22px; }
.pill b { background: var(--sun); border-radius: 999px; padding: 2px 10px; font-weight: 700; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; padding: 0; list-style: none; font-size: .95rem; color: var(--ink); font-weight: 500; }
.trust-row li { display: flex; align-items: center; gap: 8px; }
.tick { width: 20px; height: 20px; border-radius: 50%; background: var(--green-soft); display: inline-grid; place-items: center; flex: none; }
.tick::after { content: ""; width: 8px; height: 5px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg) translate(1px, -1px); }

/* phone mockup */
.stage { position: relative; display: flex; justify-content: center; padding: 10px 0 120px; }
.phone { width: 300px; background: var(--ink); border-radius: 42px; padding: 12px; box-shadow: var(--shadow); }
.screen { background: #f4f6fb; border-radius: 32px; overflow: hidden; min-height: 520px; display: flex; flex-direction: column; }
.screen-top { background: #fff; padding: 22px 16px 12px; text-align: center; border-bottom: 1px solid var(--line); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--sun); color: var(--ink); font-weight: 800; display: grid; place-items: center; margin: 0 auto 4px; font-size: .9rem; }
.screen-top strong { display: block; color: var(--ink); font-size: .9rem; }
.screen-top span { font-size: .75rem; color: var(--muted); }
.thread { padding: 16px 12px; display: flex; flex-direction: column; gap: 10px; font-size: .84rem; line-height: 1.45; }
.bubble { max-width: 84%; padding: 10px 13px; border-radius: 18px; }
.bubble.out { background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 6px; align-self: flex-start; }
.bubble.in { background: var(--blue); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.stamp { font-size: .7rem; color: var(--muted); text-align: center; }
.float-card { position: absolute; right: -6px; bottom: 0; width: 250px; background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow); padding: 14px 16px; border: 1px solid var(--line); font-size: .86rem; }
.float-card .badge { display: inline-block; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: .75rem; border-radius: 999px; padding: 3px 10px; margin-bottom: 8px; }
.float-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; }
.float-card dt { color: var(--muted); }
.float-card dd { margin: 0; color: var(--ink); font-weight: 600; }
.mock-note { position: absolute; left: 0; bottom: 0; font-size: .75rem; color: var(--muted); }

/* ---------- Stat strip ---------- */
.stats { padding: 44px 0; border-bottom: 1px solid var(--line); }
.stats .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.stat-num { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--ink); letter-spacing: -.03em; line-height: 1; margin-bottom: 8px; }
.stat p { margin: 0; font-size: .97rem; }
.stats .small { grid-column: 1 / -1; margin: 0; }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.tint .card { border-color: transparent; }
.card p { margin: 0; }
.icon { width: 48px; height: 48px; border-radius: 14px; background: var(--sun-soft); display: grid; place-items: center; margin-bottom: 18px; }
.icon svg { width: 24px; height: 24px; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 18px; }
.step-when { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--blue); background: var(--tint); border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }
.tint .step-when { background: #fff; }

/* ---------- Preview: report + messages ---------- */
.preview { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.report { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 28px; }
.report-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 20px; }
.report-head strong { color: var(--ink); }
.tag { font-size: .75rem; font-weight: 700; background: var(--sun-soft); color: #7a5600; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.kpi { background: var(--tint); border-radius: var(--r-md); padding: 14px; }
.kpi b { display: block; font-size: 1.7rem; color: var(--ink); line-height: 1.1; }
.kpi span { font-size: .8rem; }
.kpi.good { background: var(--green-soft); }
.kpi.good b { color: var(--green); }
.funnel { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.funnel li { display: grid; grid-template-columns: 130px 1fr 36px; align-items: center; gap: 10px; margin-bottom: 9px; }
.bar { height: 10px; border-radius: 999px; background: var(--tint); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.funnel li:last-child .bar i { background: var(--green); }
.funnel b { color: var(--ink); text-align: right; }

.messages { display: flex; flex-direction: column; gap: 14px; }
.msg { background: #fff; border-radius: var(--r-md); border: 1px solid var(--line); padding: 18px 20px; }
.tint .msg { border-color: transparent; }
.msg-meta { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; color: var(--blue); margin-bottom: 6px; }
.msg-meta span { color: var(--muted); font-weight: 500; }
.msg p { margin: 0; color: var(--ink); font-size: .95rem; }

/* ---------- Comparison ---------- */
.compare-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare th, .compare td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .97rem; }
.compare thead th { color: var(--ink); font-size: 1rem; background: #fafbfe; }
.compare tbody th { color: var(--ink); font-weight: 600; width: 24%; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare .us { background: #f2f6ff; color: var(--ink); font-weight: 600; }
.compare thead .us { background: var(--blue); color: #fff; }

/* ---------- Calculator ---------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.calc-inputs { padding: 34px; }
.calc-out { background: var(--ink); color: #c9d3e2; padding: 34px; display: flex; flex-direction: column; justify-content: center; }
.field { margin-bottom: 24px; }
.field label { display: flex; justify-content: space-between; font-weight: 600; color: var(--ink); margin-bottom: 8px; font-size: .97rem; }
.field output { color: var(--blue); font-weight: 800; }
input[type=range] { width: 100%; accent-color: var(--blue); }
.big-num { font-size: clamp(2.6rem, 6vw, 3.8rem); font-weight: 800; color: var(--sun); letter-spacing: -.03em; line-height: 1; margin: 6px 0 10px; }
.calc-out p { color: #c9d3e2; }
.calc-out strong { color: #fff; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.price-card { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow); border: 2px solid var(--ink); padding: 34px; position: relative; }
.price-card .ribbon { position: absolute; top: -14px; left: 28px; background: var(--sun); color: var(--ink); font-weight: 800; font-size: .82rem; padding: 4px 14px; border-radius: 999px; }
.price { font-size: 4rem; font-weight: 800; color: var(--ink); letter-spacing: -.04em; line-height: 1; margin: 8px 0 4px; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.checklist { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); }
.checklist .tick { margin-top: 3px; }

/* ---------- Founder ---------- */
.founder { display: grid; grid-template-columns: 220px 1fr; gap: 44px; align-items: center; background: #fff; border-radius: var(--r-lg); padding: 36px; border: 1px solid var(--line); }
.portrait { width: 220px; height: 220px; border-radius: 24px; background: linear-gradient(135deg, var(--sun), #ffdd85); display: grid; place-items: center; font-size: 3.4rem; font-weight: 800; color: var(--ink); overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.founder blockquote { margin: 0 0 14px; font-size: 1.25rem; color: var(--ink); font-weight: 600; line-height: 1.45; }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 12px; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 22px; font-weight: 700; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--tint); color: var(--blue); display: grid; place-items: center; font-size: 1.2rem; font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 22px 20px; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--blue); color: #dce6ff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { margin-left: auto; margin-right: auto; }
.cta-band .actions { justify-content: center; }
.cta-band .btn-primary { background: var(--sun); color: var(--ink); }
.cta-band .btn-primary:hover { background: #ffd35f; color: var(--ink); }
.cta-band a:not(.btn) { color: #fff; }

/* ---------- Page head / misc ---------- */
.page-head { padding: 72px 0 40px; background: linear-gradient(#fff, #f6f8ff); }
.page-head p { font-size: 1.2rem; }
.timeline { display: grid; gap: 14px; }
.timeline .card { display: grid; grid-template-columns: 140px 1fr; gap: 20px; align-items: start; }
.timeline h3 { margin: 0; color: var(--blue); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.callout { background: var(--green-soft); border-radius: var(--r-lg); padding: 28px; }
.callout h3 { color: var(--green); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #a9b5c7; padding: 52px 0 36px; font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.site-footer strong { color: #fff; }
.site-footer p { margin: 0 0 6px; }
.site-footer a { color: #dfe6f1; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.footer-base { margin-top: 26px; padding-top: 20px; border-top: 1px solid #22324a; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap, .preview, .pricing, .calc, .two { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .founder { grid-template-columns: 1fr; text-align: left; }
  .stage { margin-top: 10px; }
}
@media (max-width: 720px) {
  section { padding: 64px 0; }
  .nav { display: none; }
  .site-header .btn { margin-left: auto; }
  .stats .wrap { grid-template-columns: 1fr; gap: 22px; }
  .grid-4 { grid-template-columns: 1fr; }
  .float-card { position: relative; right: auto; width: 100%; margin-top: 16px; }
  .stage { flex-direction: column; align-items: center; padding-bottom: 10px; }
  .mock-note { position: static; margin-top: 8px; }
  .funnel li { grid-template-columns: 105px 1fr 32px; }
  .timeline .card { grid-template-columns: 1fr; gap: 6px; }
  .portrait { width: 140px; height: 140px; font-size: 2.4rem; }
  .btn { width: 100%; }
  .site-header .btn { width: auto; }
  .calc-inputs, .calc-out, .price-card, .founder { padding: 24px; }
}
@media (max-width: 380px) {
  .phone { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
.mobile-nav { display: none; }
@media (max-width: 720px) {
  .mobile-nav { display: flex; gap: 18px; overflow-x: auto; padding: 0 20px 12px; font-size: .93rem; }
  .mobile-nav a { color: var(--text); text-decoration: none; white-space: nowrap; font-weight: 500; }
  .mobile-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--sun); }
}
