/* ---------------------------------------------------------------------------
   zaSign public site.

   PLAIN CSS, NOT TAILWIND. The design reference uses the Tailwind CDN, which
   is a third-party script and is not allowed here. Compiling Tailwind at build
   time was the alternative; this file was chosen instead because the public
   site is a fixed, small set of components, so a utility framework would add a
   build step and a dependency for no benefit. Everything below is auditable in
   one place.

   CONTRAST. Every pairing used for text meets WCAG AA (4.5:1 body, 3:1 large
   text and UI borders). The figures are noted beside the tokens. Card borders
   are decorative and sit below 3:1 on purpose; anything that identifies a
   CONTROL (inputs, focus rings) uses --border-strong, which is 3.55:1.
--------------------------------------------------------------------------- */

/* ---- self-hosted fonts -------------------------------------------------- */
/* Inter and Plus Jakarta Sans, SIL Open Font Licence 1.1. The licence texts
   ship beside the files in /assets/fonts/. font-display: swap so text is
   readable immediately and the page never blocks on a font. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2");
}

/* ---- tokens ------------------------------------------------------------- */
:root {
  --bg: #f6fbf8;
  --surface: #ffffff;
  --tint: #ecf7f1;
  --border: #d5e8dc;           /* decorative card edges */
  --border-strong: #6b8c7b;    /* inputs and focus, 3.55:1 on --bg */
  --text: #0f1f18;             /* 15.6:1 on --bg */
  --muted: #4a6358;            /* 6.2:1 on --bg */
  --primary: #067a52;          /* 5.4:1 on white, white text on it is 5.4:1 */
  --primary-hover: #05603f;
  --primary-tint: #d9f5e8;
  --accent: #0369a1;           /* 5.7:1 on --bg */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(15, 31, 24, 0.05), 0 8px 24px -12px rgba(15, 31, 24, 0.12);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --maxw: 1100px;
}

/* ---- base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Nothing may push the page sideways at 320px. */
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
strong { font-weight: 600; }
img, svg { max-width: 100%; }

/* Keyboard focus must always be visible; several resets below remove the
   browser default, so this is the single replacement. */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  padding: .7rem 1.1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 251, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; height: 64px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; }
.brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem;
  letter-spacing: -0.02em; color: var(--text);
}
.za-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .1rem .5rem; border-radius: var(--radius-pill);
  background: var(--primary-tint); border: 1px solid var(--border);
  color: var(--primary-hover); font-size: .7rem; font-weight: 700; letter-spacing: .04em;
}
.za-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.header-actions .desk { display: none; }
@media (min-width: 720px) { .header-actions .desk { display: inline-flex; } }

/* ---- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  /* 44px minimum touch target. */
  min-height: 44px; padding: .65rem 1.25rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease;
}
.btn:hover { background: var(--primary-hover); color: #fff; }
.btn.secondary {
  background: var(--surface); color: var(--text); border-color: var(--border-strong);
}
.btn.secondary:hover { background: var(--tint); color: var(--text); }
.btn.small { min-height: 38px; padding: .4rem .85rem; font-size: .9rem; }
.btn.block { width: 100%; }
.icon { width: 18px; height: 18px; flex: none; }

/* ---- side menu ---------------------------------------------------------- */
.menu-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); cursor: pointer;
}
.menu-button:hover { background: var(--tint); }
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(15, 31, 24, 0.45);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; z-index: 60;
  height: 100%; width: 86%; max-width: 360px;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px -20px rgba(15, 31, 24, .4);
  transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column; padding: 1.25rem;
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.drawer nav { display: flex; flex-direction: column; gap: .25rem; margin-top: 1rem; }
.drawer nav a {
  display: flex; align-items: center; gap: .75rem;
  min-height: 44px; padding: .5rem .75rem; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font-weight: 600;
}
.drawer nav a:hover { background: var(--tint); }
.drawer nav a .icon { color: var(--primary); }
.drawer .divider { height: 1px; background: var(--border); margin: .75rem 0; }
.drawer-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ---- sections ----------------------------------------------------------- */
.section { padding: 3.5rem 0; }
.section + .section { border-top: 1px solid var(--border); }
.eyebrow {
  display: block; font-size: .78rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
  margin-bottom: .4rem;
}
.section-head { max-width: 640px; margin: 0 auto 2.5rem; text-align: center; }
.section-head p { color: var(--muted); margin-bottom: 0; }
/* A sub page's own h1 sits in a section head; the hero size is too large
   there, so it takes the h2 scale while staying the page's only h1. */
