/* merit.legal — editorial landing */

:root {
  --paper:    #faf8f4;
  --paper-2:  #f2eee6;
  --ink:      #16181b;
  --ink-soft: #43474d;
  --muted:    #767a82;
  --rule:     #ded8cc;
  --rule-soft:#e9e4da;
  --accent:   #1e4b3c;
  --accent-2: #2f6b56;
  --accent-bg: rgba(30,75,60,.07);
  --sel:      rgba(30,75,60,.16);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 1160px;
  --gutter: 28px;
  --ease: cubic-bezier(.2,.7,.3,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:    #101215;
    --paper-2:  #16191d;
    --ink:      #eceae5;
    --ink-soft: #b6bac0;
    --muted:    #878c94;
    --rule:     #2a2e34;
    --rule-soft:#212529;
    --accent:   #7cbda3;
    --accent-2: #96d0b7;
    --accent-bg: rgba(124,189,163,.1);
    --sel:      rgba(124,189,163,.22);
  }
}

* { 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(--sans);
  font-size: 17px;
  line-height: 1.62;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--sel); }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.012em;
  text-wrap: balance;
  margin: 0 0 .55em;
}
h1 { font-size: clamp(2.45rem, 5.6vw, 4.4rem); line-height: 1.04; letter-spacing: -.022em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); line-height: 1.12; }
h3 { font-size: 1.22rem; line-height: 1.28; }

p, li, dd { text-wrap: pretty; }
p { margin: 0 0 1rem; color: var(--ink-soft); }

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

.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; }
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--rule); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 66px; }

.brand { display: inline-flex; align-items: baseline; gap: 9px; }
.brand-mark {
  font-family: var(--serif); font-size: 1.05rem; line-height: 1;
  width: 26px; height: 26px; display: inline-grid; place-items: center;
  border: 1px solid var(--ink); color: var(--ink); align-self: center;
}
.brand-name { font-family: var(--serif); font-size: 1.3rem; letter-spacing: .01em; }

.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { display: inline-flex; align-items: baseline; gap: 6px; font-size: .93rem; color: var(--ink-soft); position: relative; padding: 2px 0; }
.nav a i { font-family: var(--mono); font-style: normal; font-size: .66rem; color: var(--muted); letter-spacing: .02em; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px; background: currentColor; transition: right .28s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nav + .header-actions { margin-left: 0; }

.lang { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.lang button { background: none; border: 0; padding: 2px 1px; font: inherit; color: var(--muted); cursor: pointer; letter-spacing: .06em; }
.lang button:hover { color: var(--ink); }
.lang button.is-active { color: var(--ink); border-bottom: 1px solid var(--accent); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: .95rem; font-weight: 500;
  padding: 13px 26px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn:hover { color: #0d1113; } }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-text {
  background: none; border: 0; border-bottom: 1px solid var(--rule); color: var(--ink);
  padding: 13px 2px; font-weight: 400;
}
.btn-text:hover { background: none; color: var(--accent); border-color: var(--accent); }
.btn[disabled] { opacity: .5; cursor: default; }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px 0; }
.burger span { display: block; width: 22px; height: 1px; background: var(--ink); margin: 6px 0; transition: transform .25s var(--ease), opacity .2s var(--ease); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.hero { padding: clamp(56px, 9vw, 104px) 0 clamp(40px, 6vw, 72px); }
.hero-title { max-width: 15ch; margin-bottom: clamp(32px, 5vw, 56px); }

.hero-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 76px); align-items: start; }
.hero-lead .lead { margin: 0; }
.lead { font-size: clamp(1.06rem, 1.35vw, 1.22rem); line-height: 1.55; color: var(--ink-soft); max-width: 54ch; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 26px; }

.masthead { margin: 6px 0 0; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.masthead > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule-soft); }
.masthead dt { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding-top: 2px; }
.masthead dd { margin: 0; font-size: .92rem; text-align: right; color: var(--ink); }

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 5vw, 64px);
  margin: clamp(48px, 7vw, 84px) 0 0; padding-top: 26px; border-top: 1px solid var(--rule);
}
.stats > div { display: flex; flex-direction: column; gap: 8px; }
.stats dt { font-family: var(--serif); font-size: clamp(2.1rem, 3.6vw, 2.9rem); line-height: 1; letter-spacing: -.02em; font-variant-numeric: lining-nums; }
.stats dd { margin: 0; font-size: .9rem; line-height: 1.45; color: var(--muted); max-width: 30ch; }

/* ---------- section chrome ---------- */

.section { padding: clamp(58px, 8vw, 100px) 0; }
.section.tinted { background: var(--paper-2); }

.sec-no {
  display: flex; align-items: baseline; gap: 12px; margin: 0 0 28px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.sec-no i { font-style: normal; color: var(--accent); }
.sec-no::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.sec-head { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: end; margin-bottom: clamp(34px, 5vw, 58px); }
.sec-head h2 { max-width: 18ch; margin: 0; }
.section-lead { font-size: 1.02rem; color: var(--ink-soft); margin: 0; max-width: 46ch; }

/* ---------- 3 columns ---------- */

.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 46px); }
.cols-3 h3 { margin-bottom: .5em; }
.cols-3 p { margin: 0; font-size: .95rem; }
.cols-3.bordered article { border-top: 1px solid var(--ink); padding-top: 20px; }

/* ---------- ledger (platform) ---------- */

