/* MindHeaven® — Newsletter production section
   Namespaced to avoid collisions with the existing site. */

:root {
  --mh-news-bg: #f4f5f6;
  --mh-news-surface: #fbfbf9;
  --mh-news-text: #111318;
  --mh-news-muted: #727780;
  --mh-news-faint: #a0a5ad;
  --mh-news-line: #dfe2e6;
  --mh-news-line-strong: #c7cbd1;
  --mh-news-accent: #5b57e8;
  --mh-news-button: #665eff;
  --mh-news-button-text: #ffffff;
  --mh-news-error: #a74242;
  --mh-news-success: #28754c;
}

.mh-newsletter {
  box-sizing: border-box;
  width: 100%;
  background: var(--mh-news-bg);
  color: var(--mh-news-text);
  border-top: 1px solid var(--mh-news-line);
  border-bottom: 1px solid var(--mh-news-line);
  padding: clamp(78px, 9vw, 138px) clamp(22px, 5.5vw, 80px);
  font-family: inherit;
}

.mh-newsletter *,
.mh-newsletter *::before,
.mh-newsletter *::after {
  box-sizing: border-box;
}

.mh-newsletter__inner {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.mh-newsletter__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 25px;
  color: var(--mh-news-accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.mh-newsletter__meta::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--mh-news-accent);
}

.mh-newsletter__title {
  max-width: 870px;
  margin: 0;
  color: var(--mh-news-text);
  font: inherit;
  font-size: clamp(44px, 6vw, 82px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.045em;
}

.mh-newsletter__intro {
  max-width: 680px;
  margin: 28px 0 45px;
  color: var(--mh-news-muted);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.6;
}

.mh-newsletter__form {
  width: min(100%, 840px);
}

.mh-newsletter__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid var(--mh-news-line-strong);
}

.mh-newsletter__input {
  width: 100%;
  min-height: 66px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--mh-news-text);
  font: inherit;
  font-size: 18px;
  line-height: 1.3;
}

.mh-newsletter__input::placeholder {
  color: var(--mh-news-faint);
}

.mh-newsletter__input:focus {
  box-shadow: inset 0 -2px 0 var(--mh-news-accent);
}

.mh-newsletter__button {
  align-self: center;
  min-width: 176px;
  min-height: 52px;
  margin-left: 24px;
  padding: 0 25px;
  border: 0;
  border-radius: 2px;
  background: var(--mh-news-button);
  color: var(--mh-news-button-text);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: opacity 180ms ease, transform 180ms ease;
}

.mh-newsletter__button:hover {
  background: #5851e6;
  opacity: 1;
}

.mh-newsletter__button:active {
  transform: translateY(1px);
}

.mh-newsletter__button:disabled {
  cursor: wait;
  opacity: .55;
}

.mh-newsletter__consent {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  max-width: 760px;
  margin-top: 20px;
  color: var(--mh-news-muted);
  font-size: 11px;
  line-height: 1.6;
}

.mh-newsletter__consent input {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--mh-news-accent);
}

.mh-newsletter__consent a {
  color: var(--mh-news-text);
  text-decoration: underline;
  text-decoration-color: var(--mh-news-line-strong);
  text-underline-offset: 3px;
}

.mh-signup__turnstile {
  width: 100%;
  margin-top: 0;
  overflow: hidden;
}

.mh-signup__turnstile.is-interactive {
  margin-top: 18px;
}

.mh-signup__status {
  min-height: 22px;
  margin: 17px 0 0;
  color: var(--mh-news-muted);
  font-size: 13px;
  line-height: 1.5;
}

.mh-signup__status[data-state="success"] {
  color: var(--mh-news-success);
}

.mh-signup__status[data-state="error"] {
  color: var(--mh-news-error);
}

.mh-signup__spinner {
  display: none;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 1px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: mh-news-spin 700ms linear infinite;
}

.mh-newsletter__button[data-loading="true"] .mh-signup__spinner {
  display: inline-block;
}

.mh-signup__trap,
.mh-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

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

@media (max-width: 720px) {
  .mh-newsletter {
    padding-left: 22px;
    padding-right: 22px;
  }

  .mh-newsletter__row {
    grid-template-columns: 1fr;
    border-bottom: 0;
  }

  .mh-newsletter__input {
    border-bottom: 1px solid var(--mh-news-line-strong);
  }

  .mh-newsletter__button {
    width: 100%;
    margin: 16px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mh-newsletter__button {
    transition: none;
  }
}
