/* ============================================================================
   Iteration 35 — one-screen listing page ("apartment.html?route=…")
   The whole residence on one screen: a photo collage on the left (every
   photo reachable through the lightbox), and the identity — title, facts,
   rent, the standard inquiry form — on the right. Monochrome ink/white per
   the system; the listing's own photography carries all the colour.
   The header is forced solid on this page (body[data-header="solid"]).
   ========================================================================== */

/* ---- Stage: split viewport ---------------------------------------------- */
.apt-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(400px, 540px);
  min-height: calc(100svh - var(--header-h));
  margin-top: var(--header-h);
  background: #fff;
}
.apt-stage[hidden] { display: none; }
/* No photos at all → the panel carries the page alone. */
.apt-stage:has(.apt-collage__grid[data-n="0"]) { grid-template-columns: 1fr; }
.apt-stage:has(.apt-collage__grid[data-n="0"]) .apt-collage { display: none; }

/* ---- Photo aside — one photo at a time, prev/next arrows (live parity) --- */
.apt-collage {
  position: sticky; top: var(--header-h); align-self: start;
  height: calc(100svh - var(--header-h));
  background: var(--ink); overflow: hidden;
}
.apt-collage__grid {
  display: grid; width: 100%; height: 100%;
  grid-template-columns: 1fr;
}

.apt-tile {
  position: relative; overflow: hidden;
  margin: 0; padding: 0; border: 0;
  background: var(--ink); cursor: zoom-in;
  min-height: 0; /* let the grid rows own the height */
}
.apt-tile img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s var(--ease);
}
.apt-tile:hover img, .apt-tile:focus-visible img { transform: scale(1.04); }
.apt-tile:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }

/* Prev/next arrows over the photo — same manners as the lightbox nav */
.apt-ph__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .44); border-radius: 50%;
  background: rgba(10, 10, 13, .4); color: #fff; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.apt-ph__nav[hidden] { display: none; }
.apt-ph__nav:hover, .apt-ph__nav:focus-visible { background: #fff; color: var(--ink); }
.apt-ph__nav:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.apt-ph__prev { left: 18px; }
.apt-ph__next { right: 18px; }

.apt-viewall {
  position: absolute; right: 16px; bottom: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 16px;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  font-family: var(--ff-normal); font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.apt-viewall:hover, .apt-viewall:focus-visible { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---- Panel — identity + inquiry ------------------------------------------ */
.apt-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(var(--s-5), 3.5vh, var(--s-7)) clamp(var(--s-5), 3vw, var(--s-8));
  border-left: 1px solid var(--line);
}
.apt-title {
  font-size: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem);
  line-height: 1.05; letter-spacing: -0.01em;
  margin: 0 0 var(--s-2);
}
/* Vertical unit facts — one labeled line each (Address / Lease Term /
   Asking Rent / Furnished), live-site parity per 2026-07-17 feedback. */
.apt-facts {
  list-style: none;
  margin: 0 0 var(--s-4);
  display: flex; flex-direction: column; gap: 7px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: var(--s-3) 0;
  font-size: .95rem; line-height: 1.5; color: var(--ink-soft);
}
.apt-facts b { color: var(--ink); font-weight: 600; }
/* Video tour / apply-now — quiet ghost actions beside the rent */
.apt-actions { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); margin: 0 0 var(--s-4); }
.apt-action {
  display: inline-block; padding: .6em 1.1em;
  font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); border: 1px solid var(--line-2);
  transition: border-color .25s var(--ease);
}
.apt-action:hover, .apt-action:focus-visible { border-color: var(--ink); }

/* Video tour — the home page's YouTube-red "aura" button, panel-sized:
   white centre framed by a red gradient ring, red halo that blooms on hover.
   Brand colour is the owner-sanctioned exception to the B&W system. */
.apt-action--yt {
  display: inline-flex; align-items: center; gap: .6em;
  border: 2px solid transparent;
  border-radius: var(--radius, 6px);
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #FF6A5F 0%, #FF0000 55%, #C4160F 100%) border-box;
  box-shadow: 0 8px 26px -13px rgba(255, 0, 0, .42);
  transition: transform .28s var(--ease), box-shadow .32s var(--ease);
}
.apt-action--yt:hover, .apt-action--yt:focus-visible {
  border-color: transparent;              /* keep the gradient ring */
  transform: translateY(-3px);
  box-shadow: 0 15px 40px -10px rgba(255, 0, 0, .62);
}
.apt-action--yt svg { width: 24px; height: auto; display: block; border-radius: 5px; }
@media (prefers-reduced-motion: reduce) {
  .apt-action--yt { transition: none; }
  .apt-action--yt:hover, .apt-action--yt:focus-visible { transform: none; }
}

