/**
 * Digital Duct Tape — newsletter signup for workshopcalc
 * Two placements:
 *   1) .ddt-footer  — injected into <footer> on every page (always visible)
 *   2) .ddt-sticky  — dismissable sticky bar at bottom of viewport
 */

/* ============ Footer block ============ */
.ddt-footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 12px;
  padding: 2rem 1.75rem;
  margin: 1.5rem 0;
  color: #e2e8f0;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ddt-footer .ddt-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: #60a5fa;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.ddt-footer .ddt-headline {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  font-size: 1.875rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}
.ddt-footer .ddt-tagline {
  font-size: 1rem;
  color: #cbd5e1;
  font-style: italic;
  margin: 0 0 0.25rem;
}
.ddt-footer .ddt-sub {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0 0 1.25rem;
}
.ddt-footer form {
  display: flex;
  gap: 0.5rem;
  max-width: 440px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.ddt-footer input[type="email"] {
  flex: 1;
  min-width: 180px;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.ddt-footer input[type="email"]:focus {
  border-color: #60a5fa;
  background: rgba(255, 255, 255, 0.08);
}
.ddt-footer input[type="email"]::placeholder { color: #64748b; }
.ddt-footer button[type="submit"] {
  padding: 0.65rem 1.25rem;
  background: #2563eb;
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  white-space: nowrap;
}
.ddt-footer button[type="submit"]:hover { background: #1d4ed8; }
.ddt-footer .ddt-trust {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.75rem;
}

/* ============ Sticky bottom bar ============ */
.ddt-sticky {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9998;
  background: #0f172a;
  color: #f1f5f9;
  border-radius: 12px;
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(96, 165, 250, 0.35);
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.875rem;
  animation: ddtSlideUp 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-width: 720px;
  margin: 0 auto;
}
.ddt-sticky .ddt-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}
.ddt-sticky .ddt-copy {
  flex: 1;
  min-width: 0;
}
.ddt-sticky .ddt-copy strong { color: #ffffff; font-weight: 700; }
.ddt-sticky .ddt-copy span { color: #94a3b8; font-size: 0.8rem; display: block; margin-top: 2px; }
.ddt-sticky form {
  display: flex;
  gap: 0.375rem;
  flex-shrink: 0;
}
.ddt-sticky input[type="email"] {
  min-width: 180px;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}
.ddt-sticky input[type="email"]:focus { border-color: #60a5fa; }
.ddt-sticky input[type="email"]::placeholder { color: #64748b; }
.ddt-sticky button[type="submit"] {
  padding: 0.45rem 0.9rem;
  background: #2563eb;
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.ddt-sticky button[type="submit"]:hover { background: #1d4ed8; }
.ddt-sticky .ddt-close {
  background: transparent;
  border: 0;
  color: #64748b;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.ddt-sticky .ddt-close:hover { color: #cbd5e1; }

@keyframes ddtSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Mobile */
@media (max-width: 640px) {
  .ddt-footer { padding: 1.5rem 1rem; }
  .ddt-footer .ddt-headline { font-size: 1.5rem; }
  .ddt-sticky {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
  .ddt-sticky .ddt-copy { flex-basis: 100%; font-size: 0.8rem; }
  .ddt-sticky form { flex-basis: 100%; }
  .ddt-sticky input[type="email"] { flex: 1; min-width: 0; }
}
