/* ==========================================================
   MONDAY MOOD
   Uses the site's existing tokens from styles.css. Scoped to
   .mm so nothing here can leak into the rest of the site.
   ========================================================== */

.mm-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(20px, 5vw, 48px);
  border-bottom: 1px solid var(--rule);
}
.mm-nav__mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.mm-nav__mark img { height: 32px; width: auto; display: block; }
.mm-nav__mark span { font-family: var(--ff-display); font-weight: 400; font-size: 17px; letter-spacing: 0.04em; }
@media (max-width: 560px) {
  .mm-nav { padding: 14px clamp(16px, 4vw, 24px); }
  .mm-nav__mark img { height: 26px; }
  .mm-nav__mark span { font-size: 15px; }
}

.mm {
  min-height: calc(100vh - 70px);
  display: flex; align-items: center;
  padding: clamp(56px, 10vh, 110px) var(--gutter) clamp(48px, 8vh, 88px);
}
.mm__inner { width: min(640px, 100%); margin: 0 auto; }

.mm__eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ember);
  margin: 0 0 26px;
}

.mm__title {
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 14px;
}

.mm__cadence {
  font-size: clamp(17px, 0.5vw + 0.95rem, 19px);
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 clamp(32px, 5vw, 44px);
}

/* Body copy runs one thought per line, so paragraphs sit close together. */
.mm__p {
  font-size: clamp(17px, 0.5vw + 0.95rem, 19px);
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 18px;
  max-width: 54ch;
}
.mm__p--tight { margin-bottom: 8px; }
.mm__p strong { color: var(--ink); font-weight: 500; }

/* ---------- the form ---------- */

.mm-form { margin: clamp(34px, 5vw, 46px) 0 0; max-width: 54ch; }

.mm-form .mm-form__row { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.mm-form .mm-form__field { flex: 1 1 240px; min-width: 0; }

.mm-form .mm-form__label {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.mm-form .mm-form__input {
  width: 100%;
  min-height: 56px;
  padding: 15px 20px;
  /* 17px keeps it readable at 45-55 and stops iOS zooming on focus */
  font-family: var(--ff-body);
  font-size: 17px;
  color: var(--ink);
  background: rgba(14, 26, 44, 0.6);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out);
  appearance: none;
}
.mm-form .mm-form__input::placeholder { color: var(--muted); opacity: 1; }
.mm-form .mm-form__input:hover { border-color: var(--ember-deep); }
.mm-form .mm-form__input:focus { outline: none; border-color: var(--ember); background: rgba(14, 26, 44, 0.9); }
.mm-form .mm-form__input:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }

/* Honeypot: off-screen for people, present for bots. */
.mm-form .mm-form__pot {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; opacity: 0; pointer-events: none;
}

.mm-form .mm-form__submit {
  flex: 0 0 auto;
  min-height: 56px;
  padding: 15px 28px;
  justify-content: center;
  white-space: nowrap;
}
.mm-form .mm-form__submit[disabled] { opacity: .55; cursor: progress; }

.mm-form .mm-form__consent {
  /* 15px, not the usual 12-13px fine print. This audience is 45-55. */
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  margin: 18px 0 0;
  max-width: 54ch;
}
.mm-form .mm-form__consent a:not(.btn) { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }

.mm-form .mm-form__status {
  font-size: 16px; line-height: 1.65;
  margin: 16px 0 0; max-width: 54ch;
}
.mm-form .mm-form__status:empty { margin: 0; }
.mm-form .mm-form__status--ok { color: var(--ember-soft); }
.mm-form .mm-form__status--error { color: var(--warm-soft); }

@media (max-width: 560px) {
  .mm-form .mm-form__row { flex-direction: column; }
  /* In a column the flex-basis would set height, not width. */
  .mm-form .mm-form__field { flex: 0 0 auto; }
  .mm-form .mm-form__submit { width: 100%; }
}

/* ---------- the rule and the sample line ---------- */

.mm__rule { border: 0; border-top: 1px solid var(--rule); margin: clamp(40px, 6vw, 56px) 0; }

.mm__aside {
  font-size: 16px; line-height: 1.7;
  color: var(--muted);
  max-width: 54ch; margin: 0;
}
.mm__aside a { color: var(--ember-soft); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- the state pages ---------- */

.mm__mark {
  width: 56px; height: 56px; margin: 0 0 28px;
  border-radius: 999px; border: 1px solid var(--ember);
  display: flex; align-items: center; justify-content: center;
}
.mm__mark svg { width: 24px; height: 24px; }

.mm__sender {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg-soft);
  padding: 2px 8px;
  border-radius: 4px;
  word-break: break-all;
}

.mm__backlink {
  display: inline-block;
  margin-top: clamp(36px, 5vw, 52px);
  font-family: var(--ff-mono);
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.mm__backlink:hover { color: var(--ink); opacity: 1; }


/* ---------- the inline block, reused on every content page ----------
   Two-class selectors throughout, because article.css styles bare `p` and
   `a` inside .article and would otherwise win. */

.mm-inline {
  max-width: 640px;
  margin: clamp(52px, 8vw, 84px) 0;
  padding: clamp(26px, 4vw, 40px);
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ember);
}
.mm-inline--center { margin-left: auto; margin-right: auto; }

/* As a direct child of <main> the block supplies its own gutter. Inside an
   article it inherits the article's measure and needs none. */
main > .mm-inline {
  width: min(640px, calc(100% - 2 * var(--gutter)));
  margin-left: auto;
  margin-right: auto;
}

