/* ============================================================
   NEFIMS — Design System
   Concept: "The Ledger & The Seal"
   An escrow account is a ledger entry that stays open until a
   seal is struck closing it. The whole site borrows the visual
   language of a bound ledger book: hairline rules, tab markers,
   monospace figures — and a wax-seal motif that visually "locks"
   whenever funds are secured.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Color tokens */
  --ink:          #0B0F19;
  --ledger-blue:  #16233F;
  --ledger-blue-2:#1E2E52;
  --paper:        #EDEFF2;
  --paper-warm:   #E6E4DC;
  --brass:        #A9824C;
  --brass-light:  #C9A876;
  --verdigris:    #4F7563;
  --verdigris-lt: #6E9482;
  --rule:         #C7CAD1;
  --rule-dark:    #35426A;
  --text-ink:     #1B2130;
  --text-muted:   #565F73;
  --text-on-dark: #E8EAF0;
  --text-on-dark-muted: #9CA6C0;

  /* Type */
  --display: 'Fraunces', Georgia, serif;
  --body: 'IBM Plex Sans', -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', monospace;

  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--text-ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

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

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

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; margin: 0; color: var(--ink); }
p { margin: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 14px;
  height: 1px;
  background: var(--brass);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,15,25,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-dark);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  color: var(--paper);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo .mark {
  width: 26px; height: 26px;
  border: 1.5px solid var(--brass);
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
}
.logo .mark::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brass);
}
nav.primary-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
nav.primary-nav a {
  font-size: 14.5px;
  color: var(--text-on-dark-muted);
  transition: color 0.15s ease;
}
nav.primary-nav a:hover, nav.primary-nav a.active { color: var(--paper); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 14.5px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-brass {
  background: var(--brass);
  color: var(--ink);
}
.btn-brass:hover { background: var(--brass-light); transform: translateY(-1px); }
.btn-ghost-dark {
  color: var(--paper);
  border-color: var(--rule-dark);
}
.btn-ghost-dark:hover { border-color: var(--brass); color: var(--brass-light); }
.btn-ghost-light {
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost-light:hover { border-color: var(--brass); color: var(--brass); }
.nav-toggle {
  display: none;
  background: none; border: none; color: var(--paper); font-size: 24px; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ledger-blue) 100%);
  color: var(--paper);
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 60px; align-items: center; position: relative; z-index: 2; }
.hero h1 {
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1.08;
  color: var(--paper);
  margin: 22px 0 22px;
  letter-spacing: -0.01em;
}
.hero h1 em { font-style: italic; color: var(--brass-light); }
.hero p.lede {
  font-size: 18px;
  color: var(--text-on-dark-muted);
  max-width: 46ch;
  margin-bottom: 34px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* Seal — the signature element */
.seal-wrap { display: grid; place-items: center; }
.seal {
  width: 260px; height: 260px;
  position: relative;
}
.seal svg { width: 100%; height: 100%; }
.seal .ring-outer { fill: none; stroke: var(--rule-dark); stroke-width: 1; stroke-dasharray: 3 5; }
.seal .ring-lock {
  fill: none; stroke: var(--brass); stroke-width: 1.5;
  stroke-dasharray: 780;
  stroke-dashoffset: 780;
  animation: seal-close 1.6s cubic-bezier(.4,0,.2,1) 0.4s forwards;
}
@keyframes seal-close { to { stroke-dashoffset: 0; } }
.seal text { font-family: var(--mono); fill: var(--text-on-dark-muted); font-size: 9.5px; letter-spacing: 0.12em; }
.seal .center-mark {
  fill: var(--brass);
  opacity: 0;
  animation: seal-appear 0.4s ease 1.9s forwards;
}
@keyframes seal-appear { to { opacity: 1; } }
.seal .status {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--verdigris-lt);
  text-align: center; opacity: 0; animation: seal-appear 0.5s ease 2.1s forwards;
}
.seal .status small { display: block; color: var(--text-on-dark-muted); font-size: 10px; margin-top: 4px; }

