/* THE CLOSING PAGE. One per closed deal, written by tools/closing_pages.py.
 *
 * Phil, 2026-11-24, on the first version, which reused the listing page:
 * "I hate the design. It almost looks like our listing page ... one main
 * picture with the details on it, gets to the point of the size, square
 * footage, acreage." So this page is the photograph. The address, the sold
 * stamp and the facts all sit on it, and nothing under it is cream.
 *
 * Loaded only by /closed/<deal>/ pages. Nothing here touches another page.
 * The brand does not move: navy, cream, gold, Marcellus and Archivo, square
 * corners, no shadows. */

.sold {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto;
  min-height: clamp(600px, 88vh, 940px);
  background: var(--navy-deep); color: var(--on-dark);
}
.sold__img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
}
/* Dark where the words are, clear where the property is. */
.sold__scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(22,35,45,.97) 0%, rgba(22,35,45,.86) 30%, rgba(22,35,45,.34) 60%, rgba(22,35,45,.10) 100%),
    linear-gradient(to right, rgba(22,35,45,.58) 0%, rgba(22,35,45,0) 62%),
    linear-gradient(to bottom, rgba(22,35,45,.62) 0%, rgba(22,35,45,0) 20%);
}
.sold > .wrap, .sold__rail { position: relative; z-index: 2; }

.sold__top { padding-top: var(--s3); }
.sold__top .crumb, .sold__top .crumb a { color: var(--on-dark); }
.sold__top .crumb a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.sold__top .crumb i { color: var(--on-dark-mute); }

.sold__copy { align-self: end; padding-top: var(--s7); padding-bottom: var(--s4); }
.sold__stamp {
  display: inline-block; margin: 0 0 var(--s3);
  background: var(--gold); color: var(--navy-deep);
  font-family: var(--display); font-size: clamp(20px, 2.2vw, 30px); line-height: 1;
  padding: 11px 18px 10px;
}
.sold__h {
  font-size: clamp(40px, 7vw, 104px); line-height: .96; letter-spacing: -.015em;
  color: var(--on-dark); margin: 0; text-wrap: balance; max-width: 18ch;
}
.sold__where { display: block; color: var(--gold); font-size: .56em; line-height: 1.1; letter-spacing: 0; margin-top: .22em; }
.sold__sum {
  margin: var(--s3) 0 0; max-width: 58ch;
  font-size: clamp(16px, 1.25vw, 19px); line-height: 1.55; color: var(--on-dark);
}

/* The facts, across the foot of the photograph. */
.sold__rail {
  border-top: 1px solid var(--on-dark-line);
  background: rgba(22,35,45,.62);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.sold__facts {
  margin: 0 auto; display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sold__facts > div {
  display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px;
  padding: var(--s3) var(--s3) var(--s3) 0; min-width: 0;
  border-top: 1px solid var(--on-dark-line);
}
.sold__facts > div:nth-child(-n+2) { border-top: 0; }
.sold__facts > div:nth-child(even) { padding-left: var(--s3); border-left: 1px solid var(--on-dark-line); }
.sold__facts dt {
  font-family: var(--body); font-size: 11px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold);
}
.sold__facts dd {
  margin: 0; font-family: var(--display); color: var(--on-dark);
  font-size: clamp(22px, 2.5vw, 38px); line-height: 1.05; overflow-wrap: anywhere;
}
.sold__facts dd.sold__word { font-size: clamp(18px, 1.7vw, 25px); line-height: 1.15; }
@media (min-width: 860px) {
  .sold__facts { grid-template-columns: repeat(var(--facts, 4), minmax(0, 1fr)); }
  .sold__facts > div, .sold__facts > div:nth-child(-n+2) { border-top: 0; padding-left: var(--s4); border-left: 1px solid var(--on-dark-line); }
  .sold__facts > div:first-child { padding-left: 0; border-left: 0; }
}

/* One line and the three ways on, straight under the photograph. */
.soldline { padding: var(--s5) 0; }
.soldline__row { display: grid; gap: var(--s3); }
.soldline__text { margin: 0; max-width: 70ch; font-size: clamp(16px, 1.2vw, 18px); line-height: 1.6; color: var(--on-dark-body); }
.soldline__text b { color: var(--on-dark); font-weight: 600; }
.soldline .btn-row { margin: 0; }

/* Phil's own lines on a deal, when he has given them. */
.soldstory .prose p { max-width: 62ch; font-size: clamp(17px, 1.3vw, 20px); line-height: 1.6; color: var(--on-dark); }
.soldstory h2 { margin-bottom: var(--s4); }

/* More closings, on the dark. The card's name is a link. */
.soldmore .head { margin-bottom: var(--s4); }
.plate h3 a { color: inherit; text-decoration-color: var(--gold-line); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.plate h3 a:hover { color: var(--gold-text); }
.on-dark .plate h3 a:hover { color: var(--gold); }

@media (max-width: 600px) {
  .sold { min-height: 0; }
  .sold__copy { padding-top: clamp(200px, 56vw, 300px); }
}

/* An odd fact out takes the full row on a phone. */
@media (max-width: 859px) {
  .sold__facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; padding-left: 0; border-left: 0; }
}

/* The paragraph about the property, beside the full table of facts. */
.soldabout__cols { display: grid; gap: var(--s5); }
@media (min-width: 980px) { .soldabout__cols { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s6); align-items: start; } }
.soldabout h2 { margin-bottom: var(--s3); }
.soldabout .prose p { max-width: 60ch; font-size: clamp(17px, 1.3vw, 20px); line-height: 1.62; color: var(--on-dark); }
.soldabout .soldline__text { margin-top: var(--s3); }
.soldabout .btn-row { margin-top: var(--s4); }
.soldtable { margin: 0; background: var(--navy-deep); border-top: 2px solid var(--gold); padding: var(--s2) var(--s4); }
.soldtable > div { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: var(--s3); padding: 14px 0; border-top: 1px solid var(--on-dark-line); }
.soldtable > div:first-child { border-top: 0; }
.soldtable dt { font-family: var(--body); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); padding-top: 4px; }
.soldtable dd { margin: 0; font-size: 16px; line-height: 1.4; color: var(--on-dark); overflow-wrap: anywhere; }
@media (max-width: 480px) { .soldtable { padding: var(--s1) var(--s3); } .soldtable > div { grid-template-columns: 1fr; gap: 2px; } }
