/* حلم المنزل — component styles. Every value is a token from tokens.json; logical properties so RTL and LTR both work. */
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-text); font-size: 16px; line-height: 28px; -webkit-font-smoothing: antialiased; }
.dh-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; padding: var(--space-5); }
.dh-stack { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); }

/* Icon */
.dh-icon { flex: none; display: inline-block; vertical-align: middle; }
[dir="ltr"] .dh-icon-dir { transform: scaleX(-1); }

/* Button */
.dh-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); box-sizing: border-box; height: var(--control-md); padding: 0 var(--space-5); border: 1.5px solid transparent; border-radius: var(--radius-sm); font-family: var(--font-text); font-size: 15px; line-height: 20px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.dh-btn:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.dh-btn:disabled, .dh-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.dh-btn-sm { height: var(--control-sm); padding: 0 var(--space-4); font-size: 14px; }
.dh-btn-lg { height: var(--control-lg); padding: 0 var(--space-6); font-size: 16px; }
.dh-btn-block { display: flex; width: 100%; }
.dh-btn-primary { background: var(--brand); color: var(--on-brand); }
.dh-btn-primary:hover { background: var(--brand-strong); }
.dh-btn-secondary { background: var(--surface-raised); color: var(--brand); border-color: var(--line-strong); }
.dh-btn-secondary:hover { border-color: var(--brand); background: var(--brand-soft); }
.dh-btn-ghost { background: transparent; color: var(--brand); padding-inline: var(--space-3); }
.dh-btn-ghost:hover { background: var(--brand-soft); }
.dh-btn-inverse { background: var(--on-deep); color: var(--brand-deep); }
.dh-btn-inverse:hover { background: var(--sand); color: var(--on-sand); }

/* Badge */
.dh-badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 var(--space-2); border-radius: var(--radius-xs); font-family: var(--font-text); font-size: 12px; line-height: 18px; font-weight: 600; white-space: nowrap; background: var(--surface-sunken); color: var(--ink-muted); }
.dh-badge-dot { width: 6px; height: 6px; border-radius: var(--radius-full); background: currentColor; }
.dh-badge-available { background: var(--available-soft); color: var(--available); }
.dh-badge-reserved { background: var(--reserved-soft); color: var(--reserved); }
.dh-badge-sold { background: var(--sold-soft); color: var(--sold); }
.dh-badge-construction { background: var(--brand-soft); color: var(--brand); }
.dh-badge-featured { background: var(--sand-soft); color: var(--sand-ink); }
.dh-badge-solid { box-shadow: var(--shadow-sm); }