.trust-bar {
  background: var(--ink);
  border-top: 1px solid var(--rule-dark);
  padding: 22px 0;
}
.trust-bar .wrap {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.trust-bar .item {
  font-family: var(--mono); font-size: 12.5px; color: var(--text-on-dark-muted);
  display: flex; align-items: center; gap: 8px;
}
.trust-bar .item .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--verdigris-lt); }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
section.tight { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(28px, 3vw, 38px); margin-top: 14px; line-height: 1.15; }
.section-head p { color: var(--text-muted); font-size: 16.5px; margin-top: 14px; }

.on-dark { background: var(--ledger-blue); color: var(--text-on-dark); }
.on-dark h2, .on-dark h3, .on-dark h4 { color: var(--paper); }
.on-dark .section-head p { color: var(--text-on-dark-muted); }

/* Ledger tab stepper (genuine sequence: process steps) */
.ledger-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule-dark); border-bottom: 1px solid var(--rule-dark); }
.ledger-step {
  padding: 34px 30px;
  border-right: 1px solid var(--rule-dark);
  position: relative;
}
.ledger-step:last-child { border-right: none; }
.ledger-step .tab {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--brass);
  text-transform: uppercase; margin-bottom: 16px; display: block;
}
.ledger-step h3 { font-size: 21px; color: var(--paper); margin-bottom: 10px; }
.ledger-step p { color: var(--text-on-dark-muted); font-size: 15px; }

/* Persona / solutions cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.persona-card {
  background: var(--paper);
  padding: 32px 26px;
  transition: background 0.18s ease;
  cursor: pointer;
}
.persona-card:hover { background: #fff; }
.persona-card .tag { font-family: var(--mono); font-size: 11px; color: var(--text-muted); letter-spacing: 0.08em; }
.persona-card h4 { font-size: 19px; margin: 12px 0 8px; }
.persona-card p { font-size: 14.5px; color: var(--text-muted); }
.persona-card .go { margin-top: 16px; font-size: 13px; color: var(--brass); font-weight: 600; }

/* Differentiators */
.diff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); gap: 40px; }
.diff-item { border-top: 2px solid var(--brass); padding-top: 18px; }
.diff-item h4 { font-size: 18px; margin-bottom: 10px; }
.diff-item p { color: var(--text-muted); font-size: 15px; }

/* Testimonial */
.testimonial-strip { background: var(--paper-warm); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.testimonial-strip .wrap { padding: 64px 28px; }
blockquote { font-family: var(--display); font-size: clamp(22px,2.4vw,30px); font-weight: 500; line-height: 1.4; max-width: 780px; color: var(--ink); margin: 0; }
blockquote::before { content: '\201C'; color: var(--brass); }
.cite { margin-top: 22px; font-family: var(--mono); font-size: 13px; color: var(--text-muted); }

/* Fee calculator */
.calc-box {
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--rule-dark);
  padding: 40px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
}
.calc-input label { font-family: var(--mono); font-size: 12px; color: var(--text-on-dark-muted); letter-spacing: 0.08em; text-transform: uppercase; }
.calc-input input[type=range] { width: 100%; margin-top: 16px; accent-color: var(--brass); }
.calc-amount { font-family: var(--mono); font-size: 28px; color: var(--brass-light); margin-top: 10px; }
.calc-result { text-align: right; }
.calc-result .fee { font-family: var(--mono); font-size: 44px; color: var(--verdigris-lt); }
.calc-result .label { font-size: 12px; color: var(--text-on-dark-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 6px; }

/* Final CTA band */
.cta-band { background: var(--ink); color: var(--paper); text-align: center; padding: 88px 0; }
.cta-band h2 { color: var(--paper); font-size: clamp(28px,3.4vw,42px); max-width: 700px; margin: 0 auto 14px; }
.cta-band p { color: var(--text-on-dark-muted); margin-bottom: 34px; }

/* Footer */
footer { background: var(--ink); border-top: 1px solid var(--rule-dark); padding: 56px 0 28px; color: var(--text-on-dark-muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.footer-grid h5 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper); margin-bottom: 16px; }
.footer-grid a { display: block; font-size: 14px; padding: 5px 0; color: var(--text-on-dark-muted); }
.footer-grid a:hover { color: var(--brass-light); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule-dark); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12.5px; font-family: var(--mono); }
.compliance-note {
  background: var(--ledger-blue-2); border: 1px solid var(--rule-dark); padding: 14px 18px; margin-top: 24px;
  font-family: var(--mono); font-size: 12px; color: var(--text-on-dark-muted); line-height: 1.7;
}

