/* ========================================================================
   IRONWORKS AI — NEWSLETTER DIALOG
   Loads after style.css; every token, button, kicker and corner tick comes
   from there. Native <dialog>, so focus trap, Esc and the top layer are the
   browser's.
   ======================================================================== */

.iw-newsletter {
  /* No position override: the UA's position:fixed is what keeps a modal in the
     viewport, and it already anchors the close button and corner ticks. */
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 44px 40px 32px;
  overflow: auto;
  color: var(--off);
  background: var(--navy-2);
  border: 1px solid rgba(193,120,41,.35);
  border-radius: 0;
  box-shadow: var(--shadow-lg);
}
.iw-newsletter::backdrop {
  background: rgba(10,10,20,.72);
  backdrop-filter: blur(3px);
}
.iw-newsletter[open] { animation: iw-nl-in .28s ease-out; }
@keyframes iw-nl-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .iw-newsletter[open] { animation: none; }
}

.iw-newsletter__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  font-size: 26px;
  line-height: 1;
  color: rgba(250,250,250,.6);
  background: none;
  border: 0;
  cursor: pointer;
}
.iw-newsletter__close:hover,
.iw-newsletter__close:focus-visible { color: var(--copper-light); }

.iw-newsletter__title {
  margin: 14px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 40px);
  font-weight: 400;
  line-height: 1.08;
}
.iw-newsletter__title em { color: var(--copper-light); }
.iw-newsletter__lead {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(250,250,250,.72);
}

.iw-newsletter__form {
  display: flex;
  gap: 10px;
}
.iw-newsletter__input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--off);
  background: var(--navy-3);
  border: 1px solid rgba(250,250,250,.18);
  border-radius: var(--radius-sm);
}
.iw-newsletter__input::placeholder { color: rgba(250,250,250,.38); }
.iw-newsletter__input:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(193,120,41,.25);
}
.iw-newsletter__input[aria-invalid="true"] { border-color: #E05A47; }
.iw-newsletter__form .btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* Honeypot: off-screen, not display:none, so naive bots still fill it. */
.iw-newsletter__hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.iw-newsletter__msg {
  min-height: 20px;
  margin: 10px 0 0;
  font-size: 13px;
  color: #F08A7A;
}
.iw-newsletter__fine {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .5px;
  color: rgba(250,250,250,.45);
}
.iw-newsletter__fine a { color: inherit; text-decoration: underline; }
.iw-newsletter__done .btn { margin-top: 4px; }

@media (max-width: 520px) {
  .iw-newsletter { padding: 40px 20px 24px; }
  .iw-newsletter__form { flex-direction: column; }
  .iw-newsletter__form .btn { justify-content: center; }
}
