/* Law Office of Madaen / TopPaymaster
   Navy, white and light gray sections with gold accents. Serif headings, sans serif text. */
:root {
  --navy: #14213d;
  --navy-2: #1d2f54;
  --gold: #b8913a;
  --gold-dark: #977525;
  --gold-soft: #f3ead6;
  --ink: #1e2433;
  --muted: #5a6172;
  --line: #dce2ec;
  --light: #f4f6f9;
  --white: #ffffff;
  --radius: 6px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--ink); background: var(--white); font-size: 1.0625rem; line-height: 1.65; }
h1, h2, h3, h4, .h1, .h2, .h3, .h4 { font-family: var(--serif); font-weight: 700; color: var(--navy); line-height: 1.2; }
h1, .h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); }
h2, .h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
h3, .h3 { font-size: 1.45rem; }
a { color: var(--navy-2); text-underline-offset: 3px; }
a:hover { color: var(--gold-dark); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--gold); color: #fff; padding: .5rem 1rem; z-index: 2000; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Top bar and header */
.topbar { background: var(--navy); color: #c9d1e0; font-size: .875rem; padding: .35rem 0; }
.topbar a { color: #fff; text-decoration: none; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1030; }
.navbar { padding: .65rem 0; }
.navbar-brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: var(--gold); display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.6rem; font-weight: 700; border: 2px solid var(--gold); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--serif); font-size: 1.35rem; color: var(--navy); }
.brand-text small { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dark); }
.nav-link { color: var(--ink); font-weight: 600; font-size: .98rem; }
.nav-link:hover, .nav-link.active { color: var(--gold-dark); }
.dropdown-menu { border-color: var(--line); border-radius: var(--radius); }
.dropdown-item:active { background: var(--navy); }