/* Page hero (secondary pages) */
.page-hero { background: linear-gradient(180deg, var(--ink), var(--ledger-blue)); color: var(--paper); padding: 64px 0 56px; }
.page-hero h1 { color: var(--paper); font-size: clamp(32px,4vw,46px); margin-top: 16px; }
.page-hero p { color: var(--text-on-dark-muted); font-size: 17px; max-width: 60ch; margin-top: 14px; }

/* Tables */
.fee-table { width: 100%; border-collapse: collapse; margin-top: 32px; }
.fee-table th, .fee-table td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.fee-table th { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); border-bottom: 2px solid var(--ink); }
.fee-table td:first-child { font-weight: 600; }
.fee-table .amount { font-family: var(--mono); }

.plan-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 40px; }
.plan { background: #fff; padding: 34px 28px; }
.plan.featured { background: var(--ink); color: var(--paper); }
.plan.featured h3, .plan.featured .price { color: var(--paper); }
.plan .eyebrow2 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--brass); text-transform: uppercase; }
.plan h3 { font-size: 22px; margin: 10px 0 4px; }
.plan .price { font-family: var(--mono); font-size: 34px; margin: 14px 0; }
.plan .price span { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.plan ul { list-style: none; padding: 0; margin: 22px 0; }
.plan li { padding: 9px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.plan.featured li { border-top: 1px solid var(--rule-dark); }

/* Security / trust list */
.trust-list { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 20px; }
.trust-list .row { background: #fff; padding: 26px 28px; display: grid; grid-template-columns: 200px 1fr; gap: 24px; }
.trust-list .row .k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); }
.trust-list .row p { color: var(--text-muted); font-size: 15px; }
.placeholder-tag {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; background: #FDF3E7; color: #8A5A19;
  border: 1px dashed #C99A4A; padding: 2px 7px; border-radius: 3px; margin-left: 6px;
}

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 22px 0; font-family: var(--body); font-size: 16.5px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--ink); }
.faq-q .icon { font-family: var(--mono); color: var(--brass); font-size: 18px; transition: transform 0.2s ease; }
.faq-item.open .faq-q .icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-item.open .faq-a { max-height: 300px; }
.faq-a p { padding-bottom: 22px; color: var(--text-muted); font-size: 15px; max-width: 70ch; }

/* Contact form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.form-grid .full { grid-column: 1 / -1; }
label.f-label { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
input[type=text], input[type=email], input[type=tel], select, textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--rule); background: #fff; font-family: var(--body); font-size: 15px; color: var(--text-ink); border-radius: 2px;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(169,130,76,0.15); }
.form-note { font-size: 13px; color: var(--text-muted); margin-top: 10px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .seal-wrap { order: -1; }
  .seal { width: 180px; height: 180px; }
  .ledger-steps { grid-template-columns: 1fr; }
  .ledger-step { border-right: none; border-bottom: 1px solid var(--rule-dark); }
  .footer-grid { grid-template-columns: repeat(2,1fr); }
  .plan-grid { grid-template-columns: 1fr; }
  .calc-box { grid-template-columns: 1fr; }
  .calc-result { text-align: left; }
  .form-grid { grid-template-columns: 1fr; }
  nav.primary-nav { position: fixed; inset: 72px 0 0 0; background: var(--ink); flex-direction: column; padding: 32px 28px; gap: 4px; transform: translateX(100%); transition: transform 0.25s ease; }
  nav.primary-nav.open { transform: translateX(0); }
  nav.primary-nav a { padding: 14px 0; border-bottom: 1px solid var(--rule-dark); width: 100%; }
  .nav-toggle { display: block; }
  .trust-bar .wrap { justify-content: flex-start; }
}
