/* Newsletter invitation + popup. Matches the site theme (dark #222831 / footer #1a1f26,
 * card #393E46, border #454B54, primary #12c0e2, text #fff, muted #94a3b8, "Roboto Condensed").
 * Scoped under .tgn-* so it cannot affect the React app's own styles. */

.tgn-invite {
  background: #1f252d;
  border-top: 1px solid #2a313b;
  color: #fff;
  font-family: "Roboto Condensed", system-ui, sans-serif;
}
.tgn-invite-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}
.tgn-invite-text { flex: 1 1 320px; min-width: 0; }
.tgn-invite-h {
  font-family: "Roboto Condensed", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2rem);
  line-height: 1.15;
  letter-spacing: .01em;
  margin: 0 0 .5rem;
  color: #fff;
}
.tgn-invite-p { margin: 0; color: #cbd5e1; font-size: 1.05rem; line-height: 1.5; max-width: 60ch; }

.tgn-invite-btn, .tgn-submit {
  font-family: "Roboto Condensed", system-ui, sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  background: #12c0e2;
  color: #06222a;
  border: 0;
  border-radius: 6px;
  padding: .85rem 1.6rem;
  cursor: pointer;
  transition: opacity .2s ease, background-color .2s ease;
  white-space: nowrap;
}
.tgn-invite-btn { flex: 0 0 auto; }
.tgn-invite-btn:hover, .tgn-submit:hover { opacity: .9; }
.tgn-invite-btn:focus-visible, .tgn-submit:focus-visible,
.tgn-close:focus-visible, .tgn-form input:focus-visible, .tgn-form a:focus-visible {
  outline: 2px solid #12c0e2;
  outline-offset: 2px;
}

/* ── modal ── */
.tgn-overlay {
  position: fixed; inset: 0; z-index: 2147483000;
  background: rgba(10, 13, 17, .72);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 4vh 1rem; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
body.tgn-noscroll { overflow: hidden; }
.tgn-dialog {
  font-family: "Roboto Condensed", system-ui, sans-serif;
  background: #393e46;
  color: #fff;
  border: 1px solid #454b54;
  border-radius: 10px;
  width: 100%; max-width: 560px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  padding: 1.5rem;
  margin: auto 0;
  animation: tgn-in .18s ease;
}
@keyframes tgn-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.tgn-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.tgn-dialog-title { font-weight: 700; font-size: 1.5rem; margin: 0 0 .25rem; color: #fff; }
.tgn-close {
  background: transparent; border: 0; color: #cbd5e1; font-size: 1.6rem; line-height: 1;
  cursor: pointer; padding: .1rem .4rem; border-radius: 6px; flex: 0 0 auto;
}
.tgn-close:hover { color: #fff; background: rgba(255,255,255,.08); }

.tgn-form { margin-top: .75rem; }
.tgn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; }
.tgn-field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.tgn-field.tgn-full, .tgn-full { grid-column: 1 / -1; }
.tgn-field label { font-size: .85rem; color: #cbd5e1; font-weight: 500; }
.tgn-req { color: #12c0e2; }
.tgn-form input[type=text], .tgn-form input[type=email] {
  background: #222831; color: #fff;
  border: 1px solid #454b54; border-radius: 6px;
  padding: .6rem .7rem; font-size: 1rem; font-family: inherit; width: 100%;
}
.tgn-form input::placeholder { color: #94a3b8; }

.tgn-consent { display: flex; align-items: flex-start; gap: .6rem; margin: 1rem 0 .25rem; }
.tgn-consent input { margin-top: .25rem; flex: 0 0 auto; width: 1.1rem; height: 1.1rem; accent-color: #12c0e2; }
.tgn-consent label { font-size: .9rem; color: #cbd5e1; line-height: 1.45; }
.tgn-privacy { color: #12c0e2; text-decoration: underline; }

.tgn-err { color: #fca5a5; background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4);
  border-radius: 6px; padding: .55rem .7rem; margin: .75rem 0 0; font-size: .92rem; }
.tgn-submit { margin-top: 1rem; width: 100%; padding: .9rem; }
.tgn-submit[disabled] { opacity: .6; cursor: default; }

.tgn-success { text-align: left; }
.tgn-success p { color: #cbd5e1; line-height: 1.5; margin: .25rem 0 0; }

/* visually-hidden live region */
.tgn-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* honeypot: off-screen, not display:none (so bots still see it) */
.tgn-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 640px) {
  .tgn-invite-inner { padding: 2rem 1.25rem; }
  .tgn-grid { grid-template-columns: 1fr; }
  .tgn-invite-btn { width: 100%; }
  .tgn-dialog { padding: 1.25rem; border-radius: 10px 10px 0 0; }
  .tgn-overlay { padding: 0; align-items: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  .tgn-dialog { animation: none; }
  .tgn-invite-btn, .tgn-submit, .tgn-close { transition: none; }
}