/* Unit / building features — her live-site notes, rendered legibly */
.apt-features { margin: 0 0 var(--s-4); }
.apt-features__block + .apt-features__block { margin-top: var(--s-4); }
.apt-features__h {
  margin: 0 0 var(--s-2);
  font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.apt-features__lede { margin: 0 0 var(--s-3); font-size: .95rem; line-height: 1.55; color: var(--ink); }
/* Single vertical column, one feature per line (live parity) */
.apt-features__list {
  list-style: none; margin: 0; padding: 0;
  font-size: .88rem; line-height: 1.55; color: var(--ink-soft);
}
.apt-features__list li { position: relative; padding-left: 1em; margin-bottom: .4em; }
.apt-features__list li::before { content: ""; position: absolute; left: 0; top: .72em; width: .4em; height: 1px; background: var(--ink); }

/* The standard form, compacted for the one-screen panel */
.apt-form .form-grid { gap: 0 var(--s-4); }
.apt-form .field { margin-bottom: var(--s-4); }
.apt-form .field input { min-height: 46px; padding: 10px 14px; }
.apt-panel .field__error { color: #b42318; } /* legible on white (the shared tint is for ink sections) */

.apt-foot {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-5);
  margin: var(--s-4) 0 0;
  font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.apt-back {
  color: var(--ink); border-bottom: 1px solid var(--line-2);
  transition: border-color .25s var(--ease);
}
.apt-back:hover, .apt-back:focus-visible { border-color: var(--ink); }
.apt-contactline { margin: var(--s-3) 0 0; font-size: .9rem; color: var(--muted); }
.apt-contactline a { color: var(--ink); font-weight: 600; }

/* ---- Lightbox — every photo, one at a time ------------------------------- */
.apt-lb {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 56px);
  background: rgba(10, 10, 13, .95);
}
.apt-lb[hidden] { display: none; }
body.apt-lb-open { overflow: hidden; }
.apt-lb__stage {
  margin: 0; max-width: min(1280px, 100%); max-height: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.apt-lb__stage img {
  max-width: 100%; max-height: calc(100svh - 140px);
  object-fit: contain; display: block; background: #000;
}
.apt-lb__count {
  color: rgba(255, 255, 255, .78);
  font-size: .78rem; font-weight: 600; letter-spacing: .18em;
}
.apt-lb__close, .apt-lb__nav {
  position: absolute; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .44); border-radius: 50%;
  background: rgba(10, 10, 13, .4); color: #fff; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.apt-lb__close:hover, .apt-lb__nav:hover,
.apt-lb__close:focus-visible, .apt-lb__nav:focus-visible { background: #fff; color: var(--ink); }
.apt-lb__close:focus-visible, .apt-lb__nav:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.apt-lb__close { top: 20px; right: 20px; }
.apt-lb__prev { left: 18px; top: 50%; transform: translateY(-50%); }
.apt-lb__next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---- Not-found (fail-soft) ----------------------------------------------- */
.apt-notfound { padding-top: calc(var(--header-h) + clamp(var(--s-7), 8vh, var(--s-9))); }
.apt-notfound__actions { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-6); }

/* ---- Stacked layout ------------------------------------------------------ */
@media (max-width: 960px) {
  .apt-stage { display: block; min-height: 0; }
  .apt-collage { position: static; height: clamp(300px, 62vw, 540px); }
  .apt-panel { border-left: 0; padding: var(--s-6) var(--s-5) var(--s-7); }
  .apt-lb__close { top: 12px; right: 12px; }
  .apt-lb__prev { left: 8px; } .apt-lb__next { right: 8px; }
  .apt-lb__nav, .apt-lb__close { width: 44px; height: 44px; }
  .apt-lb__stage img { max-height: calc(100svh - 110px); }
}

/* ---- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .apt-tile img { transition: none; }
  .apt-tile:hover img, .apt-tile:focus-visible img { transform: none; }
  .apt-viewall, .apt-back, .apt-foot__links a, .apt-lb__close, .apt-lb__nav { transition: none; }
}

/* Touch (2026-09-27): sideways swipes on the photo and in the viewer are
   handled by apartment.js; vertical ones stay native page scrolls. */
.apt-tile, .apt-lb__stage { touch-action: pan-y; }
