/* The free Game Model Builder pop-up on the course page (19 October 2026).
   A copy of the Game Model Builder page's newsletter pop-up (gmb-v2/nl-offer.css)
   with a "free with the course" tag on the cover and the reservation bar at the
   foot of this file. The original's notes follow.

   Newsletter offer pop-up. A native <dialog>, so focus trapping, Escape and
   the backdrop come from the browser.

   Revision 3, 11 October 2026: a navy panel holds the workbook cover, which
   settles in as the dialog opens. No prices anywhere in the pop-up, Lucas's
   ruling. Labels are plain text with a short rule, no pill boxes.

   Two columns from 720px, a bottom sheet with a navy band on phones.
   Brand tokens come from page.css, with fallbacks so it also stands alone. */

.nlo {
  --o-ink: var(--sc-ink, #1D2730);
  --o-muted: var(--sc-ink-soft, #656D77);
  --o-blue: var(--sc-accent, #3281BC);
  --o-blue-deep: var(--gm-accent-deep, #2A6C9E);
  --o-blue-dark: var(--gm-accent-dark, #1F5680);
  --o-navy: var(--gm-navy, #141D24);
  --o-hair: rgba(29, 39, 48, 0.14);
  --o-serif: var(--gm-font-work, "Lora", Georgia, serif);
  --o-display: var(--sc-font-display, "Instrument Serif", Georgia, serif);
  --o-sans: var(--sc-font-text, "Inter", system-ui, sans-serif);

  position: fixed;
  width: min(780px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #FFFFFF;
  color: var(--o-ink);
  box-shadow: 0 40px 100px -30px rgba(20, 29, 36, 0.55);
  font-family: var(--o-sans);
  overflow: auto;
}
.nlo::backdrop { background: rgba(20, 29, 36, 0.55); backdrop-filter: blur(3px); }
.nlo[open] { animation: nlo-in .38s cubic-bezier(.2, .7, .2, 1); }
@keyframes nlo-in { from { opacity: 0; transform: translateY(18px) scale(.985); } }

.nlo__grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 720px) { .nlo__grid { grid-template-columns: 300px 1fr; } }

/* ----------------------------------------------------------- the visual */
.nlo__visual {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  padding: 36px 28px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(50, 129, 188, 0.28), transparent 60%),
    var(--o-navy);
  color: #F1EFEA;
}
.nlo__cover {
  width: 168px; height: auto; border-radius: 6px;
  box-shadow: 0 24px 40px -14px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06);
  transform: rotate(-4deg);
}
.nlo[open] .nlo__cover { animation: nlo-cover .7s cubic-bezier(.2, .7, .2, 1) .08s both; }
@keyframes nlo-cover { from { opacity: 0; transform: rotate(-9deg) translateY(16px); } }

/* --------------------------------------------------------------- close */
.nlo__x {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px;
  display: grid; place-items: center; border: 0; border-radius: 10px;
  background: transparent; color: var(--o-muted); cursor: pointer;
}
.nlo__x:hover { background: rgba(29, 39, 48, 0.06); color: var(--o-ink); }

/* ---------------------------------------------------------------- copy */
.nlo__in { position: relative; padding: 34px 32px 24px; }

.nlo__kicker {
  display: flex; align-items: center; gap: 12px; margin: 0;
  color: var(--o-blue-deep); font: 600 0.72rem/1 var(--o-sans); letter-spacing: 0.14em; text-transform: uppercase;
}
.nlo__kicker::before { content: ""; width: 24px; height: 1.5px; background: currentColor; }

.nlo__h {
  margin: 14px 0 0; padding-right: 24px;
  font: 600 1.75rem/1.12 var(--o-serif); letter-spacing: -0.012em; text-wrap: balance;
}
.nlo__h:focus { outline: none; }
.nlo__p { margin: 12px 0 0; font-size: 15.5px; line-height: 1.6; }
.nlo__p--muted { color: var(--o-muted); }

.nlo__form { margin-top: 20px; }
.nlo__label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.nlo__input {
  width: 100%; height: 52px; padding: 0 16px; box-sizing: border-box;
  font-family: inherit; font-size: 16px; color: var(--o-ink);
  border: 1.5px solid rgba(29, 39, 48, 0.22); border-radius: 10px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.nlo__input::placeholder { color: #A3A9B0; }
.nlo__input:focus { outline: none; border-color: var(--o-blue); box-shadow: 0 0 0 4px rgba(50, 129, 188, 0.16); }
.nlo__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.nlo__btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; margin-top: 10px; padding: 0 18px; box-sizing: border-box;
  border: 0; border-radius: 10px; background: var(--o-blue-deep); color: #fff;
  font: 600 16px/1.2 var(--o-sans); text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .15s, box-shadow .2s, transform .2s;
}
.nlo__btn svg { transition: transform .2s; }
.nlo__btn:hover { background: var(--o-blue-dark); box-shadow: 0 12px 34px rgba(50, 129, 188, 0.22); transform: translateY(-1px); }
.nlo__btn:hover svg { transform: translateX(3px); }
.nlo__btn[disabled] { opacity: .7; cursor: progress; transform: none; }

.nlo__fine { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--o-muted); }
.nlo__err { margin: 10px 0 0; font-size: 14px; color: #B3261E; }

.nlo__skip {
  display: block; margin: 12px auto 0; padding: 6px 8px; border: 0; background: none; cursor: pointer;
  font: 500 14px/1.2 var(--o-sans); color: var(--o-muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.nlo__skip:hover { color: var(--o-ink); }

/* -------------------------------------------------------- confirmation */
.nlo__code {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 18px; padding: 14px 14px 14px 18px;
  border: 1.5px dashed rgba(50, 129, 188, 0.55); border-radius: 12px; background: rgba(50, 129, 188, 0.06);
}
.nlo__code-val { font: 600 1.35rem/1 var(--o-serif); letter-spacing: 0.06em; }
.nlo__copy {
  min-height: 36px; padding: 0 12px; border: 1px solid var(--o-hair); border-radius: 8px; background: #fff;
  font: 600 13px/1 var(--o-sans); color: var(--o-ink); cursor: pointer;
}

/* --------------------------------------------- phones: a bottom sheet */
@media (max-width: 719px) {
  .nlo {
    width: 100%; max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .nlo[open] { animation-name: nlo-up; }
  @keyframes nlo-up { from { transform: translateY(100%); } }

  /* The visual becomes a band with the cover centred in it. */
  .nlo__visual { padding: 22px 56px 18px; }
  .nlo__cover { width: 84px; border-radius: 4px; }
  .nlo__x { color: #C9D1D8; }
  .nlo__x:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  .nlo__in { padding: 22px 22px 18px; }
  .nlo__h { font-size: 1.5rem; padding-right: 0; }
  .nlo__p { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .nlo[open], .nlo[open] .nlo__cover { animation: none; }
  .nlo__btn, .nlo__btn svg { transition: none; }
}

/* ------------------------------------------- course page additions */
.nlo__free {
  position: absolute; right: 18%; bottom: 20%; z-index: 2;
  padding: .4rem .7rem; border-radius: 9px; transform: rotate(-4deg);
  background: var(--o-blue); color: #fff; font: 600 0.74rem/1 var(--o-sans); letter-spacing: .02em;
  box-shadow: 0 0 0 4px rgba(20, 29, 36, .9), 0 10px 20px -8px rgba(50, 129, 188, .8);
}
.nlo__visual { position: relative; }
@media (max-width: 719px) { .nlo__free { right: 10%; bottom: 14%; font-size: .66rem; } }

/* "Your free Game Model Builder is reserved until ...", top of the page, only
   once reserved. */
.bonus-bar {
  position: relative; z-index: 5; display: flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .6rem 16px; background: var(--o-blue-deep); color: #fff; text-align: center;
  font: 500 .88rem/1.4 var(--o-sans);
}
.bonus-bar strong { font-weight: 600; }
.bonus-bar svg { flex: none; }

/* On this page the pop-up opens over navy rather than cream, so it gets a
   faint outline to keep its navy panel from merging into the page behind. */
.nlo { box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 40px 100px -30px rgba(0, 0, 0, .8); }
.nlo::backdrop { background: rgba(8, 13, 17, .7); }
