/* ============================================================
   J.H. Randolph & Co. — Shared Design System
   Linked from all pages; inline <style> blocks in page files
   supplement/override these where needed.
   ============================================================ */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --navy:        #080E1D;
  --navy-mid:    #0F172A;
  --navy-soft:   #1E2A45;
  --navy-rim:    #2A3858;
  --paper:       #F9F8F5;
  --paper-off:   #F1F0EC;
  --paper-dim:   #E8E6E0;
  --ink:         #080E1D;
  --ink-dim:     #4A5568;
  --ink-fade:    #8896A5;
  --ink-ghost:   #C2CCD8;
  --blue:        #2563EB;
  --blue-bright: #3B82F6;
  --blue-muted:  #1D4ED8;
  --blue-pale:   rgba(37,99,235,0.08);
  --on-dark:     #E8EDF5;
  --on-dark-dim: #8896A5;
  --on-dark-fade:rgba(232,237,245,0.4);
  --hairline:        rgba(8,14,29,0.10);
  --hairline-strong: rgba(8,14,29,0.18);
  --hairline-dark:   rgba(255,255,255,0.08);
  --hairline-dark-s: rgba(255,255,255,0.14);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  "JetBrains Mono", "SF Mono", monospace;
  --ease:  cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset ──────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; }

/* ── Layout ─────────────────────────────────────────────────── */
.wrap        { max-width: 1200px; margin: 0 auto; padding: 0 52px; }
.wrap-narrow { max-width: 960px;  margin: 0 auto; padding: 0 52px; }
@media (max-width: 768px) { .wrap, .wrap-narrow { padding: 0 24px; } }

/* ── Accessibility ──────────────────────────────────────────── */
.skip-link { position: absolute; top: -60px; left: 20px; z-index: 9999; background: var(--blue); color: #fff; padding: 12px 20px; font-size: 13px; font-weight: 500; transition: top .2s; }
.skip-link:focus { top: 16px; }

/* ── Scroll reveal ──────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; }
.d2 { transition-delay: .16s; }
.d3 { transition-delay: .24s; }
.d4 { transition-delay: .32s; }

/* ── Banner ─────────────────────────────────────────────────── */
.banner { background: var(--navy); border-bottom: 1px solid var(--hairline-dark); padding: 9px 0; }
.banner-inner { display: flex; align-items: center; justify-content: center; gap: 24px; font-size: 10px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--on-dark-dim); }
.bdot { color: var(--blue-bright); opacity: .5; }
@media (max-width: 600px) { .banner-inner { flex-wrap: wrap; gap: 10px; font-size: 9px; letter-spacing: .2em; } }