/* Buttons */
.btn { border-radius: var(--radius); font-weight: 600; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover, .btn-gold:focus { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.btn-outline-gold { border: 2px solid var(--gold); color: var(--gold-dark); background: transparent; }
.btn-outline-gold:hover { background: var(--gold); color: #fff; }
.btn-navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-outline-light-gold { border: 2px solid rgba(255,255,255,.7); color: #fff; }
.btn-outline-light-gold:hover { background: #fff; color: var(--navy); }

/* Sections: alternating navy, white and light gray */
.section { padding: 4.5rem 0; }
.section-sm { padding: 3rem 0; }
.section-light { background: var(--light); }
.section-navy { background: var(--navy); color: #dfe5f0; }
.section-navy h1, .section-navy h2, .section-navy h3 { color: #fff; }
.section-navy a:not(.btn) { color: #f1d999; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .6rem; }
.gold-rule { width: 64px; height: 3px; background: var(--gold); border: 0; opacity: 1; margin: 1rem 0 1.5rem; }
.text-center .gold-rule { margin-left: auto; margin-right: auto; }
.lead { font-size: 1.2rem; color: var(--muted); }
.section-navy .lead { color: #c9d1e0; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #dfe5f0; padding: 5rem 0 4.5rem; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; border: 2px solid rgba(184,145,58,.25); }
.hero h1 { color: #fff; max-width: 780px; }
.hero .lead { color: #c9d1e0; max-width: 680px; }
.hero-phone { font-family: var(--serif); font-size: 1.6rem; color: #fff; text-decoration: none; }
.hero-phone:hover { color: #f1d999; }
.trust-row { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .95rem; }
.trust-row span::before { content: "\2713"; color: var(--gold); font-weight: 700; margin-right: .45rem; }

.page-hero { background: var(--navy); color: #c9d1e0; padding: 3.5rem 0 3rem; }
.page-hero h1 { color: #fff; }
.page-hero .lead { color: #c9d1e0; max-width: 760px; }
.breadcrumb { font-size: .875rem; margin-bottom: .75rem; }
.breadcrumb a { color: #f1d999; }
.breadcrumb-item.active, .breadcrumb-item + .breadcrumb-item::before { color: #9aa6bd; }

/* Cards */
.card-tile { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); padding: 1.6rem; height: 100%;
  transition: box-shadow .2s, transform .2s; }
.card-tile:hover { box-shadow: 0 10px 28px rgba(20,33,61,.1); transform: translateY(-2px); }
.card-tile h3 { font-size: 1.35rem; }
.card-tile a.stretched-link { text-decoration: none; }
.card-tile .more { font-weight: 600; color: var(--gold-dark); }
.icon-circle { width: 52px; height: 52px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-dark); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.icon-circle svg { width: 26px; height: 26px; }
.form-card { border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); box-shadow: 0 6px 22px rgba(20,33,61,.06); }
.form-card .card-body { padding: 2rem; }

/* Steps */
ol.steps { counter-reset: step; list-style: none; padding: 0; }
ol.steps > li { counter-increment: step; position: relative; padding: 0 0 1.4rem 3.4rem; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; width: 2.3rem; height: 2.3rem; border-radius: 50%;
  background: var(--navy); color: var(--gold); font-family: var(--serif); font-weight: 700; font-size: 1.25rem; display: flex; align-items: center; justify-content: center; }
.section-navy ol.steps > li::before { background: var(--gold); color: var(--navy); }

/* Content pages */
.prose { max-width: 780px; }
.prose h2 { margin-top: 2.2rem; font-size: 1.85rem; }
.prose h3 { margin-top: 1.6rem; }
.prose table { font-size: .97rem; }
.prose ul li, .prose ol li { margin-bottom: .35rem; }
.content-section + .content-section { margin-top: 2.5rem; }
.sidebar-box { background: var(--light); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.sidebar-box.navy { background: var(--navy); color: #dfe5f0; border: 0; }
.sidebar-box.navy h3 { color: #fff; }
.sticky-side { position: sticky; top: 100px; }
.note-box { background: var(--gold-soft); border-left: 4px solid var(--gold); padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; }
.wire-warning { background: rgba(184,145,58,.12); border: 1px solid rgba(184,145,58,.4); border-radius: var(--radius); padding: .75rem 1rem; margin-top: .75rem; }
.security-note { font-size: .92rem; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }

/* FAQ */
.accordion-button { font-weight: 600; color: var(--navy); }
.accordion-button:not(.collapsed) { background: var(--gold-soft); color: var(--navy); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(184,145,58,.35); }

/* Blog */
.post-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; height: 100%; background: #fff; }
.post-card h2, .post-card h3 { font-size: 1.4rem; }
.post-meta { font-size: .85rem; color: var(--muted); }
.post-meta .cat { color: var(--gold-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.article-body { font-size: 1.1rem; }

/* CTA band */
.cta-band { background: var(--navy); color: #dfe5f0; padding: 3.5rem 0; border-top: 4px solid var(--gold); }
.cta-band h2 { color: #fff; }

/* Attorney */
.attorney-photo { border-radius: var(--radius); border: 4px solid #fff; box-shadow: 0 10px 30px rgba(20,33,61,.18); width: 100%; height: auto; }

/* Forms */
.form-label { font-weight: 600; font-size: .96rem; }
.form-control, .form-select { border-radius: var(--radius); border-color: #c8d0dd; }
.form-control:focus, .form-select:focus { border-color: var(--gold); box-shadow: 0 0 0 .2rem rgba(184,145,58,.2); }
.input-validation-error { border-color: #b42318 !important; }
.field-validation-error, .text-danger { color: #b42318 !important; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
fieldset.kyc { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; background: #fff; }
fieldset.kyc legend { float: none; width: auto; padding: 0 .5rem; font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--navy); }

/* Portal */
.portal-nav .nav-link { border-radius: var(--radius); color: var(--ink); }
.portal-nav .nav-link.active { background: var(--navy); color: #fff; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.checklist .tick { flex: 0 0 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--light); color: var(--muted); border: 2px solid var(--line); }
.checklist .done .tick { background: #e7f4ec; color: #1c7c45; border-color: #9fd3b4; }
.status { display: inline-block; font-size: .78rem; font-weight: 700; padding: .15rem .55rem; border-radius: 99px; background: var(--light); color: var(--muted); border: 1px solid var(--line); }
.status-ok { background: #e7f4ec; color: #1c7c45; border-color: #9fd3b4; }
.status-wait { background: #fff6e0; color: #8a6100; border-color: #f0d48a; }
.status-bad { background: #fdecec; color: #b42318; border-color: #f4b4ad; }
.qr-box { display: inline-block; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); min-height: 170px; min-width: 170px; }
ol.auth-steps > li { margin-bottom: 1.5rem; }
.identity-area h1, .identity-area h2, .identity-area h3 { font-family: var(--serif); }

/* Agreement and signing */
.agreement { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 2.25rem; font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1.6; }
.agreement h2 { text-align: center; text-transform: uppercase; letter-spacing: .06em; font-size: 1.6rem; }
.agreement h3 { font-size: 1.12rem; margin-top: 1.4rem; font-family: Georgia, serif; }
.agreement-letterhead { text-align: center; border-bottom: 2px solid var(--navy); padding-bottom: .75rem; margin-bottom: 1.25rem; }
.agreement-scroll { max-height: 70vh; overflow-y: auto; }
.sig-pad-wrap { border: 2px dashed #b9c2d2; border-radius: var(--radius); background: #fff; position: relative; touch-action: none; }
.sig-pad-wrap canvas { width: 100%; height: 180px; display: block; cursor: crosshair; }
.sig-pad-wrap .sig-line { position: absolute; left: 6%; right: 6%; bottom: 40px; border-bottom: 1px solid #9aa6bd; pointer-events: none; }
.sig-image { max-height: 90px; max-width: 320px; border-bottom: 1px solid #555; }
.cert td, .cert th { font-size: .88rem; vertical-align: top; }
.code-hash { font-family: Consolas, monospace; font-size: .8rem; word-break: break-all; }

/* Admin */
.admin-table td, .admin-table th { font-size: .94rem; vertical-align: middle; }
pre.log { background: #0e1626; color: #d4dbe8; padding: 1rem; border-radius: var(--radius); max-height: 70vh; overflow: auto; font-size: .8rem; white-space: pre-wrap; }

/* Footer */
.site-footer { background: #0e1830; color: #aeb8cc; padding: 3.5rem 0 2rem; font-size: .95rem; }
.site-footer a { color: #e3e8f1; text-decoration: none; }
.site-footer a:hover { color: #f1d999; text-decoration: underline; }
.footer-brand { font-family: var(--serif); font-size: 1.6rem; color: #fff; margin-bottom: .5rem; }
.footer-head { color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; }
.site-footer li { margin-bottom: .35rem; }
.site-footer hr { border-color: rgba(255,255,255,.15); margin: 2rem 0 1.25rem; }
.disclaimer { color: #8e99b0; }

@media (max-width: 991.98px) {
  .section { padding: 3.25rem 0; }
  .hero { padding: 3.5rem 0; }
  .sticky-side { position: static; }
  .navbar-nav .btn { margin: .5rem 0; }
}
@media print {
  .site-header, .topbar, .site-footer, .no-print, .skip-link { display: none !important; }
  .agreement { border: 0; padding: 0; }
  body { font-size: 11pt; }
  .agreement-scroll { max-height: none; overflow: visible; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
