/* onlinesignatureforms.com — legal trust aesthetic */

:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-alt: #eef2f7;
  --border: #d4dce8;
  --border-light: #e8edf4;
  --text: #1a2744;
  --muted: #5a6b85;
  --navy: #0f2a4a;
  --navy-mid: #1a3d66;
  --gold: #c9a227;
  --gold-hover: #b08d1a;
  --gold-light: #faf6e8;
  --accent: #1a4d8c;
  --accent-hover: #153d70;
  --success-bg: #edf7f0;
  --success-border: #b8dfc8;
  --content-max: 44rem;
  --wide-max: 76rem;
  --font: "Source Sans 3", system-ui, -apple-system, Segoe UI, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 2px 12px rgba(15, 42, 74, 0.08);
  --shadow-lg: 0 8px 32px rgba(15, 42, 74, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
}

img,
svg {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
  z-index: 1000;
  text-decoration: none;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-light);
  z-index: 200;
}

.scroll-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  transition: width 0.1s linear;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.header-accent {
  height: 3px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-mid) 60%, var(--gold) 100%);
}

.header-inner {
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-logo,
.footer-logo {
  display: block;
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.nav-active {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

/* Hero */
.hero {
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-mid) 55%, #234a75 100%);
  color: #fff;
  padding: 3rem 1.25rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-inner {
  max-width: 40rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero-sub {
  margin: 0 auto 1rem;
  font-size: 1.125rem;
  opacity: 0.92;
  max-width: 36rem;
}

.hero-meta {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.75;
}

.hero--compact {
  padding: 2.25rem 1.25rem 2.5rem;
}

.hero--compact h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

/* Main layout */
main {
  flex: 1;
}

.page-main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.page-main--wide {
  max-width: var(--wide-max);
}

.page-main section {
  margin-bottom: 2rem;
}

.page-main h2 {
  font-size: 1.375rem;
  color: var(--navy);
  margin: 0 0 0.75rem;
}

.page-main h3 {
  font-size: 1.125rem;
  color: var(--navy-mid);
  margin: 1.5rem 0 0.5rem;
}

.article-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

.article-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

/* Category chips */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.category-chip:hover,
.category-chip.is-active {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  color: var(--navy);
}

.category-chip svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Gallery */
.gallery-section {
  padding: 2.5rem 1.25rem 3rem;
  max-width: var(--wide-max);
  margin: 0 auto;
}

.gallery-header {
  text-align: center;
  margin-bottom: 2rem;
}

.gallery-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: var(--navy);
}

.gallery-header p {
  margin: 0;
  color: var(--muted);
}

.gallery-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.gallery-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.gallery-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.gallery-card__preview {
  position: relative;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border-light);
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.gallery-card__body {
  padding: 1rem 1.125rem 1.25rem;
}

.gallery-card__category {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-hover);
  margin: 0 0 0.375rem;
}

.gallery-card__title {
  margin: 0 0 0.375rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.gallery-card__desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
}

/* CSS form mock previews */
.form-mock {
  width: 100%;
  max-width: 200px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  box-shadow: 0 2px 8px rgba(15, 42, 74, 0.06);
}

.form-mock__title {
  height: 6px;
  width: 70%;
  background: var(--navy);
  border-radius: 2px;
  margin-bottom: 0.625rem;
}

.form-mock__line {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 0.375rem;
}

.form-mock__line--short {
  width: 55%;
}

.form-mock__sig {
  margin-top: 0.625rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
}

.form-mock__sig-label {
  font-size: 0.5rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.form-mock__sig-line {
  height: 16px;
  position: relative;
}

.form-mock__sig-line::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 80%;
  height: 1px;
  background: var(--text);
}

.form-mock__sig-curve {
  position: absolute;
  left: 10%;
  bottom: 4px;
  width: 60%;
  height: 12px;
  border-bottom: 1.5px solid var(--navy-mid);
  border-radius: 0 0 50% 50%;
}

.form-mock--nda .form-mock__title { background: var(--navy-mid); }
.form-mock--waiver .form-mock__title { background: #2d5a3d; }
.form-mock--consent .form-mock__title { background: #3d5a7a; }
.form-mock--invoice .form-mock__title { background: var(--gold-hover); }
.form-mock--lease .form-mock__title { background: #2a4070; }
.form-mock--medical .form-mock__title { background: #1a5c5c; }
.form-mock--service .form-mock__title { background: #4a3d6b; }

/* Template detail */
.template-detail {
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 0.375rem;
  color: var(--border);
}

.breadcrumb li[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.template-detail__hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .template-detail__hero {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
  }
}

.template-detail__preview-wrap {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.template-detail__preview-wrap .form-mock {
  max-width: 280px;
  padding: 1.25rem;
}

.template-detail__category {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.template-detail__category a {
  color: var(--gold-hover);
  text-decoration: none;
}

.template-detail__category a:hover {
  text-decoration: underline;
}

.template-detail__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--navy);
  line-height: 1.2;
}

.template-detail__excerpt {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.provider-row {
  margin-bottom: 1.5rem;
}

.provider-row__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.625rem;
}

.provider-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.provider-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.provider-btn:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  color: var(--navy);
}

.provider-btn__icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 800;
  color: #fff;
}

.provider-btn__icon--formsapp {
  background: #7c3aed;
}

.provider-btn__icon--jotform {
  background: #ff6100;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-list li {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  margin-bottom: 0.625rem;
  font-size: 0.9375rem;
}

.feature-list svg {
  flex-shrink: 0;
  margin-top: 0.125rem;
  color: var(--gold);
}

.template-detail__body {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.quick-answer {
  background: var(--gold-light);
  border: 1px solid #e8d9a0;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.quick-answer__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-hover);
  margin: 0 0 0.375rem;
}

.quick-answer p {
  margin: 0;
  font-size: 0.9375rem;
}

.template-detail__section {
  margin-bottom: 2rem;
}

.template-detail__section h2 {
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0 0 0.75rem;
}

.template-detail__prose p {
  margin: 0 0 1rem;
}

.field-list {
  margin: 0;
  padding-left: 1.25rem;
}

.field-list li {
  margin-bottom: 0.375rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* FAQ */
.faq-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.faq-section h2 {
  text-align: center;
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0 0 1.25rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  background: var(--surface);
  overflow: hidden;
}

.faq-item summary {
  padding: 0.875rem 1rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--gold);
  font-weight: 400;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item__body {
  padding: 0 1rem 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Related templates */
.related-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-section h2 {
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0 0 0.375rem;
}

.related-section > p {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Info band */
.info-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 1.25rem;
}

.info-band__inner {
  max-width: var(--wide-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.info-band__stat strong {
  display: block;
  font-size: 1.75rem;
  color: var(--navy);
  line-height: 1.2;
}

.info-band__stat span {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  padding: 2.5rem 1.25rem 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--wide-max);
  margin: 0 auto;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 1rem;
}

.footer-brand .footer-logo {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.footer-desc {
  font-size: 0.875rem;
  opacity: 0.8;
  max-width: 28rem;
  margin: 0 0 1.5rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-cols h2 {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  margin: 0 0 0.75rem;
}

.footer-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-cols li {
  margin-bottom: 0.375rem;
}

.footer-cols a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-cols a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.footer-util {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin-bottom: 1.25rem;
}

.footer-util a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-util a:hover {
  color: var(--gold);
}

.footer-util-sep {
  opacity: 0.4;
}

.footer-sisters {
  font-size: 0.8125rem;
  opacity: 0.75;
  margin: 0 0 1rem;
  line-height: 1.6;
}

.footer-sisters-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.375rem;
  opacity: 0.9;
}

.footer-sisters a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.footer-sisters a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.8125rem;
  opacity: 0.55;
  margin: 0;
}

@media (max-width: 640px) {
  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
