/* ReadTomato page templates for JM Distinctive Properties.
   Everything is scoped under .rtp so Betheme's global rules stay out of it.
   No webfonts on purpose: this site's mobile LCP is already ~14s, so the type
   personality is carried by scale, weight and spacing rather than new bytes. */

/* The theme sets overflow-x:hidden on the body at mobile widths, which makes the body
   a scroll container and silently kills position:sticky for everything inside it.
   `clip` does the same visual job without creating that scroll container. Scoped to
   the rtp-page body class so no other page on her site is affected. */
body.rtp-page {
  overflow-x: clip;
  overflow-y: visible;
}

.rtp {
  /* Palette derived from her live site so these pages sit inside her own header
     and footer without looking foreign. --accent is her brand cyan (#86d4e8)
     deepened until it passes AA on white; the pastel itself stays decorative. */
  --ink: #1e2328;
  --ink-2: #566068;
  --ink-3: #7d878f;
  --rule: #e2e7ea;
  --rule-strong: #c9d2d7;
  --paper: #ffffff;
  --surface: #f4f8f9;
  --accent: #12718c;
  --accent-deep: #0c5468;
  --accent-soft: #86d4e8;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);

  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.rtp *, .rtp *::before, .rtp *::after { box-sizing: border-box; }
.rtp img, .rtp video { max-width: 100%; height: auto; display: block; }

.rtp__wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.rtp__wrap--narrow { max-width: 760px; }

.rtp a { color: var(--accent); }
.rtp a:focus-visible,
.rtp button:focus-visible,
.rtp input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Utility label. Used for every eyebrow and field name on both pages, so the two
   templates read as one system. */
.rtp__label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

/* ---------------------------------------------------------------- masthead */
.rtp-masthead {
  padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--rule);
}
.rtp-masthead__eyebrow { margin-bottom: 18px; }
.rtp-masthead__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0 0 18px;
  color: var(--ink);
}
.rtp-masthead__standfirst {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 62ch;
  margin: 0;
}
.rtp-masthead__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 26px;
}
.rtp-masthead__meta span { font-size: 13px; color: var(--ink-3); }

/* ------------------------------------------------------- glossary controls */
/* The alphabet rail is the signature element: 94 terms is too many to scroll,
   and the four letters with no entries are shown disabled rather than hidden,
   so the index reads as a complete A to Z rather than an arbitrary list. */
.rtp-controls {
  position: sticky;
  /* Betheme pins its own header on scroll. rt-pages.js measures it and sets this
     var, so the glossary bar parks below it instead of hiding underneath. */
  top: var(--rtp-sticky-top, 0px);
  z-index: 30;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
}
.rtp-controls__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
/* Betheme styles every input in .entry-content (its own height, padding, margin and
   box-shadow), which inflated this control to 85px tall and forced the bar to wrap.
   These declarations exist to override the theme, not to decorate. */
.rtp .rtp-search {
  flex: 0 1 340px;
  max-width: 340px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 0 12px;
  height: 42px;
  margin: 0;
  background: var(--paper);
}
.rtp .rtp-search:focus-within { border-color: var(--accent); }
.rtp .rtp-search input[type="search"] {
  border: 0;
  outline: 0;
  box-shadow: none;
  font: inherit;
  font-size: 15px;
  line-height: 1.3;
  width: 100%;
  height: 40px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}
.rtp-search__icon { color: var(--ink-3); flex: none; }

.rtp-alpha { display: flex; flex-wrap: wrap; gap: 2px; }
.rtp-alpha a,
.rtp-alpha span {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  border-radius: 2px;
  color: var(--accent);
}
.rtp-alpha a:hover { background: var(--accent); color: #fff; }
.rtp-alpha span { color: #c4ccd1; cursor: default; }

.rtp-count {
  font-size: 13px;
  color: var(--ink-3);
  flex: none;
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------- glossary body */
.rtp-letter {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: clamp(40px, 6vw, 68px) 0 4px;
  scroll-margin-top: calc(var(--rtp-sticky-top, 0px) + var(--rtp-bar-h, 70px) + 18px);
}
.rtp-letter__mark {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 62px);
  line-height: 1;
  color: var(--accent-soft);
  font-weight: 400;
}
.rtp-letter__rule { flex: 1; height: 1px; background: var(--rule); }
.rtp-letter__n { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.rtp-term {
  padding: 26px 0 26px 22px;
  border-top: 1px solid var(--rule);
  border-left: 2px solid transparent;
  scroll-margin-top: calc(var(--rtp-sticky-top, 0px) + var(--rtp-bar-h, 70px) + 18px);
  transition: border-color .18s ease, background-color .18s ease;
}
.rtp-term:target,
.rtp-term.is-hit { border-left-color: var(--accent-soft); background: var(--surface); }
.rtp-term__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.2;
  margin: 0 0 14px;
  color: var(--ink);
}
.rtp-term__beat { margin: 0 0 14px; }
.rtp-term__beat:last-child { margin-bottom: 0; }
.rtp-term__beat p { margin: 6px 0 0; max-width: 68ch; }
.rtp-term__beat--example {
  border-left: 1px solid var(--rule-strong);
  padding-left: 16px;
  margin-left: 1px;
}
.rtp-term__beat--example p { color: var(--ink-2); font-style: italic; }
.rtp-term__see {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--ink-3);
}
.rtp-term__see a { text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
.rtp-term__see a:hover { border-bottom-color: var(--accent); }

.rtp-empty {
  display: none;
  padding: 56px 0;
  text-align: center;
  color: var(--ink-2);
}
.rtp-empty.is-on { display: block; }
.rtp-empty strong { color: var(--ink); }

/* --------------------------------------------------------------- prose box */
.rtp-note {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: clamp(22px, 3vw, 32px);
  margin: clamp(32px, 5vw, 52px) 0;
}
.rtp-note h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 12px;
}
.rtp-note p { margin: 0 0 12px; color: var(--ink-2); }
.rtp-note p:last-child { margin-bottom: 0; }
.rtp-note--fine p { font-size: 14px; line-height: 1.6; }

.rtp-prose h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 32px);
  margin: clamp(32px, 4vw, 48px) 0 14px;
}
.rtp-prose p { margin: 0 0 16px; max-width: 68ch; color: var(--ink-2); }
.rtp-prose ul { margin: 0 0 16px; padding-left: 20px; color: var(--ink-2); }

