
/* ==========================================================================
   Case study documents and pop-out overlay  (Work page)
   ========================================================================== */

/* feature card ---------------------------------------------------------- */
.lead-card {
  display: grid; grid-template-columns: 0.42fr 1fr;
  width: 100%; padding: 0; margin: 0 0 clamp(34px, 5vw, 54px); text-align: left;
  font: inherit; color: inherit; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.lead-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(10,79,89,0.14); }
.lead-card__thumb {
  color: #fff; font-family: var(--serif); font-size: clamp(21px, 2.4vw, 29px); line-height: 1.15;
  display: grid; place-items: center; text-align: center;
  min-height: 190px; padding: 20px;
}
.lead-card__body { padding: clamp(24px, 3vw, 38px); }
@media (max-width: 760px) { .lead-card { grid-template-columns: 1fr; } }

button.work-card, button.lead-card { border: 1px solid var(--line); font: inherit; }
button.work-card { padding: 0; text-align: left; cursor: pointer; width: 100%;
  display: flex; flex-direction: column; align-items: stretch; }
button.work-card .work-card__body, .lead-card__body { display: block; }
button.work-card .work-card__body { flex: 1; }
button.work-card .work-card__thumb {
  display: grid; place-items: center; text-align: center; padding: 14px;
}
.work-card__desc { display: block; font-size: 15.5px; line-height: 1.6; color: #3B565E; }
.lead-card__title {
  display: block; font-family: var(--serif); font-weight: 700; line-height: 1.12;
  letter-spacing: -0.015em; font-size: clamp(23px, 2.6vw, 30px);
  color: var(--navy); margin: 8px 0 12px;
}
.lead-card__desc { display: block; font-size: 16px; line-height: 1.62; color: #3B565E; margin-bottom: 18px; }
.case-open { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }

/* the document ---------------------------------------------------------- */
.case-doc {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  margin: 0 0 clamp(40px, 6vw, 76px);
}
.js .case-docs { display: none; }

.doc__masthead { background: var(--teal-ink); padding: clamp(32px, 5vw, 56px) clamp(26px, 4vw, 52px); }
.doc__masthead .eyebrow { color: var(--mint); margin-bottom: 14px; }
.doc__masthead h2 { color: #fff; font-size: clamp(30px, 4.4vw, 50px); margin: 0 0 12px; }
.doc__masthead p { color: rgba(255,255,255,0.78); font-size: clamp(15px, 1.6vw, 18px); margin: 0; }

.doc__meta {
  display: grid; grid-template-columns: 0.8fr 1fr 1.9fr; gap: clamp(20px, 4vw, 44px);
  background: var(--mint-soft); padding: clamp(22px, 3vw, 30px) clamp(26px, 4vw, 52px);
}
.doc__meta h4 {
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 8px; line-height: 1.4;
}
.doc__meta p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--teal-ink); }
@media (max-width: 760px) { .doc__meta { grid-template-columns: 1fr; gap: 18px; } }

.doc__body { padding: clamp(26px, 4vw, 52px); }
.doc__note {
  background: var(--paper); border-left: 3px solid var(--accent);
  padding: 18px 22px; margin: 0 0 clamp(26px, 3vw, 38px);
  font-size: 15.5px; line-height: 1.6; color: #3B565E;
}
.doc__note strong { color: var(--teal-ink); }
.doc__cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 4vw, 48px); }
@media (max-width: 760px) { .doc__cols { grid-template-columns: 1fr; } }
.doc__label {
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  border-bottom: 1px solid var(--line); padding-bottom: 10px; margin: 0 0 16px;
}
.doc__body p { font-size: 16px; line-height: 1.62; color: #3B565E; }
.doc__body p:last-child { margin-bottom: 0; }
.doc__quote {
  border-left: 2px solid var(--accent); padding-left: 20px;
  font-family: var(--serif); font-style: italic; font-size: 19px; color: #24424C;
  margin: clamp(26px, 3vw, 36px) 0 0;
}

/* before and after ------------------------------------------------------ */
.doc__section { margin-top: clamp(30px, 4vw, 46px); }

.ba {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: clamp(12px, 2vw, 20px); align-items: stretch;
}
.ba__col { display: flex; flex-direction: column; }
.ba { align-items: start; }

/* the flags. These are the whole point: you should never have to guess
   which side is which. */
.ba .ba__flag {
  margin: 0; padding: 14px 20px;
  font-family: var(--sans); font-size: 16px; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase; text-align: center;
  border-radius: var(--radius) var(--radius) 0 0;
}
.ba .ba__flag--before { background: #5A757A; color: #fff; }
.ba .ba__flag--after  { background: var(--teal-deep); color: #fff; }

.ba__panel {
  flex: 1; background: var(--paper);
  border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: clamp(20px, 3vw, 28px);
}
.ba__panel--after {
  background: var(--mint-soft);
  border-color: var(--teal); border-top: 0;
  box-shadow: 0 14px 34px rgba(10,79,89,0.13);
}
.ba .ba__caption {
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 18px;
}
.ba .ba__panel--after .ba__caption { color: var(--accent); }

/* the arrow, drawn rather than typed, because the publish check rejects
   arrow characters */
.ba__arrow {
  align-self: start; justify-self: center; margin-top: 2px;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--teal); color: #fff;
  display: grid; place-items: center;
  border: 5px solid var(--cream);
  box-shadow: 0 8px 22px rgba(10,79,89,0.28);
}
.ba__arrow svg { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .ba { grid-template-columns: 1fr; gap: 0; }
  .ba__arrow { align-self: center; margin: -14px 0; transform: rotate(90deg); position: relative; z-index: 2; }
  .ba__col + .ba__arrow + .ba__col { margin-top: 0; }
  .ba__col:first-child { margin-bottom: 4px; }
}

/* the before side reads as the old thing: flatter, quieter */
.ba .ba__panel p { font-size: 15px; line-height: 1.6; color: #6B7F84; }
.ba .ba__panel--after p { color: #24424C; }
.ba .ba__panel p:last-of-type { margin-bottom: 0; }
.ba .ba__panel .ba__mark {
  font-family: var(--serif); font-weight: 700; font-size: 19px;
  color: #7A8F93; margin: 0 0 6px; letter-spacing: -0.01em;
}
.ba .ba__panel--after .ba__mark { color: var(--teal-deep); }
.ba .ba__panel .ba__crumb { font-size: 13px; color: #93A5A9; margin: 0 0 12px; }
.ba .ba__panel .ba__head {
  font-family: var(--serif); font-weight: 700; line-height: 1.16; letter-spacing: -0.015em;
  font-size: clamp(20px, 2.2vw, 25px); color: #4A6469; margin: 0 0 14px;
}
.ba .ba__panel--after .ba__head { color: var(--navy); }
.ba__shot { border-radius: var(--radius); margin: 0 0 16px; width: 100%; height: auto; }
.ba__cta {
  display: inline-block; margin-top: 20px;
  font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: #fff; background: var(--teal-deep);
  padding: 12px 20px; border-radius: var(--radius);
}

/* why I made these changes. Sits in the after column, under the panel,
   exactly where the Word document puts it. */
.reasons-block { margin-top: clamp(22px, 3vw, 30px); }
.reasons-block__title {
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  border-bottom: 1px solid var(--line); padding-bottom: 10px; margin: 0 0 18px;
}
.reasons { display: block; margin: 0; padding: 0; list-style: none; }
.reasons li {
  margin: 0 0 clamp(16px, 2vw, 22px);
  display: grid; grid-template-columns: auto 1fr; gap: 14px;
}
.reasons li:last-child { margin-bottom: 0; }
.reasons .reasons__n { font-family: var(--serif); font-size: 24px; line-height: 1.1; color: var(--teal); }
.reasons h4 {
  font-family: var(--sans); font-size: 15.5px; font-weight: 700; letter-spacing: 0;
  line-height: 1.35; margin: 0 0 5px; color: var(--navy);
}
.reasons p { font-size: 14.5px; line-height: 1.58; color: #3B565E; margin: 0; }

/* the pop-out ----------------------------------------------------------- */
.case-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.case-modal.is-open { display: block; }
.case-modal__backdrop { position: absolute; inset: 0; background: rgba(0,16,33,0.62); }
.case-modal__panel {
  position: relative;
  width: min(980px, calc(100% - 2 * var(--gutter)));
  margin: clamp(14px, 4vh, 52px) auto;
  max-height: calc(100vh - 2 * clamp(14px, 4vh, 52px));
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--cream); border-radius: var(--radius);
  box-shadow: 0 40px 90px rgba(0,16,33,0.42);
}
.case-modal__panel .case-doc { margin: 0; border: 0; border-radius: 0; }
.case-modal__close {
  position: fixed; top: 16px; right: 16px; z-index: 210;
  width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: var(--paper); color: var(--teal-ink);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,16,33,0.32);
}
.case-modal__close svg { width: 18px; height: 18px; }
.case-modal__close:hover { background: var(--mint-soft); }
body.modal-open { overflow: hidden; }