/* ── Navigation ─────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 200; background: rgba(8,14,29,.94); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--hairline-dark); padding: 18px 0; transition: box-shadow .3s; }
.nav.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,.35); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav-brand { font-family: var(--serif); font-size: 20px; font-weight: 400; color: var(--on-dark); letter-spacing: .01em; white-space: nowrap; }
.nav-brand .co { font-size: 13px; font-style: italic; font-weight: 300; color: var(--on-dark-dim); margin-left: 5px; }
.nav-center { display: flex; align-items: center; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark-dim); transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--on-dark); }
.nav-links a.accent { color: var(--blue-bright); }
.nav-links a.accent:hover, .nav-links a.accent.active { color: #fff; }
.nav-sep { width: 1px; height: 14px; background: var(--hairline-dark-s); margin: 0 20px; flex-shrink: 0; }
.nav-cta { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); background: #fff; padding: 11px 22px; border-radius: 2px; border: none; cursor: pointer; font-family: var(--sans); transition: background .2s, color .2s; }
.nav-cta:hover { background: var(--blue-bright); color: #fff; }
.hamburger { display: none; background: none; border: 1px solid var(--hairline-dark-s); width: 38px; height: 38px; cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.hamburger span { display: block; width: 18px; height: 1px; background: var(--on-dark); transition: transform .3s var(--ease), opacity .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu { display: none; position: fixed; inset: 0; z-index: 190; background: var(--navy-mid); padding: 100px 40px 48px; transform: translateX(100%); transition: transform .45s var(--ease); }
.mobile-menu.open { transform: none; }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 24px; }
.mobile-menu ul a { font-family: var(--serif); font-size: 30px; font-weight: 300; color: var(--on-dark); display: block; transition: color .2s; }
.mobile-menu ul a:hover { color: var(--blue-bright); }
.mobile-menu-cta { margin-top: 40px; display: inline-block; background: var(--blue); color: #fff; padding: 14px 28px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; border-radius: 2px; border: none; cursor: pointer; font-family: var(--sans); }
@media (max-width: 960px) { .nav-center { display: none; } .hamburger { display: flex; } .mobile-menu { display: block; } }

/* ── Page hero (shared by inner pages) ──────────────────────── */
.page-hero { background: var(--navy); padding: 88px 0 72px; border-bottom: 1px solid var(--hairline-dark); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--hairline-dark) 1px, transparent 1px), linear-gradient(90deg, var(--hairline-dark) 1px, transparent 1px); background-size: 80px 80px; mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 20%, transparent 100%); -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 20%, transparent 100%); pointer-events: none; }
.page-hero::after { content: ""; position: absolute; top: -150px; left: -100px; width: 700px; height: 600px; background: radial-gradient(ellipse at 20% 30%, rgba(37,99,235,.10), transparent 65%); pointer-events: none; }
.breadcrumb { display: flex; align-items: center; gap: 10px; margin-bottom: 40px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--on-dark-dim); position: relative; z-index: 2; }
.breadcrumb a { color: var(--blue-bright); transition: color .2s; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb-sep { opacity: .4; }
.page-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: .4em; text-transform: uppercase; color: var(--blue-bright); margin-bottom: 16px; position: relative; z-index: 2; }
.page-h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(48px,7vw,96px); line-height: .96; letter-spacing: -.025em; color: var(--on-dark); margin-bottom: 28px; position: relative; z-index: 2; }
.page-h1 em { font-style: italic; color: var(--blue-bright); }
.page-sub { font-size: 16px; line-height: 1.65; color: var(--on-dark-dim); max-width: 600px; margin-bottom: 44px; position: relative; z-index: 2; }
.page-chips { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: relative; z-index: 2; }
.page-chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(37,99,235,.10); border: 1px solid rgba(59,130,246,.20); border-radius: 2px; padding: 6px 14px; font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--blue-bright); }
.page-chip strong { color: #fff; }
@media (max-width: 640px) { .page-hero { padding: 56px 0 48px; } }

/* ── Section common ─────────────────────────────────────────── */
.eyebrow { font-size: 9px; font-weight: 700; letter-spacing: .4em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.eyebrow.bright { color: var(--blue-bright); }
.section-title { font-family: var(--serif); font-weight: 300; font-size: clamp(36px,4.5vw,58px); line-height: 1.07; letter-spacing: -.015em; }
.section-title em { font-style: italic; color: var(--blue-muted); font-weight: 300; }
.section-title.on-dark { color: var(--on-dark); }
.section-title.on-dark em { color: var(--blue-bright); }
.section-title.on-paper { color: var(--ink); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--blue); padding: 15px 32px; border-radius: 2px; border: none; cursor: pointer; font-family: var(--sans); transition: background .2s, transform .15s; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary:hover { background: var(--blue-bright); transform: translateY(-1px); }
.btn-ghost { font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-dim); padding: 15px 24px; border: 1px solid var(--hairline-dark-s); border-radius: 2px; transition: color .2s, border-color .2s; display: inline-flex; align-items: center; }
.btn-ghost:hover { color: var(--on-dark); border-color: var(--on-dark-dim); }
.btn-cta-primary { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: var(--blue); padding: 16px 36px; border-radius: 2px; border: none; cursor: pointer; font-family: var(--sans); transition: background .2s, transform .15s; display: inline-flex; align-items: center; gap: 8px; }
.btn-cta-primary:hover { background: var(--blue-bright); transform: translateY(-1px); }
.btn-cta-ghost { font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); padding: 16px 28px; border: 1px solid var(--hairline-strong); border-radius: 2px; transition: color .2s, border-color .2s; display: inline-flex; align-items: center; }
.btn-cta-ghost:hover { color: var(--ink); border-color: var(--ink-ghost); }
.btn-ghost-ink { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); padding: 13px 24px; border: 1px solid var(--hairline-strong); border-radius: 2px; transition: color .2s, border-color .2s; display: inline-flex; align-items: center; }
.btn-ghost-ink:hover { color: var(--ink); border-color: var(--ink-ghost); }