.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(32px, 6vw, 76px); border-top: 1px solid var(--rule); }
.ledger-row { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.ledger-no { font-family: var(--mono); font-size: .72rem; color: var(--accent); letter-spacing: .08em; padding-top: .45em; }
.ledger-row h3 { margin: 0 0 .35em; }
.ledger-row p { grid-column: 2; margin: 0; font-size: .95rem; }
@media (min-width: 861px) {
  .ledger-row:nth-last-child(-n+2) { border-bottom: 0; }
}

/* ---------- steps ---------- */

.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.steps li {
  display: grid; grid-template-columns: 84px minmax(0, 22ch) minmax(0, 1fr); gap: 0 clamp(24px, 4vw, 56px);
  align-items: baseline; padding: 28px 0; border-bottom: 1px solid var(--rule);
  transition: background .25s var(--ease);
}
.steps li:hover { background: var(--accent-bg); }
.steps .num { font-family: var(--mono); font-size: .78rem; color: var(--accent); letter-spacing: .1em; }
.steps h3 { margin: 0; }
.steps li > div { display: contents; }
.steps p { margin: 0; font-size: .95rem; }

/* ---------- split (security / contact) ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 84px); align-items: start; }
.split h2 { max-width: 17ch; }

blockquote {
  margin: 30px 0 0; padding: 0 0 0 20px; border-left: 2px solid var(--accent);
  font-family: var(--serif); font-size: 1.14rem; line-height: 1.45; color: var(--ink); text-wrap: pretty;
}

.checks { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.checks li {
  counter-increment: c; position: relative; padding: 15px 0 15px 40px;
  border-bottom: 1px solid var(--rule-soft); font-size: .96rem; color: var(--ink-soft);
}
.checks li::before {
  content: counter(c, decimal-leading-zero); position: absolute; left: 0; top: 17px;
  font-family: var(--mono); font-size: .7rem; color: var(--accent); letter-spacing: .06em;
}

/* ---------- docket (roadmap) ---------- */

.docket { border-top: 1px solid var(--ink); }
.docket-row {
  display: grid; grid-template-columns: 130px minmax(0, 20ch) minmax(0, 1fr); gap: 4px clamp(20px, 4vw, 52px);
  align-items: baseline; padding: 24px 0; border-bottom: 1px solid var(--rule);
}
.docket-date { font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; }
.docket-row h3 { margin: 0; }
.docket-row p { margin: 0; font-size: .94rem; }

/* ---------- contact ---------- */

.contact { background: var(--paper-2); border-top: 1px solid var(--rule); }
.split-form { align-items: start; }
.contact .sec-no { margin-bottom: 22px; }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.form input, .form textarea {
  width: 100%; font: inherit; font-size: .97rem; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  padding: 8px 0; border-radius: 0; resize: vertical;
  transition: border-color .2s var(--ease);
}
.form input:focus, .form textarea:focus { outline: none; border-bottom-color: var(--accent); }
.form input.invalid, .form textarea.invalid { border-bottom-color: #b4443a; }
.form .btn { justify-self: start; margin-top: 6px; }
.form-hint { font-size: .82rem; color: var(--muted); margin: 0; max-width: 46ch; }
.form-status { font-size: .9rem; margin: 0; min-height: 1.3em; color: var(--accent); }
.form-status.error { color: #b4443a; }
@media (prefers-color-scheme: dark) { .form-status.error { color: #e08279; } }
.form-done { border-top: 1px solid var(--ink); padding-top: 26px; }
.form-done:focus { outline: none; }
.form-done h3 { margin: 0 0 .4em; }
.form-done p { margin: 0; max-width: 40ch; }

[hidden] { display: none !important; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

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

.site-footer { border-top: 1px solid var(--rule); padding: 34px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.footer-brand .brand-name { font-size: 1.1rem; }
.disclaimer { font-size: .82rem; color: var(--muted); margin: 8px 0 0; max-width: 54ch; }
.copy { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; color: var(--muted); margin: 0; }

/* ---------- reveal ---------- */

.rv { opacity: 0; transform: translateY(10px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ---------- responsive ---------- */

@media (max-width: 1040px) {
  .nav { display: none; }
}

@media (max-width: 860px) {
  .hero-body, .sec-head, .split { grid-template-columns: 1fr; }
  .sec-head { align-items: start; gap: 18px; }
  .hero-title { max-width: 18ch; }
  .ledger { grid-template-columns: 1fr; }
  .cols-3 { grid-template-columns: 1fr; gap: 30px; }
  .steps li, .docket-row { grid-template-columns: 60px minmax(0, 1fr); }
  .steps li > div { display: block; }
  .steps p { margin-top: .4em; }
  .docket-row { grid-template-columns: 1fr; gap: 6px; }
  .docket-row h3 { margin-top: 2px; }
  .stats { grid-template-columns: 1fr; gap: 22px; }
  .stats > div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 16px; align-items: baseline; }
  .stats dd { max-width: none; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .burger { display: block; }
  .nav {
    display: grid; position: fixed; inset: 66px 0 auto; background: var(--paper);
    border-bottom: 1px solid var(--rule); padding: 4px var(--gutter) 18px; gap: 0;
    opacity: 0; transform: translateY(-6px); pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--rule-soft); font-size: 1rem; }
  .nav a::after { display: none; }
  .header-actions .btn-sm { display: none; }
  .footer-inner { flex-direction: column; gap: 20px; }
}
