/* ============================================================
   Statement Mill — shared stylesheet
   Palette: pine / mist / emerald / ink / paper (docs only)
   Type: Bricolage Grotesque (display) · Instrument Sans (body)
         IBM Plex Mono (figures, code)
   ============================================================ */

:root {
  --ink: #0f1a15;
  --pine: #11463a;
  --pine-deep: #0b332a;
  --mist: #f2f6f3;
  --white: #ffffff;
  --emerald: #17a06b;
  --emerald-dark: #10855a;
  --line: #d9e4dd;
  --muted: #5b6b63;
  --paper: #fdf9ef;        /* reserved for document motifs only */
  --paper-line: #e8dfc8;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(15, 26, 21, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 26, 21, 0.14);
  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.02em; }

h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--emerald-dark);
  display: block;
  margin-bottom: 14px;
}

.lede { font-size: 1.15rem; color: var(--muted); max-width: 56ch; }

.num, .amount, code, pre { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:focus-visible, a:focus-visible {
  outline: 3px solid var(--emerald);
  outline-offset: 2px;
}

.btn-primary { background: var(--emerald); color: #fff; }
.btn-primary:hover { background: var(--emerald-dark); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-ghost { background: transparent; color: var(--pine); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--pine); }

.btn-onDark { background: var(--white); color: var(--pine-deep); }
.btn-onDark:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--pine);
  display: grid;
  place-items: center;
  color: #fff;
}

.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-links a { text-decoration: none; font-size: 0.95rem; color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--ink); }

/* CTA button inside nav must beat .nav-links a specificity */
.nav-links a.btn-primary { color: #fff; font-size: 0.92rem; padding: 11px 20px; }
.nav-links a.btn-primary:hover { color: #fff; background: var(--emerald-dark); }

@media (max-width: 820px) {
  .nav-links li:not(.nav-cta) { display: none; }
}

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

.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(23, 160, 107, 0.10), transparent 60%),
    var(--mist);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding: 84px 0 96px;
}

@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; padding: 56px 0 64px; }
}

.hero h1 .u {
  background-image: linear-gradient(transparent 68%, rgba(23, 160, 107, 0.28) 68%);
}

.hero .lede { margin: 22px 0 30px; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.trust-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--pine-deep);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
}

.chip svg { width: 14px; height: 14px; }

/* ---------- signature: the mill ---------- */

.mill { position: relative; min-height: 480px; margin-bottom: 26px; }

.mill-doc {
  position: absolute;
  top: 0;
  left: 6%;
  width: 62%;
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-sm);
  padding: 18px 18px 22px;
  box-shadow: var(--shadow);
  transform: rotate(-3deg);
}

.mill-doc .doc-head {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8a7f61;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--paper-line);
  padding-bottom: 9px;
  margin-bottom: 12px;
}

.doc-line { height: 8px; border-radius: 4px; background: #e9e0c9; margin-bottom: 9px; }
.doc-line.w60 { width: 60%; }
.doc-line.w85 { width: 85%; }
.doc-line.w45 { width: 45%; }
.doc-line.w75 { width: 75%; }
.doc-line.smudge { background: repeating-linear-gradient(90deg, #e9e0c9 0 14px, #dfd4b6 14px 22px); }

/* flow badge: white circle, emerald diagonal arrow, gentle float */
.mill-flow {
  position: absolute;
  top: 30%;
  left: 47%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  color: var(--emerald);
  z-index: 2;
  animation: flowFloat 3s ease-in-out infinite;
}

@keyframes flowFloat {
  0%, 100% { transform: translate(0, 0); box-shadow: var(--shadow); }
  50% { transform: translate(3px, 3px); box-shadow: 0 14px 34px rgba(23, 160, 107, 0.18); }
}

.mill-table {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 78%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.mill-table .t-head {
  display: grid;
  grid-template-columns: 1.1fr 1.7fr 1fr;
  gap: 8px;
  padding: 12px 16px;
  background: var(--pine);
  color: #cfe6db;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.t-row {
  display: grid;
  grid-template-columns: 1.1fr 1.7fr 1fr;
  gap: 8px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  opacity: 0;
  transform: translateY(10px);
  animation: rowIn 0.5s ease forwards;
}

.t-row .num { color: var(--muted); font-size: 0.75rem; }
.t-row .amount { text-align: right; font-weight: 500; }
.t-row .amount.credit { color: var(--emerald-dark); }

.t-row:nth-child(2) { animation-delay: 0.35s; }
.t-row:nth-child(3) { animation-delay: 0.65s; }
.t-row:nth-child(4) { animation-delay: 0.95s; }
.t-row:nth-child(5) { animation-delay: 1.25s; }
.t-row:nth-child(6) { animation-delay: 1.55s; }

@keyframes rowIn { to { opacity: 1; transform: translateY(0); } }

.mill-verified {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: absolute;
  right: 14px;
  bottom: -38px;
  background: var(--ink);
  color: #d7f5e7;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  animation: rowIn 0.5s ease 1.9s forwards;
}

@media (prefers-reduced-motion: reduce) {
  .t-row, .mill-verified { animation: none; opacity: 1; transform: none; }
  .mill-arrow { animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 920px) {
  .mill { min-height: 430px; margin-top: 8px; }
}

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

.section { padding: 88px 0; }
.section-tight { padding: 64px 0; }
.section-mist { background: var(--mist); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 48px; }

/* formats strip */

.formats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.formats span {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.formats .sep { color: var(--line); }

/* steps */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.step-glyph {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--mist);
  color: var(--pine);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.95rem; }

/* features */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 920px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } }

.feature { padding: 26px 26px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.95rem; }
.feature .k {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--emerald-dark);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}

/* audiences */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } }

