/* ===== MAGNET CAPTURE MODAL ===== */

/* Backdrop */
.magnet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.magnet-backdrop.open {
  display: flex;
}

/* Modal box */
.magnet-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 32px 80px rgba(26, 26, 46, 0.25);
  animation: magnetModalIn 0.25s ease-out;
}

@keyframes magnetModalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Close button */
.magnet-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #6b6b7b);
  transition: background 0.2s, color 0.2s;
  font-size: 1.2rem;
  line-height: 1;
  z-index: 1;
}

.magnet-close:hover {
  background: #f0ede9;
  color: var(--deep, #1a1a2e);
}

/* Header */
.magnet-modal-header {
  padding: 36px 36px 28px;
  background: linear-gradient(165deg, #1a1a2e 0%, #2d1b42 100%);
  border-radius: 20px 20px 0 0;
  position: relative;
  overflow: hidden;
}

.magnet-modal-header::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,169,201,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.magnet-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #d4a574;
  margin-bottom: 14px;
}

.magnet-modal-header h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  color: #fff;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 8px;
}

.magnet-modal-header p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

/* Body */
.magnet-modal-body {
  padding: 28px 36px 36px;
}

/* Form */
.magnet-form-row {
  margin-bottom: 16px;
}

.magnet-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2c2c3a;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.magnet-input {
  width: 100%;
  padding: 12px 16px;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 0.95rem;
  border: 1.5px solid rgba(26, 26, 46, 0.15);
  border-radius: 10px;
  background: #faf8f5;
  color: #2c2c3a;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  box-sizing: border-box;
  min-height: 44px;
}

.magnet-input:focus {
  border-color: #2d1b42;
  box-shadow: 0 0 0 3px rgba(45, 27, 66, 0.1);
  background: #fff;
}

.magnet-input.error {
  border-color: #e05252;
  box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.12);
}

.magnet-input::placeholder {
  color: #9a9aaa;
}

/* Magnet selector grid */
.magnet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}

.magnet-option {
  position: relative;
}

.magnet-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.magnet-option-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 12px;
  border: 2px solid rgba(26, 26, 46, 0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}

.magnet-option-label:hover {
  border-color: #b8a9c9;
  background: #faf8f5;
}

.magnet-option input:checked + .magnet-option-label {
  border-color: #2d1b42;
  background: #f5f0eb;
}

.magnet-option-icon {
  font-size: 1.4rem;
}

.magnet-option-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #2c2c3a;
  line-height: 1.3;
}

/* Goals textarea */
.magnet-textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 0.95rem;
  border: 1.5px solid rgba(26, 26, 46, 0.15);
  border-radius: 10px;
  background: #faf8f5;
  color: #2c2c3a;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  box-sizing: border-box;
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.magnet-textarea:focus {
  border-color: #2d1b42;
  box-shadow: 0 0 0 3px rgba(45, 27, 66, 0.1);
  background: #fff;
}

.magnet-textarea::placeholder {
  color: #9a9aaa;
}

.magnet-optional-hint {
  font-size: 0.75rem;
  color: #9a9aaa;
  margin-top: 4px;
}

/* Submit button */
.magnet-submit {
  width: 100%;
  padding: 15px 24px;
  background: #d4a574;
  color: #fff;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
  margin-top: 8px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.magnet-submit:hover:not(:disabled) {
  background: #c69563;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 165, 116, 0.35);
}

.magnet-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Loading spinner */
.magnet-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: magnetSpin 0.7s linear infinite;
}

.magnet-spinner.on { display: block; }

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

/* Error message */
.magnet-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #dc2626;
  margin-bottom: 12px;
  line-height: 1.5;
}

.magnet-error.on { display: block; }

/* Success state */
.magnet-success {
  display: none;
  padding: 28px 36px 36px;
  text-align: center;
}

.magnet-success.on { display: block; }

.magnet-success-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.magnet-success h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.5rem;
  color: #1a1a2e;
  font-weight: 400;
  margin-bottom: 10px;
}

.magnet-success p {
  font-size: 0.95rem;
  color: #6b6b7b;
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto 24px;
}

.magnet-success-btn {
  display: inline-block;
  padding: 12px 28px;
  background: #1a1a2e;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.2s;
}

.magnet-success-btn:hover {
  background: #2d1b42;
}

/* ===== STICKY HERO MAGNET CTA ===== */
.hero-magnet-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  margin-left: 16px;
  padding: 13px 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(212, 165, 116, 0.4);
  color: var(--soft-gold, #d4a574);
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hero-magnet-cta:hover {
  background: rgba(212, 165, 116, 0.15);
  border-color: rgba(212, 165, 116, 0.7);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 165, 116, 0.2);
}

.hero-magnet-cta span {
  font-size: 1rem;
}

