/* Markham, Vaughan, Richmond Hill. Layout only. Tokens and the locked form stay in fx.css and home.css. */

body.nx-page {
  background: #f5f1ea;
  color: #1c1a17;
  overflow-x: clip;
  scrollbar-color: #766e64 #f5f1ea;
}

body.nx-page::-webkit-scrollbar { width: 10px; height: 10px; }
body.nx-page::-webkit-scrollbar-thumb { background: #766e64; border-radius: 0; }
body.nx-page::-webkit-scrollbar-track { background: #f5f1ea; }

.nx-page h1 {
  font-family: var(--fx-serif);
  font-weight: 300;
  font-synthesis: none;
  letter-spacing: -0.02em;
  line-height: 1.02;
  text-wrap: wrap;
  margin: 0;
  max-width: min(14ch, 100%);
  overflow-wrap: break-word;
  font-size: clamp(38px, 5vw, 76px);
}

.nx-page .fx-grid,
.nx-page .nx-frame,
.nx-page .nx-places,
.nx-page .nx-stairs__object { min-width: 0; }

.nx-page .ft-consent-banner { max-width: 100%; overflow-x: clip; }
.nx-page .ft-consent-banner__inner > * { min-width: 0; max-width: 100%; }
.nx-page .ft-consent-banner__text { overflow-wrap: anywhere; }
.nx-page .ft-consent-banner__actions { max-width: 100%; }

.nx-page h1 em {
  font-style: italic;
  font-weight: 300;
}

.nx-page #lead-form { scroll-margin-top: 88px; }

.nx-page a:focus-visible,
.nx-page summary:focus-visible {
  outline: 2px solid var(--fx-oak);
  outline-offset: 4px;
}

.nx-page .fx-acc { margin-top: 48px; }

.nx-page .fx-acc summary span {
  min-width: 0;
  overflow-wrap: break-word;
}

.nx-fact {
  margin: 22px 0 0;
  max-width: 62ch;
  color: var(--fx-ink);
}

.nx-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin: 36px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--fx-line);
}

.nx-links a { overflow-wrap: anywhere; }

.nx-frame .fx-frame { aspect-ratio: 1; }

.nx-frame .fx-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 78%;
}

.nx-frame {
  display: grid;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.nx-frame p {
  margin: 0;
  max-width: 36ch;
  color: var(--fx-ink-soft);
  overflow-wrap: break-word;
}

/* Markham: places, then the floor. No photograph in the open. */

.nx-open { padding-bottom: clamp(64px, 8vw, 96px); }

.nx-places {
  list-style: none;
  display: grid;
  margin: 36px 0 0;
  padding: 0;
  border-top: 1px solid var(--fx-line);
}

.nx-places li {
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--fx-line);
  font-family: var(--fx-serif);
  font-weight: 300;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

.nx-open .fx-lead { margin-top: 28px; }

.nx-open h2 { margin-top: 48px; max-width: 14ch; }

.nx-floor {
  background: var(--fx-paper);
  padding: var(--fx-section) 0;
  border-top: 1px solid var(--fx-line);
}

.nx-pair {
  display: grid;
  gap: 36px 18px;
  margin-top: 28px;
}

.nx-pair h3 {
  margin: 0;
  max-width: 18ch;
  overflow-wrap: break-word;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.15;
}

/* Vaughan: the photograph is the viewport. The exception is a short band. */

.nx-house { margin-top: 80px; }

.nx-house__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: calc(100svh - 80px);
  background: var(--fx-sand);
  overflow: hidden;
}

.nx-house__photo {
  position: absolute;
  inset: 0;
}

.nx-house__photo picture,
.nx-house__photo img {
  display: block;
  width: 100%;
  height: 100%;
}

.nx-house__photo img {
  object-fit: cover;
  object-position: center 72%;
}

.nx-house__shade {
  position: relative;
  z-index: 1;
  pointer-events: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: clamp(72px, 16vh, 160px) clamp(20px, 5vw, 80px) 40px;
  background: linear-gradient(to top, rgb(28 26 23 / 86%) 0%, rgb(28 26 23 / 55%) 46%, transparent 100%);
  color: var(--fx-linen);
}

.nx-house__shade a,
.nx-house__shade .fx-btn { pointer-events: auto; }

.nx-house__shade h1 { color: var(--fx-linen); }

.nx-house__shade .fx-install-crumb,
.nx-house__shade .fx-install-crumb a { color: var(--fx-stone-light); }

.nx-house__shade .fx-install-crumb a:hover { color: var(--fx-linen); }

.nx-house__shade .fx-grid {
  width: 100%;
  max-width: 1440px;
  min-width: 0;
  margin-inline: auto;
}

.nx-house__shade .fx-link { display: inline; white-space: normal; }

.nx-house__shade .fx-lead,
.nx-house__shade .fx-body {
  color: var(--fx-stone-light);
  max-width: min(40rem, 100%);
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (max-width: 799px) {
  .nx-house__shade .fx-lead,
  .nx-house__shade .fx-body {
    max-width: 16rem;
  }
}

.nx-house__shade .fx-area-actions,
.nx-open .fx-area-actions,
.nx-stairs .fx-area-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.nx-exception {
  background: var(--fx-paper);
  padding: clamp(64px, 8vw, 112px) 0;
  border-top: 1px solid var(--fx-line);
}

.nx-exception h2 { max-width: 16ch; }

.nx-exception .fx-body { margin-top: 22px; }

/* Richmond Hill: stair names and the floor are one object. */

.nx-stairs { padding-bottom: clamp(64px, 8vw, 96px); }

.nx-stairs .fx-frame img { object-position: center 70%; }

.nx-stairs__object {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.nx-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--fx-line);
}

.nx-rail li {
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--fx-line);
  font-family: var(--fx-serif);
  font-weight: 300;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

.nx-stairs__caption { margin: 0; max-width: 62ch; }

@media (max-width: 799px) {
  .nx-house { margin-top: 64px; }
  .nx-house__stage { min-height: calc(100svh - 64px); }
  .nx-stairs.fx-install-open { padding-top: calc(64px + 20px); }
  .nx-rail li { padding: 8px 0; }
}

@media (min-width: 800px) {
  .nx-places { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nx-places li { border-bottom: 0; padding: 22px 24px 8px 0; }
  .nx-places li + li {
    border-left: 1px solid var(--fx-line);
    padding-left: 24px;
  }

  .nx-stairs__object {
    grid-template-columns: minmax(0, 0.34fr) minmax(0, 1fr);
    column-gap: 36px;
    align-items: start;
  }

  .nx-rail { border-top: 0; }
  .nx-rail li:first-child { border-top: 1px solid var(--fx-line); }
  .nx-stairs__caption { grid-column: 2; }

  .nx-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  body.nx-page.has-bar { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .nx-page .fx-acc summary::after { transition: none; }
}
