/* Shared foundation for the Issuer Solutions family of sites.
   Each site sets its own colour tokens in site.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page-bg, #fff);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus, #2167d5); outline-offset: 2px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: calc(var(--max-w, 1200px) + 2 * var(--gutter, 32px)); margin: 0 auto; padding: 0 var(--gutter, 32px); }

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--eyebrow, var(--ink));
}

.arrow { width: 1em; height: 1em; flex: none; }

/* ---------- Header: shared construction ---------- */
.site-header { position: relative; z-index: 20; }
.header-inner { height: var(--header-h, 76px); display: flex; align-items: center; gap: 32px; }
.site-nav { display: flex; align-items: center; gap: var(--nav-gap, 36px); margin-left: auto; }
.site-nav a { text-decoration: none; font-size: 14px; font-weight: 500; }
.site-nav a:hover { color: var(--accent); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px 0; transition: transform .2s, opacity .2s; }

/* ---------- Buttons: shared construction ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px;
  font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; border-radius: var(--btn-radius, 6px);
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-fg, #fff); }
.btn-primary:hover { background: var(--btn-bg-hover); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--btn-outline, currentColor); }
.btn-secondary:hover { background: rgba(0,0,0,.04); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }

/* ---------- Contact dialog ---------- */
.contact-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0; border: 0; border-radius: 12px;
  color: var(--ink); background: #fff;
  box-shadow: 0 24px 80px rgba(16, 24, 32, .25);
}
.contact-dialog::backdrop { background: rgba(16, 24, 32, .45); backdrop-filter: blur(2px); }
.contact-inner { padding: 36px; position: relative; }
.contact-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px;
  border: 0; background: none; border-radius: 6px; cursor: pointer; font-size: 24px; line-height: 1; color: var(--muted);
}
.contact-close:hover { background: #f1f3f5; }
.contact-dialog h2 { font-size: 26px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 6px; }
.contact-dialog .lead { color: var(--muted); margin-bottom: 24px; }
.contact-form { display: grid; gap: 14px; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line, #dde3e8); border-radius: 6px; background: #fff; font-size: 15px;
}
.contact-form textarea { min-height: 110px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .actions { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.form-status { font-size: 14px; color: #b42318; }
.form-success { text-align: center; padding: 24px 0 8px; }
.form-success h3 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.form-success p { color: var(--muted); }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav, .header-cta { display: none; }
  .site-header.nav-open .site-nav {
    display: flex; flex-direction: column; align-items: flex-start; gap: 0;
    position: absolute; top: var(--header-h, 76px); left: 0; right: 0;
    background: #fff; padding: 8px var(--gutter, 24px) 20px; border-bottom: 1px solid var(--line, #dde3e8);
    box-shadow: 0 12px 24px rgba(16,24,32,.08);
  }
  .site-header.nav-open .site-nav a { padding: 12px 0; width: 100%; color: var(--ink); }
  .site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .contact-inner { padding: 28px 20px; }
  .contact-form .row { grid-template-columns: 1fr; }
}
