/*
 * Development and property pages.
 * The V3 finder layout in the Stanton brand: Cormorant Garamond and Manrope, forest/cream/gold,
 * rounded cards and pill buttons. Brand tokens (--forest, --cream, --gold, --serif, --sans…) live in style.css.
 */
:root {
  --line-strong: rgba(35,37,31,.24);
  --radius: 16px;
  --radius-sm: 10px;
  --download-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11m-4.5-4.5L12 15l4.5-4.5M5 19h14'/%3E%3C/svg%3E");
}
/* Availability colours: pin/dot, pill background, pill text (each pill pair is at least 4.5:1). */
[data-status=available]   { --status: #3f7a4e; --status-bg: #e9f2eb; --status-text: #2f6b42; }
[data-status=reserved]    { --status: #926217; --status-bg: #f7eedd; --status-text: #7a5418; }
[data-status=coming_soon] { --status: #476989; --status-bg: #e8eff5; --status-text: #3d5d7c; }
[data-status=sold]        { --status: #66685f; --status-bg: #ecebe7; --status-text: #55574f; }
/* Cormorant defaults to old-style numerals, which make "Plot 1" read as "Plot ı". */
.sd-finder h2, .sd-finder h3, .sd-property h1, .sd-property h2, .sd-plot-sheet h3, .sd-viewing-dialog h2 { font-variant-numeric: lining-nums; }

/* Small interface controls: view switch, zoom, reset, close, route actions. Calmer than the brand buttons. */
.sd-view-switch button,
.sd-map-tools button,
.sd-finder [data-reset],
.sd-filter-toggle,
[data-request-close],
.sd-plot-sheet > .button,
.sd-property > .sd-route-actions .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 40px; padding: .5rem 1rem;
  border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--forest);
  font: 600 .875rem/1 var(--sans); letter-spacing: 0; text-transform: none; cursor: pointer; transform: none;
}
.sd-map-tools button:hover:not(:disabled),
.sd-finder [data-reset]:hover,
.sd-filter-toggle:hover,
.sd-plot-sheet > .button:hover,
.sd-property > .sd-route-actions .button:hover { background: var(--cream); transform: none; }
.sd-map-tools button:disabled { opacity: .4; cursor: default; }

/* Secondary brand buttons on white cards. */
.sd-panel .button:not(.button--gold),
.sd-property-actions .button:not(.button--gold),
.sd-viewing-dialog .sd-form .button:not(.button--gold):not(.sd-submit) { border-color: var(--line-strong); background: #fff; color: var(--forest); }
.sd-panel .button:not(.button--gold):hover,
.sd-property-actions .button:not(.button--gold):hover { border-color: var(--forest); }
.sd-file-meta { font-size: .9em; font-weight: 500; letter-spacing: 0; text-transform: none; opacity: .75; }

/* Banner */
.dev-heading { position: relative; padding-block: clamp(2.5rem,5vw,4.5rem); background: var(--cream); }
.dev-heading-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 4rem; align-items: center; }
.dev-heading-image { width: 100%; height: 300px; object-fit: cover; border-radius: 4rem 1rem 1rem 1rem; }
.dev-heading h1 { max-width: 14ch; margin: 0 0 1rem; font-size: clamp(3rem,6vw,5.4rem); line-height: .95; }
.dev-heading .eyebrow { margin-bottom: 1rem; }
.dev-heading .eyebrow:empty { display: none; }
.dev-stage { display: inline-flex; margin: 0 0 1.1rem; padding: .35rem .85rem; border: 1px solid currentColor; border-radius: 999px; font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.dev-heading .lead { max-width: 48ch; margin-bottom: 0; }
.dev-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.dev-heading--photo {
  isolation: isolate; display: flex; align-items: flex-end; overflow: hidden;
  min-height: clamp(320px,34vw,440px); padding-block: clamp(3rem,6vw,5rem) clamp(2rem,3.5vw,3rem);
  border-bottom-right-radius: clamp(2.5rem,7vw,6rem); background: var(--forest); color: #fff;
}
.dev-heading--photo::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg,rgba(19,31,26,.9) 0%,rgba(19,31,26,.62) 42%,rgba(19,31,26,.12) 78%), linear-gradient(0deg,rgba(19,31,26,.6),transparent 55%);
}
.dev-heading--photo .dev-heading-grid { display: block; width: 100%; }
.dev-heading--photo .dev-heading-image { position: absolute; inset: 0; z-index: -2; height: 100%; border-radius: 0; }
.dev-heading--photo .eyebrow { color: var(--gold-light); }
.dev-heading--photo .dev-stage { border-color: rgba(255,255,255,.5); }
.dev-heading--photo .lead { color: rgba(255,255,255,.85); }
.dev-heading--photo .dev-links .button:not(.button--gold) { border-color: rgba(255,255,255,.55); color: #fff; }
.dev-heading--photo .dev-links .button:not(.button--gold):hover { background: #fff; color: var(--forest); }

/* Finder */
.dev-finder-section { padding-block: clamp(2.5rem,5vw,4.5rem) clamp(3rem,6vw,5rem); background: var(--paper); }
.sd-finder { margin: 0; }
.sd-finder-header,
.dev-finder-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.25rem 2rem; margin-bottom: 1.5rem; }
.sd-finder-header h2,
.dev-finder-heading h2 { max-width: none; margin: 0; font-size: clamp(2.3rem,4vw,3.6rem); line-height: 1; }
.sd-finder-heading-copy p { max-width: 60ch; margin: .75rem 0 0; color: var(--ink-soft); }
.sd-view-switch { display: inline-flex; flex: none; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.sd-view-switch button { border: 0; padding-inline: 1.15rem; background: transparent; white-space: nowrap; }
.sd-view-switch button[aria-pressed=true] { background: var(--forest); color: #fff; }
.sd-filter-toggle { display: none; }
.sd-controls {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr)) auto; align-items: end; gap: 1rem;
  margin: 0; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream);
}
.sd-controls label { display: grid; gap: .4rem; color: var(--ink-soft); font-size: .8rem; font-weight: 600; }
.sd-controls select,
.sd-controls input { width: 100%; min-width: 0; min-height: 46px; padding: .6rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font: 500 .95rem var(--sans); }
.sd-finder [data-count] { margin: 1rem 0 1.1rem; color: var(--ink-soft); font-size: .875rem; }
.sd-grid { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 1.5rem; align-items: start; }
.sd-grid > div { min-width: 0; }

/* Site plan */
.sd-map { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.sd-map-tools { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: .85rem; }
.sd-map-tools > div { display: flex; gap: .4rem; }
.sd-map-tools button { min-width: 40px; padding-inline: .8rem; }
.sd-map-scroll { overflow: auto; max-height: 680px; overscroll-behavior: contain; }
.sd-map-canvas { position: relative; width: 100%; min-width: 500px; line-height: 0; }
.sd-map-canvas > img,
.sd-map > img { display: block; width: 100%; height: auto; background: none; }
.sd-pin {
  position: absolute; display: grid; place-items: center; width: 32px; height: 32px; min-width: 0; min-height: 0; padding: 0;
  transform: translate(-50%,-50%); border: 2px solid #fff; border-radius: 50%; background: var(--status); color: #fff;
  font: 700 12px/1 var(--sans); box-shadow: 0 2px 6px rgba(0,0,0,.35); cursor: pointer; transition: transform .15s ease;
}
.sd-pin:hover:not(:disabled) { transform: translate(-50%,-50%) scale(1.1); }
.sd-pin[aria-pressed=true] { z-index: 3; background: var(--status); outline: 3px solid var(--gold); outline-offset: 2px; }
.sd-pin:disabled { opacity: .2; box-shadow: none; cursor: default; }
.sd-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding: .8rem 1rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .8rem; }
.sd-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: .45rem; border-radius: 50%; background: var(--status); }
.sd-plan-note { margin: .75rem 0 0; color: var(--ink-soft); font-size: .8rem; }

