/*
 * score.sphoro.com
 *
 * Same palette as the partner portal, so someone who signs up does not land
 * somewhere that looks like a different company. Light and dark are one set of
 * custom properties rather than two stylesheets.
 */

:root {
  color-scheme: light dark;

  --bg: #fbfaf8;
  --bg-2: #f4f1ec;
  --panel: #ffffff;
  --line: #e6e2dc;
  --line-soft: #efece7;
  --ink: #17161a;
  --ink-2: #4a463f;
  --muted: #8c877f;
  --accent: #b4460f;
  --accent-soft: #fdf0e8;
  --ok: #1c7a4e;
  --ok-soft: rgba(28, 122, 78, 0.1);
  --warn: #9a6b06;
  --bad: #a92a20;

  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131216;
    --bg-2: #191820;
    --panel: #1d1c22;
    --line: #2f2d37;
    --line-soft: #262530;
    --ink: #eeecf2;
    --ink-2: #b8b4c0;
    --muted: #8b8794;
    --accent: #ff8a4c;
    --accent-soft: #2a1c14;
    --ok: #4ecb8c;
    --ok-soft: rgba(78, 203, 140, 0.12);
    --warn: #e2ac4b;
    --bad: #f4756c;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.022em;
  line-height: 1.15;
}
h1 {
  font-size: clamp(34px, 5.2vw, 54px);
  font-weight: 620;
}
h2 {
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 600;
}
h3 {
  font-size: 17px;
  font-weight: 600;
}
p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.mono {
  font-family: var(--mono);
  font-size: 0.86em;
}
.muted {
  color: var(--muted);
}

/* ── nav ────────────────────────────────────────────────────────────────── */

header.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 640;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand:hover {
  text-decoration: none;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.nav a.link {
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 500;
}
.nav a.link:hover {
  color: var(--ink);
  text-decoration: none;
}
.nav .spacer {
  flex: 1;
}
@media (max-width: 720px) {
  .nav a.link {
    display: none;
  }
}

/* ── buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 550;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.12s;
}
.btn:hover {
  opacity: 0.86;
  text-decoration: none;
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.lg {
  font-size: 15.5px;
  padding: 12px 22px;
}

/* ── sections ───────────────────────────────────────────────────────────── */

section {
  padding: 76px 0;
  border-top: 1px solid var(--line-soft);
}
section:first-of-type {
  border-top: 0;
}
.section-head {
  max-width: 620px;
  margin-bottom: 34px;
}
.section-head .eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-head p {
  color: var(--ink-2);
  margin-top: 12px;
  font-size: 16.5px;
}

/* ── hero ───────────────────────────────────────────────────────────────── */

.hero {
  padding: 84px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 52px;
  align-items: start;
}
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
.hero p.lede {
  font-size: 18.5px;
  color: var(--ink-2);
  margin-top: 20px;
  max-width: 30em;
}
.hero .cta {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.hero .note {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 52px;
}
.stats div {
  background: var(--bg);
  padding: 18px 20px;
}
.stats .n {
  font-size: 25px;
  font-weight: 620;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stats .l {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}
@media (max-width: 720px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── demo ───────────────────────────────────────────────────────────────── */

.demo {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.demo-head {
  padding: 15px 20px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}
.demo-head b {
  font-size: 14px;
  font-weight: 600;
}
.demo-head .tag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ok);
  background: var(--ok-soft);
  padding: 3px 9px;
  border-radius: 20px;
}
.demo-body {
  padding: 20px;
}
.demo-hash {
  font-family: var(--mono);
  font-size: 12.5px;
  word-break: break-all;
  background: var(--bg-2);
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--ink-2);
  min-height: 42px;
}
.demo-hash b {
  color: var(--ink);
  font-weight: 600;
}
.demo-rows {
  margin-top: 14px;
  font-size: 13.5px;
}
.demo-rows div {
  display: flex;
  gap: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}
.demo-rows div:last-child {
  border-bottom: 0;
}
.demo-rows span:first-child {
  color: var(--muted);
  flex: none;
  width: 44%;
}
.demo-rows span:last-child {
  font-family: var(--mono);
  font-size: 12.5px;
  word-break: break-all;
}
.meter {
  height: 5px;
  border-radius: 4px;
  background: var(--bg-2);
  overflow: hidden;
  margin: 14px 0 4px;
}
.meter i {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.5s ease;
}

/* ── cards ──────────────────────────────────────────────────────────────── */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 860px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
}
.card h3 {
  margin-bottom: 9px;
}
.card p {
  color: var(--ink-2);
  font-size: 14.5px;
}
.card .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

/* ── tables ─────────────────────────────────────────────────────────────── */

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.tbl th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 650;
  padding: 0 14px 10px 0;
  border-bottom: 1px solid var(--line);
}
.tbl td {
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-variant-numeric: tabular-nums;
}
.tbl tr:last-child td {
  border-bottom: 0;
}
.tbl td:first-child {
  color: var(--ink-2);
}
.scroll-x {
  overflow-x: auto;
}

/* ── pricing ────────────────────────────────────────────────────────────── */

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 860px) {
  .plans {
    grid-template-columns: 1fr;
  }
}
.plan {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 24px;
}
.plan.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.plan .tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.plan .price {
  font-size: 34px;
  font-weight: 640;
  letter-spacing: -0.035em;
  margin: 14px 0 2px;
  font-variant-numeric: tabular-nums;
}
.plan .price small {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}
.plan > p {
  color: var(--muted);
  font-size: 14px;
  margin: 6px 0 20px;
  min-height: 42px;
}
.plan ul {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  font-size: 14px;
}
.plan li {
  padding: 6px 0 6px 22px;
  position: relative;
  color: var(--ink-2);
}
.plan li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: 700;
}
.plan li.off {
  color: var(--muted);
}
.plan li.off::before {
  content: '—';
  color: var(--muted);
  font-weight: 400;
}

/* ── limits ─────────────────────────────────────────────────────────────── */

.limits {
  background: var(--bg-2);
}
.limit {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.limit:last-child {
  border-bottom: 0;
}
.limit b {
  display: block;
  font-size: 15px;
  margin-bottom: 5px;
}
.limit p {
  color: var(--ink-2);
  font-size: 14.5px;
}

/* ── code ───────────────────────────────────────────────────────────────── */

pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
  color: var(--ink-2);
}
pre .k {
  color: var(--accent);
}
pre .s {
  color: var(--ok);
}
pre .c {
  color: var(--muted);
}

/* ── cta + footer ───────────────────────────────────────────────────────── */

.cta-band {
  text-align: center;
  padding: 84px 0;
}
.cta-band p {
  color: var(--ink-2);
  margin: 14px auto 26px;
  max-width: 34em;
  font-size: 16.5px;
}

footer {
  border-top: 1px solid var(--line-soft);
  padding: 34px 0 46px;
  font-size: 13.5px;
  color: var(--muted);
}
.foot-inner {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}
footer a {
  color: var(--ink-2);
}
