/* Trust Center — Forward Thinking Systems */
/* Design system: DM Sans, blue (#1a6fb5/#2185d0), navy (#0f172a), slate (#f8fafc) */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&display=swap');

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

:root {
  --primary: #1a6fb5;
  --primary-light: #2185d0;
  --dark: #0f172a;
  --dark-light: #1e293b;
  --bg: #f8fafc;
  --white: #fff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-dark: #334155;
  --green: #065f46;
  --green-bg: #d1fae5;
  --green-bg-light: #ecfdf5;
  --green-border: #d1fae5;
  --green-accent: #16a34a;
  --green-accent-bg: #f0fdf4;
  --green-accent-border: #bbf7d0;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --amber-text: #92400e;
  --amber-icon-bg: #fef3c7;
  --red: #dc2626;
  --red-border: #fca5a5;
  --red-bg: #fee2e2;
  --teal-bg: #eff6ff;
  --teal-border: #dbeafe;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-elevated: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-btn: 0 2px 8px rgba(26,111,181,0.3);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.2);
  --gradient-primary: linear-gradient(135deg, #1a6fb5, #2185d0);
  --gradient-icon: linear-gradient(135deg, #2185d0, #3b9ae0);
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
.header {
  background: linear-gradient(180deg, #ffffff 0%, #f0f4f8 50%, #e8eef6 100%);
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
}

.header-logo-fallback {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gradient-icon);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo-fallback svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.header-title {
  color: #f8fafc;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.header-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin-left: 10px;
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1.5px solid var(--primary);
  background: rgba(26,111,181,0.08);
  color: var(--primary);
  font-size: 13px;
  font-family: var(--font);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}

.header-contact:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Main container */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

/* Hero */
.hero {
  padding: 56px 0 32px;
}

.hero h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero h1 svg {
  width: 32px;
  height: 32px;
  color: var(--primary);
  flex-shrink: 0;
}

.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
  max-width: 560px;
  line-height: 1.6;
}

/* Section heading */
.section-heading {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin: 0;
}

/* Badges section */
.badges-section {
  padding: 48px 0 40px;
}

.badges-section .section-heading {
  margin-bottom: 24px;
}

.section-subheading {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin: 28px 0 16px;
}

.badges-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.badge-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
  position: relative;
}

a.badge-card:hover {
  border-color: var(--primary);
}

.badge-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 6px;
  width: max-content;
  max-width: 260px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 10;
  pointer-events: none;
}

.badge-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--dark);
}

.badge-card:hover .badge-tooltip {
  display: block;
}

.badge-icon {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.badge-icon.certified {
  /* no bounding box — image stands alone */
}

.badge-icon.in-progress {
  opacity: 0.5;
}

.badge-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.badge-icon svg {
  width: 26px;
  height: 26px;
}

.badge-icon.certified svg { color: #fff; }
.badge-icon.in-progress svg { color: var(--text-muted); }

.badge-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}

.badge-status {
  font-size: 13px;
  margin-top: 3px;
  font-weight: 500;
}

.badge-status.certified { color: var(--primary); }
.badge-status.in-progress { color: var(--text-muted); }

/* Documents section */
.docs-section { padding-top: 16px; }

.docs-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.docs-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrapper svg {
  position: absolute;
  left: 10px;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  padding: 8px 12px 8px 32px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 13px;
  outline: none;
  width: 200px;
  background: var(--white);
  font-family: var(--font);
  transition: border-color 0.15s;
}

.search-input:focus { border-color: var(--primary-light); }

.btn-request-access {
  padding: 10px 28px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: none; /* shown via JS when docs selected */
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: var(--shadow-btn);
  font-family: var(--font);
  transition: opacity 0.15s;
}

.btn-request-access.visible { display: flex; }
.btn-request-access:hover { opacity: 0.92; }

/* Category tabs */
.category-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.category-tab {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  background: var(--white);
  color: var(--text-secondary);
  font-family: var(--font);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.category-tab:hover {
  border-color: var(--text-muted);
}

.category-tab.active {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}

.category-tab svg { width: 14px; height: 14px; }

/* Document grid */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Document card */
.doc-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.15s;
  box-shadow: var(--shadow-card);
  position: relative;
}

.doc-card.gated { cursor: pointer; }

.doc-card.selected {
  border: 2px solid var(--primary-light);
  padding: 19px;
  box-shadow: 0 0 0 3px rgba(26,111,181,0.1);
}

.doc-card:hover { box-shadow: var(--shadow-elevated); }

.doc-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.doc-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-icon.gated { background: var(--amber-icon-bg); }
.doc-icon.gated svg { color: var(--amber-text); }
.doc-icon.public { background: var(--green-bg); }
.doc-icon.public svg { color: var(--green); }
.doc-icon svg { width: 18px; height: 18px; }

.doc-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #cbd5e1;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.doc-checkbox.checked {
  border: none;
  background: var(--primary-light);
}

