/* Signal Dept — homepage styles */
:root {
  --ink: #1C2B38;
  --olive: #6B6B4A;
  --white: #FFFFFF;
  --light-grey: #E8E8E4;
  --mid-grey: #9A9A94;
  --footer-grey: #5A5A56;        /* WCAG AA — darkened from #9A9A94 */
  --success: #2E7D32;
  --radius: 26px;

  /* Spacing scale — 4px base, consistent rhythm */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
}

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

html, body {
  background: var(--white);
  color: var(--ink);
  font-family: "Futura", "Avenir Next", "Avenir", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header / logo — reduced 40-50% per Spencer */
.site-header {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-md);
}

.logo {
  display: block;
  width: 200px;
  height: auto;
  opacity: 0.85;
}

/* Hero — reduced top gap from 80px to 64px per UX (was 104px, broke 48px rhythm) */
.hero {
  padding-top: 64px;
  padding-bottom: var(--space-xl);
}

.hero h1 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--ink);
}

.hero h1 span {
  display: block;
}

/* Body text — for labels and inline copy */
.body-text {
  font-size: 18px;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.5;
}

/* Trust marks */
.collaborators-label {
  margin-bottom: var(--space-sm);   /* 16px — matches cta-label gap */
}

.trust {
  margin-bottom: var(--space-sm);   /* 16px — matches collaborators-label and cta-label gaps */
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 64px, black calc(100% - 64px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, black 64px, black calc(100% - 64px), transparent 100%);
}

.trust-track {
  display: flex;
  gap: var(--space-xl);
  align-items: center;
  width: max-content;
  animation: scroll 30s linear infinite;
}

.trustmark {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.65;
  flex-shrink: 0;
  pointer-events: none;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* CTA — spacing matches Collaborators:→logos (16px label gap + 48px section gap) */
.cta-label {
  margin-bottom: var(--space-sm);  /* 16px — equal to collaborators-label */
}

.cta {
  margin-bottom: var(--space-lg);   /* 32px — reduced from 48px per Spencer req 6 */
}

.cta-btn {
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 14px 36px;
  min-width: 200px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cta-btn:hover { opacity: 0.85; }
.cta-btn:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
}

/* Contact form panel — fixed overlay per UX P0.1 */
.contact-panel {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(28, 43, 56, 0.4);
  z-index: 100;
}

.contact-panel:not([hidden]) {
  display: flex;
}

.form-card {
  position: relative;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  padding: var(--space-lg) 40px;
  background: var(--white);
  max-width: 500px;
  width: calc(100% - 48px);
  max-height: 90vh;
  overflow-y: auto;
}

.close-btn {
  position: absolute;
  top: var(--space-sm);
  right: 20px;
  background: none;
  border: none;
  color: var(--mid-grey);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover { color: var(--ink); }

.form-card h2 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: var(--space-md);
  color: var(--ink);
}

form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: var(--footer-grey);
  gap: 4px;
}

input, textarea {
  border: 1px solid var(--mid-grey);
  border-radius: 4px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  width: 100%;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
}

textarea { resize: vertical; min-height: 80px; }

.send-btn {
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 12px 32px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  align-self: flex-start;
}

.send-btn:hover { opacity: 0.85; }

/* Form success message */
.form-success {
  color: var(--success);
  font-size: 15px;
  font-weight: 500;
  padding: var(--space-md) 0;
  text-align: center;
}

/* Footer — equalized padding per UX P2.4 */
.site-footer {
  margin-top: 0;
  padding: 40px 0 40px;
  font-size: 12px;
  color: var(--footer-grey);
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.site-footer a {
  color: var(--footer-grey);
  text-decoration: underline;
}

.site-footer a:hover { color: var(--ink); }

/* Mobile */
@media (max-width: 600px) {
  main { padding: 0 24px; }
  .site-header { padding-top: var(--space-md); padding-bottom: var(--space-sm); }
  .logo { width: 140px; }
  .hero { padding-top: 48px; padding-bottom: var(--space-lg); }
  .hero h1 { font-size: 24px; line-height: 1.4; }
  .trust { margin-bottom: var(--space-lg); }
  .trustmark { height: 24px; }
  .trust-track { gap: var(--space-lg); }
  .form-card { padding: var(--space-md); }
  .send-btn { width: 100%; align-self: stretch; }
  .site-footer { flex-direction: column; gap: var(--space-xs); align-items: flex-start; }
}

/* Legal page */
.legal-page {
  max-width: 720px;
}

.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--mid-grey);
  text-decoration: none;
  margin-bottom: var(--space-sm);
}

.back-link:hover { color: var(--ink); }

.legal-content {
  padding-top: var(--space-md);
  padding-bottom: var(--space-xl);
}

.legal-content h1 {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: var(--space-xs);
  color: var(--ink);
}

.last-updated {
  font-size: 13px;
  color: var(--mid-grey);
  margin-bottom: var(--space-xl);
}

.legal-content h2 {
  font-size: 16px;
  font-weight: 500;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--ink);
}

.legal-content p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 12px;
}

.legal-content a {
  color: var(--ink);
  text-decoration: underline;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .trust-track { animation: none; }
}