/*
 * Listing marketing pages: the index at /marketing and one set per listing.
 *
 * A reading surface. The job is to make four pieces of copy easy to read side
 * by side against the photograph they would be published with, so nothing here
 * competes with the copy for attention.
 *
 * Everything is a brand token, so a second agent's site inherits this without
 * an edit.
 */

.mkt {
  border: 1px solid var(--c-line);
  border-radius: var(--s-radius);
  background: var(--c-white);
  margin: 0 0 2.5rem;
  overflow: hidden;
}

.mkt__meta {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--c-muted);
}

/*
 * The Rule 712 line.
 *
 * Called out rather than buried, because on a closed sale it is the difference
 * between one photograph and twenty three.
 */
.mkt__rule {
  margin: 0;
  padding: 0.75rem 1.5rem;
  font-size: 0.85rem;
  color: var(--c-ink-soft);
  background: color-mix(in srgb, var(--c-accent) 8%, transparent);
  border-bottom: 1px solid var(--c-line);
}

/* --- Body ----------------------------------------------------------------- */

.mkt__body {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.5rem;
  align-items: start;
}

@media (max-width: 48rem) {
  .mkt__body {
    grid-template-columns: minmax(0, 1fr);
  }
}

.mkt__photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--s-radius);
  border: 1px solid var(--c-line);
}

.mkt__photocap,
.mkt__nophoto {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--c-muted);
}

.mkt__nophoto {
  padding: 1rem;
  border: 1px dashed var(--c-line);
  border-radius: var(--s-radius);
  background: var(--c-paper);
}

.mkt__copy {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.mkt__piecehead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: var(--t-tracking);
  text-transform: uppercase;
  color: var(--c-muted);
}

.mkt__piecehead em {
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--c-muted);
  white-space: nowrap;
}

/*
 * The copy itself, in a pre.
 *
 * Line breaks in a Google Business Profile post and in an email are content,
 * not presentation, so they are shown exactly as the file holds them. white-space
 * pre-wrap keeps the breaks and still wraps long lines on a narrow screen.
 */
.mkt__text {
  margin: 0;
  padding: 1rem 1.1rem;
  font-family: var(--f-body);
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--c-body);
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-left: 3px solid color-mix(in srgb, var(--c-accent) 55%, transparent);
  border-radius: var(--s-radius);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* --- Footer --------------------------------------------------------------- */

.mkt__foot {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--c-line);
  background: var(--c-paper-alt);
}

.mkt__note {
  margin: 0 0 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--s-radius);
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-alarm);
}

.mkt__note--warn {
  border-left-color: var(--c-error);
}

.mkt__note h3,
.mkt__note h4 {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: var(--t-tracking);
  text-transform: uppercase;
  color: var(--c-ink);
}

.mkt__note p,
.mkt__note li {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--c-body);
}

.mkt__note ul {
  margin: 0;
  padding-left: 1.1rem;
}

.mkt__passed {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--c-muted);
  max-width: var(--s-measure);
}

.mkt__empty {
  padding: 2rem;
  border: 1px dashed var(--c-line);
  border-radius: var(--s-radius);
  color: var(--c-muted);
  line-height: 1.7;
}

.mkt__empty code {
  font-family: var(--f-mono);
  font-size: 0.85em;
  color: var(--c-ink);
}

/* --- Index grid ----------------------------------------------------------- */

.mktgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin: 0 0 2rem;
}

.mktcard {
  border: 1px solid var(--c-line);
  border-radius: var(--s-radius);
  background: var(--c-white);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.mktcard:hover {
  border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-line));
  transform: translateY(-2px);
}

.mktcard__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.mktcard__media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  background: var(--c-paper-alt);
}

.mktcard__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mktcard__nophoto {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--c-muted);
}

.mktcard__badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.2rem 0.55rem;
  border-radius: calc(var(--s-radius) / 2);
  background: var(--c-white);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: var(--t-tracking);
  text-transform: uppercase;
  color: var(--c-ink);
}

.mktcard__body {
  display: block;
  padding: 0.85rem 1rem 1rem;
}

.mktcard__addr {
  display: block;
  font-family: var(--f-display);
  font-size: 1rem;
  line-height: 1.3;
  color: var(--c-ink);
}

.mktcard__price {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-accent-deep);
}

.mktcard__count {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--c-muted);
}

/* The index carries the same footnote without a card around it. */
.mkt__passed--page {
  padding-top: 1.25rem;
  border-top: 1px solid var(--c-line);
}

.mkt__meta--page {
  margin: 0.5rem 0 0;
}

.mkt__meta--page a,
.eyebrow a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Notes ---------------------------------------------------------------- */

.postlist {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  border-top: 1px solid var(--c-line);
}

.postlist__item { border-bottom: 1px solid var(--c-line); }

.postlist__link {
  display: block;
  padding: 1.15rem 0;
  text-decoration: none;
  color: inherit;
}

.postlist__link:hover .postlist__title { color: var(--c-accent-deep); }

.postlist__title {
  display: block;
  font-family: var(--f-display);
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--c-ink);
}

.postlist__summary {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--c-body);
  max-width: var(--s-measure);
}

.postlist__date {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: var(--t-tracking);
  text-transform: uppercase;
  color: var(--c-muted);
}

/* The post body. One column, measure limited, nothing else competing. */
.post {
  max-width: var(--s-measure);
  margin: 0 0 3rem;
}

.post p {
  margin: 0 0 1.15rem;
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--c-body);
}

/* The source note and the caveat close every post. Set back so they read as
   what they are: the limits of what was just claimed. */
.post p:nth-last-child(-n+2) {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--c-muted);
}
