/* Newsletter / email capture (Crownstore).
 * Scroll entrance: root `data-cs-scroll-reveal` + `.reveal` columns — theme.css + components/js/animation.js */
.newsletter-section {
  background: var(--theme-bg, #f8f4ee);
  padding: 148px 48px;
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
}

.newsletter-inner {
  max-width: var(--theme-container, 1340px);
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 80px;
  align-items: center;
  min-width: 0;
  box-sizing: border-box;
}

.newsletter-text {
  min-width: 0;
}

.newsletter-text h2 {
  margin-bottom: 20px;
  color: var(--theme-text, #2a2118);
  font-family: var(--theme-font-display, 'Playfair Display', Georgia, serif);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
}

.newsletter-text > p {
  font-family: var(--theme-font-serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--theme-text-secondary, #6b5f54);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 420px;
}

.newsletter-form .newsletter-input-group {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
}

.newsletter-form input[type='email'] {
  flex: 1;
  padding: 16px 20px;
  border: 1px solid var(--color-border, #c4b8a0);
  border-right: none;
  background: transparent;
  font-family: var(--theme-font-family, 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 13.5px;
  color: var(--theme-text, #2a2118);
  outline: none;
  min-width: 0;
  transition: border-color var(--dur, 380ms) var(--ease, cubic-bezier(0.25, 0.46, 0.45, 0.94));
}

.newsletter-form input[type='email']::placeholder {
  color: var(--theme-muted, #9b8e7a);
}

.newsletter-form input[type='email']:focus {
  border-color: var(--theme-text, #2a2118);
}

.newsletter-note {
  font-size: 11px;
  color: var(--theme-muted, #9b8e7a);
  letter-spacing: 0.04em;
  line-height: 1.6;
  transition: color 0.3s var(--ease, cubic-bezier(0.25, 0.46, 0.45, 0.94));
}

button.btn.btn--primary.edit-button {
  background: var(--theme-secondary);
  border-color: var(--theme-secondary);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--theme-primary, #4a5c47) 28%, transparent);
  padding: 17px 38px;
  color: var(--theme-text-inverse, #f8f4ee);
  display: inline-flex;
  align-items: center;
  font-family: var(--theme-font-family);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
}
button.btn.btn--primary.edit-button:hover {
  background: var(--theme-primary, #4a5c47);
  border-color: var(--theme-primary, #4a5c47);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--theme-primary, #4a5c47) 28%, transparent);
  color: var(--theme-text-inverse, #f8f4ee);
}
.btn--primary:hover {
  background: var(--theme-primary, #4a5c47);
  border-color: var(--theme-primary, #4a5c47);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--theme-primary, #4a5c47) 28%, transparent);
}

.newsletter-note.is-success {
  color: var(--theme-primary, #4a5c47);
  font-style: italic;
}

.newsletter-image {
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: 420px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.newsletter-art {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 65% 50% at 40% 30%,
      color-mix(in srgb, var(--theme-bg, #f8f4ee) 55%, transparent) 0%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 50% 45% at 70% 80%,
      color-mix(in srgb, var(--theme-accent, #b8945a) 20%, transparent) 0%,
      transparent 60%
    ),
    linear-gradient(
      150deg,
      var(--theme-surface-card, #f2ede3) 0%,
      var(--theme-cream, #e8ddd0) 22%,
      var(--theme-border, #c4b8a0) 48%,
      var(--theme-accent-soft, #d4b078) 72%,
      var(--theme-muted, #9b8e7a) 100%
    );
}

@media (max-width: 767px) {
  .newsletter-section {
    padding: clamp(56px, 10vw, 88px) clamp(16px, 5vw, 24px);
    /* Avoid 100vw padding math pulling past viewport */
    width: 100%;
  }

  .newsletter-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(28px, 7vw, 44px);
    align-items: stretch;
  }

  .newsletter-text {
    order: 1;
    max-width: 100%;
  }

  /* Input + CTA in one row overflow narrow screens — stack full-width */
  .newsletter-form .newsletter-input-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .newsletter-form input[type='email'] {
    border-right: 1px solid var(--color-border, #c4b8a0);
    width: 100%;
  }

  button.btn.btn--primary.edit-button {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .newsletter-note {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Copy + form first; gradient card below */
  .newsletter-image {
    order: 2;
    min-height: min(48vh, 360px);
    width: 100%;
  }
}