/* ============================================================ LISTING PAGE */
.rtp-hero { position: relative; background: #0d1418; }
.rtp-hero__media { position: relative; aspect-ratio: 16 / 9; }
.rtp-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.rtp-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 14, 18, .88) 0%, rgba(8, 14, 18, .35) 42%, rgba(8, 14, 18, .05) 70%);
}
.rtp-hero__inner {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding-bottom: clamp(24px, 4vw, 48px);
}
.rtp-hero__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.rtp-hero__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-soft); }
.rtp-hero__addr {
  font-family: var(--serif);
  font-weight: 400;
  color: #fff;
  font-size: clamp(28px, 4.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -.015em;
  margin: 0 0 6px;
  text-wrap: balance;
}
.rtp-hero__place { color: rgba(255, 255, 255, .74); font-size: clamp(15px, 1.8vw, 18px); margin: 0; }

/* The spec ledger. Deliberately typographic rather than icon cards: this is a
   property record, and rows are omitted entirely when we have no sourced value
   rather than printed as "N/A" or filled with a guess. */
.rtp-ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid var(--rule);
  margin-top: clamp(28px, 4vw, 44px);
}
.rtp-ledger__cell {
  padding: 20px 22px 20px 0;
  border-bottom: 1px solid var(--rule);
}
.rtp-ledger__v {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.1;
  margin: 8px 0 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.rtp-ledger__v--price { color: var(--accent-deep); }

/* ------------------------------------------------------------ video player */
.rtp-video { margin: clamp(40px, 6vw, 72px) 0; }
.rtp-video__frame {
  position: relative;
  background: #0d1418;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.rtp-video__frame video { width: 100%; height: 100%; object-fit: cover; }
.rtp-video__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rtp-video__play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(8, 14, 18, .22);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color .2s ease;
}
.rtp-video__play:hover { background: rgba(8, 14, 18, .38); }
.rtp-video__play[hidden] { display: none; }
.rtp-video__disc {
  width: clamp(62px, 8vw, 84px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 28px rgba(0, 0, 0, .34);
  transition: transform .2s ease;
}
.rtp-video__play:hover .rtp-video__disc { transform: scale(1.06); }
.rtp-video__disc svg { margin-left: 4px; color: var(--accent-deep); }
.rtp-video__cap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-3);
}

/* ---------------------------------------------------------------- gallery */
.rtp-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 4px;
}
.rtp-gallery__item {
  position: relative;
  margin: 0;
  border: 0;
  padding: 0;
  background: var(--surface);
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}
.rtp-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}
.rtp-gallery__item:hover img { transform: scale(1.04); }
.rtp-gallery__item figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 26px 14px 11px;
  font-size: 13px;
  color: #fff;
  text-align: left;
  background: linear-gradient(to top, rgba(8, 14, 18, .8), transparent);
  opacity: 0;
  transition: opacity .25s ease;
}
.rtp-gallery__item:hover figcaption,
.rtp-gallery__item:focus-visible figcaption { opacity: 1; }
/* The lead shot gets a 2x2 tile. It must span two ROWS as well as two columns,
   or the taller cell leaves a dead gap beside the tiles next to it. */
/* Row height comes from the uniform 3/2 tiles, so a 2x2 span lands flush. */
.rtp-gallery__item--wide {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
  height: 100%;
}
@media (max-width: 700px) {
  .rtp-gallery__item--wide { grid-column: span 1; grid-row: span 1; aspect-ratio: 3 / 2; }
}