/* Property list */
.sd-list { display: grid; grid-template-columns: 1fr; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.sd-list > li { margin: 0; padding: 0; border: 0; }
.sd-plot-row {
  display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 1.25rem; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); text-decoration: none !important; transition: border-color .2s ease;
}
.sd-plot-row:hover { border-color: var(--line-strong); }
.sd-plot-row[aria-pressed=true] { border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest); }
.sd-plot-row > img { width: 150px; height: 100%; min-height: 150px; object-fit: cover; }
.sd-row-placeholder { display: grid; place-items: center; min-height: 150px; padding: 1rem; background: var(--cream); color: var(--ink-soft); font-size: .8rem; text-align: center; }
.sd-row-info { min-width: 0; padding: 1rem 1.25rem 1rem 0; }
.sd-row-info h3 { margin: .55rem 0 .2rem; font-size: 1.65rem; line-height: 1.1; }
.sd-row-info p { margin: 0 0 .35rem; color: var(--ink-soft); font-size: .9rem; }
.sd-row-info strong { font: 600 1.45rem/1.2 var(--serif); font-variant-numeric: lining-nums; }
.sd-finder [data-empty] { padding: 2.5rem 1.5rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: #fff; text-align: center; }

/* Status pill */
.sd-panel-status { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .7rem; border-radius: 999px; background: var(--status-bg); color: var(--status-text); font: 700 .72rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.sd-panel-status::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: currentColor; }

/* Selected-home panel */
.sd-panel { position: sticky; top: 1.25rem; align-self: start; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 18px 40px rgba(35,37,31,.07); }
.sd-panel-picture { position: relative; aspect-ratio: 16/10; background: var(--cream); }
.sd-panel-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; border-radius: 0; }
.sd-image-label { position: absolute; left: .75rem; bottom: .75rem; z-index: 1; padding: .25rem .55rem; border-radius: 6px; background: rgba(255,255,255,.92); color: var(--ink); font-size: .75rem; line-height: 1.4; }
.sd-panel-body { padding: 1.4rem 1.5rem 1.5rem; }
.sd-panel h3 { margin: .75rem 0 .25rem; font-size: 2rem; line-height: 1.05; }
.sd-panel [data-summary] { margin: 0 0 .4rem; color: var(--ink-soft); font-size: .9rem; }
.sd-panel-price { margin: .4rem 0 0; font: 600 2rem/1.1 var(--serif); font-variant-numeric: lining-nums; }
.sd-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; margin: 1.25rem 0 0; padding: 1.1rem 0 0; border-top: 1px solid var(--line); }
.sd-facts > div { margin: 0; padding: 0; border: 0; }
.sd-facts dt { color: var(--ink-soft); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sd-facts dd { margin: .2rem 0 0; font-size: .95rem; font-weight: 500; }
.sd-panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.4rem; }
.sd-panel-actions .button { width: 100%; }
/* One main button; the secondary actions read as the brand's text links beneath it. */
.sd-panel .sd-panel-actions [data-details],
.sd-panel .sd-panel-actions [data-brochure] { width: auto; min-height: 0; padding: 0 0 .2rem; border: 0; border-bottom: 1px solid currentColor; border-radius: 0; background: none; color: var(--forest); font-size: .75rem; letter-spacing: .12em; }
.sd-panel .sd-panel-actions [data-details]:hover,
.sd-panel .sd-panel-actions [data-brochure]:hover { border-color: currentColor; background: none; color: var(--ink); transform: none; }
.sd-panel-actions [data-details]::after { content: " →"; }
.sd-mobile-selection { display: none; }
.sd-no-plots { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(280px,1fr); gap: 1.5rem; align-items: start; }
.sd-no-plots .sd-panel { position: static; padding: 1.5rem; }
.sd-no-plots h3 { margin-top: 0; }
.sd-no-plots p { color: var(--ink-soft); }
.sd-editor-note { margin-top: 1rem; padding: 1rem; border-left: 3px solid var(--gold); background: var(--cream); font-size: .875rem; }