.section-head h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); }

.hero { padding: 2.5rem 0 3rem; text-align: center; }
.hero .lede {
  font-size: 1.1rem; color: var(--muted);
  max-width: 36rem; margin: 1rem auto 0;
}
.badge-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .85rem; margin-bottom: 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-size: .8rem; font-weight: 600;
}
.cta-row {
  display: flex; flex-direction: column; gap: .75rem;
  align-items: stretch; margin-top: 1.75rem;
}
@media (min-width: 600px) {
  .cta-row { flex-direction: row; justify-content: center; align-items: center; }
  .cta-row .btn { width: auto; }
}

/* ---- cards -------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { .grid.two { grid-template-columns: repeat(2, 1fr); } }

.step { position: relative; display: flex; flex-direction: column; }
.step-number {
  position: absolute; top: -.7rem; left: 1.25rem;
  padding: .1rem .6rem; border-radius: var(--radius-pill);
  background: var(--tint); border: 1px solid var(--border);
  color: var(--primary-hover); font-size: .72rem; font-weight: 700; letter-spacing: .04em;
}
.step-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-bottom: 1rem;
  border-radius: var(--radius-sm); background: var(--tint); color: var(--primary);
}
.step-icon .icon { width: 22px; height: 22px; }
.step-foot {
  margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: .5rem;
  color: var(--muted); font-size: .85rem;
}
.step-foot .icon { width: 16px; height: 16px; color: var(--primary); }

/* ---- plans -------------------------------------------------------------- */
.plan { display: flex; flex-direction: column; }
.plan.featured { border-color: var(--primary); box-shadow: 0 6px 28px -14px rgba(6, 122, 82, .45); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tag {
  display: inline-block; padding: .2rem .6rem; border-radius: var(--radius-pill);
  background: var(--tint); color: var(--primary-hover);
  font-size: .75rem; font-weight: 700;
}
.tag.quiet { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.price { font-family: var(--font-display); font-size: 2.25rem; font-weight: 800; margin: 1rem 0 .25rem; }
.price .per { font-family: var(--font-body); font-size: .95rem; font-weight: 400; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .6rem; }
.plan li { display: flex; align-items: flex-start; gap: .5rem; color: var(--muted); font-size: .95rem; }
.plan li .icon { width: 16px; height: 16px; margin-top: .25rem; color: var(--primary); flex: none; }
.plan-foot { margin-top: auto; padding-top: 1.5rem; }

/* ---- forms -------------------------------------------------------------- */
label { display: block; font-weight: 600; font-size: .92rem; margin: .85rem 0 .3rem; }
input[type="text"], input[type="email"], input[type="password"], select, textarea {
  width: 100%; min-height: 44px; padding: .6rem .75rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font: inherit;
}
textarea { min-height: 140px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.field-row { display: flex; flex-direction: column; gap: .5rem; }
@media (min-width: 560px) {
  .field-row { flex-direction: row; }
  .field-row input { flex: 1; }
}
.notice, .error-box {
  border-radius: var(--radius-sm); padding: .75rem 1rem; margin: 0 0 1rem;
  border: 1px solid var(--border);
}
.notice { background: var(--primary-tint); border-color: var(--primary); }
.error-box { background: #fdecec; border-color: #c0392b; color: #7a1f1f; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- callout, FAQ, banner ----------------------------------------------- */
.callout { display: flex; gap: 1rem; align-items: flex-start; }
.callout .step-icon { margin-bottom: 0; }

.faq { display: grid; gap: .75rem; }
/* details/summary rather than scripted buttons: it works with the keyboard and
   with JavaScript switched off, and needs no aria wiring of its own. */
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 44px; padding: 1rem 1.25rem;
  font-weight: 700; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--muted); transition: transform .2s ease; flex: none; }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq .answer { padding: 0 1.25rem 1.25rem; color: var(--muted); }
.faq .answer p:last-child { margin-bottom: 0; }

.banner { background: var(--tint); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.banner .inner {
  display: flex; flex-direction: column; gap: 1rem; align-items: center;
  text-align: center; padding: 1.75rem 1rem; max-width: var(--maxw); margin: 0 auto;
}
@media (min-width: 720px) {
  .banner .inner { flex-direction: row; justify-content: space-between; text-align: left; }
}
.banner .icon-round {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--primary); flex: none;
}
.banner h2 { font-size: 1.05rem; margin: 0; font-family: var(--font-body); font-weight: 700; }

/* ---- the example signature card ----------------------------------------- */
.example-card {
  max-width: 440px; margin: 2.5rem auto 0; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem;
}
.example-label {
  display: inline-block; margin-bottom: .75rem;
  padding: .15rem .55rem; border-radius: var(--radius-pill);
  background: var(--bg); border: 1px solid var(--border-strong);
  color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .06em;
}
.example-head {
  display: flex; align-items: center; gap: .75rem;
  padding-bottom: .85rem; border-bottom: 1px solid var(--border);
}
.example-head .step-icon { width: 36px; height: 36px; margin: 0; }
.example-title { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.example-meta { color: var(--muted); font-size: .78rem; }
.example-body {
  margin: .9rem 0; padding: .85rem; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border);
}
.line { height: 8px; border-radius: 4px; background: var(--tint); margin-bottom: .5rem; }
.line.w3 { width: 75%; } .line.w4 { width: 92%; } .line.w2 { width: 55%; }
.sig-box {
  margin-top: .9rem; padding: .7rem;
  border: 2px dashed var(--primary); border-radius: var(--radius-sm);
  background: var(--primary-tint);
}
.sig-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; color: var(--primary-hover); font-size: .72rem; font-weight: 700;
}
.sig-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .4rem; }
.sig-name { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 1.4rem; color: var(--primary-hover); }
.sig-time { text-align: right; color: var(--muted); font-size: .7rem; line-height: 1.3; }
.example-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; color: var(--muted); font-size: .75rem;
}