/* lightbox */
.rtp-lb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 12, 15, .96);
  display: none;
  place-items: center;
  padding: 3vmin;
}
.rtp-lb.is-open { display: grid; }
.rtp-lb img { max-width: 96vw; max-height: 84vh; object-fit: contain; }
.rtp-lb__cap { color: rgba(255, 255, 255, .8); font-size: 14px; margin-top: 14px; text-align: center; }
.rtp-lb__btn {
  position: absolute;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .26);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
}
.rtp-lb__btn:hover { background: rgba(255, 255, 255, .2); }
.rtp-lb__close { top: 3vmin; right: 3vmin; }
.rtp-lb__prev { left: 3vmin; top: 50%; transform: translateY(-50%); }
.rtp-lb__next { right: 3vmin; top: 50%; transform: translateY(-50%); }

/* -------------------------------------------------------------- feature list */
.rtp-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0 32px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}
.rtp-features li {
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------- CTA */
.rtp-cta {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  margin-top: clamp(48px, 7vw, 88px);
  padding: clamp(40px, 6vw, 72px) 0;
}
.rtp-cta__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 780px) { .rtp-cta__grid { grid-template-columns: 1fr; } }
.rtp-cta h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 36px);
  margin: 10px 0 12px;
  line-height: 1.15;
}
.rtp-cta p { color: var(--ink-2); margin: 0 0 18px; max-width: 54ch; }
/* Selectors carry `a` deliberately. These buttons ARE links, so the generic
   `.rtp a` rule above (0,1,1) outranks a bare `.rtp-btn` (0,1,0) and repaints the
   label in the accent colour, which put teal text on the teal fill. Matching the
   type keeps the button's own colour in charge. */
.rtp a.rtp-btn,
.rtp .rtp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-deep);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 2px;
  transition: background-color .18s ease;
}
.rtp a.rtp-btn:hover,
.rtp a.rtp-btn:focus,
.rtp .rtp-btn:hover { background: #083f4e; color: #fff; }

.rtp a.rtp-btn--ghost,
.rtp .rtp-btn--ghost {
  background: transparent;
  color: var(--accent-deep);
  border: 1px solid var(--rule-strong);
}
.rtp a.rtp-btn--ghost:hover,
.rtp a.rtp-btn--ghost:focus,
.rtp .rtp-btn--ghost:hover {
  background: var(--paper);
  color: var(--accent-deep);
  border-color: var(--accent);
}
.rtp-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.rtp-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 26px;
}
.rtp-card dl { margin: 0; }
.rtp-card dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-top: 16px; }
.rtp-card dt:first-child { margin-top: 0; }
.rtp-card dd { margin: 5px 0 0; font-size: 16px; }
.rtp-card dd a { text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .rtp *, .rtp *::before, .rtp *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* On a phone the A to Z rail wraps to three rows and the sticky bar eats a quarter of
   the screen. Search is the better small screen affordance anyway, so the rail steps
   aside and the bar stays compact. */
@media (max-width: 640px) {
  .rtp-alpha { display: none; }
  .rtp-controls { padding: 10px 0; }
  .rtp-controls__inner { gap: 12px; }
  .rtp .rtp-search { flex: 1 1 auto; max-width: none; }
}

/* ====================================================== SELLER EXPERIENCE
   NFC destination. Everyone here already has her brochure in hand, so the
   phone sits above the fold and the reading order is why-her, not what-is-SEO. */
.rtp-seller__hero { border-bottom: 0; padding-bottom: clamp(20px, 3vw, 32px); }
.rtp-seller__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.rtp .rtp-seller__call { font-size: 16px; padding: 15px 26px; }
/* Thumb reach beats elegance on a phone held one handed at someone's kitchen counter. */
@media (max-width: 620px) {
  .rtp-seller__actions { flex-direction: column; }
  .rtp .rtp-seller__actions .rtp-btn { width: 100%; justify-content: center; }
}

.rtp-seller__block {
  padding: clamp(28px, 4vw, 44px) 0;
  border-top: 1px solid var(--rule);
}
.rtp-seller__block:first-of-type { border-top: 0; }
.rtp-seller__h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.18;
  margin: 10px 0 14px;
  max-width: 24ch;
  color: var(--ink);
}
.rtp-seller__lead { font-size: clamp(17px, 1.9vw, 19px); margin: 0 0 14px; max-width: 64ch; color: var(--ink); }
.rtp-seller__detail {
  margin: 0;
  max-width: 64ch;
  color: var(--ink-2);
  border-left: 2px solid var(--accent-soft);
  padding-left: 18px;
}

.rtp-seller__creds { padding: clamp(28px, 4vw, 44px) 0; border-top: 1px solid var(--rule); }
.rtp-seller__creds ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; }
.rtp-seller__creds li { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.rtp-seller__creds strong { display: block; font-weight: 600; color: var(--ink); font-size: 16px; }
.rtp-seller__creds span { display: block; color: var(--ink-2); font-size: 15px; margin-top: 3px; }

/* Secondary MLS facts. Two columns of hairline rows, deliberately quieter than the
   headline ledger so price and beds still win the first glance. */
.rtp-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0 40px;
  margin: clamp(24px, 3vw, 34px) 0 0;
}
.rtp-facts__row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}
.rtp-facts dt { font-size: 14px; color: var(--ink-3); }
.rtp-facts dd { margin: 0; font-size: 14px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