.panel {
  border-radius: var(--radius);
  padding: 36px;
  border: 1px solid var(--line);
}

.panel-dark { background: var(--pine-deep); color: #e8f3ee; border-color: var(--pine-deep); }
.panel-dark h3 { color: #fff; font-size: 1.5rem; margin-bottom: 12px; }
.panel-dark p { color: #b9d4c9; }
.panel-light h3 { font-size: 1.5rem; margin-bottom: 12px; }
.panel-light p { color: var(--muted); }

.panel ul { list-style: none; margin: 20px 0 26px; display: grid; gap: 10px; }
.panel li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.panel li svg { flex: none; margin-top: 4px; width: 15px; height: 15px; color: var(--emerald); }

.codebox {
  background: #0c211b;
  border-radius: var(--radius-sm);
  padding: 18px;
  font-size: 0.78rem;
  color: #b9e8d2;
  overflow-x: auto;
  line-height: 1.7;
  margin: 20px 0 26px;
}

.codebox .c { color: #5f8676; }
.codebox .s { color: #ffd88a; }

/* pricing */

.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 1080px) { .pricing { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .pricing { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }

.price-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.price-card:hover {
  transform: translateY(-6px);
  border-color: var(--emerald);
  box-shadow: var(--shadow-lg);
}

.price-card.selected {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(23, 160, 107, 0.16), var(--shadow-lg);
}

.price-card.featured { border-color: var(--emerald); box-shadow: var(--shadow-lg); }

@media (prefers-reduced-motion: reduce) {
  .price-card, .price-card:hover { transform: none; transition: none; }
  .mill-flow { animation: none; }
}

.badge {
  position: absolute;
  top: -13px;
  left: 28px;
  background: var(--emerald);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}

.price-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.price { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; letter-spacing: -0.02em; }
.price small { font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.price-note { font-size: 0.85rem; color: var(--muted); margin: 4px 0 20px; }

.price-card ul { list-style: none; display: grid; gap: 9px; margin-bottom: 26px; }
.price-card li { display: flex; gap: 9px; font-size: 0.92rem; align-items: flex-start; }
.price-card li svg { flex: none; margin-top: 4px; width: 14px; height: 14px; color: var(--emerald); }
.price-card .btn { margin-top: auto; justify-content: center; }

/* bank links */

.bank-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 920px) { .bank-grid { grid-template-columns: repeat(2, 1fr); } }

.bank-link {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--pine-deep);
  background: var(--white);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.bank-link:hover { border-color: var(--emerald); transform: translateY(-1px); }
.bank-link span { display: block; font-size: 0.75rem; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* FAQ */

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  padding: 18px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--emerald-dark); font-size: 1.2rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding: 0 0 20px; max-width: 64ch; }

/* CTA band */

.cta-band {
  background: var(--pine-deep);
  color: #fff;
  border-radius: var(--radius);
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-band h2 { color: #fff; max-width: 22ch; }
.cta-band p { color: #b9d4c9; margin-top: 10px; }

/* footer */

.footer { border-top: 1px solid var(--line); padding: 48px 0 40px; background: var(--mist); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 14px; font-family: var(--font-mono); font-weight: 500; }
.footer ul { list-style: none; display: grid; gap: 9px; }
.footer a { text-decoration: none; font-size: 0.92rem; color: var(--pine-deep); }
.footer a:hover { color: var(--emerald-dark); }
.footer .fineprint { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- per-bank page specifics ---------- */

.bank-hero { padding: 72px 0 64px; }
.bank-hero .lede { margin-top: 18px; }

.breadcrumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 22px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); }

.spec-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-top: 8px; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.spec-table th { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 500; }
.spec-table td.amount { font-family: var(--font-mono); }

.prose { max-width: 68ch; }
.prose p { margin-bottom: 16px; color: #33413a; }
.prose h2 { margin: 40px 0 16px; }

/* ---------- blog ---------- */

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 920px) { .post-grid { grid-template-columns: 1fr; max-width: 560px; } }

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-card:hover { transform: translateY(-4px); border-color: var(--emerald); box-shadow: var(--shadow-lg); }

.post-card .k {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--emerald-dark);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.post-card h3 { font-size: 1.15rem; margin-bottom: 10px; line-height: 1.3; }
.post-card p { color: var(--muted); font-size: 0.92rem; flex: 1; }

.post-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 18px;
  display: flex;
  gap: 12px;
}

.article-head { max-width: 760px; padding: 64px 0 40px; }
.article-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.article-head .post-meta { margin-top: 20px; }
.article-body { padding-bottom: 72px; }
.article-body .prose h3 { margin: 28px 0 12px; }
.article-body .prose ul, .article-body .prose ol { margin: 0 0 16px 22px; color: #33413a; }
.article-body .prose li { margin-bottom: 8px; }
.article-body .prose table { margin-bottom: 20px; }

@media (prefers-reduced-motion: reduce) {
  .post-card, .post-card:hover { transform: none; transition: none; }
}