/* Dialogs: selected home on phones, and the viewing request */
.sd-plot-sheet,
.sd-viewing-dialog { padding: 0; border: 0; border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(13,26,17,.4); }
.sd-plot-sheet::backdrop,
.sd-viewing-dialog::backdrop { background: rgba(19,31,26,.66); backdrop-filter: blur(2px); }
.sd-plot-sheet { width: min(520px,calc(100% - 24px)); max-height: 90dvh; }
.sd-plot-sheet > .button { margin: .75rem 1rem; }
.sd-plot-sheet .sd-panel { position: static; display: block; border: 0; border-radius: 0; box-shadow: none; }
.sd-viewing-dialog { width: min(640px,calc(100% - 32px)); max-height: min(860px,calc(100dvh - 32px)); }
.sd-request-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.6rem 1.75rem .5rem; background: var(--forest); color: #fff; }
.sd-request-header h2 { max-width: none; margin: 0; color: #fff; font-size: clamp(1.9rem,4vw,2.4rem); line-height: 1.05; }
.sd-request-header [data-request-close] { flex: none; border-color: rgba(255,255,255,.5); background: transparent; color: #fff; }
.sd-request-header [data-request-close]:hover { background: rgba(255,255,255,.12); }
.sd-viewing-dialog [data-request-plot] { margin: 0; padding: 0 1.75rem 1.4rem; background: var(--forest); color: rgba(255,255,255,.8); font-size: .875rem; }
.sd-viewing-dialog .sd-form { display: block; margin: 0; padding: 1.5rem 1.75rem 1.75rem; }
.sd-viewing-dialog .sd-form label { margin: 0 0 1rem; }
.sd-viewing-dialog .sd-form > div > .button { margin: .25rem .5rem .75rem 0; }
.sd-request-review { margin: 0 0 1rem; padding: .8rem 1rem; border-radius: var(--radius-sm); background: var(--cream); font-size: .9rem; }

/* Forms on these pages */
.sd-form { display: grid; gap: 1rem; margin: 0; }
.sd-form label { display: grid; gap: .4rem; color: var(--ink); font-size: .875rem; font-weight: 600; }
.sd-form input,
.sd-form select,
.sd-form textarea { width: 100%; min-height: 48px; padding: .7rem .85rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font: 400 1rem var(--sans); }
.sd-form p { color: var(--ink-soft); font-size: .875rem; }
.sd-form .sd-submit { justify-self: start; }

/* Property page */
.sd-property { padding-block: clamp(2rem,4vw,3.5rem) clamp(3rem,6vw,5rem); }
.sd-property > .sd-route-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.sd-property [data-copy-result] { min-height: 1.4em; margin: .5rem 0 0; color: var(--ink-soft); font-size: .875rem; }
.sd-property-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(320px,1fr); gap: clamp(1.5rem,3vw,2.5rem); align-items: start; margin-top: .75rem; }
.sd-property-image { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.sd-property-layout > div:first-child > .sd-property-image { border-top-left-radius: clamp(3rem,6vw,5rem); }
.sd-property-copy h1 { max-width: none; margin: .8rem 0 .4rem; font-size: clamp(2.6rem,4.5vw,3.8rem); line-height: 1; }
.sd-property-copy > p { color: var(--ink-soft); }
.sd-property-price { margin: .25rem 0 1.25rem; color: var(--ink) !important; font: 600 2.4rem/1 var(--serif); font-variant-numeric: lining-nums; }
.sd-property-actions { display: grid; gap: .6rem; }
.sd-detail-section { margin-top: 1.5rem; padding: clamp(1.25rem,2.5vw,1.75rem); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.sd-detail-section h2 { max-width: none; margin: 0 0 1rem; font-size: clamp(1.8rem,2.6vw,2.3rem); line-height: 1.05; }
.sd-detail-section p,
.sd-detail-section li { font-size: .95rem; }
.sd-detail-section .sd-facts { margin-top: 1rem; }
.sd-floorplan-image { display: block; width: 100%; height: auto; margin: 0 0 1rem; background: none; }
.sd-floorplan-pdf { display: block; width: 100%; height: 720px; max-height: 80vh; margin: 0 0 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }

/* Downloads */
/* Each download is as wide as its label, so the label always sits on one line; the row wraps instead. */
.sd-downloads { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.sd-downloads li { flex: 0 1 auto; min-width: 0; max-width: 100%; margin: 0 !important; }
.sd-download { display: flex; align-items: center; gap: .75rem; min-height: 56px; padding: .8rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--forest); font-size: .9rem; font-weight: 600; white-space: nowrap; text-decoration: none !important; transition: border-color .2s ease, background .2s ease; }
.sd-download .sd-file-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sd-download::before { content: ""; flex: none; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--download-icon) center/contain no-repeat; mask: var(--download-icon) center/contain no-repeat; }
.sd-download:hover { border-color: var(--forest); background: var(--cream); }
.sd-download .sd-file-meta { margin-left: auto; white-space: nowrap; }
.dev-downloads { padding-bottom: clamp(3rem,6vw,5rem); background: var(--paper); }
.dev-downloads h2 { margin: 0 0 1.25rem; font-size: clamp(2rem,3vw,2.8rem); }

/* Supporting content */
.dev-content { padding-block: clamp(3rem,6vw,5rem); background: var(--cream); }
.dev-content h2 { max-width: none; font-size: clamp(2.3rem,4vw,3.6rem); }
.dev-content .entry-content { max-width: 900px; }
.dev-content .wp-block-image img { height: auto; }

/* Plan view on desktop: the selected-home card and the plan viewer share one height, top and bottom.
   The row takes the taller of the viewer and the card's minimum (a 150px photo plus its details); then the photo grows,
   or the viewer gains space around the plan, to fill it. The list view keeps the sticky, content-height card.
   Below 1101px the card would dwarf the plan, so the plan goes full width and details open in the sheet. */
@media (min-width: 1101px) {
  .sd-finder[data-view=plan] .sd-grid { align-items: stretch; }
  .sd-finder[data-view=plan] .sd-grid > div { display: flex; flex-direction: column; }
  .sd-finder[data-view=plan] .sd-map { display: flex; flex: 1 1 auto; flex-direction: column; }
  .sd-finder[data-view=plan] .sd-map-scroll { display: flex; flex: 1 1 auto; flex-direction: column; }
  .sd-finder[data-view=plan] .sd-map-canvas { flex: none; margin-block: auto; }
  .sd-finder[data-view=plan] .sd-grid > .sd-panel { position: relative; top: auto; display: flex; flex-direction: column; align-self: stretch; }
  .sd-finder[data-view=plan] .sd-grid > .sd-panel .sd-panel-picture { flex: 1 1 150px; min-height: 150px; aspect-ratio: auto; }
}
@media (max-width: 1100px) {
  .sd-grid { grid-template-columns: minmax(0,1fr); }
  .sd-grid > .sd-panel { display: none; }
  .sd-mobile-selection:not([hidden]) { position: sticky; bottom: 12px; z-index: 8; display: flex; justify-content: center; width: 100%; margin-top: 1rem; border-color: var(--forest); background: var(--forest); color: #fff; font-size: .95rem; letter-spacing: 0; text-transform: none; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
  .sd-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sd-controls [data-reset] { justify-self: start; }
}
@media (max-width: 900px) {
  .dev-heading-grid { grid-template-columns: 1fr; gap: 2rem; }
  .sd-property-layout { grid-template-columns: 1fr; }
  .sd-property-copy { grid-row: 1; }
}
@media (max-width: 760px) {
  .sd-finder-header { flex-direction: column; align-items: flex-start; }
  .sd-filter-toggle { display: inline-flex; margin-bottom: .25rem; }
  .sd-finder:not(.is-filtering) .sd-controls { display: none; }
  .sd-controls { padding: 1rem; gap: .75rem; }
  .sd-map-scroll { height: 52dvh; max-height: none; }
  .sd-map-canvas { min-width: 640px; }
  .sd-map-tools { flex-wrap: wrap; }
  .sd-pin { width: 36px; height: 36px; }
  .sd-plot-row { grid-template-columns: 110px minmax(0,1fr); gap: .9rem; }
  .sd-plot-row > img { width: 110px; min-height: 130px; }
  .sd-row-info { padding-right: .9rem; }
  .sd-row-info h3 { font-size: 1.4rem; }
  .sd-plot-sheet,
  .sd-viewing-dialog { width: 100%; max-width: none; max-height: 92dvh; margin: auto 0 0; border-radius: var(--radius) var(--radius) 0 0; }
  .sd-request-header,
  .sd-viewing-dialog [data-request-plot],
  .sd-viewing-dialog .sd-form { padding-inline: 1.25rem; }
  .sd-no-plots { grid-template-columns: 1fr; }
  .sd-downloads li { flex-basis: 100%; }
  .dev-heading--photo { min-height: 0; border-bottom-right-radius: 3rem; }
  .dev-heading--photo::after { background: linear-gradient(0deg,rgba(19,31,26,.88),rgba(19,31,26,.55)); }
  .dev-links .button { flex: 1 1 100%; }
}