.doc-checkbox svg {
  width: 14px;
  height: 14px;
  color: #fff;
  display: none;
}

.doc-checkbox.checked svg { display: block; }

.doc-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
}

.doc-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.5;
}

.doc-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.doc-updated {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-download-public {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--green-border);
  background: var(--green-bg-light);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font);
  transition: background 0.15s;
}

.btn-download-public:hover { background: var(--green-bg); }
.btn-download-public svg { width: 12px; height: 12px; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* Case Studies CTA */
.case-studies-section {
  margin-top: 56px;
  padding: 0 0 0;
}
.case-studies-inner {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 100%);
  border: 1px solid var(--teal-border);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.case-studies-text h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.case-studies-text p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 520px;
}
.btn-case-studies {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--white);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.btn-case-studies:hover {
  background: var(--primary);
  color: var(--white);
}
.btn-case-studies svg {
  width: 16px;
  height: 16px;
}
@media (max-width: 640px) {
  .case-studies-inner {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }
  .case-studies-text p { max-width: 100%; }
}

/* Footer */
.footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--primary); }

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow: auto;
  box-shadow: var(--shadow-modal);
  transform: translateY(10px);
  transition: transform 0.2s;
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.modal-header p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 0;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.modal-close:hover { color: var(--text); }
.modal-close svg { width: 20px; height: 20px; }

.modal-body {
  padding: 20px 28px 28px;
}

/* Form elements */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 14px;
  outline: none;
  font-family: var(--font);
  background: var(--white);
  transition: border-color 0.15s;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--primary-light);
}

.form-input::placeholder { color: var(--text-muted); }

/* Modal doc list */
.modal-doc-list {
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 2px 0;
  margin-top: 8px;
}

.modal-doc-item {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-doc-item:last-child { border-bottom: none; }
.modal-doc-item svg { width: 14px; height: 14px; color: var(--text-secondary); flex-shrink: 0; }

/* Turnstile container */
.turnstile-container {
  margin-bottom: 20px;
}

/* Primary button */
.btn-primary {
  width: 100%;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  box-shadow: var(--shadow-btn);
  transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.92; }
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Success state in modal */
.modal-success {
  padding: 48px 28px;
  text-align: center;
}

.result-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.result-icon.success { background: var(--green-bg); }
.result-icon.error { background: var(--red-bg); }

.result-icon svg { width: 28px; height: 28px; }
.result-icon.success svg { color: var(--green); }
.result-icon.error svg { color: var(--red); }

.result-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.result-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.btn-secondary {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  margin-top: 20px;
  transition: border-color 0.15s;
}

.btn-secondary:hover { border-color: var(--text-muted); }

/* Hidden honeypot */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner { padding: 0 16px; }
  .header-subtitle { display: none; }
  .main { padding: 0 16px 60px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
  .badges-grid { gap: 10px; }
  .badge-card { min-width: 160px; padding: 10px 14px; }
  .docs-grid { grid-template-columns: 1fr; }
  .docs-toolbar { flex-direction: column; align-items: stretch; }
  .docs-toolbar-right { flex-wrap: wrap; }
  .search-input { width: 100%; }
  .footer { flex-direction: column; text-align: center; }
  .modal { max-height: 90vh; margin: 10px; }
}

/* Loading state */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  color: var(--text-muted);
  font-size: 14px;
  gap: 10px;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