/* ===== RESOURCES PAGE ===== */
.resources-page {
  padding-top: 80px;
}

.resources-hero {
  background: linear-gradient(165deg, #1a1a2e 0%, #2d1b42 100%);
  padding: 80px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.resources-hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 169, 201, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.resources-hero-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d4a574;
  margin-bottom: 20px;
}

.resources-hero h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 16px;
}

.resources-hero p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

.resources-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 40px;
}

.resources-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #d4a574;
  margin-bottom: 12px;
}

.resources-section-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: #1a1a2e;
  font-weight: 400;
  margin-bottom: 40px;
}

.magnets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.magnet-card {
  background: #fff;
  border: 1.5px solid rgba(26, 26, 46, 0.09);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  display: flex;
  flex-direction: column;
}

.magnet-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(26, 26, 46, 0.12);
  border-color: #b8a9c9;
}

.magnet-card-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
}

.magnet-card-body {
  padding: 28px 28px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.magnet-card-badge {
  display: inline-block;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d4a574;
  background: rgba(212, 165, 116, 0.12);
  border: 1px solid rgba(212, 165, 116, 0.25);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
  align-self: flex-start;
}

.magnet-card h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.25rem;
  color: #1a1a2e;
  font-weight: 400;
  margin-bottom: 10px;
  line-height: 1.3;
}

.magnet-card p {
  font-size: 0.88rem;
  color: #6b6b7b;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 24px;
}

.magnet-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #1a1a2e;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.2s;
  align-self: flex-start;
}

.magnet-card:hover .magnet-card-cta {
  background: #2d1b42;
}

/* ===== EXIT-INTENT POPUP ===== */
.exit-popup-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.exit-popup-backdrop.open {
  display: flex;
}

.exit-popup {
  background: #fff;
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  position: relative;
  animation: magnetModalIn 0.25s ease-out;
  overflow: hidden;
}

.exit-popup-header {
  padding: 40px 40px 28px;
  background: linear-gradient(165deg, #1a1a2e 0%, #2d1b42 100%);
  text-align: center;
}

.exit-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  transition: color 0.2s;
}

.exit-popup-close:hover { color: #fff; }

.exit-popup-icon {
  font-size: 2.8rem;
  margin-bottom: 14px;
}

.exit-popup-header h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.5rem;
  color: #fff;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 8px;
}

.exit-popup-header p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

.exit-popup-body {
  padding: 28px 36px 36px;
}

.exit-popup-form-row {
  margin-bottom: 14px;
}

.exit-popup-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2c2c3a;
  margin-bottom: 5px;
}

.exit-popup-input {
  width: 100%;
  padding: 11px 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  border: 1.5px solid rgba(26, 26, 46, 0.15);
  border-radius: 10px;
  background: #faf8f5;
  color: #2c2c3a;
  outline: none;
  box-sizing: border-box;
  min-height: 44px;
  transition: border-color 0.2s;
}

.exit-popup-input:focus {
  border-color: #2d1b42;
  box-shadow: 0 0 0 3px rgba(45, 27, 66, 0.1);
  background: #fff;
}

.exit-popup-input::placeholder { color: #9a9aaa; }

.exit-popup-submit {
  width: 100%;
  padding: 14px;
  background: #d4a574;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.25s;
  margin-top: 4px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.exit-popup-submit:hover { background: #c69563; }
.exit-popup-submit:disabled { opacity: 0.65; cursor: not-allowed; }

.exit-popup-note {
  margin-top: 10px;
  font-size: 0.75rem;
  color: #9a9aaa;
  text-align: center;
}

.exit-popup-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.83rem;
  color: #dc2626;
  margin-bottom: 10px;
}

.exit-popup-error.on { display: block; }

/* Success state for exit popup */
.exit-popup-success {
  display: none;
  padding: 40px 36px;
  text-align: center;
}

.exit-popup-success.on { display: block; }

.exit-popup-success-icon { font-size: 2.8rem; margin-bottom: 14px; }

.exit-popup-success h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.4rem;
  color: #1a1a2e;
  font-weight: 400;
  margin-bottom: 10px;
}

.exit-popup-success p {
  font-size: 0.9rem;
  color: #6b6b7b;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .magnet-modal-header,
  .magnet-modal-body { padding-left: 24px; padding-right: 24px; }
  .magnet-success { padding-left: 24px; padding-right: 24px; }

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

  .resources-hero { padding: 64px 24px 56px; }
  .resources-content { padding: 56px 24px; }
  .magnets-grid { grid-template-columns: 1fr; }

  .exit-popup-header,
  .exit-popup-body { padding-left: 24px; padding-right: 24px; }
  .exit-popup-success { padding-left: 24px; padding-right: 24px; }

  .hero-magnet-cta { margin-left: 0; margin-top: 12px; }
}