/**
 * Newsletter Section Styles
 * Email subscription form — dark gradient band
 */

/* ── Newsletter: Dark Gradient Band ──────────────────────── */
.newsletter-dark-section,
.newsletter-section {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--color-primary) 90%, var(--color-accent)) 0%,
    color-mix(in srgb, var(--color-primary) 55%, #000) 100%
  );
  color: #fff;
  position: relative;
  overflow: hidden;
  padding-block: var(--space-6);
  margin-block: var(--space-6);
  margin-inline: var(--space-4);
  border-radius: var(--radius-2xl);
}

@media (min-width: 768px) {
  .newsletter-dark-section,
  .newsletter-section {
    margin-inline: var(--space-8);
  }
}

@media (min-width: 1200px) {
  .newsletter-dark-section,
  .newsletter-section {
    margin-inline: auto;
    max-width: calc(var(--container-max) - var(--space-16));
  }
}

/* Decorative background pattern (subtle circuit dots) */
.newsletter-dark-section::before,
.newsletter-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* ============================================
   Newsletter Content
   ============================================ */
.newsletter-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  text-align: center;
}

@media (min-width: 768px) {
  .newsletter-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
    text-align: start;
  }
}

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

.newsletter-form-col {
  width: 100%;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .newsletter-form-col {
    width: 300px;
  }
}

@media (min-width: 992px) {
  .newsletter-form-col {
    width: 340px;
  }
}

.newsletter-dark-section .section-title,
.newsletter-section .section-title {
  color: #fff;
}

.newsletter-dark-section .section-title::after,
.newsletter-section .section-title::after {
  background: linear-gradient(to right, var(--color-accent), rgba(255,255,255,0.6));
}

.newsletter-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-white);
  margin-bottom: var(--space-2);
  line-height: var(--leading-tight);
}

@media (min-width: 768px) {
  .newsletter-title {
    font-size: var(--text-2xl);
  }
}

/* ============================================
   Eyebrow Badge
   ============================================ */
.newsletter-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
}

.newsletter-description {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: var(--space-4);
  line-height: var(--leading-normal);
}

.newsletter-dark-section p,
.newsletter-section p {
  color: rgba(255, 255, 255, 0.82);
}

/* ============================================
   Newsletter Form
   ============================================ */
.newsletter-form {
  width: 100%;
}

.newsletter-input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

@media (min-width: 576px) {
  .newsletter-input-group {
    flex-direction: row;
  }
}

/* Glass-style input — integrates with dark gradient */
.newsletter-dark-section .newsletter-form .form-control,
.newsletter-section .newsletter-form .form-control,
.newsletter-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-xl);
  padding-inline: var(--space-4);
  height: 42px;
  font-size: var(--text-sm);
  color: #fff;
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.newsletter-dark-section .newsletter-form .form-control:focus,
.newsletter-section .newsletter-form .form-control:focus,
.newsletter-input:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
  outline: none;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Submit button */
.btn-newsletter-submit,
.newsletter-dark-section .btn,
.newsletter-section .btn,
.newsletter-submit {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-xl);
  padding-inline: var(--space-5);
  height: 42px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.btn-newsletter-submit:hover,
.newsletter-dark-section .btn:hover,
.newsletter-section .btn:hover,
.newsletter-submit:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.newsletter-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================
   Newsletter Message (Success/Error)
   ============================================ */
.newsletter-message {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-sm);
}

.newsletter-message .alert {
  background: var(--color-white);
  color: var(--color-text-primary);
  border: none;
  box-shadow: var(--shadow-md);
}

/* ============================================
   Privacy Text
   ============================================ */
.newsletter-privacy {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
  line-height: var(--leading-normal);
  margin-bottom: 0;
}

/* ============================================
   Accessibility
   ============================================ */
.newsletter-input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.newsletter-submit:focus-visible,
.btn-newsletter-submit:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}
