/* Home page rental search, refined (Nov 2026).
   Loaded only by public/index.html, after styles.css, mobile.css and
   landing.css, so nothing else on the site changes.
   Principles: photographs lead; one quiet search bar; one control height
   (40px) and one radius family (10px controls, 14px panels and photos);
   small hover movements only; no fades on scroll; navy is the only accent. */


/* ---------- the search band ---------- */
.searchband { box-shadow: 0 1px 0 rgba(16, 45, 78, .02), 0 8px 24px -18px rgba(16, 45, 78, .25); }
.searchband .wrap { padding-block: 16px 14px; }
.field > label { font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--ink-2); font-weight: 500; }
.field > select, .datebtn { border-radius: 10px; font-size: 14.5px; }
.field > select:hover { border-color: var(--ink-3); }
.sform .btn { border-radius: 10px; transition: filter .15s ease, transform .1s ease; }
.sform .btn:active { transform: scale(.98); }

/* Desktop: the five questions sit in one bar, divided by hairlines, with
   Search at its end. Same fields and same behaviour, less box clutter. */
@media (min-width: 1001px) {
  .sform {
    gap: 0; align-items: stretch; background: var(--surface);
    border: 1px solid var(--line); border-radius: 14px; padding: 6px;
    box-shadow: 0 1px 2px rgba(16, 45, 78, .04);
    transition: border-color .15s ease, box-shadow .15s ease;
  }
  .sform:hover { border-color: #C9D4DF; }
  .sform:focus-within { border-color: #B8C6D4; box-shadow: 0 6px 22px -10px rgba(16, 45, 78, .22); }
  .sform .field { gap: 1px; padding: 6px 14px 4px; border-radius: 9px; position: relative; justify-content: center; transition: background .15s ease; }
  .sform .field:not(.go):hover { background: var(--ground); }
  .sform .field + .field:not(.go)::before {
    content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px; background: var(--line);
  }
  .sform .field:hover::before, .sform .field:hover + .field::before { opacity: 0; }
  .sform .field > select, .sform .datebtn {
    border: 0; background: transparent; padding: 2px 0; border-radius: 0; font-size: 14.5px; cursor: pointer;
  }
  .sform .field > select { padding-right: 18px; }
  .sform .datebtn[aria-expanded="true"] { box-shadow: none; }
  .sform .field.dates:has(.datebtn[aria-expanded="true"]) { background: var(--ground); }
  .sform .field.go { padding: 0 0 0 8px; justify-content: stretch; }
  .sform .btn { height: 100%; min-height: 48px; padding-inline: 26px; font-size: 14.5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
}

/* Feature chips: same height as the other small controls. */
.chips { gap: 8px; margin-top: 12px; }
.chip { height: 34px; padding: 0 14px; font-size: 13px; transition: border-color .15s ease, background .15s ease, color .15s ease, transform .1s ease; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"]:hover { color: var(--navy-ink); }

/* ---------- results heading and tools ---------- */
.resbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; padding-block: 34px 22px; }
.restitle { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.resbar h1 { font-family: var(--serif, 'Cormorant Garamond', Georgia, serif); font-weight: 600; font-size: clamp(28px, 2.6vw, 36px); line-height: 1.1; letter-spacing: -.005em; color: var(--ink); }
.rescount { font-size: 14px; }
.restools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.restools .hfind { padding: 0; display: block; }
.restools .hfbox { position: relative; width: 300px; max-width: none; flex: none; }
.restools .hfico { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.restools .hfbox input { height: 40px; padding: 0 14px 0 38px; font-size: 14.5px; border-radius: 999px; transition: border-color .15s ease; }
.restools .hfbox input:hover { border-color: var(--ink-3); }
.restools .hfbox input:focus { outline: 0; border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.restools .hfsug { border-radius: 14px; min-width: 300px; }
.mapbtn, .savedbtn { height: 40px; padding: 0 16px; font-size: 13.5px; color: var(--ink); transition: border-color .15s ease, background .15s ease, transform .1s ease; }
.mapbtn:active, .savedbtn:active { transform: scale(.97); }
.mapbtn[aria-pressed="true"] { color: var(--navy-ink); }
.sortwrap { display: inline-flex; align-items: center; gap: 8px; }
.sortwrap label { font-size: 13.5px; color: var(--ink-2); }
.sortsel { height: 40px; padding: 0 12px; font-size: 13.5px; border-radius: 999px; cursor: pointer; }
.sortsel:hover { border-color: var(--ink-3); }

/* ---------- cards ---------- */
.grid { gap: 38px 24px; }
.card .photo { border-radius: 14px; background: var(--surface-2); }
.card .photo img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.card:hover .photo img { transform: scale(1.025); }
.card .photo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(16, 45, 78, .06); pointer-events: none; z-index: 1; }
.card .cbody { padding-top: 12px; gap: 2px; }
.card .cbody .addr { font-size: 15.5px; letter-spacing: -.005em; }
.card .cbody .rate { margin-top: 8px; font-size: 15.5px; }
.card .cbody:hover .addr { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: rgba(22, 33, 46, .35); }
.card .cbody:focus-visible { outline: 0; }
.card .cbody:focus-visible .addr { text-decoration: underline; text-underline-offset: 3px; }
.card:has(.cbody:focus-visible) .photo { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--navy); }
/* No photographs yet: a calm, flat frame, not a shouted line of capitals. */
.card .nophoto { font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--ink-3); background: var(--surface-2); }
.skel { border: 0; background: transparent; }
.skel .photo { border-radius: 14px; }
.skel .cbody { padding: 12px 2px 0; }

/* ---------- tablets ---------- */
/* Two rows instead of four, so the sticky band leaves room for the homes. */
@media (min-width: 761px) and (max-width: 1000px) {
  .sform { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .sform .dates { grid-column: span 2; }
  .sform .go { grid-column: span 2; align-self: end; }
  .sform .go .btn { width: 100%; min-height: 41px; }
}
@media (max-width: 1000px) {
  .restools { width: 100%; }
  .restools .hfind { flex: 1 1 260px; }
  .restools .hfbox { width: 100%; }
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .resbar { padding-block: 20px 14px; gap: 12px; align-items: stretch; flex-direction: column; }
  .resbar h1 { font-size: 26px; flex-basis: auto; }
  .rescount { font-size: 13px; }
  .restools { gap: 10px; }
  .restools .hfind { flex: 1 1 100%; }
  .restools .hfbox input { font-size: 16px; height: 44px; }
  .restools .hfsug { min-width: 0; }
  .sortwrap { margin-left: auto; }
  .sortsel { font-size: 14px; }
  .grid { gap: 30px; }
}

/* ---------- Web Interface Guidelines pass (Nov 2026) ---------- */
/* Keyboard users: a focused card or control never lands under the sticky
   header and search bar. */
html { scroll-padding-top: calc(var(--sticky, 182px) + 16px); }
/* No double-tap zoom delay on taps; no grey flash on iPhone. */
a, button, select, summary, label, .chip, .card { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* The phone search sheet scrolls on its own, without dragging the page. */
body.msopen .searchband { overscroll-behavior: contain; }
.hero-title, .rh2, .browse h2 { text-wrap: balance; }
.hfsug li a span, .card .cbody .addr { overflow-wrap: anywhere; }

/* Live data failed: the plain list of every home stays usable (search.js). */
.builtlist { text-align: left; padding: 18px 20px; margin-top: 14px; }
.builtlist ul { margin: 8px 0 0; padding-left: 18px; columns: 2 320px; column-gap: 28px; font-size: 14px; line-height: 1.6; }
.builtlist li { break-inside: avoid; margin: 0 0 4px; }
