/* EC Partners: Lead Magnets page */

.lm-hero {
  max-width: var(--content-default);
  margin: 0 auto;
  padding: clamp(7rem, 12vw, 9rem) var(--space-6) var(--space-10);
  text-align: center;
}
.lm-hero h1 {
  font-size: var(--text-2xl); font-weight: 700; color: #fff;
  margin-bottom: var(--space-4);
}
.lm-hero p {
  font-size: var(--text-base); color: var(--color-text-sub);
  max-width: 56ch; margin: 0 auto;
}

.lm-section { padding: 0 var(--space-6) var(--space-16); }
.lm-grid {
  max-width: var(--content-wide); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}
.lm-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-3);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.lm-card:hover { border-color: rgba(37,64,198,0.5); transform: translateY(-2px); }
.lm-card-top {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.lm-format {
  font-size: var(--text-xs); font-weight: 600; color: var(--color-accent-light);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.lm-how {
  font-size: 0.75rem; color: var(--color-text-faint);
  border: 1px solid var(--color-border); border-radius: 100px;
  padding: 2px 10px; white-space: nowrap;
}
.lm-card h2 { font-size: var(--text-lg); font-weight: 700; color: #fff; }
.lm-card p { font-size: var(--text-sm); color: var(--color-text-sub); line-height: 1.7; flex: 1; }
.lm-card .btn-red { align-self: flex-start; margin-top: var(--space-3); cursor: pointer; padding: var(--space-3) var(--space-6); }

.lm-bottom {
  border-top: 1px solid var(--color-border);
  padding: var(--space-12) var(--space-6);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-4);
  text-align: center;
}
.lm-bottom p { color: var(--color-text-sub); font-size: var(--text-base); }

/* Modal */
.lm-dialog {
  width: min(460px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-8) var(--space-8);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.lm-dialog::backdrop { background: rgba(5,8,16,0.75); backdrop-filter: blur(4px); }
.lm-close {
  position: absolute; top: var(--space-3); right: var(--space-3);
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-sub);
}
.lm-close:hover { color: #fff; background: rgba(255,255,255,0.06); }
.lm-close svg { width: 18px; height: 18px; }
.lm-dialog-format {
  font-size: var(--text-xs); font-weight: 600; color: var(--color-accent-light);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-2);
}
.lm-dialog h2 { font-size: var(--text-xl); font-weight: 700; color: #fff; margin-bottom: var(--space-2); padding-right: var(--space-6); }
.lm-dialog-sub { font-size: var(--text-sm); color: var(--color-text-sub); margin-bottom: var(--space-6); }

.lm-form { display: flex; flex-direction: column; gap: var(--space-4); }
.lm-field { display: flex; flex-direction: column; gap: var(--space-2); }
.lm-field span { font-size: var(--text-xs); font-weight: 600; color: #fff; letter-spacing: 0.02em; }
.lm-field input, .lm-field select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  color: #fff; font-size: var(--text-sm);
}
.lm-field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
  padding-right: 40px; cursor: pointer;
}
.lm-field select:invalid { color: var(--color-text-faint); }
.lm-field select option { color: #fff; background: var(--color-surface); }
.lm-field input::placeholder { color: var(--color-text-faint); }
.lm-field input:focus, .lm-field select:focus { outline: none; border-color: var(--color-accent-light); box-shadow: 0 0 0 3px rgba(37,64,198,0.25); }
.lm-field[hidden] { display: none; }
.lm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lm-error { font-size: var(--text-xs); color: #F87171; min-height: 0; }
.lm-error:empty { display: none; }
.lm-form .btn-red-lg { margin-top: var(--space-2); }
.lm-form .btn-red-lg:disabled { opacity: 0.7; cursor: wait; }
.lm-form .form-fine { text-align: center; margin-top: 0; }

.lm-success { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.lm-success[hidden] { display: none; }
.lm-success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--color-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.lm-success-icon svg { width: 26px; height: 26px; }
.lm-success h2 { padding-right: 0; margin-bottom: 0; }
.lm-success p { font-size: var(--text-sm); color: var(--color-text-sub); }
.lm-download { text-decoration: none; text-align: center; display: block; }
.lm-download[hidden] { display: none; }
.lm-next { font-size: var(--text-xs); }

@media (max-width: 480px) {
  .lm-dialog { padding: var(--space-8) var(--space-5) var(--space-6); }
}

/* Gold accents + cover image */
.lm-hero h1 span { color: var(--color-gold); }
.lm-format, .lm-dialog-format { color: var(--color-gold); }
.lm-card:hover { border-color: rgba(200,164,92,0.55); }
.lm-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 380px)); justify-content: center; }
.lm-cover {
  display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
  margin: calc(var(--space-2) * -1) 0 var(--space-3);
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
  aspect-ratio: 612 / 792; background: #0B1120;
}
.lm-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.lm-cover:hover img { transform: scale(1.02); }