/* ---- record list (traceability) ----------------------------------------- */
.record-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.record-list li { display: flex; gap: .65rem; align-items: flex-start; }
.record-list .icon { width: 18px; height: 18px; margin-top: .22rem; color: var(--primary); flex: none; }

/* ---- long-form pages (legal, how it works, features) -------------------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 2rem; font-size: 1.3rem; }
.prose h3 { margin-top: 1.5rem; font-size: 1.05rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: .35rem 0; }
.prose em { display: block; color: var(--muted); font-style: normal; margin-bottom: 1.25rem; }

.feature-block { scroll-margin-top: 80px; }
.feature-block h3 { margin-bottom: .35rem; }

/* ---- footer ------------------------------------------------------------- */
.site-footer {
  background: var(--surface); border-top: 1px solid var(--border);
  margin-top: 3rem; padding: 2.25rem 1rem;
  color: var(--muted); font-size: .9rem;
}
.site-footer .inner { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 1.25rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--primary-hover); }
.site-footer .legal-row {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between;
  padding-top: 1.25rem; border-top: 1px solid var(--border);
}

/* ---- profile menu -------------------------------------------------------
   details/summary, so the browser handles opening, closing and focus. The
   script in site.js only adds Escape and click-outside. */
.profile { position: relative; display: inline-block; }
.profile > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  /* 44px, the minimum touch target. */
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary-tint); color: var(--primary-hover);
  border: 1px solid var(--border); font-weight: 700; font-size: .9rem;
}
.profile > summary::-webkit-details-marker { display: none; }
.profile > summary:hover { background: #c5ecda; }
.profile-sheet {
  position: absolute; right: 0; top: 52px; z-index: 60; width: 240px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .75rem; box-shadow: var(--shadow);
  text-align: left;
}
.profile-email {
  margin: 0 0 .5rem; padding: 0 .5rem;
  font-size: .85rem; color: var(--muted); word-break: break-all;
}
.profile-links {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border); padding-top: .4rem; margin-bottom: .4rem;
}
.profile-links a {
  display: block; min-height: 44px; line-height: 44px; padding: 0 .5rem;
  border-radius: var(--radius-sm); color: var(--text); text-decoration: none;
  font-size: .95rem;
}
.profile-links a:hover { background: var(--tint); }
.profile-signout { border-top: 1px solid var(--border); padding-top: .5rem; margin: 0; }

/* At the narrowest widths the sheet must not hang off the screen. */
@media (max-width: 400px) {
  .profile-sheet { width: calc(100vw - 2rem); right: -.5rem; }
}