/* TextField */
.dh-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dh-field-label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.dh-field-box { display: flex; align-items: center; box-sizing: border-box; min-height: var(--control-md); background: var(--surface-raised); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); transition: border-color .15s ease; }
.dh-field-box:hover { border-color: var(--ink-muted); }
.dh-field-box:focus-within { border-color: var(--focus); box-shadow: var(--focus-ring); }
.dh-field-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 var(--space-4); height: 41px; font: inherit; font-size: 16px; color: var(--ink); }
textarea.dh-field-input { height: auto; min-height: 104px; padding: var(--space-3) var(--space-4); resize: vertical; line-height: 28px; }
.dh-field-input::placeholder { color: var(--ink-subtle); opacity: 1; }
.dh-field-suffix { padding-inline: var(--space-3) var(--space-4); font-size: 14px; color: var(--ink-muted); border-inline-start: 1px solid var(--line); align-self: stretch; display: flex; align-items: center; }
.dh-field-desc { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.dh-field.is-error .dh-field-box { border-color: var(--sold); }
.dh-field.is-error .dh-field-desc { color: var(--sold); }

/* SectionHeading */
.dh-heading { display: flex; flex-direction: column; gap: var(--space-2); max-width: 720px; }
.dh-heading-center { align-items: center; text-align: center; margin-inline: auto; }
.dh-heading-eyebrow { margin: 0; display: inline-flex; align-items: center; gap: var(--space-2); font-size: 13px; line-height: 20px; font-weight: 600; letter-spacing: .02em; color: var(--sand-ink); }
.dh-heading-eyebrow::before { content: ""; width: 16px; height: 8px; background: var(--sand); clip-path: polygon(0 100%, 50% 0, 100% 100%); }
.dh-heading-title { margin: 0; font-family: var(--font-display); font-size: 32px; line-height: 46px; font-weight: 600; color: var(--ink); }
.dh-heading-lead { margin: 0; font-size: 18px; line-height: 32px; color: var(--ink-muted); }

/* PropertyCard — the roof corner sits at the top-start corner */
.dh-pcard { display: flex; flex-direction: column; overflow: hidden; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); border-start-start-radius: var(--radius-roof); box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease; }
.dh-pcard:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.dh-pcard-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-sunken); }
.dh-pcard-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.dh-pcard-status { position: absolute; inset-block-start: var(--space-3); inset-inline-end: var(--space-3); }
.dh-pcard-body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5) var(--space-5) var(--space-4); }
.dh-pcard-title { margin: 0; font-family: var(--font-display); font-size: 19px; line-height: 30px; font-weight: 600; color: var(--ink); }
.dh-pcard-title a { color: inherit; text-decoration: none; }
.dh-pcard-title a:hover { color: var(--brand); }
.dh-pcard-title a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-xs); }
.dh-pcard-loc { margin: 0; display: flex; align-items: center; gap: var(--space-1); font-size: 14px; line-height: 24px; color: var(--ink-muted); }
.dh-pcard-specs { list-style: none; margin: var(--space-2) 0 0; padding: var(--space-3) 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: 14px; line-height: 24px; color: var(--ink); }
.dh-pcard-specs li { display: inline-flex; align-items: center; gap: 6px; }
.dh-pcard-specs .dh-icon { color: var(--brand); }
.dh-pcard-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); background: var(--surface-sunken); }
.dh-pcard-pricebox { display: flex; flex-direction: column; min-width: 0; flex: none; }
.dh-pcard-pricenote { font-size: 12px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }
.dh-pcard-price { white-space: nowrap; font-family: var(--font-display); font-size: 22px; line-height: 30px; font-weight: 700; color: var(--ink); }

/* StatBand — the parapet: brand-deep triangles crown the band */
.dh-statband { position: relative; margin-top: 8px; background: var(--brand-deep); color: var(--on-deep); border-radius: 0 0 var(--radius-md) var(--radius-md); }
.dh-statband-edge { position: absolute; inset-inline: 0; top: -8px; height: 8px; background: conic-gradient(from 135deg at 50% 0, var(--brand-deep) 90deg, transparent 0) 0 0 / 16px 8px repeat-x; }
.dh-statband-list { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-5); padding: var(--space-7) var(--space-6); }
.dh-stat { display: flex; flex-direction: column-reverse; align-items: center; gap: var(--space-1); text-align: center; }
.dh-stat + .dh-stat { border-inline-start: 1px solid color-mix(in srgb, var(--on-deep) 18%, transparent); }
.dh-stat-value { margin: 0; font-family: var(--font-display); font-size: 44px; line-height: 52px; font-weight: 700; color: var(--on-deep); direction: ltr; unicode-bidi: isolate; }
.dh-stat-label { font-size: 14px; line-height: 22px; font-weight: 500; color: var(--on-deep-muted); }

/* BuildProgress */
.dh-progress { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); }
.dh-progress-head { display: flex; justify-content: space-between; align-items: baseline; }
.dh-progress-title { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); }
.dh-progress-pct { font-family: var(--font-display); font-size: 22px; line-height: 30px; font-weight: 700; color: var(--brand); }
.dh-progress-track { height: 10px; border-radius: var(--radius-full); background: var(--brand-soft); overflow: hidden; }
.dh-progress-fill { height: 100%; border-radius: var(--radius-full); background: var(--brand); }
.dh-progress-stages { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--space-3); }
.dh-stage { display: flex; align-items: center; gap: var(--space-2); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.dh-stage-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--radius-full); border: 1.5px solid var(--line-strong); font-size: 12px; font-weight: 600; color: var(--ink-muted); box-sizing: border-box; }
.dh-stage.is-done { color: var(--ink); }
.dh-stage.is-done .dh-stage-mark { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.dh-stage.is-now { color: var(--ink); font-weight: 600; }
.dh-stage.is-now .dh-stage-mark { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.dh-progress-note { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
