/* ============================================================
   ARC Studios · Founding Instructor Roadmap pop-up
   book.arcstudiosco.com

   Same pop-up, restyled to the new brand. The markup is built at
   runtime by js/arc-roadmap.js, so every class name here is
   load-bearing — rename one and that part of the pop-up stops
   being styled.

   What changed from the old version: Didact Gothic and Poppins
   became Century Gothic, the pill buttons became the site's
   3px radius, and the hard-coded greys became the brand tokens
   from the shared stylesheet. Shape, copy and behaviour are
   untouched.
   ============================================================ */

.rm {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: var(--font);
  color: var(--ink-muted);
}
.rm[hidden], .rm [hidden] { display: none !important; }
.rm * { box-sizing: border-box; }

.rm__scrim {
  position: absolute;
  inset: 0;
  background: rgba(26, 24, 22, 0.58);
  opacity: 0;
  transition: opacity .3s ease;
}
.rm.is-open .rm__scrim { opacity: 1; }

.rm__panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 880px;
  min-height: 500px;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: var(--taupe-light);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  transform: translateY(18px) scale(.98);
  opacity: 0;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .3s ease;
}
.rm.is-open .rm__panel { transform: none; opacity: 1; }

/* Left: the photo. Falls back to flat ink if the image is missing,
   which still looks deliberate rather than broken. */
/* Centred, not 40%. The wall logo sits in the middle of the frame and
   the photo's proportions almost match the panel's, so centring keeps
   it whole instead of shaving one side off. */
.rm__photo {
  background: var(--ink) url("/img/popup-wall.jpg") center / cover no-repeat;
  border-radius: 22px 0 0 22px;
  min-height: 100%;
}

/* Right: the offer. */
.rm__main {
  padding: clamp(34px, 4vw, 52px) clamp(26px, 3.4vw, 46px) clamp(30px, 3vw, 42px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}
.rm__logo { width: 88px; height: auto; display: block; margin-bottom: 4px; }

.rm__ask { display: flex; flex-direction: column; gap: 10px; }
.rm__eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.rm__main h2 {
  margin: 0;
  font-weight: 400;
  color: var(--ink);
  font-size: clamp(25px, 2.6vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.rm__sub {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: 32ch;
}

.rm form { width: 100%; display: flex; flex-direction: column; gap: 12px; margin: 8px 0 0; }

.rm input[type=email] {
  width: 100%;
  font: 400 16px/1.5 var(--font);
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid rgba(31, 29, 27, 0.18);
  border-radius: 3px;
  min-height: 52px;
  padding: 14px 18px;
}
.rm input[type=email]::placeholder { color: #8A857F; }
.rm input[type=email]:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  border-color: transparent;
}

.rm__fine {
  margin: 0;
  padding: 0 2px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-muted);
  text-align: left;
}

.rm__btn {
  width: 100%;
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark);
  background: var(--ink);
  border: 0;
  border-radius: 3px;
  min-height: 52px;
  padding: 0 22px;
  cursor: pointer;
  transition: background-color .18s ease;
}
.rm__btn:hover { background: #000; }
.rm__btn[disabled] { opacity: .6; cursor: progress; }

.rm__err { margin: 0; color: #8C4A3A; font-size: 14px; text-align: left; }
.rm__err:empty { display: none; }

/* The spam trap. Off-screen rather than display:none, because some
   bots skip anything that is hidden outright. */
.rm__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rm__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.rm__close:hover { background: var(--taupe); }
.rm button:focus-visible, .rm a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* After they sign up. */
.rm__done { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.rm__back {
  margin-top: 6px;
  background: none;
  border: 0;
  color: var(--ink-muted);
  font: 400 14px var(--font);
  text-decoration: underline;
  cursor: pointer;
  padding: 10px;
}
.rm__back:hover { color: var(--ink); }

body.rm-lock { overflow: hidden; }

/* Phone: the photo goes, the card centres. */
@media (max-width: 720px) {
  .rm__panel { grid-template-columns: 1fr; min-height: 0; max-width: 440px; }
  .rm__photo { display: none; }
  .rm__main { padding: 44px 22px 28px; }
  .rm__logo { width: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  .rm__panel, .rm__scrim { transition: none; }
}

/* ---- Extra fields ---- */

/* First and last side by side; they stack on a narrow panel. */
.rm__row { display: flex; gap: 10px; }
.rm__row > input { flex: 1 1 0; min-width: 0; }
@media (max-width: 420px) { .rm__row { flex-direction: column; } }

.rm input[type=text],
.rm input[type=tel] {
  width: 100%;
  font: 400 16px/1.5 var(--font);
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid rgba(31, 29, 27, 0.18);
  border-radius: 3px;
  min-height: 52px;
  padding: 14px 18px;
}
.rm input[type=text]::placeholder,
.rm input[type=tel]::placeholder { color: #8A857F; }
.rm input[type=text]:focus,
.rm input[type=tel]:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  border-color: transparent;
}

/* Consent. These are the thing someone is agreeing to, so they are
   set at a readable size rather than as small print. */
.rm__check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  text-align: left;
  cursor: pointer;
}
.rm__check input[type=checkbox] {
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: var(--ink);
  cursor: pointer;
}
.rm__check span {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-muted);
}

/* Six fields is a taller panel than one. Give it room to scroll on a
   short screen rather than clipping the button off the bottom. */
.rm__panel { min-height: 0; }
.rm__main { justify-content: flex-start; }
@media (min-width: 721px) {
  .rm__panel { min-height: 560px; }
  .rm__main { justify-content: center; }
}
