/* Homepage newsletter signup dialog — homepage (index) only */

.newsletter-popup-root {
  position: fixed;
  inset: 0;
  /* Above site-chrome header (z-index: 80) so mobile close stays tappable */
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgba(14, 19, 13, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.newsletter-popup-root[hidden] {
  display: none !important;
}

.newsletter-popup {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: min(960px, 100%);
  max-height: min(92vh, 640px);
  border-radius: 6px;
  overflow: hidden;
  background: var(--deep, #0e130d);
  color: var(--light, #f7f7f2);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.newsletter-popup__panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(24px, 4vw, 40px) clamp(22px, 4vw, 36px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.newsletter-popup__logo {
  width: 120px;
  height: auto;
}

.newsletter-popup__logo img {
  display: block;
  width: 120px;
  height: auto;
}

.newsletter-popup__title {
  margin: 0;
  font-family: var(--display, "Comfortaa", sans-serif);
  font-weight: 300;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--light, #f7f7f2);
  text-wrap: balance;
}

.newsletter-popup__lead {
  margin: 0;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.55;
  color: var(--light-mute, rgba(247, 247, 242, 0.72));
  max-width: 38ch;
}

.newsletter-popup__form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 4px;
}

.newsletter-popup__form .newsletter-consent,
.newsletter-popup__form .newsletter-status {
  grid-column: 1;
}

.newsletter-popup__form label:not(.newsletter-consent):not(.newsletter-hp) {
  display: block;
}

.newsletter-popup__form input[type="email"],
.newsletter-popup__form input[type="text"] {
  width: 100%;
  padding: 14px 14px;
  border: 0;
  border-radius: 3px;
  font: inherit;
  font-size: 16px;
  background: #fff;
  color: var(--ink, #141914);
}

.newsletter-popup__form input::placeholder {
  color: #6b7268;
}

.newsletter-popup__form .newsletter-submit {
  width: 100%;
  padding: 15px 20px;
  border: 0;
  border-radius: 3px;
  font-family: "Sora", var(--body, "Quicksand", sans-serif);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  background: var(--light, #f7f7f2);
  color: var(--deep, #0e130d);
}

.newsletter-popup__form .newsletter-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.newsletter-popup__form .newsletter-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--light-mute, rgba(247, 247, 242, 0.82));
}

.newsletter-popup__form .newsletter-consent input {
  flex: none;
  margin: 3px 0 0;
  accent-color: var(--gold, #d9b565);
}

.newsletter-popup__form .newsletter-consent a {
  color: var(--gold, #d9b565);
}

.newsletter-popup__form .newsletter-status {
  min-height: 1.4em;
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  color: var(--mint, #81d48e);
}

.newsletter-popup__form .newsletter-status.is-error {
  color: #ffd2c9;
}

.newsletter-popup__visual {
  position: relative;
  min-height: 220px;
  background: var(--forest-2, #163029);
}

.newsletter-popup__visual picture,
.newsletter-popup__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.newsletter-popup__close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.92);
  color: var(--deep, #0e130d);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.newsletter-popup__close svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.newsletter-popup__close:hover {
  background: #fff;
}

@media (max-width: 760px) {
  .newsletter-popup {
    grid-template-columns: 1fr;
    max-height: min(94vh, 900px);
  }

  .newsletter-popup__visual {
    order: -1;
    min-height: 160px;
    max-height: 200px;
  }

  .newsletter-popup__close {
    top: max(14px, env(safe-area-inset-top, 0px));
    right: max(14px, env(safe-area-inset-right, 0px));
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .newsletter-popup-root {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