.mm-inline .mm-inline__eyebrow {
  display: block;
  font-family: var(--ff-mono);
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ember);
  margin: 0 0 16px;
}
.mm-inline .mm-inline__title {
  font-family: var(--ff-display); font-weight: 300;
  font-size: clamp(25px, 3vw, 32px); line-height: 1.15; letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 14px;
}
.mm-inline .mm-inline__body {
  font-size: clamp(16px, 0.4vw + 0.9rem, 18px); line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
  max-width: 52ch;
}
.mm-inline .mm-inline__body + .mm-inline__body { margin-top: 14px; }
.mm-inline .mm-form { margin-top: 26px; }

/* ---------- the off-ramp bridge ----------
   Sits between the booking widget and the letter block. Without it the signup
   arrives with no explanation, as though the page changed the subject. */

.mm-offramp {
  padding: clamp(48px, 7vw, 80px) var(--gutter) 0;
}
.mm-offramp__inner {
  width: min(640px, 100%);
  margin: 0 auto;
  padding-top: clamp(40px, 6vw, 64px);
  border-top: 1px solid var(--rule);
}
.mm-offramp .mm-offramp__lead {
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 16px;
}
.mm-offramp .mm-offramp__body {
  font-size: clamp(17px, 0.5vw + 0.95rem, 19px);
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
  max-width: 52ch;
}
/* The block below supplies its own top margin, so remove the doubled gap. */
.mm-offramp + .mm-inline { margin-top: clamp(28px, 4vw, 40px); }

/* ==========================================================
   THE PROMPT
   Desktop: exit-intent modal. Mobile: slim bottom bar.
   ========================================================== */

/* ---------- desktop modal ---------- */

.mm-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: var(--gutter);
  opacity: 0;
  transition: opacity .3s var(--ease-out);
}
.mm-modal.is-open { opacity: 1; }

.mm-modal__scrim {
  position: absolute; inset: 0;
  background: rgba(6, 12, 22, 0.72);
  cursor: pointer;
}

.mm-modal__panel {
  position: relative;
  width: min(520px, 100%);
  padding: clamp(30px, 4vw, 44px);
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ember);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(10px);
  transition: transform .3s var(--ease-out);
}
.mm-modal.is-open .mm-modal__panel { transform: none; }

.mm-modal .mm-modal__title {
  font-family: var(--ff-display); font-weight: 300;
  font-size: clamp(26px, 3vw, 32px); line-height: 1.14; letter-spacing: -0.02em;
  color: var(--ink); margin: 0 0 14px;
}
.mm-modal .mm-modal__body {
  font-size: 17px; line-height: 1.65; color: var(--ink-soft);
  margin: 0; max-width: 44ch;
}
.mm-modal .mm-form { margin-top: 26px; }
.mm-modal .mm-form__row { flex-direction: column; }
.mm-modal .mm-form__field { flex: 0 0 auto; }
.mm-modal .mm-form__submit { width: 100%; }

/* No guilt copy, no tiny grey "no thanks". It is a real, legible control. */
.mm-modal .mm-modal__decline {
  display: block;
  margin: 18px auto 0;
  padding: 10px 16px;
  font-family: var(--ff-body); font-size: 15px;
  color: var(--muted);
  border-radius: 999px;
  transition: color .25s var(--ease-out);
}
.mm-modal .mm-modal__decline:hover { color: var(--ink); }
.mm-modal .mm-modal__decline:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }

/* ---------- mobile bar ---------- */

.mm-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  background: var(--bg-soft);
  border-top: 2px solid var(--ember);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(100%);
  transition: transform .32s var(--ease-out);
  /* Clear of the iOS home indicator. */
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mm-bar.is-open { transform: none; }

.mm-bar__inner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px clamp(14px, 4vw, 20px);
}
.mm-bar .mm-bar__text {
  flex: 1 1 auto; min-width: 0;
  font-size: 15px; line-height: 1.35; color: var(--ink-soft); margin: 0;
}
.mm-bar .mm-bar__text strong { color: var(--ink); font-weight: 500; }

.mm-bar .mm-bar__cta { flex: 0 0 auto; padding: 11px 18px; font-size: 15px; }

.mm-bar .mm-bar__close {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); border-radius: 999px;
}
.mm-bar .mm-bar__close svg { width: 15px; height: 15px; }
.mm-bar .mm-bar__close:hover { color: var(--ink); }
.mm-bar .mm-bar__close:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }

.mm-bar .mm-bar__form { padding: 0 clamp(14px, 4vw, 20px) 14px; }
.mm-bar .mm-form { margin: 0; }
.mm-bar .mm-form__row { flex-direction: column; }
.mm-bar .mm-form__field { flex: 0 0 auto; }
.mm-bar .mm-form__submit { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .mm-modal, .mm-modal__panel, .mm-bar { transition: none; }
  .mm-bar { transform: none; }
}

/* ---------- the footer form ----------
   The footer column is narrow, so the field and button always stack. */
.footer__letter { grid-column: span 2; max-width: 340px; }
.footer__letter .mm-form { margin-top: 14px; }
.footer__letter .mm-form .mm-form__row { flex-direction: column; gap: 10px; }
.footer__letter .mm-form .mm-form__field { flex: 0 0 auto; }
.footer__letter .mm-form .mm-form__input { min-height: 48px; padding: 12px 16px; font-size: 16px; height: auto; }
.footer__letter .mm-form .mm-form__submit { width: 100%; min-height: 48px; padding: 12px 20px; font-size: 15px; }
.footer__letter .mm-form .mm-form__status { font-size: 15px; }
@media (max-width: 720px) { .footer__letter { grid-column: auto; max-width: none; } }