/* ── Page CTA banner ────────────────────────────────────────── */
.page-cta { background: var(--paper-off); border-top: 1px solid var(--hairline-strong); padding: 120px 0; }
.cta-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: .4em; text-transform: uppercase; color: var(--blue); margin-bottom: 20px; }
.cta-h { font-family: var(--serif); font-weight: 300; font-size: clamp(36px,5vw,64px); line-height: 1.04; letter-spacing: -.02em; color: var(--ink); margin-bottom: 20px; }
.cta-h em { font-style: italic; color: var(--blue-muted); }
.cta-body-text { font-size: 16px; line-height: 1.7; color: var(--ink-dim); max-width: 560px; margin: 0 auto 44px; }
.cta-row { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer { background: var(--navy-mid); border-top: 1px solid var(--hairline-dark); padding: 64px 0 40px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; padding-bottom: 48px; border-bottom: 1px solid var(--hairline-dark); }
.footer-brand { font-family: var(--serif); font-weight: 400; font-size: 20px; color: var(--on-dark); margin-bottom: 6px; }
.footer-brand .co { font-size: 13px; font-style: italic; font-weight: 300; color: var(--on-dark-dim); margin-left: 4px; }
.footer-tagline { font-size: 11px; color: var(--on-dark-dim); font-family: var(--mono); letter-spacing: .04em; margin-bottom: 16px; }
.footer-email { font-family: var(--mono); font-size: 11px; color: var(--blue-bright); letter-spacing: .04em; transition: color .2s; }
.footer-email:hover { color: #fff; }
.footer-nav h4 { font-size: 9px; font-weight: 700; letter-spacing: .36em; text-transform: uppercase; color: var(--blue-bright); margin-bottom: 16px; opacity: .7; }
.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-nav ul a { font-size: 13px; color: var(--on-dark-dim); transition: color .2s; letter-spacing: .02em; }
.footer-nav ul a:hover { color: var(--on-dark); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 500; letter-spacing: .14em; color: var(--on-dark-dim); opacity: .45; flex-wrap: wrap; gap: 8px; }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; } }
@media (max-width: 580px) { .footer-top { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; text-align: center; } }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(8,14,29,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box { background: var(--paper); width: 100%; max-width: 620px; max-height: 90vh; overflow-y: auto; padding: 52px 48px 44px; position: relative; transform: translateY(18px); transition: transform .4s var(--ease); border-top: 3px solid var(--blue); }
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-close { position: absolute; top: 18px; right: 22px; background: none; border: none; font-size: 22px; color: var(--ink-fade); cursor: pointer; line-height: 1; padding: 4px 6px; transition: color .2s; }
.modal-close:hover { color: var(--ink); }
.modal-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: .4em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; }
.modal-title { font-family: var(--serif); font-weight: 300; font-size: 34px; line-height: 1.08; letter-spacing: -.015em; color: var(--ink); margin-bottom: 8px; }
.modal-sub { font-size: 13px; line-height: 1.65; color: var(--ink-dim); margin-bottom: 36px; padding-bottom: 32px; border-bottom: 1px solid var(--hairline); }
.modal-form { display: flex; flex-direction: column; gap: 22px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label { font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-dim); }
.form-input, .form-textarea { font-family: var(--sans); font-size: 14px; color: var(--ink); background: #fff; border: 1px solid var(--hairline-strong); padding: 11px 14px; outline: none; border-radius: 2px; transition: border-color .2s; width: 100%; }
.form-input:focus, .form-textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--ink-ghost); }
.form-textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.form-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check-item { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-dim); cursor: pointer; padding: 8px 10px; border: 1px solid var(--hairline); border-radius: 2px; transition: background .15s, border-color .15s; user-select: none; }
.check-item:hover { background: var(--paper-off); }
.check-item input[type=checkbox] { width: 14px; height: 14px; accent-color: var(--blue); cursor: pointer; flex-shrink: 0; }
.check-item:has(input:checked) { background: var(--blue-pale); border-color: rgba(37,99,235,.3); color: var(--blue-muted); font-weight: 500; }
.form-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 4px; }
.form-submit { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--blue); border: none; padding: 15px 24px; cursor: pointer; border-radius: 2px; transition: background .2s; }
.form-submit:hover { background: var(--blue-bright); }
.form-copy { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .06em; color: var(--ink-dim); background: var(--paper-off); border: 1px solid var(--hairline-strong); padding: 15px 18px; cursor: pointer; border-radius: 2px; white-space: nowrap; transition: background .2s, color .2s; }
.form-copy:hover { background: var(--paper-dim); color: var(--ink); }
.form-copy.copied { background: #DCFCE7; border-color: #86EFAC; color: #15803D; }
.form-note { font-size: 11.5px; color: var(--ink-fade); font-style: italic; font-family: var(--serif); line-height: 1.6; text-align: center; }
@media (max-width: 600px) { .modal-box { padding: 36px 24px 32px; } .form-row { grid-template-columns: 1fr; } .form-checks { grid-template-columns: 1fr; } }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes badgePulse { 0%,100% { box-shadow: 0 0 0 3px rgba(59,130,246,.2); } 50% { box-shadow: 0 0 0 7px rgba(59,130,246,.06); } }
@keyframes greenPulse { 0%,100% { box-shadow: 0 0 0 3px rgba(34,197,94,.15); } 50% { box-shadow: 0 0 0 8px rgba(34,197,94,.05); } }
